CSceneCache::Save
0x004ada70 · 431 bytes · __thiscall
_ZN11CSceneCache4SaveER10CUtlBuffer
Decompiled
undefined (2 params)
/* CSceneCache::Save(CUtlBuffer&) */
void __thiscall CSceneCache::Save(CSceneCache *this,CUtlBuffer *param_1)
{
undefined2 *puVar1;
CUtlBuffer CVar2;
undefined4 uVar3;
uint uVar4;
char cVar5;
char *pcVar6;
void *pvVar7;
int iVar8;
undefined1 local_26;
undefined1 uStack_25;
undefined1 local_24;
undefined1 uStack_23;
undefined1 uStack_22;
undefined1 uStack_21;
undefined1 local_20;
undefined1 local_1f;
undefined1 local_1e;
undefined1 local_1d;
uVar3 = *(undefined4 *)(this + 4);
if (((byte)param_1[0x15] & 1) == 0) {
cVar5 = CUtlBuffer::CheckPut(param_1,4);
if (cVar5 != '\0') {
if (((byte)param_1[0x34] & 1) == 0) {
*(undefined4 *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
uVar3;
iVar8 = *(int *)(param_1 + 0x10);
}
else {
iVar8 = *(int *)(param_1 + 0x10);
pvVar7 = (void *)((iVar8 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar7 != (void *)0x0) {
uStack_21 = (undefined1)((uint)uVar3 >> 0x18);
local_20 = uStack_21;
uStack_22 = (undefined1)((uint)uVar3 >> 0x10);
local_1f = uStack_22;
uStack_23 = (undefined1)((uint)uVar3 >> 8);
local_1e = uStack_23;
local_24 = (undefined1)uVar3;
local_1d = local_24;
_V_memcpy(pvVar7,&local_20,4);
iVar8 = *(int *)(param_1 + 0x10);
}
}
*(int *)(param_1 + 0x10) = iVar8 + 4;
CUtlBuffer::AddNullTermination(param_1);
CVar2 = param_1[0x15];
uVar4 = *(uint *)(this + 0x14);
goto joined_r0x004adb58;
}
}
else {
CUtlBuffer::Printf(param_1,"%u",uVar3);
}
CVar2 = param_1[0x15];
uVar4 = *(uint *)(this + 0x14);
joined_r0x004adb58:
if (((byte)CVar2 & 1) == 0) {
cVar5 = CUtlBuffer::CheckPut(param_1,2);
if (cVar5 != '\0') {
if (((byte)param_1[0x34] & 1) == 0) {
*(short *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
(short)uVar4;
iVar8 = *(int *)(param_1 + 0x10);
}
else {
iVar8 = *(int *)(param_1 + 0x10);
pvVar7 = (void *)((iVar8 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar7 != (void *)0x0) {
uStack_25 = (undefined1)(uVar4 >> 8);
local_20 = uStack_25;
local_26 = (undefined1)uVar4;
local_1f = local_26;
_V_memcpy(pvVar7,&local_20,2);
iVar8 = *(int *)(param_1 + 0x10);
}
}
*(int *)(param_1 + 0x10) = iVar8 + 2;
CUtlBuffer::AddNullTermination(param_1);
}
}
else {
CUtlBuffer::Printf(param_1,"%d",(int)(short)uVar4);
}
iVar8 = 0;
if ((uVar4 & 0xffff) != 0) {
do {
puVar1 = (undefined2 *)(*(int *)(this + 8) + iVar8);
iVar8 = iVar8 + 2;
pcVar6 = (char *)(**(code **)(*soundemitterbase + 0x28))(soundemitterbase,*puVar1);
CUtlBuffer::PutString(param_1,pcVar6);
} while (iVar8 != (uVar4 & 0xffff) * 2);
}
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.