CDecalVertCache::StoreVertsInCache
0x001dab40 · 291 bytes · __thiscall
_ZN15CDecalVertCache17StoreVertsInCacheEP7decal_tP10CDecalVert
Decompiled
undefined (3 params)
/* CDecalVertCache::StoreVertsInCache(decal_t*, CDecalVert*) */
void __thiscall
CDecalVertCache::StoreVertsInCache(CDecalVertCache *this,decal_t *param_1,CDecalVert *param_2)
{
CDecalVertCache *pCVar1;
int iVar2;
int iVar3;
CDecalVert *pCVar4;
CDecalVert *pCVar5;
int local_18;
CDecalVertCache *local_14;
local_18 = (int)(*(ushort *)(param_1 + 0x4e) + 3) >> 2;
FindFreeBlocks(this,local_18);
if (local_18 <= *(int *)(this + 0x20000)) {
iVar2 = AllocBlocks(this,local_18);
*(short *)(param_1 + 0x50) = (short)iVar2;
local_14 = this + iVar2 * 0x80;
pCVar5 = param_2 + 0x10;
if (local_18 != 0) {
do {
pCVar1 = local_14;
iVar2 = 4;
pCVar4 = param_2;
do {
iVar3 = (int)pCVar4 - (int)param_2;
*(undefined4 *)local_14 = *(undefined4 *)pCVar4;
*(undefined4 *)(local_14 + 4) = *(undefined4 *)(pCVar4 + 4);
*(undefined4 *)(local_14 + 8) = *(undefined4 *)(pCVar4 + 8);
*(undefined4 *)(local_14 + 0x10) = *(undefined4 *)(pCVar5 + iVar3);
*(undefined4 *)(local_14 + 0x14) = *(undefined4 *)(pCVar5 + iVar3 + 4);
*(undefined4 *)(local_14 + 0x18) = *(undefined4 *)(param_2 + iVar3 + 0x18);
*(undefined4 *)(local_14 + 0x1c) = *(undefined4 *)(param_2 + iVar3 + 0x1c);
iVar2 = iVar2 + -1;
local_14 = local_14 + 0x20;
pCVar4 = pCVar4 + 0x20;
} while (iVar2 != 0);
local_14 = (CDecalVertCache *)0x0;
param_2 = param_2 + 0x80;
local_18 = local_18 + -1;
*(uint *)(pCVar1 + 0xc) = (uint)*(ushort *)(param_1 + 0x52);
*(undefined4 *)(pCVar1 + 0x6c) = r_framecount;
if (*(int *)(pCVar1 + 0x2c) != 0xffff) {
local_14 = this + *(int *)(pCVar1 + 0x2c) * 0x80;
}
pCVar5 = pCVar5 + 0x80;
} while (local_18 != 0);
return;
}
}
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.