Interpolator_CurveInterpolate_NonNormalized
0x00592030 · 314 bytes · __cdecl
_Z43Interpolator_CurveInterpolate_NonNormalizediRK10QuaternionS1_S1_S1_fRS_
Decompiled
undefined (7 params)
/* Interpolator_CurveInterpolate_NonNormalized(int, Quaternion const&, Quaternion const&, Quaternion
const&, Quaternion const&, float, Quaternion&) */
void Interpolator_CurveInterpolate_NonNormalized
(int param_1,Quaternion *param_2,Quaternion *param_3,Quaternion *param_4,
Quaternion *param_5,float param_6,Quaternion *param_7)
{
Quaternion *pQVar1;
double dVar2;
pQVar1 = param_3;
*(undefined4 *)param_7 = 0;
*(undefined4 *)(param_7 + 4) = 0;
*(undefined4 *)(param_7 + 8) = 0;
*(undefined4 *)(param_7 + 0xc) = 0;
switch(param_1) {
case 2:
dVar2 = sin((double)param_6 * 1.5707963267948966);
param_3 = (Quaternion *)(float)dVar2;
break;
case 3:
dVar2 = sin(((double)param_6 + 1.0) * 1.5707963267948966);
param_3 = (Quaternion *)(float)(1.0 - dVar2);
break;
case 4:
param_3 = (Quaternion *)(param_6 * param_6 * 3.0 - (param_6 + param_6) * param_6 * param_6);
break;
case 0xe:
return;
case 0xf:
*(undefined4 *)param_7 = *(undefined4 *)param_3;
*(undefined4 *)(param_7 + 4) = *(undefined4 *)(param_3 + 4);
*(undefined4 *)(param_7 + 8) = *(undefined4 *)(param_3 + 8);
*(undefined4 *)(param_7 + 0xc) = *(undefined4 *)(param_3 + 0xc);
return;
default:
Warning("Unknown interpolation type %d\n",param_1);
case 0:
case 1:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 0xb:
case 0xc:
case 0xd:
param_3 = (Quaternion *)param_6;
}
QuaternionSlerp(pQVar1,param_4,(float)param_3,param_7);
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.