quakeforge/include
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
..
client [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
evdev [input] Use a single select call for all drivers 2021-09-26 15:11:07 +09:00
QF [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
qw [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
win32 Get QF cross-compiling using MXE/mingw32 2021-03-27 20:09:37 +09:00
adivtab.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
alsa_funcs_list.h [audio] Clean up alsa init and add error checking 2021-06-25 09:50:31 +09:00
anorm_dots.h Massive whitespace cleanup. 2012-05-22 08:23:22 +09:00
anorms.h Massive whitespace cleanup. 2012-05-22 08:23:22 +09:00
asm_draw.h [sw] Clean up r_refdef and R_ViewChanged 2022-03-27 15:32:00 +09:00
asm_i386.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
block8.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
block16.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
bsearch.h [util] Add fuzzy and reentrant bsearch 2021-06-01 18:53:53 +09:00
buildnum.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
compat.h [util] Add fuzzy and reentrant bsearch 2021-06-01 18:53:53 +09:00
context_sdl.h Separate render and presentation initialization 2019-07-09 01:00:47 +09:00
context_win.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
context_x11.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
d_iface.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
d_ifacea.h [renderer] Move particles over to simd 2021-12-24 06:45:13 +09:00
d_local.h Remove some long dead cvars 2022-04-24 17:23:46 +09:00
dga_check.h [video] Mark dga funcs as const when dga not available 2021-08-11 12:09:07 +09:00
exp.h Do a pure/const/noreturn/format attribute pass. 2018-10-09 12:42:21 +09:00
fbset.h big protototype cleanup. Now, except for a few cases, all non-static 2002-11-05 19:12:51 +00:00
garbage.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
getopt.h make gcc more anal about prototypes, string constants and function 2003-01-06 18:28:13 +00:00
gib_buffer.h [build] Autoconfiscate printf format attribute 2021-03-27 19:52:59 +09:00
gib_builtin.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_classes.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_execute.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_function.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_handle.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_object.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_parse.h Do a pure/const/noreturn/format attribute pass. 2018-10-09 12:42:21 +09:00
gib_process.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_regex.h Do a pure/const/noreturn/format attribute pass. 2018-10-09 12:42:21 +09:00
gib_semantics.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_thread.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_tree.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gib_vars.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
gl_warp_sin.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
in_win.h Fix win32 (mingw) builds. 2012-02-07 20:18:23 +09:00
in_x11.h [x11] Split up in_x11_init into three stages 2021-11-21 21:22:11 +09:00
logos.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
Makemodule.am [screen] Move some flags into screen.h 2022-03-09 09:31:22 +09:00
mod_internal.h [gl] Use glGenTextures to allocate texture numbers 2022-03-15 13:29:05 +09:00
net_dgrm.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
net_loop.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
net_udp.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
net_vcr.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
net_wins.h Get QF cross-compiling using MXE/mingw32 2021-03-27 20:09:37 +09:00
netchan.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
netmain.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
noisetextures.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
old_keys.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
ops.h Do a pure/const/noreturn/format attribute pass. 2018-10-09 12:42:21 +09:00
pstdint.h Prefer int over long for (u)int32_t. 2010-12-23 09:47:05 +09:00
qfalloca.h Handle alloca "correctly". 2013-01-22 21:02:50 +09:00
qfselect.h [util] Wrap fd_set 2021-09-28 10:53:51 +09:00
qstring.h [util] Add strndup and reentrant quicksort 2021-03-27 20:03:39 +09:00
quakeasm.h [sw] Clean up use of vid.colormap8 2022-03-29 14:43:38 +09:00
quicksort.h [util] Add fuzzy and reentrant bsearch 2021-06-01 18:53:53 +09:00
r_cvar.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_dynamic.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_internal.h [renderer] Move a couple functions to using vec4f_t 2022-03-30 23:53:30 +09:00
r_local.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_scrap.h [renderer] Move core of scrap into shared code 2021-01-13 02:47:07 +09:00
r_shared.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
regex.h Massive whitespace cleanup. 2012-05-22 08:23:22 +09:00
rua_internal.h [ruamoko] Add wrappers for the existing scene functions 2022-02-14 16:43:10 +09:00
sbar.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
scn_internal.h [scene] Track hierarchies instead of root transforms 2022-03-04 06:43:30 +09:00
skin_stencil.h Massive whitespace cleanup. 2012-05-22 08:23:22 +09:00
snd_internal.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
sv_console.h The status bar in the quakeworld server curses console finally does something. Currently only cpu usage, but as a proof-of-concept, it more than does its job. 2007-04-09 00:10:10 +00:00
varrays.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
vgamodes.h Massive whitespace cleanup. 2012-05-22 08:23:22 +09:00
vid_gl.h [renderer] Make screen capture support asynchronous operation 2022-04-01 01:01:53 +09:00
vid_internal.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
vid_sw.h [renderer] Make screen capture support asynchronous operation 2022-04-01 01:01:53 +09:00
vid_vulkan.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
vregset.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
winquake.h [vid] Clean up windows video code a bit 2021-03-31 15:10:35 +09:00
world.h Do a pure/const/noreturn/format attribute pass. 2018-10-09 12:42:21 +09:00