CExpressionCalculator::ParseUnary
0x0026f270 · 265 bytes · __thiscall
_ZN21CExpressionCalculator10ParseUnaryERPKc
Decompiled
undefined (2 params)
/* CExpressionCalculator::ParseUnary(char const*&) */
undefined4 __thiscall CExpressionCalculator::ParseUnary(CExpressionCalculator *this,char **param_1)
{
char *pcVar1;
undefined4 uVar2;
char cVar3;
undefined4 uVar4;
float *pfVar5;
int local_34;
float local_30;
float local_2c;
char *local_28;
char *local_24;
char *local_20;
local_28 = "+";
local_24 = "-";
local_20 = "!";
local_34 = 3;
pcVar1 = *param_1;
uVar2 = *(undefined4 *)(this + 0x44);
cVar3 = ParseStringList(param_1,&local_28,&local_34);
if ((cVar3 == '\0') || (uVar4 = ParseUnary(this,param_1), (char)uVar4 == '\0')) {
*(undefined4 *)(this + 0x44) = uVar2;
*param_1 = pcVar1;
uVar4 = ParsePrimary(this,param_1);
if ((char)uVar4 == '\0') {
*(undefined4 *)(this + 0x44) = uVar2;
*param_1 = pcVar1;
}
return uVar4;
}
local_30 = *(float *)(*(int *)(this + 0x38) + (*(int *)(this + 0x44) + -1) * 4);
*(int *)(this + 0x44) = *(int *)(this + 0x44) + -1;
if (local_34 == 1) {
local_2c = -local_30;
}
else {
if (local_34 != 2) {
if (local_34 != 0) {
return uVar4;
}
pfVar5 = &local_30;
goto LAB_0026f32f;
}
local_2c = 1.0;
if (local_30 != 0.0) {
local_2c = 0.0;
}
}
pfVar5 = &local_2c;
LAB_0026f32f:
CUtlStack<float,CUtlMemory<float,int>>::Push
((CUtlStack<float,CUtlMemory<float,int>> *)(this + 0x38),pfVar5);
return uVar4;
}
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.