CDecalVertCache::GetCachedVerts
0x001da740 · 179 bytes · __thiscall
_ZN15CDecalVertCache14GetCachedVertsEP7decal_t
Decompiled
undefined (2 params)
/* CDecalVertCache::GetCachedVerts(decal_t*) */
CDecalVertCache * __thiscall CDecalVertCache::GetCachedVerts(CDecalVertCache *this,decal_t *param_1)
{
ushort uVar1;
CDecalVertCache *pCVar2;
undefined4 *puVar3;
int iVar4;
CDecalVertCache *pCVar5;
uint uVar6;
undefined4 *puVar7;
iVar4 = r_framecount;
uVar1 = *(ushort *)(param_1 + 0x50);
if (*(int *)(this + 0x2000c) != r_framecount) {
*(undefined4 *)(this + 0x20008) = 0;
*(int *)(this + 0x2000c) = iVar4;
}
if (uVar1 == 0xffff) {
pCVar5 = (CDecalVertCache *)0x0;
}
else {
pCVar5 = this + (uint)uVar1 * 0x80;
pCVar2 = pCVar5;
while( true ) {
*(int *)(pCVar5 + 0x6c) = iVar4;
if (*(int *)(pCVar2 + 0x2c) == 0xffff) break;
pCVar2 = this + *(int *)(pCVar2 + 0x2c) * 0x80;
}
uVar6 = (int)(*(ushort *)(param_1 + 0x4e) + 3) >> 2;
*(uint *)(this + 0x20008) = *(int *)(this + 0x20008) + uVar6;
if (1 < uVar6) {
puVar3 = &g_DecalClipVerts;
do {
pCVar2 = pCVar5;
puVar7 = puVar3;
for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {
*puVar7 = *(undefined4 *)pCVar2;
pCVar2 = pCVar2 + 4;
puVar7 = puVar7 + 1;
}
uVar6 = uVar6 - 1;
pCVar2 = pCVar5 + 0x2c;
pCVar5 = (CDecalVertCache *)0x0;
if (*(int *)pCVar2 != 0xffff) {
pCVar5 = this + *(int *)pCVar2 * 0x80;
}
puVar3 = puVar3 + 0x20;
} while (uVar6 != 0);
pCVar5 = (CDecalVertCache *)&g_DecalClipVerts;
}
}
return pCVar5;
}
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.