quakeforge/libs/gamecode/test
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
..
Makemodule.am Fix a bunch of distcheck issues 2022-02-14 19:28:19 +09:00
head.c [gamecode] Clean up string_t and pointer_t 2022-01-18 12:11:14 +09:00
main.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
test-bitops.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-branch.c [gamecode] Add tests for the branch instructions 2022-01-17 09:57:54 +09:00
test-callret.c [gamecode] Fix some goofs in the callchain test 2022-01-17 18:51:50 +09:00
test-conv0.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-conv1.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-conv2.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-conv3.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-conv4.c [gamecode] Document the tests that fail under clang 2022-03-31 14:50:49 +09:00
test-conv5.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-conv6.c [gamecode] Document the tests that fail under clang 2022-03-31 14:50:49 +09:00
test-conv7.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-double.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-float.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-hops.c [gamecode] Add tests for the hops instructions 2022-01-16 18:46:29 +09:00
test-int.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-jump.c [gamecode] Redesign jump's B addressing 2022-01-30 22:34:40 +09:00
test-lea.c [gamecode] Change address mode B to entity.field 2022-01-20 14:55:29 +09:00
test-load.c [gamecode] Change address mode B to entity.field 2022-01-20 14:55:29 +09:00
test-load64.c [gamecode] Add 64-bit load/store instructions 2022-02-02 14:47:36 +09:00
test-long.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-mem.c [gamecodee] Add tests for move and memset 2022-01-15 13:20:33 +09:00
test-scale.c [gamecode] Add tests for the scale instructions 2022-01-14 19:46:35 +09:00
test-stack.c [gamecode] Change address mode B to entity.field 2022-01-20 14:55:29 +09:00
test-state.c [gamecode] Add tests for the state instructions 2022-01-16 22:17:17 +09:00
test-store.c [gamecode] Change address mode B to entity.field 2022-01-20 14:55:29 +09:00
test-store64.c [gamecode] Add 64-bit load/store instructions 2022-02-02 14:47:36 +09:00
test-string.c [gamecode] Rearrange several instructions 2022-01-16 14:22:04 +09:00
test-swizzle.c [gamecode] Add tests for the swizzle instructions 2022-01-15 22:44:58 +09:00
test-unsigned.c [gamecode] Add unsigned divide and remainder instructions 2022-02-06 12:20:17 +09:00
test-vector.c [gamecode] Make num_globals() calculate actual globals 2022-01-14 19:45:51 +09:00
test-with.c [gamecode] Add tests for the with instruction(s) 2022-01-15 18:44:11 +09:00