CExpressionCalculator::ParseAddSub
0x0026f4f0 · 259 bytes · __thiscall
_ZN21CExpressionCalculator11ParseAddSubERPKc
Decompiled
undefined (2 params)
/* CExpressionCalculator::ParseAddSub(char const*&) */
undefined4 __thiscall CExpressionCalculator::ParseAddSub(CExpressionCalculator *this,char **param_1)
{
int iVar1;
float fVar2;
char *pcVar3;
undefined4 uVar4;
int iVar5;
char cVar6;
undefined4 uVar7;
undefined4 uVar8;
int local_2c;
float local_28;
char *local_24;
char *local_20;
pcVar3 = *param_1;
uVar4 = *(undefined4 *)(this + 0x44);
uVar7 = ParseDivMul(this,param_1);
if ((char)uVar7 == '\0') {
*(undefined4 *)(this + 0x44) = uVar4;
*param_1 = pcVar3;
return uVar7;
}
pcVar3 = *param_1;
uVar4 = *(undefined4 *)(this + 0x44);
local_24 = "+";
local_20 = "-";
local_2c = 2;
cVar6 = ParseStringList(param_1,&local_24,&local_2c);
if ((cVar6 != '\0') && (uVar8 = ParseAddSub(this,param_1), (char)uVar8 != '\0')) {
iVar5 = *(int *)(this + 0x44);
iVar1 = iVar5 + -1;
fVar2 = *(float *)(*(int *)(this + 0x38) + iVar1 * 4);
*(int *)(this + 0x44) = iVar1;
local_28 = *(float *)(*(int *)(this + 0x38) + -4 + iVar1 * 4);
*(int *)(this + 0x44) = iVar5 + -2;
if (local_2c == 0) {
local_28 = fVar2 + local_28;
}
else {
if (local_2c != 1) {
return uVar8;
}
local_28 = local_28 - fVar2;
}
CUtlStack<float,CUtlMemory<float,int>>::Push
((CUtlStack<float,CUtlMemory<float,int>> *)(this + 0x38),&local_28);
return uVar8;
}
*(undefined4 *)(this + 0x44) = uVar4;
*param_1 = pcVar3;
return uVar7;
}
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.