quakeforge/include/QF
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
..
classes Massive whitespace cleanup. 2012-05-22 08:23:22 +09:00
GL [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
GLSL [glsl] Implement fisheye rendering 2022-03-25 12:22:16 +09:00
input Fix some doxygen warnings 2021-12-25 11:17:33 +09:00
math [math] Add some bit-op functions 2022-01-23 13:47:14 +09:00
plugin [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
progs [gamecode] Move return buffer to end of progs memory map 2022-02-05 18:37:23 +09:00
scene [scene] Move entity_t etc into scene headers 2022-03-29 14:43:38 +09:00
simd [simd] Use portable swizzles 2022-03-31 02:25:33 +09:00
ui [ui] Add two view manipulation functions 2021-07-10 17:57:59 +09:00
Vulkan [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
alloc.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
bspfile.h [util] Make bsp_t counts size_t 2021-08-01 21:54:05 +09:00
cbuf.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
cdaudio.h Merge branch 'master' into vulkan 2020-03-20 13:04:41 +09:00
cexpr.h [cexpr] Expose cexpr assignment 2022-04-24 19:15:22 +09:00
checksum.h Make header protection consistent 2020-02-24 12:21:20 +09:00
clip_hull.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
cmd.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
cmem.h [util] Use mmap/munmap for cmem internal alloc/free 2021-07-12 16:33:47 +09:00
console.h [console] Get message modes and menus working again 2021-11-28 23:21:55 +09:00
crc.h Make header protection consistent 2020-02-24 12:21:20 +09:00
csqc.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
cvar.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
darray.h [util] Clean up nested macro temp var names a little 2022-03-31 14:44:51 +09:00
draw.h Make header protection consistent 2020-02-24 12:21:20 +09:00
dstring.h [build] Autoconfiscate printf format attribute 2021-03-27 19:52:59 +09:00
fbsearch.h [util] Add functions for binary heaps 2021-08-02 12:44:08 +09:00
gib.h [build] Autoconfiscate printf format attribute 2021-03-27 19:52:59 +09:00
hash.h [util] FIx an "only" in a comment 2021-01-05 17:40:07 +09:00
heapsort.h [util] Add functions for binary heaps 2021-08-02 12:44:08 +09:00
idparse.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
image.h [image] Make WritePNG take settings from tex_t 2022-04-01 01:01:53 +09:00
info.h Make header protection consistent 2020-02-24 12:21:20 +09:00
input.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
iqm.h Make header protection consistent 2020-02-24 12:21:20 +09:00
joystick.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
keys.h [input] Clean out a lot of obsolete stuff from keys 2021-11-27 12:31:24 +09:00
link.h Make header protection consistent 2020-02-24 12:21:20 +09:00
listener.h [util] Add a listener object 2021-11-25 13:36:02 +09:00
llist.h Make header protection consistent 2020-02-24 12:21:20 +09:00
Makemodule.am [gl] Get fisheye working with frame buffers 2022-03-26 12:51:31 +09:00
mathlib.h [mathlib] Remove suspicious IS_NAN 2022-03-19 12:50:08 +09:00
mdfour.h Clean up after removal of uint32.h 2020-02-29 16:11:07 +09:00
mersenne.h [util] Add mtwist float random number functions 2021-12-24 06:45:13 +09:00
model.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
modelgen.h Make header protection consistent 2020-02-24 12:21:20 +09:00
msg.h [util] Add message short and long poke functions 2021-04-04 15:56:14 +09:00
object.h Make header protection consistent 2020-02-24 12:21:20 +09:00
pak.h Make header protection consistent 2020-02-24 12:21:20 +09:00
pakfile.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
pcx.h Merge branch 'master' into win-merge 2021-03-25 22:42:16 +09:00
plist.h [plist] Remove incorrect const from PL_RemoveObjectForKey 2021-12-17 08:30:00 +09:00
plugin.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
png.h [image] Make WritePNG take settings from tex_t 2022-04-01 01:01:53 +09:00
pqueue.h [util] Clean up nested macro temp var names a little 2022-03-31 14:44:51 +09:00
progs.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
pvsfile.h [qfvis] Write out the fat-pvs file 2021-07-27 20:04:19 +09:00
qargs.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
qdefs.h Make header protection consistent 2020-02-24 12:21:20 +09:00
qendian.h Make header protection consistent 2020-02-24 12:21:20 +09:00
qtypes.h [renderer] Move driver specific texture chain defs 2021-07-21 16:36:51 +09:00
quakefs.h [quakefs] Return QFile pointer from QFS_NextFile(name) 2022-03-31 17:27:04 +09:00
quakeio.h [build] Autoconfiscate printf format attribute 2021-03-27 19:52:59 +09:00
render.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
riff.h Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
ringbuffer.h [util] Clean up nested macro temp var names a little 2022-03-31 14:44:51 +09:00
ruamoko.h [gamecode] Pass registered data pointer to builtins 2022-02-14 12:28:38 +09:00
screen.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
script.h Make script much friendlier to use 2020-02-26 09:39:03 +09:00
segtext.h Document segmented text 2020-02-15 23:48:47 +09:00
set.h [util] Minimize set growth 2021-08-11 12:31:03 +09:00
sizebuf.h [util] Make sizebuf and msg sizes unisgned 2021-04-04 15:53:53 +09:00
skin.h Make header protection consistent 2020-02-24 12:21:20 +09:00
sound.h [sound] Use vec4f_t for api functions 2022-03-30 23:42:38 +09:00
spritegn.h Make header protection consistent 2020-02-24 12:21:20 +09:00
sys.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
sys_developer.h [gamecode] Use a new developer flag for builtin debug 2021-12-24 06:45:13 +09:00
teamplay.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
tga.h [image] Add parameter to load only the header 2021-01-19 10:15:57 +09:00
va.h [util] Make va return const char * 2021-03-29 17:24:30 +09:00
ver_check.h Make header protection consistent 2020-02-24 12:21:20 +09:00
vid.h [renderer] Move to using dynamic frame buffers 2022-03-24 12:56:29 +09:00
wad.h Make header protection consistent 2020-02-24 12:21:20 +09:00
wadfile.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
winding.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
zone.h [zone] Add function to retrieve memory usage 2021-12-27 20:12:03 +09:00