Mod_LoadPrimVerts
0x00196ea0 · 380 bytes · unknown
_Z17Mod_LoadPrimVertsv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Mod_LoadPrimVerts() */
void Mod_LoadPrimVerts(void)
{
int iVar1;
undefined1 *puVar2;
char *pcVar3;
undefined4 *__s;
uint uVar4;
uint uVar5;
int in_GS_OFFSET;
uint local_140 [3];
int local_134;
undefined4 *local_130;
int local_128;
undefined1 local_124 [260];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CMapLoadHelper::CMapLoadHelper((CMapLoadHelper *)local_140,0x26);
if (local_140[0] != (local_140[0] / 0xc) * 0xc) {
/* try { // try from 0019700f to 00197013 has its CatchHandler @ 00197024 */
Host_Error("Mod_LoadPrimVerts: funny lump size in %s",s_szMapPathName);
}
uVar5 = local_140[0] / 0xc;
puVar2 = s_szMapPathName;
if ((&s_MapLumpFiles)[local_128 * 7] != 0) {
puVar2 = local_124;
}
/* try { // try from 00196f38 to 00196f5a has its CatchHandler @ 00197024 */
pcVar3 = (char *)va("%s [%s]",puVar2,"primverts");
__s = (undefined4 *)Hunk_AllocName(uVar5 * 0x1c,pcVar3,true);
memset(__s,0,uVar5 * 0x1c);
iVar1 = s_pMap;
*(uint *)(s_pMap + 0xac) = uVar5;
*(undefined4 **)(iVar1 + 0xb0) = __s;
uVar4 = 0;
if (uVar5 != 0) {
do {
uVar4 = uVar4 + 1;
*__s = *local_130;
__s[1] = local_130[1];
__s[2] = local_130[2];
__s = __s + 7;
local_130 = local_130 + 3;
} while (uVar5 != uVar4);
}
if (local_134 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_134);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
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.