CScratchPadGraph::AddSample
0x005940e0 · 332 bytes · __thiscall
_ZN16CScratchPadGraph9AddSampleEiff
Decompiled
undefined (4 params)
/* CScratchPadGraph::AddSample(int, float, float) */
void __thiscall
CScratchPadGraph::AddSample(CScratchPadGraph *this,int param_1,float param_2,float param_3)
{
char *pcVar1;
float fVar2;
undefined4 local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
undefined4 local_1c;
undefined4 local_18;
undefined4 local_14;
undefined4 local_10;
pcVar1 = (char *)(*(int *)(this + 4) + param_1 * 0x18);
UpdateTicksAndStuff(this,param_2,param_3);
if (*pcVar1 == '\0') {
GetSamplePosition((float)&local_5c,(float)this);
fVar2 = param_3;
GetSamplePosition((float)&local_50,(float)this);
local_1c = *(undefined4 *)(pcVar1 + 0xc);
local_18 = *(undefined4 *)(pcVar1 + 0x10);
local_28 = local_50;
local_14 = *(undefined4 *)(pcVar1 + 0x14);
local_24 = local_4c;
local_10 = 0x3f800000;
local_20 = local_48;
local_44 = local_5c;
local_38 = *(undefined4 *)(pcVar1 + 0xc);
local_34 = *(undefined4 *)(pcVar1 + 0x10);
local_40 = local_58;
local_30 = *(undefined4 *)(pcVar1 + 0x14);
local_2c = 0x3f800000;
local_3c = local_54;
(**(code **)(**(int **)this + 0x1c))(*(int **)this,&local_44,&local_28,fVar2);
}
*pcVar1 = '\0';
*(float *)(pcVar1 + 4) = param_2;
*(float *)(pcVar1 + 8) = param_3;
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.