InitPowerInfoTriInfos_R
0x000d3770 · 324 bytes · __regparm3
_ZL23InitPowerInfoTriInfos_RP10CPowerInfoRK10CVertIndexRP8CTriInfoii
Decompiled
undefined (5 params)
/* InitPowerInfoTriInfos_R(CPowerInfo*, CVertIndex const&, CTriInfo*&, int, int) */
void __regparm3
InitPowerInfoTriInfos_R
(CPowerInfo *param_1,CVertIndex *param_2,CTriInfo **param_3,int param_4,int param_5)
{
bool bVar1;
int iVar2;
short sVar3;
int iVar4;
short sVar5;
int iVar6;
undefined2 local_34;
short local_28;
short local_24;
short local_22;
local_22 = *(short *)(param_2 + 2);
iVar4 = (1 << ((byte)param_4 & 0x1f)) + 1;
sVar3 = *(short *)param_2;
iVar6 = (int)sVar3 + local_22 * iVar4;
if (param_5 + 1 < param_4) {
iVar4 = 0;
do {
iVar2 = iVar4 * 4;
iVar4 = iVar4 + 1;
InitPowerInfoTriInfos_R
(param_1,(CVertIndex *)(*(int *)(param_1 + 8) + iVar6 * 0x10 + iVar2),param_3,
param_4,param_5 + 1);
} while (iVar4 != 4);
}
else if (0 < DAT_0033c118) {
bVar1 = false;
iVar2 = 0;
while( true ) {
sVar5 = (short)(1 << (((byte)param_4 - (char)param_5) - 1 & 0x1f));
local_22 = sVar5 * *(short *)((int)(g_TWinding + iVar2 * 6) + 2) + local_22;
sVar3 = sVar3 + sVar5 * *(short *)(g_TWinding + iVar2 * 6);
local_28 = (short)iVar4;
if (bVar1) {
sVar3 = local_22 * local_28 + sVar3;
local_34 = (undefined2)iVar6;
*(short *)*param_3 = local_24;
*(short *)(*param_3 + 2) = sVar3;
*(undefined2 *)(*param_3 + 4) = local_34;
*param_3 = *param_3 + 6;
local_24 = sVar3;
}
else {
local_24 = sVar3 + local_22 * local_28;
}
iVar2 = iVar2 + 1;
if (DAT_0033c118 <= iVar2) break;
bVar1 = true;
local_22 = *(short *)(param_2 + 2);
sVar3 = *(short *)param_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.