CChoreoScene::ExportMarkedToFile
0x00bb2a90 · 334 bytes · __thiscall
_ZN12CChoreoScene18ExportMarkedToFileEPKc
Decompiled
undefined (2 params)
/* CChoreoScene::ExportMarkedToFile(char const*) */
bool __thiscall CChoreoScene::ExportMarkedToFile(CChoreoScene *this,char *param_1)
{
CChoreoEvent *this_00;
CChoreoScene *this_01;
int iVar1;
int iVar2;
CUtlBuffer *pCVar3;
char *pcVar4;
CChoreoActor *pCVar5;
undefined4 local_54 [4];
undefined4 local_44;
pCVar5 = (CChoreoActor *)0x1;
CUtlBuffer::CUtlBuffer((CUtlBuffer *)local_54,0,0,1);
pcVar4 = "// Choreo version 1\n";
pCVar3 = (CUtlBuffer *)0x0;
/* try { // try from 00bb2ad5 to 00bb2bc7 has its CatchHandler @ 00bb2be6 */
FilePrintf((CUtlBuffer *)local_54,0,"// Choreo version 1\n");
iVar2 = 0;
if (0 < *(int *)(this + 0x10)) {
do {
while( true ) {
this_00 = *(CChoreoEvent **)(*(int *)(this + 4) + iVar2 * 4);
iVar1 = CChoreoEvent::GetActor(this_00);
if ((iVar1 != 0) || (((byte)this_00[0x178] & 0x40) == 0)) break;
FileSaveEvent((CUtlBuffer *)local_54,0,this_00);
iVar2 = iVar2 + 1;
if (*(int *)(this + 0x10) <= iVar2) goto LAB_00bb2b20;
}
iVar2 = iVar2 + 1;
} while (iVar2 < *(int *)(this + 0x10));
}
LAB_00bb2b20:
iVar2 = 0;
if (0 < *(int *)(this + 0x24)) {
do {
while ((this_01 = *(CChoreoScene **)(*(int *)(this + 0x18) + iVar2 * 4),
this_01 == (CChoreoScene *)0x0 || (this_01[0x115] == (CChoreoScene)0x0))) {
iVar2 = iVar2 + 1;
if (*(int *)(this + 0x24) <= iVar2) goto LAB_00bb2b62;
}
FileSaveActor(this_01,pCVar3,(int)pcVar4,pCVar5);
iVar2 = iVar2 + 1;
} while (iVar2 < *(int *)(this + 0x24));
}
LAB_00bb2b62:
iVar2 = (**(code **)(*(int *)(g_pFullFileSystem + 4) + 8))
(g_pFullFileSystem + 4,param_1,&DAT_00bf9593,0);
if (iVar2 != 0) {
(**(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.