CChoreoChannel::SaveToBuffer
0x00b9dc60 · 538 bytes · __thiscall
_ZN14CChoreoChannel12SaveToBufferER10CUtlBufferP12CChoreoSceneP17IChoreoStringPool
Decompiled
undefined (4 params)
/* CChoreoChannel::SaveToBuffer(CUtlBuffer&, CChoreoScene*, IChoreoStringPool*) */
void __thiscall
CChoreoChannel::SaveToBuffer
(CChoreoChannel *this,CUtlBuffer *param_1,CChoreoScene *param_2,IChoreoStringPool *param_3
)
{
CChoreoChannel CVar1;
uint uVar2;
char cVar3;
short sVar4;
CChoreoEvent *this_00;
void *pvVar5;
uint uVar6;
int iVar7;
undefined1 local_20;
undefined1 uStack_1f;
undefined1 local_1e;
undefined1 local_1d;
sVar4 = (*(code *)**(undefined4 **)param_3)(param_3,this + 4);
if (((byte)param_1[0x15] & 1) == 0) {
cVar3 = CUtlBuffer::CheckPut(param_1,2);
if (cVar3 != '\0') {
if (((byte)param_1[0x34] & 1) == 0) {
*(short *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = sVar4;
iVar7 = *(int *)(param_1 + 0x10);
}
else {
iVar7 = *(int *)(param_1 + 0x10);
pvVar5 = (void *)((iVar7 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar5 != (void *)0x0) {
uStack_1f = (undefined1)((ushort)sVar4 >> 8);
local_1e = uStack_1f;
local_20 = (undefined1)sVar4;
local_1d = local_20;
_V_memcpy(pvVar5,&local_1e,2);
iVar7 = *(int *)(param_1 + 0x10);
}
}
*(int *)(param_1 + 0x10) = iVar7 + 2;
CUtlBuffer::AddNullTermination(param_1);
}
}
else {
CUtlBuffer::Printf(param_1,"%d",(int)sVar4);
}
uVar2 = *(uint *)(this + 0x90);
if (((byte)param_1[0x15] & 1) == 0) {
cVar3 = CUtlBuffer::CheckPut(param_1,1);
if (cVar3 != '\0') {
*(char *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
(char)uVar2;
*(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
CUtlBuffer::AddNullTermination(param_1);
}
}
else {
CUtlBuffer::Printf(param_1,"%u",uVar2 & 0xff);
}
if (0 < (int)uVar2) {
uVar6 = 0;
do {
if ((int)uVar6 < *(int *)(this + 0x90)) {
this_00 = *(CChoreoEvent **)(*(int *)(this + 0x84) + uVar6 * 4);
}
else {
this_00 = (CChoreoEvent *)0x0;
}
uVar6 = uVar6 + 1;
CChoreoEvent::SaveToBuffer(this_00,param_1,param_2,param_3);
} while (uVar6 != uVar2);
}
CVar1 = this[0x98];
if (((((byte)param_1[0x15] & 1) != 0) && (*(int *)(param_1 + 0x10) != 0)) &&
(*(char *)(*(int *)param_1 + ((*(int *)(param_1 + 0x10) + -1) - *(int *)(param_1 + 0x20))) ==
'\n')) {
if (((byte)param_1[0x15] & 0x10) == 0) {
iVar7 = *(int *)(param_1 + 0x18);
}
else {
iVar7 = 0;
}
while (iVar7 = iVar7 + -1, -1 < iVar7) {
cVar3 = CUtlBuffer::CheckPut(param_1,1);
if (cVar3 != '\0') {
*(undefined1 *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = 9
;
*(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
CUtlBuffer::AddNullTermination(param_1);
}
}
}
cVar3 = CUtlBuffer::CheckPut(param_1,1);
if (cVar3 != '\0') {
*(CChoreoChannel *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
CVar1;
*(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
CUtlBuffer::AddNullTermination(param_1);
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.