UnserializeDMX
0x00bead70 · 249 bytes · __cdecl
_Z14UnserializeDMXR10CUtlBufferPP11CDmxElementPKc
Decompiled
undefined (3 params)
/* UnserializeDMX(CUtlBuffer&, CDmxElement**, char const*) */
void UnserializeDMX(CUtlBuffer *param_1,CDmxElement **param_2,char *param_3)
{
char cVar1;
char *pcVar2;
int in_GS_OFFSET;
CDmxSerializer local_a9;
int local_a8;
int local_a4;
char local_a0 [64];
char local_60 [64];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
*param_2 = (CDmxElement *)0x0;
cVar1 = ReadDMXHeader(param_1,local_a0,0x40,&local_a8,local_60,0x40,&local_a4);
if (cVar1 != '\0') {
if (local_a4 == 0) {
pcVar2 = "<no file>";
if (param_3 != (char *)0x0) {
pcVar2 = param_3;
}
Warning("reading file \'%s\' of legacy format \'%s\' - dmxconvert this file to a newer format!\n"
,pcVar2,local_60);
}
if (((byte)param_1[0x15] & 1) == 0) {
CDmxSerializer::Unserialize(&local_a9,param_1,local_a8,param_2);
}
else {
pcVar2 = "<no file>";
if (param_3 != (char *)0x0) {
pcVar2 = param_3;
}
UnserializeTextDMX(pcVar2,param_1,param_2);
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.