quakeforge/libs/video/renderer/sw
Bill Currie 12c84046f3 [cvar] Make cvars properly typed
This is an extremely extensive patch as it hits every cvar, and every
usage of the cvars. Cvars no longer store the value they control,
instead, they use a cexpr value object to reference the value and
specify the value's type (currently, a null type is used for strings).
Non-string cvars are passed through cexpr, allowing expressions in the
cvars' settings. Also, cvars have returned to an enhanced version of the
original (id quake) registration scheme.

As a minor benefit, relevant code having direct access to the
cvar-controlled variables is probably a slight optimization as it
removed a pointer dereference, and the variables can be located for data
locality.

The static cvar descriptors are made private as an additional safety
layer, though there's nothing stopping external modification via
Cvar_FindVar (which is needed for adding listeners).

While not used yet (partly due to working out the design), cvars can
have a validation function.

Registering a cvar allows a primary listener (and its data) to be
specified: it will always be called first when the cvar is modified. The
combination of proper listeners and direct access to the controlled
variable greatly simplifies the more complex cvar interactions as much
less null checking is required, and there's no need for one cvar's
callback to call another's.

nq-x11 is known to work at least well enough for the demos. More testing
will come.
2022-04-24 19:15:22 +09:00
..
d_copy.S Add GNU-stack notes to assembly files 2021-06-13 10:12:03 -04:00
d_draw.S [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_edge.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
d_fill.c Make vid.width/height unsigned and clean up the mess. 2013-01-24 12:36:14 +09:00
d_init.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
d_modech.c [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_part.c [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_parta.S [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_polysa.S [renderer] Abandon sw32 altogether 2022-03-09 21:36:15 +09:00
d_polyse.c [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_scan.c [renderer] Clean up post processing 2022-03-26 00:42:43 +09:00
d_scana.S [renderer] Abandon sw32 altogether 2022-03-09 21:36:15 +09:00
d_sky.c [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_spr8.S [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_sprite.c [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_surf.c [scene] Move entity_t etc into scene headers 2022-03-29 14:43:38 +09:00
d_vars.c [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_varsa.S [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
d_zpoint.c [sw] Rename d_pzbuffer to d_zbuffer 2022-03-21 23:12:22 +09:00
draw.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
fpu.c Massive whitespace cleanup. 2012-05-22 08:23:22 +09:00
fpua.S Add GNU-stack notes to assembly files 2021-06-13 10:12:03 -04:00
nonintel.c Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
surf8.S [sw] Clean up use of vid.colormap8 2022-03-29 14:43:38 +09:00
sw_fisheye.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
sw_graph.c [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
sw_raclip.c [sw] Clean up r_refdef and R_ViewChanged 2022-03-27 15:32:00 +09:00
sw_raclipa.S [sw] Clean up r_refdef and R_ViewChanged 2022-03-27 15:32:00 +09:00
sw_ralias.c [sw] Clean up use of vid.colormap8 2022-03-29 14:43:38 +09:00
sw_raliasa.S [sw] Fix some missed symbol renames 2022-03-21 19:24:43 +09:00
sw_rbsp.c [renderer] Clean up r_bsp a little 2022-03-17 13:09:20 +09:00
sw_rdraw.c [scene] Move entity_t etc into scene headers 2022-03-29 14:43:38 +09:00
sw_rdrawa.S [sw] Clean up r_refdef and R_ViewChanged 2022-03-27 15:32:00 +09:00
sw_redge.c [renderer] Remove currententity 2022-03-11 16:39:08 +09:00
sw_redgea.S Add GNU-stack notes to assembly files 2021-06-13 10:12:03 -04:00
sw_riqm.c [sw] Clean up use of vid.colormap8 2022-03-29 14:43:38 +09:00
sw_rmain.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
sw_rmisc.c [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
sw_rpart.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
sw_rsky.c [sw] Clean up R_SetSkyFrame a little 2022-03-17 13:37:21 +09:00
sw_rsprite.c [renderer] Move a couple functions to using vec4f_t 2022-03-30 23:53:30 +09:00
sw_rsurf.c [sw] Clean up use of vid.colormap8 2022-03-29 14:43:38 +09:00
sw_rvarsa.S Add GNU-stack notes to assembly files 2021-06-13 10:12:03 -04:00
transform.S [renderer] Clean up use of vup/vright/vpn 2022-03-14 09:45:27 +09:00
vid_common_sw.c [renderer] Abandon sw32 altogether 2022-03-09 21:36:15 +09:00