CEnvEffectsScript::ParseScriptFile
0x0068f240 · 202 bytes · __thiscall
_ZN17CEnvEffectsScript15ParseScriptFileEv
Decompiled
undefined (1 param)
/* CEnvEffectsScript::ParseScriptFile() */
void __thiscall CEnvEffectsScript::ParseScriptFile(CEnvEffectsScript *this)
{
uchar *puVar1;
int iVar2;
char *pcVar3;
undefined4 *puVar4;
int local_20 [4];
iVar2 = 0x12d;
puVar4 = &token;
local_20[0] = 0;
g_bUnget = 0;
currenttoken = (uchar *)0x0;
tokencount = 0;
*(undefined4 *)(this + 0x1404) = 0;
pcVar3 = "";
if (*(char **)(this + 0x13f4) != (char *)0x0) {
pcVar3 = *(char **)(this + 0x13f4);
}
for (; iVar2 != 0; iVar2 = iVar2 + -1) {
*puVar4 = 0;
puVar4 = puVar4 + 1;
}
puVar4 = &name;
for (iVar2 = 0x40; iVar2 != 0; iVar2 = iVar2 + -1) {
*puVar4 = 0;
puVar4 = puVar4 + 1;
}
puVar1 = (uchar *)UTIL_LoadFileForMe(pcVar3,local_20);
if ((0 < local_20[0]) && (puVar1 != (uchar *)0x0)) {
currenttoken = puVar1;
LoadFromBuffer((char *)this,pcVar3);
UTIL_FreeFile(puVar1);
return;
}
DevMsg(1,"CEnvEffectsScript: failed to load %s\n",pcVar3);
return;
}
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.