CExpressionCalculator::ParseLessGreater
0x0026f600 · 343 bytes · __thiscall
_ZN21CExpressionCalculator16ParseLessGreaterERPKc
Decompiled
undefined (2 params)
/* CExpressionCalculator::ParseLessGreater(char const*&) */
undefined4 __thiscall
CExpressionCalculator::ParseLessGreater(CExpressionCalculator *this,char **param_1)
{
int iVar1;
float fVar2;
float fVar3;
char *pcVar4;
undefined4 uVar5;
int iVar6;
bool bVar7;
char cVar8;
undefined4 uVar9;
undefined4 uVar10;
int local_34;
float local_30;
char *local_2c;
undefined *local_28;
undefined *local_24;
undefined *local_20;
pcVar4 = *param_1;
uVar5 = *(undefined4 *)(this + 0x44);
uVar9 = ParseAddSub(this,param_1);
if ((char)uVar9 == '\0') {
*(undefined4 *)(this + 0x44) = uVar5;
*param_1 = pcVar4;
return uVar9;
}
pcVar4 = *param_1;
uVar5 = *(undefined4 *)(this + 0x44);
local_2c = "<";
local_28 = &DAT_002a04df;
local_24 = &DAT_002cd1dd;
local_20 = &DAT_002cd1e0;
local_34 = 4;
cVar8 = ParseStringList(param_1,&local_2c,&local_34);
if ((cVar8 == '\0') || (uVar10 = ParseLessGreater(this,param_1), (char)uVar10 == '\0')) {
*(undefined4 *)(this + 0x44) = uVar5;
*param_1 = pcVar4;
return uVar9;
}
iVar6 = *(int *)(this + 0x44);
iVar1 = iVar6 + -1;
fVar2 = *(float *)(*(int *)(this + 0x38) + iVar1 * 4);
*(int *)(this + 0x44) = iVar1;
fVar3 = *(float *)(*(int *)(this + 0x38) + -4 + iVar1 * 4);
*(int *)(this + 0x44) = iVar6 + -2;
if (local_34 == 1) {
bVar7 = fVar2 < fVar3;
}
else {
if (local_34 < 2) {
if (local_34 != 0) {
return uVar10;
}
local_30 = (float)(-(uint)(fVar3 < fVar2) & 0x3f800000);
goto LAB_0026f6f9;
}
if (local_34 == 2) {
local_30 = (float)(-(uint)(fVar3 <= fVar2) & 0x3f800000);
goto LAB_0026f6f9;
}
if (local_34 != 3) {
return uVar10;
}
bVar7 = fVar2 <= fVar3;
}
local_30 = (float)(-(uint)bVar7 & 0x3f800000);
LAB_0026f6f9:
CUtlStack<float,CUtlMemory<float,int>>::Push
((CUtlStack<float,CUtlMemory<float,int>> *)(this + 0x38),&local_30);
return uVar10;
}
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.