summaryrefslogtreecommitdiffstats
path: root/src/features.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-06 16:30:10 +0100
committersalmonik <salmonik@tuta.io>2026-11-06 16:30:10 +0100
commite339d1dc45b3113648552b0002e0c15f55e61cb2 (patch)
tree4570dc0ba1501ea26e87447d234693ad5532e813 /src/features.h
parentdocs: record the esp.cpp split in the plan (diff)
downloadhl2h-e339d1dc45b3113648552b0002e0c15f55e61cb2.tar.gz
hl2h-e339d1dc45b3113648552b0002e0c15f55e61cb2.zip
Config: generate save/load/reset from one settings table
Every persisted setting now lives in a single descriptor table (config_table.cpp) with its section, key, type, default and clamp range. config_save(), config_load() and config_reset_defaults() iterate it, so the three functions can no longer disagree about defaults or bounds, and the old hand-written 350-line parser is gone. Section and key names are unchanged, so existing config files keep loading, and the duplicated [view] scalar clamp block is replaced by per-entry limits.
Diffstat (limited to '')
-rw-r--r--src/features.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/features.h b/src/features.h
index 6890aa6..b4616a1 100644
--- a/src/features.h
+++ b/src/features.h
@@ -133,4 +133,9 @@ QAngle gui_frozen_view();
133void gui_config_init(); 133void gui_config_init();
134void gui_config_write(FILE *f); 134void gui_config_write(FILE *f);
135 135
136// Declarative settings persistence (config_table.cpp).
137void settings_save(FILE *f);
138void settings_load(FILE *f);
139void settings_reset_defaults();
140
136#endif 141#endif