Mod_LoadVertices
0x00196520 · 339 bytes · unknown
_Z16Mod_LoadVerticesv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Mod_LoadVertices() */
void Mod_LoadVertices(void)
{
int iVar1;
undefined1 *puVar2;
char *pcVar3;
undefined4 *puVar4;
uint uVar5;
uint uVar6;
int in_GS_OFFSET;
uint local_130 [3];
int local_124;
undefined4 *local_120;
int local_118;
undefined1 local_114 [260];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
CMapLoadHelper::CMapLoadHelper((CMapLoadHelper *)local_130,3);
if (local_130[0] != (local_130[0] / 0xc) * 0xc) {
/* try { // try from 0019665f to 00196663 has its CatchHandler @ 00196674 */
Host_Error("Mod_LoadVertices: funny lump size in %s",s_szMapPathName);
}
uVar6 = local_130[0] / 0xc;
puVar2 = s_szMapPathName;
if ((&s_MapLumpFiles)[local_118 * 7] != 0) {
puVar2 = local_114;
}
/* try { // try from 001965b7 to 001965d5 has its CatchHandler @ 00196674 */
pcVar3 = (char *)va("%s [%s]",puVar2,"vertexes");
puVar4 = (undefined4 *)Hunk_AllocName(uVar6 * 0xc,pcVar3,true);
iVar1 = s_pMap;
*(undefined4 **)(s_pMap + 0x20) = puVar4;
*(uint *)(iVar1 + 0x1c) = uVar6;
uVar5 = 0;
if (uVar6 != 0) {
do {
uVar5 = uVar5 + 1;
*puVar4 = *local_120;
puVar4[1] = local_120[1];
puVar4[2] = local_120[2];
puVar4 = puVar4 + 3;
local_120 = local_120 + 3;
} while (uVar6 != uVar5);
}
if (local_124 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_124);
}
if (local_10 != *(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.