CUtlMemoryPool::CUtlMemoryPool
0x00b740b0 · 171 bytes · __thiscall
_ZN14CUtlMemoryPoolC2EiiiPKci
Decompiled
undefined (6 params)
/* CUtlMemoryPool::CUtlMemoryPool(int, int, int, char const*, int) */
void __thiscall
CUtlMemoryPool::CUtlMemoryPool
(CUtlMemoryPool *this,int param_1,int param_2,int param_3,char *param_4,int param_5)
{
int iVar1;
uint uVar2;
int local_24;
undefined2 local_1e;
if (param_5 == 0) {
uVar2 = 0xffffffff;
local_24 = 0;
local_1e = 1;
}
else {
local_1e = (undefined2)param_5;
local_24 = (param_5 & 0xffffU) - 1;
uVar2 = -(param_5 & 0xffffU);
}
*(undefined4 *)(this + 0x14) = 0;
*(int *)(this + 8) = param_3;
*(undefined4 *)(this + 0x10) = 0;
*(undefined4 *)(this + 0xc) = 0;
*(undefined2 *)(this + 0x18) = local_1e;
iVar1 = 4;
if (3 < (uint)param_1) {
iVar1 = param_1;
}
*(int *)(this + 4) = param_2;
*(uint *)this = iVar1 + local_24 & uVar2;
if (param_4 == (char *)0x0) {
param_4 = "/data/src/tier1/mempool.cpp";
}
*(char **)(this + 0x1c) = param_4;
*(undefined2 *)(this + 0x1a) = 0;
*(CUtlMemoryPool **)(this + 0x20) = this + 0x20;
*(CUtlMemoryPool **)(this + 0x24) = this + 0x20;
AddNewBlob(this);
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.