summaryrefslogtreecommitdiffstats
path: root/src/menu.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-26 17:53:40 +0100
committersalmonik <salmonik@tuta.io>2026-10-26 17:53:40 +0100
commitd164e3373108d0c0f83452fbea22f8569b84eec6 (patch)
tree141999a0ac933728382f344c56f009cb0464b044 /src/menu.cpp
parentConfig: store in $XDG_CONFIG_HOME/hl2hake/config (diff)
downloadhl2h-d164e3373108d0c0f83452fbea22f8569b84eec6.tar.gz
hl2h-d164e3373108d0c0f83452fbea22f8569b84eec6.zip
Docs/cleanup: refresh CONTEXT, update ISurface status, remove dead code
- rewrite CONTEXT.md for the current architecture, interfaces, netvars, menu tree, bones/ESP, aimbot/vischeck, triggerbot, silent aim and ABH - update ISURFACE_STATUS.md: DrawLine slot, current menu/config path, 9 build TUs, current file layout - remove the stale root-level `tree` file - drop unused class_health_off/per-class health scan (NPC HP is not networked), surf_call_slot, and unused scancode helpers
Diffstat (limited to 'src/menu.cpp')
-rw-r--r--src/menu.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index c3bb9ae..d628873 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -217,22 +217,6 @@ static std::string config_path() {
217 return dir + "/config"; 217 return dir + "/config";
218} 218}
219 219
220[[maybe_unused]] static const char *sdl_scancode_name(int sc) {
221 if (sc == 0)
222 return "None";
223 static char buf[32];
224 snprintf(buf, sizeof(buf), "Key%d", sc);
225 return buf;
226}
227
228[[maybe_unused]] static int parse_sdl_scancode(const char *s) {
229 if (strcmp(s, "None") == 0 || strcmp(s, "") == 0)
230 return 0;
231 if (strncmp(s, "Key", 3) == 0)
232 return atoi(s + 3);
233 return 0;
234}
235
236static void config_save() { 220static void config_save() {
237 FILE *f = fopen(config_path().c_str(), "w"); 221 FILE *f = fopen(config_path().c_str(), "w");
238 if (!f) 222 if (!f)
@@ -758,14 +742,6 @@ void outer_draw() {
758 surf_pop_make_current(panel); 742 surf_pop_make_current(panel);
759} 743}
760 744
761// Call an arbitrary ISurface vtable slot with up to 2 long args (cdecl thiscall
762// on i386: this first, rest on stack).
763long surf_call_slot(void *surf, int slot, long a1, long a2) {
764 void **vt = *(void ***)surf;
765 using Fn = long (*)(void *, long, long);
766 return ((Fn)vt[slot])(surf, a1, a2);
767}
768
769// --------------------------------------------------------------------------- 745// ---------------------------------------------------------------------------
770// ISurface discovery — try known modules and all loaded .so files 746// ISurface discovery — try known modules and all loaded .so files
771// --------------------------------------------------------------------------- 747// ---------------------------------------------------------------------------