CScriptJournal::ToggleJournal
0x00907380 · 263 bytes · __thiscall
_ZN14CScriptJournal13ToggleJournalEv
Decompiled
undefined (1 param)
/* CScriptJournal::ToggleJournal() */
void __thiscall CScriptJournal::ToggleJournal(CScriptJournal *this)
{
undefined4 uVar1;
code *pcVar2;
CScriptJournal CVar3;
undefined4 uVar4;
int in_GS_OFFSET;
char local_420 [1024];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CVar3 = (CScriptJournal)((byte)*this ^ 1);
*this = CVar3;
if (*(float *)(this + 0xc) != -1.0) {
(**(code **)(*(int *)(this + 4) + 4))(this + 4,this + 0xc);
CVar3 = *this;
*(undefined4 *)(this + 0xc) = 0xbf800000;
}
if ((CVar3 == (CScriptJournal)0x0) || (*(int *)(this + 0x10) != -1)) {
V_sprintf_safe<1024u>(local_420,"]\n");
uVar1 = *(undefined4 *)(this + 0x10);
pcVar2 = *(code **)(*(int *)(g_pFullFileSystem + 4) + 4);
uVar4 = _V_strlen(local_420);
(*pcVar2)(g_pFullFileSystem + 4,local_420,uVar4,uVar1);
(**(code **)(*(int *)(g_pFullFileSystem + 4) + 0xc))
(g_pFullFileSystem + 4,*(undefined4 *)(this + 0x10));
*(undefined4 *)(this + 0x10) = 0xffffffff;
DevMsg("Closing journal file\n");
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.