@@ -25,10 +25,70 @@ namespace detour_FS_LoadFile {
2525 tFS_LoadFile oFS_LoadFile = nullptr ;
2626}
2727
28+ namespace detour_FS_FreeFile {
29+ tFS_FreeFile oFS_FreeFile = nullptr ;
30+ }
31+
32+ namespace detour_Z_Malloc {
33+ tZ_Malloc oZ_Malloc = nullptr ;
34+ }
35+
36+ namespace detour_SCR_UpdateScreen {
37+ tSCR_UpdateScreen oSCR_UpdateScreen = nullptr ;
38+ }
39+
2840namespace detour_Cbuf_AddLateCommands {
2941 tCbuf_AddLateCommands oCbuf_AddLateCommands = nullptr ;
3042}
3143
44+ namespace detour_Cmd_ExecuteString {
45+ tCmd_ExecuteString oCmd_ExecuteString = nullptr ;
46+ }
47+
48+ namespace detour_Cvar_Get {
49+ tCvar_Get oCvar_Get = nullptr ;
50+ }
51+
52+ namespace detour_Cvar_Set2 {
53+ tCvar_Set2 oCvar_Set2 = nullptr ;
54+ }
55+
56+ namespace detour_Cvar_SetInternal {
57+ tCvar_SetInternal oCvar_SetInternal = nullptr ;
58+ }
59+
60+ namespace detour_Com_Printf {
61+ tCom_Printf oCom_Printf = nullptr ;
62+ }
63+
64+ namespace detour_Com_DPrintf {
65+ tCom_DPrintf oCom_DPrintf = nullptr ;
66+ }
67+
68+ namespace detour_Qcommon_Init {
69+ tQcommon_Init oQcommon_Init = nullptr ;
70+ }
71+
72+ namespace detour_Cmd_AddCommand {
73+ tCmd_AddCommand oCmd_AddCommand = nullptr ;
74+ }
75+
76+ namespace detour_Cmd_Argc {
77+ tCmd_Argc oCmd_Argc = nullptr ;
78+ }
79+
80+ namespace detour_Cmd_Argv {
81+ tCmd_Argv oCmd_Argv = nullptr ;
82+ }
83+
84+ namespace detour_Z_Free {
85+ tZ_Free oZ_Free = nullptr ;
86+ }
87+
88+ namespace detour_CopyString {
89+ tCopyString oCopyString = nullptr ;
90+ }
91+
3292namespace detour_Qcommon_Frame {
3393 tQcommon_Frame oQcommon_Frame = nullptr ;
3494}
@@ -153,6 +213,38 @@ namespace detour_Sys_SendKeyEvents {
153213 tSys_SendKeyEvents oSys_SendKeyEvents = nullptr ;
154214}
155215
216+ namespace detour_AdjustTexCoords {
217+ tAdjustTexCoords oAdjustTexCoords = nullptr ;
218+ }
219+
220+ namespace detour_glTexParameterf {
221+ tglTexParameterf oglTexParameterf = nullptr ;
222+ }
223+
224+ namespace detour_glBlendFunc {
225+ tglBlendFunc oglBlendFunc = nullptr ;
226+ }
227+
228+ namespace detour_glTexCoord2f {
229+ tglTexCoord2f oglTexCoord2f = nullptr ;
230+ }
231+
232+ namespace detour_glVertex3f {
233+ tglVertex3f oglVertex3f = nullptr ;
234+ }
235+
236+ namespace detour_glBegin {
237+ tglBegin oglBegin = nullptr ;
238+ }
239+
240+ namespace detour_glEnd {
241+ tglEnd oglEnd = nullptr ;
242+ }
243+
244+ namespace detour_glColor3f {
245+ tglColor3f oglColor3f = nullptr ;
246+ }
247+
156248namespace detour_GetCursorPos {
157249 tGetCursorPos oGetCursorPos = nullptr ;
158250}
@@ -893,3 +985,160 @@ namespace detour_cInventory2_And_cGunAmmo2_Draw {
893985 }
894986}
895987
988+ // Pointer-only symbols (detours.yaml + pointers.json)
989+ void RegisterPointerOnlyFunctions_SofExe () {
990+ using namespace detour_Cmd_AddCommand ;
991+ void * addr_Cmd_AddCommand = GetDetourSystem ().ResolveFunctionAddress (
992+ reinterpret_cast <void *>(0x20019130 ), DetourModule::SofExe);
993+ oCmd_AddCommand = reinterpret_cast <tCmd_AddCommand>(addr_Cmd_AddCommand);
994+ using namespace detour_Cmd_Argc ;
995+ void * addr_Cmd_Argc = GetDetourSystem ().ResolveFunctionAddress (
996+ reinterpret_cast <void *>(0x20018D20 ), DetourModule::SofExe);
997+ oCmd_Argc = reinterpret_cast <tCmd_Argc>(addr_Cmd_Argc);
998+ using namespace detour_Cmd_Argv ;
999+ void * addr_Cmd_Argv = GetDetourSystem ().ResolveFunctionAddress (
1000+ reinterpret_cast <void *>(0x20018D30 ), DetourModule::SofExe);
1001+ oCmd_Argv = reinterpret_cast <tCmd_Argv>(addr_Cmd_Argv);
1002+ using namespace detour_Cmd_ExecuteString ;
1003+ void * addr_Cmd_ExecuteString = GetDetourSystem ().ResolveFunctionAddress (
1004+ reinterpret_cast <void *>(0x194F0 ), DetourModule::SofExe);
1005+ oCmd_ExecuteString = reinterpret_cast <tCmd_ExecuteString>(addr_Cmd_ExecuteString);
1006+ using namespace detour_Com_DPrintf ;
1007+ void * addr_Com_DPrintf = GetDetourSystem ().ResolveFunctionAddress (
1008+ reinterpret_cast <void *>(0x2001C8E0 ), DetourModule::SofExe);
1009+ oCom_DPrintf = reinterpret_cast <tCom_DPrintf>(addr_Com_DPrintf);
1010+ using namespace detour_Com_Printf ;
1011+ void * addr_Com_Printf = GetDetourSystem ().ResolveFunctionAddress (
1012+ reinterpret_cast <void *>(0x2001C6E0 ), DetourModule::SofExe);
1013+ oCom_Printf = reinterpret_cast <tCom_Printf>(addr_Com_Printf);
1014+ using namespace detour_CopyString ;
1015+ void * addr_CopyString = GetDetourSystem ().ResolveFunctionAddress (
1016+ reinterpret_cast <void *>(0x0001EA90 ), DetourModule::SofExe);
1017+ oCopyString = reinterpret_cast <tCopyString>(addr_CopyString);
1018+ using namespace detour_Cvar_Get ;
1019+ void * addr_Cvar_Get = GetDetourSystem ().ResolveFunctionAddress (
1020+ reinterpret_cast <void *>(0x20021AE0 ), DetourModule::SofExe);
1021+ oCvar_Get = reinterpret_cast <tCvar_Get>(addr_Cvar_Get);
1022+ using namespace detour_Cvar_Set2 ;
1023+ void * addr_Cvar_Set2 = GetDetourSystem ().ResolveFunctionAddress (
1024+ reinterpret_cast <void *>(0x20021D70 ), DetourModule::SofExe);
1025+ oCvar_Set2 = reinterpret_cast <tCvar_Set2>(addr_Cvar_Set2);
1026+ using namespace detour_Cvar_SetInternal ;
1027+ void * addr_Cvar_SetInternal = GetDetourSystem ().ResolveFunctionAddress (
1028+ reinterpret_cast <void *>(0x200216C0 ), DetourModule::SofExe);
1029+ oCvar_SetInternal = reinterpret_cast <tCvar_SetInternal>(addr_Cvar_SetInternal);
1030+ using namespace detour_FS_FreeFile ;
1031+ void * addr_FS_FreeFile = GetDetourSystem ().ResolveFunctionAddress (
1032+ reinterpret_cast <void *>(0x25420 ), DetourModule::SofExe);
1033+ oFS_FreeFile = reinterpret_cast <tFS_FreeFile>(addr_FS_FreeFile);
1034+ using namespace detour_Qcommon_Init ;
1035+ void * addr_Qcommon_Init = GetDetourSystem ().ResolveFunctionAddress (
1036+ reinterpret_cast <void *>(0x2001F390 ), DetourModule::SofExe);
1037+ oQcommon_Init = reinterpret_cast <tQcommon_Init>(addr_Qcommon_Init);
1038+ using namespace detour_SCR_UpdateScreen ;
1039+ void * addr_SCR_UpdateScreen = GetDetourSystem ().ResolveFunctionAddress (
1040+ reinterpret_cast <void *>(0x15FA0 ), DetourModule::SofExe);
1041+ oSCR_UpdateScreen = reinterpret_cast <tSCR_UpdateScreen>(addr_SCR_UpdateScreen);
1042+ using namespace detour_Z_Free ;
1043+ void * addr_Z_Free = GetDetourSystem ().ResolveFunctionAddress (
1044+ reinterpret_cast <void *>(0x0001EB00 ), DetourModule::SofExe);
1045+ oZ_Free = reinterpret_cast <tZ_Free>(addr_Z_Free);
1046+ using namespace detour_Z_Malloc ;
1047+ void * addr_Z_Malloc = GetDetourSystem ().ResolveFunctionAddress (
1048+ reinterpret_cast <void *>(0x1F120 ), DetourModule::SofExe);
1049+ oZ_Malloc = reinterpret_cast <tZ_Malloc>(addr_Z_Malloc);
1050+ }
1051+
1052+ void RegisterPointerOnlyFunctions_RefDll () {
1053+ using namespace detour_AdjustTexCoords ;
1054+ void * addr_AdjustTexCoords = GetDetourSystem ().ResolveFunctionAddress (
1055+ reinterpret_cast <void *>(0x00014C30 ), DetourModule::RefDll);
1056+ oAdjustTexCoords = reinterpret_cast <tAdjustTexCoords>(addr_AdjustTexCoords);
1057+ }
1058+
1059+ void RegisterPointerOnlyFunctions_GameDll () {
1060+ }
1061+
1062+ void RegisterPointerOnlyFunctions_PlayerDll () {
1063+ }
1064+
1065+ void RegisterPointerOnlyFunctions_Unknown () {
1066+ using namespace detour_glBegin ;
1067+ void * addr_glBegin = nullptr ;
1068+ {
1069+ HMODULE hMod = GetModuleHandleA (" user32.dll" );
1070+ if (hMod) addr_glBegin = reinterpret_cast <void *>(GetProcAddress (hMod, " glBegin" ));
1071+ }
1072+ if (!addr_glBegin) {
1073+ HMODULE hGl = GetModuleHandleA (" opengl32.dll" );
1074+ if (hGl) addr_glBegin = reinterpret_cast <void *>(GetProcAddress (hGl, " glBegin" ));
1075+ }
1076+ oglBegin = reinterpret_cast <tglBegin>(addr_glBegin);
1077+ using namespace detour_glBlendFunc ;
1078+ void * addr_glBlendFunc = nullptr ;
1079+ {
1080+ HMODULE hMod = GetModuleHandleA (" user32.dll" );
1081+ if (hMod) addr_glBlendFunc = reinterpret_cast <void *>(GetProcAddress (hMod, " glBlendFunc" ));
1082+ }
1083+ if (!addr_glBlendFunc) {
1084+ HMODULE hGl = GetModuleHandleA (" opengl32.dll" );
1085+ if (hGl) addr_glBlendFunc = reinterpret_cast <void *>(GetProcAddress (hGl, " glBlendFunc" ));
1086+ }
1087+ oglBlendFunc = reinterpret_cast <tglBlendFunc>(addr_glBlendFunc);
1088+ using namespace detour_glColor3f ;
1089+ void * addr_glColor3f = nullptr ;
1090+ {
1091+ HMODULE hMod = GetModuleHandleA (" user32.dll" );
1092+ if (hMod) addr_glColor3f = reinterpret_cast <void *>(GetProcAddress (hMod, " glColor3f" ));
1093+ }
1094+ if (!addr_glColor3f) {
1095+ HMODULE hGl = GetModuleHandleA (" opengl32.dll" );
1096+ if (hGl) addr_glColor3f = reinterpret_cast <void *>(GetProcAddress (hGl, " glColor3f" ));
1097+ }
1098+ oglColor3f = reinterpret_cast <tglColor3f>(addr_glColor3f);
1099+ using namespace detour_glEnd ;
1100+ void * addr_glEnd = nullptr ;
1101+ {
1102+ HMODULE hMod = GetModuleHandleA (" user32.dll" );
1103+ if (hMod) addr_glEnd = reinterpret_cast <void *>(GetProcAddress (hMod, " glEnd" ));
1104+ }
1105+ if (!addr_glEnd) {
1106+ HMODULE hGl = GetModuleHandleA (" opengl32.dll" );
1107+ if (hGl) addr_glEnd = reinterpret_cast <void *>(GetProcAddress (hGl, " glEnd" ));
1108+ }
1109+ oglEnd = reinterpret_cast <tglEnd>(addr_glEnd);
1110+ using namespace detour_glTexCoord2f ;
1111+ void * addr_glTexCoord2f = nullptr ;
1112+ {
1113+ HMODULE hMod = GetModuleHandleA (" user32.dll" );
1114+ if (hMod) addr_glTexCoord2f = reinterpret_cast <void *>(GetProcAddress (hMod, " glTexCoord2f" ));
1115+ }
1116+ if (!addr_glTexCoord2f) {
1117+ HMODULE hGl = GetModuleHandleA (" opengl32.dll" );
1118+ if (hGl) addr_glTexCoord2f = reinterpret_cast <void *>(GetProcAddress (hGl, " glTexCoord2f" ));
1119+ }
1120+ oglTexCoord2f = reinterpret_cast <tglTexCoord2f>(addr_glTexCoord2f);
1121+ using namespace detour_glTexParameterf ;
1122+ void * addr_glTexParameterf = nullptr ;
1123+ {
1124+ HMODULE hMod = GetModuleHandleA (" user32.dll" );
1125+ if (hMod) addr_glTexParameterf = reinterpret_cast <void *>(GetProcAddress (hMod, " glTexParameterf" ));
1126+ }
1127+ if (!addr_glTexParameterf) {
1128+ HMODULE hGl = GetModuleHandleA (" opengl32.dll" );
1129+ if (hGl) addr_glTexParameterf = reinterpret_cast <void *>(GetProcAddress (hGl, " glTexParameterf" ));
1130+ }
1131+ oglTexParameterf = reinterpret_cast <tglTexParameterf>(addr_glTexParameterf);
1132+ using namespace detour_glVertex3f ;
1133+ void * addr_glVertex3f = nullptr ;
1134+ {
1135+ HMODULE hMod = GetModuleHandleA (" user32.dll" );
1136+ if (hMod) addr_glVertex3f = reinterpret_cast <void *>(GetProcAddress (hMod, " glVertex3f" ));
1137+ }
1138+ if (!addr_glVertex3f) {
1139+ HMODULE hGl = GetModuleHandleA (" opengl32.dll" );
1140+ if (hGl) addr_glVertex3f = reinterpret_cast <void *>(GetProcAddress (hGl, " glVertex3f" ));
1141+ }
1142+ oglVertex3f = reinterpret_cast <tglVertex3f>(addr_glVertex3f);
1143+ }
1144+
0 commit comments