mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-15 01:11:27 +00:00
6d5e8922a5
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. |
||
---|---|---|
.. | ||
gl | ||
glsl | ||
sw | ||
vulkan | ||
crosshair.c | ||
font8x8.c | ||
Makemodule.am | ||
noisetextures.c | ||
r_alias.c | ||
r_billboard.c | ||
r_bsp.c | ||
r_cvar.c | ||
r_draw.c | ||
r_dyn_textures.c | ||
r_ent.c | ||
r_fog.c | ||
r_graph.c | ||
r_init.c | ||
r_iqm.c | ||
r_light.c | ||
r_main.c | ||
r_part.c | ||
r_progs.c | ||
r_scrap.c | ||
r_screen.c | ||
r_sprite.c | ||
vid_common.c | ||
vid_render_gl.c | ||
vid_render_glsl.c | ||
vid_render_sw.c | ||
vid_render_vulkan.c |