AddNeighbor
0x000d1720 · 276 bytes · __cdecl
_Z11AddNeighborP13CCoreDispInfoii12NeighborSpanS0_iS1_
Decompiled
undefined (7 params)
/* AddNeighbor(CCoreDispInfo*, int, int, NeighborSpan, CCoreDispInfo*, int, NeighborSpan) */
void AddNeighbor(int *param_1,int param_2,int param_3,int param_4,int *param_5,int param_6,
int param_7)
{
short *psVar1;
short sVar2;
int iVar3;
short *psVar4;
undefined1 local_24;
local_24 = (undefined1)param_4;
if ((&g_bEdgeNeighborFlip)[param_2] != '\0') {
local_24 = (undefined1)*(undefined4 *)(g_SpanFlip + param_4 * 4);
}
if ((&g_bEdgeNeighborFlip)[param_6] != '\0') {
param_7 = *(int *)(g_SpanFlip + param_7 * 4);
}
iVar3 = (**(code **)(*param_1 + 4))(param_1,param_2);
psVar1 = (short *)(iVar3 + param_3 * 6);
if (param_7 == 2) {
iVar3 = (**(code **)(*param_5 + 4))(param_5,param_6);
psVar4 = (short *)(iVar3 + 6);
sVar2 = *psVar1;
}
else {
psVar4 = (short *)(**(code **)(*param_5 + 4))();
sVar2 = *psVar1;
}
if ((sVar2 == -1) && (*psVar4 == -1)) {
iVar3 = param_5[0x81];
*(char *)(psVar1 + 2) = (char)param_7;
*psVar1 = (short)iVar3;
*(char *)(psVar1 + 1) =
(char)*(undefined4 *)(g_CoreDispNeighborOrientationMap + (param_6 + param_2 * 4) * 4);
*(undefined1 *)((int)psVar1 + 3) = local_24;
iVar3 = param_1[0x81];
*(char *)((int)psVar4 + 3) = (char)param_7;
*psVar4 = (short)iVar3;
*(char *)(psVar4 + 1) =
(char)*(undefined4 *)(g_CoreDispNeighborOrientationMap + (param_2 + param_6 * 4) * 4);
*(undefined1 *)(psVar4 + 2) = local_24;
}
else if (AddNeighbor(CCoreDispInfo*,int,int,NeighborSpan,CCoreDispInfo*,int,NeighborSpan)::
__executeCount < 1) {
AddNeighbor(CCoreDispInfo*,int,int,NeighborSpan,CCoreDispInfo*,int,NeighborSpan)::__executeCount
= AddNeighbor(CCoreDispInfo*,int,int,NeighborSpan,CCoreDispInfo*,int,NeighborSpan)::
__executeCount + 1;
Warning();
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.