CUtlVector<magnetted_objects_t,CUtlMemory<magnetted_objects_t,int>>::GrowVector
0x007a2d10 · 187 bytes · __thiscall
_ZN10CUtlVectorI19magnetted_objects_t10CUtlMemoryIS0_iEE10GrowVectorEi
Decompiled
undefined (2 params)
/* CUtlVector<magnetted_objects_t, CUtlMemory<magnetted_objects_t, int> >::GrowVector(int) */
void __thiscall
CUtlVector<magnetted_objects_t,CUtlMemory<magnetted_objects_t,int>>::GrowVector
(CUtlVector<magnetted_objects_t,CUtlMemory<magnetted_objects_t,int>> *this,int param_1)
{
int iVar1;
void *pvVar2;
int iVar3;
int iVar4;
iVar3 = *(int *)(this + 4);
iVar4 = *(int *)(this + 0xc) + param_1;
if (iVar3 < iVar4) {
iVar1 = *(int *)(this + 8);
if (-1 < iVar1) {
if (iVar1 == 0) {
if (iVar3 == 0) {
if (iVar4 < 5) {
iVar1 = 4;
goto LAB_007a2d6f;
}
iVar3 = 4;
}
do {
iVar1 = iVar3 * 2;
if (iVar4 <= iVar1) break;
iVar1 = iVar3 * 4;
iVar3 = iVar1;
} while (iVar1 < iVar4);
}
else {
for (iVar1 = ((iVar4 + -1) / iVar1 + 1) * iVar1; iVar1 < iVar4; iVar1 = (iVar1 + iVar4) / 2)
{
}
}
LAB_007a2d6f:
*(int *)(this + 4) = iVar1;
if (*(void **)this != (void *)0x0) {
pvVar2 = realloc(*(void **)this,iVar1 << 3);
*(void **)this = pvVar2;
*(void **)(this + 0x10) = pvVar2;
*(int *)(this + 0xc) = param_1 + *(int *)(this + 0xc);
return;
}
pvVar2 = malloc(iVar1 << 3);
*(void **)this = pvVar2;
goto LAB_007a2d2d;
}
}
pvVar2 = *(void **)this;
LAB_007a2d2d:
*(int *)(this + 0xc) = iVar4;
*(void **)(this + 0x10) = pvVar2;
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.