TransformIntoSubNeighbor
0x000d0b50 · 297 bytes · __cdecl
_Z24TransformIntoSubNeighborP16CDispUtilsHelperiiRK10CVertIndexRS1_
Decompiled
undefined (5 params)
/* TransformIntoSubNeighbor(CDispUtilsHelper*, int, int, CVertIndex const&, CVertIndex&) */
undefined4 *
TransformIntoSubNeighbor
(CDispUtilsHelper *param_1,int param_2,int param_3,CVertIndex *param_4,CVertIndex *param_5
)
{
undefined2 *puVar1;
undefined1 uVar2;
short sVar3;
short sVar4;
short sVar5;
int iVar6;
undefined4 *puVar7;
uint uVar8;
uint uVar9;
short local_2c [4];
short local_24 [2];
short local_20 [8];
iVar6 = (**(code **)(*(int *)param_1 + 4))(param_1,param_2);
puVar1 = (undefined2 *)(iVar6 + param_3 * 6);
uVar2 = *(undefined1 *)((int)puVar1 + 3);
iVar6 = (*(code *)**(undefined4 **)param_1)(param_1);
SetupSpan(*(undefined4 *)(iVar6 + 0x1c),param_2,uVar2,local_2c,local_2c + 2);
puVar7 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1,*puVar1);
uVar2 = *(undefined1 *)(puVar1 + 2);
uVar9 = param_2 + 2 + (uint)*(byte *)(puVar1 + 1) & 3;
iVar6 = (**(code **)*puVar7)(puVar7);
SetupSpan(*(undefined4 *)(iVar6 + 0x1c),uVar9,uVar2,local_2c + 6,local_2c + 4);
uVar8 = (uint)((&g_EdgeDims)[param_2] == 0);
sVar3 = *(short *)(param_4 + uVar8 * 2);
sVar4 = local_2c[uVar8];
sVar5 = local_2c[uVar8 + 2];
iVar6 = (int)(short)(&g_EdgeDims)[uVar9];
uVar8 = (uint)((&g_EdgeDims)[uVar9] == 0);
*(short *)(param_5 + iVar6 * 2) = local_2c[iVar6 + 4];
iVar6 = ((int)local_2c[uVar8 + 6] - (int)local_2c[uVar8 + 4]) *
((((int)sVar3 - (int)sVar4) * 0x10000) / ((int)sVar5 - (int)sVar4));
if (iVar6 < 0) {
iVar6 = iVar6 + 0xffff;
}
*(short *)(param_5 + uVar8 * 2) = (short)((uint)iVar6 >> 0x10) + local_2c[uVar8 + 4];
return puVar7;
}
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.