CDispInfo::GenerateDecalFragments_R
0x00137390 · 422 bytes · __thiscall
_ZN9CDispInfo24GenerateDecalFragments_RERK10CVertIndexitP14CDispDecalBasei
Decompiled
undefined (6 params)
/* CDispInfo::GenerateDecalFragments_R(CVertIndex const&, int, unsigned short, CDispDecalBase*, int)
*/
void __thiscall
CDispInfo::GenerateDecalFragments_R
(CDispInfo *this,CVertIndex *param_1,int param_2,ushort param_3,CDispDecalBase *param_4,
int param_5)
{
CVertIndex *pCVar1;
CDispDecalBase CVar2;
short sVar3;
ushort uVar4;
ushort *puVar5;
int iVar6;
uint uVar7;
int iVar8;
int iVar9;
int iVar10;
int local_28;
sVar3 = *(short *)param_1;
iVar9 = *(int *)(this + 0x1dc);
iVar8 = *(int *)(iVar9 + 0x24);
if ((*(uint *)(param_4 + ((uint)param_2 >> 5) * 4) & 1 << ((byte)param_2 & 0x1f)) != 0) {
puVar5 = (ushort *)(param_2 * 0x1c + *(int *)(this + 0x24c));
if ((param_5 + 1 < *(int *)(this + 0x184)) && ((*(byte *)((int)puVar5 + 3) & 1) != 0)) {
local_28 = param_2 + 1;
iVar6 = *(short *)(param_1 + 2) * iVar8;
iVar10 = 0;
while( true ) {
pCVar1 = (CVertIndex *)((iVar6 + sVar3) * 0x10 + *(int *)(iVar9 + 8) + iVar10 * 4);
uVar7 = (int)*(short *)pCVar1 + *(short *)(pCVar1 + 2) * iVar8;
if ((*(uint *)(this + (uVar7 >> 5) * 4 + 0x118) & 1 << ((byte)uVar7 & 0x1f)) != 0) {
GenerateDecalFragments_R(this,pCVar1,local_28,param_3,param_4,param_5 + 1);
iVar9 = *(int *)(this + 0x1dc);
}
iVar10 = iVar10 + 1;
local_28 = local_28 + *(int *)(iVar9 + 8 + (param_5 + 0xc) * 4);
if (iVar10 == 4) break;
iVar8 = *(int *)(iVar9 + 0x24);
}
}
iVar8 = 0;
CVar2 = param_4[0xc];
uVar4 = *puVar5;
if ((char)puVar5[1] != '\0') {
do {
while (((byte)CVar2 & 2) == 0) {
TestAddDecalTri(this,iVar8 + (uint)uVar4,param_3,(CDispDecal *)param_4);
iVar8 = iVar8 + 3;
if ((int)(uint)(byte)puVar5[1] <= iVar8) {
return;
}
}
TestAddDecalTri((int)this,(ushort)(iVar8 + (uint)uVar4),(CDispShadowDecal *)(uint)param_3);
iVar8 = iVar8 + 3;
} while (iVar8 < (int)(uint)(byte)puVar5[1]);
}
}
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.