quakeforge/ruamoko/include
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
..
gui [libr] Treat ruamoko headers as system headers 2020-03-03 15:24:41 +09:00
Array.h [libr] Add a two-object Array perform method 2020-03-26 14:14:04 +09:00
AutoreleasePool.h [libr] Treat ruamoko headers as system headers 2020-03-03 15:24:41 +09:00
cbuf.h [qfcc] Add a handle type for engine resources 2023-05-25 10:41:28 +09:00
cmd.h Correct the spelling of "int" and clean up the mess. 2011-03-25 16:53:04 +09:00
crudefile.h Rualib: documentation updates. 2011-06-14 13:31:30 -04:00
cvar.h Rua: move the old cvar() and cvar_set() functions 2011-12-14 20:33:33 -05:00
debug.h [ruamoko] Fix several builtin declarations 2022-11-12 14:39:18 +09:00
draw.h [render] Add basic 2d line drawing 2022-08-27 17:29:15 +09:00
entities.h [ruamoko] Fix several builtin declarations 2022-11-12 14:39:18 +09:00
Entity.h [ruamoko] Clean up Entity a little 2021-12-30 13:26:36 +09:00
gib.h Correct the spelling of "int" and clean up the mess. 2011-03-25 16:53:04 +09:00
hash.h Fix ruamoko's hashtab_t typedef 2020-02-19 21:41:46 +09:00
infokey.h Switch to C-style function declarations. 2010-12-11 20:31:59 -05:00
input.h [ruamoko] Fix some misnamed parameters 2022-04-26 07:19:35 +09:00
key.h [libr] Treat ruamoko headers as system headers 2020-03-03 15:24:41 +09:00
legacy_string.h [ruamoko] Move some string functions 2020-03-25 00:04:20 +09:00
Makemodule.am [ruamoko] Allow entity model to be set 2022-05-04 17:38:38 +09:00
math.h [ruamoko] Add bindings for exp() 2021-06-19 11:23:51 +09:00
mersenne.h [ruamoko] Add bindings for Mercenne Twister 2021-12-24 06:45:13 +09:00
message.h [ruamoko] Fix several builtin declarations 2022-11-12 14:39:18 +09:00
msgbuf.h [libr] Treat ruamoko headers as system headers 2020-03-03 15:24:41 +09:00
nq_message.h Switch to C-style function declarations. 2010-12-11 20:31:59 -05:00
Object.h [libr] Add -performv:: 2020-03-10 14:29:43 +09:00
physics.h Rualib: documentation updates. 2011-06-14 13:31:30 -04:00
plist.h [plist] Use reference counts for items 2023-03-13 11:26:13 +09:00
PropertyList.h [plist] Use reference counts for items 2023-03-13 11:26:13 +09:00
Protocol.h [libr] Treat ruamoko headers as system headers 2020-03-03 15:24:41 +09:00
qfile.h [qfcc] Add a handle type for engine resources 2023-05-25 10:41:28 +09:00
qfs.h [libr] Treat ruamoko headers as system headers 2020-03-03 15:24:41 +09:00
qw_message.h [libr] Treat ruamoko headers as system headers 2020-03-03 15:24:41 +09:00
qw_physics.h Switch to C-style function declarations. 2010-12-11 20:31:59 -05:00
qw_sys.h Switch to C-style function declarations. 2010-12-11 20:31:59 -05:00
runtime.h [ruamoko] Support return values in message forwarding 2022-02-05 19:30:08 +09:00
scene.h [ruamoko] Add style parameter to Light_AddLight 2022-05-07 00:50:27 +09:00
script.h Correct the spelling of "int" and clean up the mess. 2011-03-25 16:53:04 +09:00
server.h [ruamoko] Fix several builtin declarations 2022-11-12 14:39:18 +09:00
Set.h [ruamoko] Correct SetIterator memory handling 2021-12-24 06:45:13 +09:00
sound.h Switch to C-style function declarations. 2010-12-11 20:31:59 -05:00
stdlib.h [ruamoko] Add some stdlib function wrappers 2021-06-01 18:53:53 +09:00
string.h [ruamoko] Add binding for str_upper 2021-01-05 18:24:18 +09:00
sv_sound.h Switch to C-style function declarations. 2010-12-11 20:31:59 -05:00
system.h [ruamoko] Fix several builtin declarations 2022-11-12 14:39:18 +09:00
types.h [qfcc] Add a handle type for engine resources 2023-05-25 10:41:28 +09:00