CDispInfo::FindNodesInShadowFrustum
0x001375b0 · 321 bytes · __cdecl
_ZN9CDispInfo24FindNodesInShadowFrustumERK9Frustum_tPtPiii
Decompiled
undefined (5 params)
/* CDispInfo::FindNodesInShadowFrustum(Frustum_t const&, unsigned short*, int*, int, int) */
void CDispInfo::FindNodesInShadowFrustum
(Frustum_t *param_1,ushort *param_2,int *param_3,int param_4,int param_5)
{
byte bVar1;
int iVar2;
char cVar3;
int iVar4;
byte *pbVar5;
byte *pbVar6;
uint uVar7;
int iVar8;
int local_d4;
byte local_c6 [10];
byte abStack_bc [172];
uVar7 = 0;
iVar8 = 0;
local_c6[0] = 0;
local_c6[1] = 0;
bVar1 = 0;
local_d4 = 0;
while( true ) {
iVar8 = iVar8 + 1;
iVar4 = uVar7 * 0x1c + *(int *)(param_1 + 0x24c);
if ((*(float *)(iVar4 + 4) != 3.4028235e+38) &&
(cVar3 = Frustum_t::CullBox((Frustum_t *)param_2,(Vector *)(iVar4 + 4),
(Vector *)(iVar4 + 0x10)), cVar3 == '\0')) {
if ((int)(bVar1 + 1) < *(int *)(param_1 + 0x184)) {
iVar4 = uVar7 + 1;
iVar2 = *(int *)(*(int *)(param_1 + 0x1dc) + 0x38 + (uint)bVar1 * 4);
pbVar5 = local_c6 + local_d4 * 2 + 2;
do {
*pbVar5 = (byte)iVar4;
pbVar6 = pbVar5 + 2;
iVar4 = iVar4 + iVar2;
pbVar5[1] = bVar1 + 1;
pbVar5 = pbVar6;
} while (pbVar6 != abStack_bc + local_d4 * 2);
local_d4 = local_d4 + 4;
}
else {
*(short *)((int)param_3 + *(int *)param_4 * 2) = (short)uVar7;
*(int *)param_4 = *(int *)param_4 + 1;
}
}
if (local_d4 < iVar8) break;
bVar1 = local_c6[iVar8 * 2 + 1];
uVar7 = (uint)local_c6[iVar8 * 2];
}
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.