quakeforge/libs/gamecode
Bill Currie 6d5e8922a5 [qfcc] Add a handle type for engine resources
I never liked the various hacks I had come up with for representing
resource handles in Ruamoko. Structs with an int were awkward to test,
pointers and ints could be modified, etc etc. The new @handle keyword (@
used to keep handle free for use) works just like struct, union and
enum in syntax, but creates an opaque type suitable for a 32-bit handle.
The backing type is a function so v6 progs can use it without (all the
necessary opcodes exist) and no modifications were needed for
type-checking in binary expressions, but only assignment and comparisons
are supported, and (of course) nil. Tested using cbuf_t and QFile: seems
to work as desired.

I had considered 64-bit handles, but really, if more than 4G resource
objects are needed, I'm not sure QF can handle the game. However, that
limit is per resource manager, not total.
2023-05-25 10:41:28 +09:00
..
test [gamecode] Support offset for lea on globals 2023-05-14 12:45:08 +09:00
convert.py Fix windows compile issues 2022-07-31 17:34:09 +09:00
extend.py [gamecode] Add an extend instruction 2022-08-18 18:18:19 +09:00
hops.py [gamecode] Add tests for the hops instructions 2022-01-16 18:46:29 +09:00
Makemodule.am [gamecode] Add an extend instruction 2022-08-18 18:18:19 +09:00
opcodes.py [gamecode] Support offset for lea on globals 2023-05-14 12:45:08 +09:00
pr_builtins.c [gamecode] Clean up a pile of memory leaks 2023-03-03 22:07:27 +09:00
pr_debug.c [qfcc] Add a handle type for engine resources 2023-05-25 10:41:28 +09:00
pr_edict.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
pr_exec.c [gamecode] Support offset for lea on globals 2023-05-14 12:45:08 +09:00
pr_load.c [gamecode] Clean up a pile of memory leaks 2023-03-03 22:07:27 +09:00
pr_opcode.c [gamecode] Create macros for progs sizeof and alignof 2022-01-23 14:29:33 +09:00
pr_parse.c [plist] Use reference counts for items 2023-03-13 11:26:13 +09:00
pr_resolve.c [gamecode] Use an explicit size for the null page 2022-02-01 16:43:29 +09:00
pr_resource.c [gamecode] Make modules responsible for freeing resources 2023-03-03 20:26:00 +09:00
pr_strings.c [gamecode] Yet more leaks 2023-03-05 18:31:30 +09:00
pr_v6p_opcode.c [qfcc] Support advanced progs again 2022-11-12 20:04:19 +09:00
pr_zone.c [gamecode] Conform with libc malloc for pr zone 2021-09-26 12:03:44 +09:00
swizzle.py [simd] Use portable swizzles 2022-03-31 02:25:33 +09:00