quakeforge/ruamoko/qwaq
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
..
builtins [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
debugger [qwaq] Fetch Ruamoko progs locals from the stack frame 2022-02-12 10:19:45 +09:00
device [qwaq] Fix window closure 2021-09-26 10:35:24 +09:00
editor [gamecode] Clean up string_t and pointer_t 2022-01-18 12:11:14 +09:00
ui [qwaq] Pass the correct selector when listeners respond 2022-02-05 19:30:08 +09:00
.gdbinit [qwaq] Move from tools to ruamoko 2020-03-01 00:55:15 +09:00
gcd.r [qwaq] Implement execute-to-cursor 2021-06-08 16:54:04 +09:00
input-app.h [qwaq] Implement device management for input-app 2021-09-25 14:22:19 +09:00
input-app.r [qwaq] Fix window closure 2021-09-26 10:35:24 +09:00
Makemodule.am [build] Clean up a pile of distcheck issues 2021-12-24 06:45:13 +09:00
qdb [qwaq] Put my qdb script in a safe place 2021-01-30 14:45:47 +09:00
qwaq-app.h [build] Move to non-recursive make 2020-06-25 11:35:37 +09:00
qwaq-app.r [qwaq] Separate out mouse (de)init code 2021-09-23 13:14:42 +09:00
qwaq-input.h [gamecode] Clean up string_t and pointer_t 2022-01-18 12:11:14 +09:00
qwaq-input.r [qwaq] Move input handling to its own thread 2021-09-22 16:22:11 +09:00
qwaq.h [gamecode] Rename func_t to pr_func_t 2022-01-18 15:36:58 +09:00
threading.h [qwaq] Add input test app 2021-09-21 12:58:10 +09:00
z-transform.r [qwaq] Add a little z-transform program 2021-06-19 11:25:05 +09:00