Mod_LoadPrimIndices
0x00197050 · 309 bytes · unknown
_Z19Mod_LoadPrimIndicesv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Mod_LoadPrimIndices() */
void Mod_LoadPrimIndices(void)
{
size_t __n;
int iVar1;
undefined1 *puVar2;
char *pcVar3;
void *__s;
int in_GS_OFFSET;
uint local_140 [3];
int local_134;
void *local_130;
int local_128;
undefined1 local_124 [260];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CMapLoadHelper::CMapLoadHelper((CMapLoadHelper *)local_140,0x27);
if ((local_140[0] & 1) != 0) {
/* try { // try from 00197177 to 0019717b has its CatchHandler @ 0019718c */
Host_Error("Mod_LoadPrimIndices: funny lump size in %s",s_szMapPathName);
}
puVar2 = s_szMapPathName;
if ((&s_MapLumpFiles)[local_128 * 7] != 0) {
puVar2 = local_124;
}
/* try { // try from 001970ce to 001970e9 has its CatchHandler @ 0019718c */
pcVar3 = (char *)va("%s [%s]",puVar2,"primindices");
__n = (local_140[0] >> 1) * 2;
__s = (void *)Hunk_AllocName(__n,pcVar3,true);
memset(__s,0,__n);
iVar1 = s_pMap;
*(uint *)(s_pMap + 0xb4) = local_140[0] >> 1;
*(void **)(iVar1 + 0xb8) = __s;
memcpy(__s,local_130,__n);
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.