CDispUtilsHelper::GetEdgeMidPoint
0x000d13b0 · 146 bytes · __cdecl
_ZNK16CDispUtilsHelper15GetEdgeMidPointEi
Decompiled
undefined (1 param)
/* CDispUtilsHelper::GetEdgeMidPoint(int) const */
int CDispUtilsHelper::GetEdgeMidPoint(int param_1)
{
undefined4 uVar1;
undefined2 uVar2;
int iVar3;
short sVar4;
undefined4 *in_stack_00000008;
int in_stack_0000000c;
iVar3 = (**(code **)*in_stack_00000008)();
uVar1 = *(undefined4 *)(iVar3 + 0x24);
iVar3 = (**(code **)*in_stack_00000008)();
uVar2 = (undefined2)*(undefined4 *)(iVar3 + 0x2c);
if (in_stack_0000000c == 0) {
*(undefined2 *)(param_1 + 2) = uVar2;
*(undefined2 *)param_1 = 0;
return param_1;
}
sVar4 = (short)uVar1 + -1;
if (in_stack_0000000c != 1) {
if (in_stack_0000000c == 2) {
*(short *)param_1 = sVar4;
*(undefined2 *)(param_1 + 2) = uVar2;
}
else if (in_stack_0000000c == 3) {
*(undefined2 *)param_1 = uVar2;
*(undefined2 *)(param_1 + 2) = 0;
}
else {
*(undefined2 *)param_1 = 0;
*(undefined2 *)(param_1 + 2) = 0;
}
return param_1;
}
*(undefined2 *)param_1 = uVar2;
*(short *)(param_1 + 2) = sVar4;
return param_1;
}
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.