CChoreoScene::SaveBinary
0x00bb4490 · 344 bytes · __thiscall
_ZN12CChoreoScene10SaveBinaryEPKcS1_jP17IChoreoStringPool
Decompiled
undefined (5 params)
/* CChoreoScene::SaveBinary(char const*, char const*, unsigned int, IChoreoStringPool*) */
bool __thiscall
CChoreoScene::SaveBinary
(CChoreoScene *this,char *param_1,char *param_2,uint param_3,IChoreoStringPool *param_4)
{
char cVar1;
int iVar2;
undefined4 local_54 [4];
undefined4 local_44;
CUtlBuffer::CUtlBuffer((CUtlBuffer *)local_54,0,0,0);
/* try { // try from 00bb44da to 00bb45ef has its CatchHandler @ 00bb45f7 */
SaveToBinaryBuffer(this,(CUtlBuffer *)local_54,param_3,param_4);
cVar1 = (**(code **)(*(int *)(g_pFullFileSystem + 4) + 0x28))
(g_pFullFileSystem + 4,param_1,param_2);
if (cVar1 != '\0') {
cVar1 = (**(code **)(*(int *)(g_pFullFileSystem + 4) + 0x2c))
(g_pFullFileSystem + 4,param_1,param_2);
if (cVar1 == '\0') {
Warning("Forcing \'%s\' to be writable!!!\n",param_1);
(**(code **)(*(int *)(g_pFullFileSystem + 4) + 0x30))(g_pFullFileSystem + 4,param_1,1,param_2)
;
}
}
iVar2 = (**(code **)(*(int *)(g_pFullFileSystem + 4) + 8))
(g_pFullFileSystem + 4,param_1,&DAT_00c5cbad,param_2);
if (iVar2 == 0) {
Warning("Unable to open \'%s\' for writing!!!\n",param_1);
}
else {
(**(code **)(*(int *)(g_pFullFileSystem + 4) + 4))
(g_pFullFileSystem + 4,local_54[0],local_44,iVar2);
(**(code **)(*(int *)(g_pFullFileSystem + 4) + 0xc))(g_pFullFileSystem + 4,iVar2);
}
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_54);
return iVar2 != 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.