CExpressionEvaluator::IsIdentifierOrConstant
0x00052ce0 · 226 bytes · __thiscall
_ZN20CExpressionEvaluator22IsIdentifierOrConstantEc
Decompiled
undefined (2 params)
/* CExpressionEvaluator::IsIdentifierOrConstant(char) */
undefined4 __thiscall
CExpressionEvaluator::IsIdentifierOrConstant(CExpressionEvaluator *this,char param_1)
{
int iVar1;
int iVar2;
ushort **ppuVar3;
CExpressionEvaluator CVar4;
int iVar5;
CExpressionEvaluator *pCVar6;
if (param_1 == '$') {
iVar2 = *(int *)(this + 8);
this[0x10] = (CExpressionEvaluator)0x24;
ppuVar3 = __ctype_b_loc();
iVar5 = *(int *)(this + 0xc);
iVar1 = 1;
while ((CVar4 = *(CExpressionEvaluator *)(iVar2 + iVar5), ((*ppuVar3)[(char)CVar4] & 8) != 0 ||
(CVar4 == (CExpressionEvaluator)0x5f))) {
if (iVar1 == 0x80) {
return 0;
}
this[iVar1 + 0x10] = CVar4;
iVar1 = iVar1 + 1;
iVar5 = *(int *)(this + 0xc) + 1;
*(int *)(this + 0xc) = iVar5;
}
if (iVar1 < 0x7f) {
this[iVar1 + 0x10] = (CExpressionEvaluator)0x0;
return 1;
}
}
else if ((int)param_1 - 0x30U < 10) {
iVar5 = *(int *)(this + 0xc);
this[0x10] = (CExpressionEvaluator)param_1;
pCVar6 = (CExpressionEvaluator *)(*(int *)(this + 8) + iVar5);
CVar4 = *pCVar6;
iVar1 = 1;
iVar2 = iVar1;
if (9 < (int)(char)CVar4 - 0x30U) {
LAB_00052d49:
this[iVar1 + 0x10] = (CExpressionEvaluator)0x0;
return 1;
}
do {
this[iVar2 + 0x10] = CVar4;
iVar1 = iVar2 + 1;
*(int *)(this + 0xc) = iVar5 + iVar2;
CVar4 = pCVar6[iVar2];
if (9 < (int)(char)CVar4 - 0x30U) {
if (0x7e < iVar1) {
return 0;
}
goto LAB_00052d49;
}
iVar2 = iVar1;
} while (iVar1 != 0x80);
}
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.