CDmxSerializerKeyValues2::SaveElement
0x00beba90 · 349 bytes · __thiscall
_ZN24CDmxSerializerKeyValues211SaveElementER10CUtlBufferR27CDmxSerializationDictionaryP11CDmxElementb
Decompiled
undefined (5 params)
/* CDmxSerializerKeyValues2::SaveElement(CUtlBuffer&, CDmxSerializationDictionary&, CDmxElement*,
bool) */
undefined4 __thiscall
CDmxSerializerKeyValues2::SaveElement
(CDmxSerializerKeyValues2 *this,CUtlBuffer *param_1,CDmxSerializationDictionary *param_2,
CDmxElement *param_3,bool param_4)
{
char cVar1;
UniqueId_t *pUVar2;
undefined4 uVar3;
int iVar4;
if (param_4) {
uVar3 = CDmxElement::GetTypeString(param_3);
CUtlBuffer::Printf(param_1,"\"%s\"\n{\n",uVar3);
}
*(int *)(param_1 + 0x18) = *(int *)(param_1 + 0x18) + 1;
CUtlBuffer::PutString(param_1,"\"id\" \"elementid\" ");
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')) {
iVar4 = 0;
if (((byte)param_1[0x15] & 0x10) == 0) {
iVar4 = *(int *)(param_1 + 0x18);
}
while (iVar4 = iVar4 + -1, -1 < iVar4) {
cVar1 = CUtlBuffer::CheckPut(param_1,1);
if (cVar1 != '\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);
}
}
}
cVar1 = CUtlBuffer::CheckPut(param_1,1);
if (cVar1 != '\0') {
*(undefined1 *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = 0x22;
*(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
CUtlBuffer::AddNullTermination(param_1);
}
pUVar2 = (UniqueId_t *)CDmxElement::GetId(param_3);
::Serialize(param_1,pUVar2);
CUtlBuffer::PutString(param_1,"\"\n");
SerializeAttributes(this,param_1,param_2,param_3);
*(int *)(param_1 + 0x18) = *(int *)(param_1 + 0x18) + -1;
uVar3 = 0;
if (-1 < *(int *)(param_1 + 0x18)) {
uVar3 = *(undefined4 *)(param_1 + 0x18);
}
*(undefined4 *)(param_1 + 0x18) = uVar3;
if (param_4) {
CUtlBuffer::Printf(param_1,"}\n");
}
return 1;
}
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.