CExpressionCalculator::Parse5ArgFunc
0x0026edf0 · 563 bytes · __thiscall
_ZN21CExpressionCalculator13Parse5ArgFuncERPKc
Decompiled
undefined (2 params)
/* CExpressionCalculator::Parse5ArgFunc(char const*&) */
undefined4 __thiscall
CExpressionCalculator::Parse5ArgFunc(CExpressionCalculator *this,char **param_1)
{
int iVar1;
int iVar2;
float fVar3;
float fVar4;
float fVar5;
int iVar6;
int iVar7;
char cVar8;
undefined4 uVar9;
float fVar10;
int local_2c;
float local_28;
char *local_24;
char *local_20;
local_24 = "rescale";
local_20 = "crescale";
local_2c = 2;
cVar8 = ParseStringList(param_1,&local_24,&local_2c);
if (((((((cVar8 != '\0') && (cVar8 = ParseString(param_1,"("), cVar8 != '\0')) &&
(*param_1 != (char *)0x0)) &&
((cVar8 = ParseConditional(this,param_1), cVar8 != '\0' &&
(cVar8 = ParseString(param_1,","), cVar8 != '\0')))) &&
((*param_1 != (char *)0x0 &&
((cVar8 = ParseConditional(this,param_1), cVar8 != '\0' &&
(cVar8 = ParseString(param_1,","), cVar8 != '\0')))))) && (*param_1 != (char *)0x0)) &&
((((cVar8 = ParseConditional(this,param_1), cVar8 != '\0' &&
(cVar8 = ParseString(param_1,","), cVar8 != '\0')) && (*param_1 != (char *)0x0)) &&
(((cVar8 = ParseConditional(this,param_1), cVar8 != '\0' &&
(cVar8 = ParseString(param_1,","), cVar8 != '\0')) &&
((*param_1 != (char *)0x0 &&
((cVar8 = ParseConditional(this,param_1), cVar8 != '\0' &&
(uVar9 = ParseString(param_1,")"), (char)uVar9 != '\0')))))))))) {
iVar6 = *(int *)(this + 0x44);
iVar7 = *(int *)(this + 0x38);
iVar1 = iVar6 + -1;
fVar3 = *(float *)(iVar7 + iVar1 * 4);
iVar2 = iVar1 * 4;
*(int *)(this + 0x44) = iVar1;
local_28 = *(float *)(iVar7 + -4 + iVar2);
*(int *)(this + 0x44) = iVar6 + -2;
fVar10 = *(float *)(iVar7 + -8 + iVar2);
*(int *)(this + 0x44) = iVar6 + -3;
fVar4 = *(float *)(iVar7 + -0xc + iVar2);
*(int *)(this + 0x44) = iVar6 + -4;
fVar5 = *(float *)(iVar7 + -0x10 + iVar2);
*(int *)(this + 0x44) = iVar6 + -5;
if (local_2c == 0) {
local_28 = (fVar3 - local_28) * ((fVar5 - fVar4) / (fVar10 - fVar4)) + local_28;
}
else {
if (local_2c != 1) {
return uVar9;
}
fVar10 = (fVar3 - local_28) * ((fVar5 - fVar4) / (fVar10 - fVar4)) + local_28;
if (local_28 <= fVar10) {
local_28 = fVar10;
}
local_28 = (float)(~-(uint)(fVar10 <= fVar3) & (uint)fVar3 |
(uint)local_28 & -(uint)(fVar10 <= fVar3));
}
CUtlStack<float,CUtlMemory<float,int>>::Push
((CUtlStack<float,CUtlMemory<float,int>> *)(this + 0x38),&local_28);
return uVar9;
}
return 0;
}
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.