Mod_LoadGameLumpDict
0x0019bea0 · 239 bytes · unknown
_Z20Mod_LoadGameLumpDictv
Decompiled
undefined (0 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Mod_LoadGameLumpDict() */
void Mod_LoadGameLumpDict(void)
{
int iVar1;
dgamelump_t *pdVar2;
int in_GS_OFFSET;
int local_140 [3];
int local_134;
int *local_130;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CMapLoadHelper::CMapLoadHelper((CMapLoadHelper *)local_140,0x23);
_DAT_003a8df0 = 0;
/* try { // try from 0019beee to 0019bf28 has its CatchHandler @ 0019bf91 */
V_strncpy(g_GameLumpFilename,s_szMapPathName,0x104);
if (local_140[0] == 0) {
if (local_134 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_134);
}
}
else {
iVar1 = 0;
pdVar2 = (dgamelump_t *)(local_130 + 1);
if (0 < *local_130) {
do {
CUtlVector<dgamelump_t,CUtlMemory<dgamelump_t,int>>::InsertBefore
((CUtlVector<dgamelump_t,CUtlMemory<dgamelump_t,int>> *)&g_GameLumpDict,
_DAT_003a8df0,pdVar2);
iVar1 = iVar1 + 1;
pdVar2 = pdVar2 + 0x10;
} while (iVar1 < *local_130);
}
if (local_134 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_134);
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.