Interpolator_CurveTypeForName
0x00591770 · 197 bytes · __cdecl
_Z29Interpolator_CurveTypeForNamePKc
Decompiled
undefined (1 param)
/* Interpolator_CurveTypeForName(char const*) */
uint Interpolator_CurveTypeForName(char *param_1)
{
undefined1 uVar1;
int iVar2;
int iVar3;
undefined1 *puVar4;
uint uVar5;
uint uVar6;
char *pcVar7;
int in_GS_OFFSET;
char local_a0 [128];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
V_strncpy(local_a0,param_1,0x80);
iVar2 = _V_strlen("curve_");
iVar3 = V_strnicmp(local_a0,"curve_",iVar2);
uVar6 = 0;
if (iVar3 == 0) {
pcVar7 = local_a0 + iVar2;
puVar4 = (undefined1 *)V_stristr(pcVar7,"_to_curve_");
uVar1 = *puVar4;
*puVar4 = 0;
uVar6 = Interpolator_InterpolatorForName(pcVar7);
*puVar4 = uVar1;
iVar2 = _V_strlen("_to_curve_");
uVar5 = Interpolator_InterpolatorForName(puVar4 + iVar2);
uVar6 = (uVar6 & 0xff) << 8 | uVar5 & 0xff;
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar6;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.