Mod_LoadEdges
0x001966a0 · 237 bytes · unknown
_Z13Mod_LoadEdgesv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Mod_LoadEdges() */
undefined2 * Mod_LoadEdges(void)
{
int iVar1;
undefined2 *puVar2;
undefined2 *puVar3;
uint uVar4;
uint uVar5;
int in_GS_OFFSET;
uint local_140 [3];
int local_134;
int local_130;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CMapLoadHelper::CMapLoadHelper((CMapLoadHelper *)local_140,0xc);
if ((local_140[0] & 3) != 0) {
/* try { // try from 0019677f to 00196783 has its CatchHandler @ 00196794 */
Host_Error("Mod_LoadEdges: funny lump size in %s",s_szMapPathName);
}
uVar5 = local_140[0] >> 2;
uVar4 = 0xffffffff;
if (uVar5 < 0x1fc00001) {
uVar4 = uVar5 * 4;
}
/* try { // try from 00196700 to 00196704 has its CatchHandler @ 00196794 */
puVar2 = operator_new__(uVar4);
uVar4 = 0;
puVar3 = puVar2;
if (uVar5 != 0) {
do {
*puVar3 = *(undefined2 *)(local_130 + uVar4 * 4);
iVar1 = uVar4 * 4;
uVar4 = uVar4 + 1;
puVar3[1] = *(undefined2 *)(local_130 + 2 + iVar1);
puVar3 = puVar3 + 2;
} while (uVar5 != uVar4);
}
s_nMapEdgesLoaded = uVar5;
if (local_134 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_134);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return puVar2;
}
/* 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.