CNavVectorNoEditAllocator::Alloc
0x006fa2f0 · 158 bytes · __cdecl
_ZN25CNavVectorNoEditAllocator5AllocEj
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNavVectorNoEditAllocator::Alloc(unsigned int) */
void CNavVectorNoEditAllocator::Alloc(uint param_1)
{
char cVar1;
uint uVar2;
uint uVar3;
if (_DAT_00fe5c7c == 0) {
CMemoryStack::Init((CMemoryStack *)&m_memory,0x100000,0,0,4);
}
uVar2 = m_memory;
uVar3 = DAT_00fe5c88;
if (param_1 != 0) {
uVar3 = -DAT_00fe5c88 & (DAT_00fe5c88 - 1) + param_1;
}
uVar3 = m_memory + uVar3;
if ((DAT_00fe5c74 < uVar3) && (cVar1 = CMemoryStack::CommitTo((uchar *)&m_memory), cVar1 == '\0'))
{
uVar2 = 0;
uVar3 = m_memory;
}
m_memory = uVar3;
m_nBytesCurrent = param_1;
m_pCurrent = uVar2;
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.