CScratchPadGraph::UpdateTicksAndStuff
0x00593960 · 1916 bytes · __thiscall
_ZN16CScratchPadGraph19UpdateTicksAndStuffEff
Decompiled
undefined (3 params)
/* CScratchPadGraph::UpdateTicksAndStuff(float, float) */
void __thiscall
CScratchPadGraph::UpdateTicksAndStuff(CScratchPadGraph *this,float param_1,float param_2)
{
undefined4 uVar1;
int *piVar2;
code *pcVar3;
int iVar4;
int iVar5;
int iVar6;
int in_GS_OFFSET;
float fVar7;
float fVar8;
float fVar9;
double dVar10;
undefined8 in_stack_fffffd10;
undefined8 uVar11;
undefined4 uVar12;
undefined4 local_2b4;
undefined4 local_2b0;
undefined4 local_2ac;
undefined4 local_2a8;
undefined4 local_2a4;
undefined4 local_2a0;
undefined4 local_29c;
undefined4 local_298;
undefined4 local_294;
undefined4 local_290;
undefined4 local_28c;
undefined4 local_288;
undefined4 local_284;
undefined4 local_280;
undefined4 local_27c;
undefined4 local_278;
undefined4 local_274;
undefined4 local_270;
undefined4 local_26c;
undefined4 local_268;
undefined4 local_264;
undefined4 local_260;
undefined4 local_25c;
undefined4 local_258;
undefined4 local_254;
undefined4 local_250;
undefined4 local_24c;
undefined4 local_248;
undefined4 local_244;
undefined4 local_240;
undefined4 local_23c;
undefined1 local_238;
undefined4 local_234;
undefined4 local_230;
undefined4 local_22c;
undefined1 local_228;
undefined4 local_224;
char local_220 [512];
int local_20;
uVar12 = (undefined4)((ulonglong)in_stack_fffffd10 >> 0x20);
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(float *)(this + 100) < param_1) {
uVar1 = *(undefined4 *)(this + 0x5c);
GetSamplePosition((float)&local_29c,(float)this);
uVar11 = CONCAT44(uVar12,uVar1);
GetSamplePosition((float)&local_290,(float)this);
local_260 = *(undefined4 *)(this + 0x48);
local_268 = *(undefined4 *)(this + 0x40);
local_264 = *(undefined4 *)(this + 0x44);
local_258 = local_290;
local_254 = local_28c;
local_240 = 0x3f800000;
local_250 = local_288;
local_274 = local_29c;
local_270 = local_298;
local_25c = 0x3f800000;
local_26c = local_294;
local_24c = local_268;
local_248 = local_264;
local_244 = local_260;
(**(code **)(**(int **)this + 0x1c))(*(int **)this,&local_274,&local_258,uVar11);
uVar12 = (undefined4)((ulonglong)uVar11 >> 0x20);
fVar8 = *(float *)(this + 0x60);
*(float *)(this + 100) = param_1;
}
else {
fVar8 = *(float *)(this + 0x60);
}
if (fVar8 < param_2) {
GetSamplePosition((float)&local_2b4,(float)this);
uVar11 = CONCAT44(uVar12,param_2);
GetSamplePosition((float)&local_2a8,(float)this);
local_268 = *(undefined4 *)(this + 0x4c);
local_264 = *(undefined4 *)(this + 0x50);
local_260 = *(undefined4 *)(this + 0x54);
local_258 = local_2a8;
local_254 = local_2a4;
local_240 = 0x3f800000;
local_250 = local_2a0;
local_274 = local_2b4;
local_270 = local_2b0;
local_25c = 0x3f800000;
local_26c = local_2ac;
local_24c = local_268;
local_248 = local_264;
local_244 = local_260;
(**(code **)(**(int **)this + 0x1c))(*(int **)this,&local_274,&local_258,uVar11);
iVar4 = *(int *)(this + 0x3c);
if (0 < iVar4) {
iVar6 = 0;
do {
iVar6 = iVar6 + 1;
pcVar3 = *(code **)(**(int **)this + 0x1c);
uVar12 = (undefined4)((ulonglong)uVar11 >> 0x20);
GetSamplePosition((float)&local_290,(float)this);
local_240 = 0x3f800000;
local_24c = 0x3f800000;
local_258 = local_290;
local_248 = 0x3f800000;
local_254 = local_28c;
local_244 = 0x3f800000;
local_250 = local_288;
uVar11 = CONCAT44(uVar12,*(undefined4 *)(this + 0x60));
GetSamplePosition((float)&local_29c,(float)this);
local_25c = 0x3f800000;
local_268 = 0x3f800000;
local_264 = 0x3f800000;
local_274 = local_29c;
local_270 = local_298;
local_260 = 0x3f800000;
local_26c = local_294;
(*pcVar3)(*(undefined4 *)this,&local_274,&local_258,uVar11);
iVar4 = *(int *)(this + 0x3c);
} while (iVar6 < iVar4);
}
*(float *)(this + 0x60) = param_2;
}
else {
iVar4 = *(int *)(this + 0x3c);
}
fVar8 = *(float *)(this + 0x58);
fVar9 = *(float *)(this + 0x38);
fVar7 = (param_1 - fVar8) / fVar9 + 0.5;
iVar5 = (int)fVar7;
iVar6 = iVar5 + 1;
if (fVar7 <= (float)iVar5) {
iVar6 = iVar5;
}
if (iVar4 < iVar6) {
while( true ) {
local_258 = 0x3f800000;
local_254 = 0x3f800000;
local_250 = 0x3f800000;
local_24c = 0x3f800000;
local_248 = CONCAT22(local_248._2_2_,0x101);
local_244 = 0;
local_240 = 0;
local_238 = 1;
local_23c = 0;
local_234 = 0;
local_230 = 0;
local_22c = 0;
local_228 = 1;
local_224 = 0x40400000;
GetSamplePosition((float)&local_274,(float)this);
local_244 = local_274;
dVar10 = (double)((float)iVar4 * fVar9 + fVar8);
local_240 = local_270;
local_23c = local_26c;
V_snprintf(local_220,0x200,"time: %.2f",dVar10);
uVar12 = (undefined4)((ulonglong)dVar10 >> 0x20);
(**(code **)(**(int **)this + 0x34))(*(int **)this,local_220,&local_258);
piVar2 = *(int **)this;
pcVar3 = *(code **)(*piVar2 + 0x1c);
GetSamplePosition((float)&local_29c,(float)this);
local_25c = 0x3f800000;
local_268 = 0x3f800000;
local_274 = local_29c;
local_264 = 0x3f800000;
local_270 = local_298;
local_260 = 0x3f800000;
local_26c = local_294;
uVar11 = CONCAT44(uVar12,*(undefined4 *)(this + 0x5c));
GetSamplePosition((float)&local_2a8,(float)this);
local_278 = 0x3f800000;
local_284 = 0x3f800000;
local_290 = local_2a8;
local_28c = local_2a4;
local_280 = 0x3f800000;
local_288 = local_2a0;
local_27c = 0x3f800000;
(*pcVar3)(piVar2,&local_290,&local_274,uVar11);
iVar4 = *(int *)(this + 0x3c) + 1;
*(int *)(this + 0x3c) = iVar4;
if (iVar6 <= iVar4) break;
fVar8 = *(float *)(this + 0x58);
fVar9 = *(float *)(this + 0x38);
}
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.