CSave::WriteGameField
0x004a8d70 · 699 bytes · __thiscall
_ZN5CSave14WriteGameFieldEPKcPvP9datamap_tP17typedescription_t
Decompiled
undefined (5 params)
/* CSave::WriteGameField(char const*, void*, datamap_t*, typedescription_t*) */
undefined4 __thiscall
CSave::WriteGameField
(CSave *this,char *param_1,void *param_2,datamap_t *param_3,typedescription_t *param_4)
{
undefined2 uVar1;
char *pcVar2;
int iVar3;
undefined4 uVar4;
char *local_20 [4];
char *local_10;
switch(*(undefined4 *)param_4) {
case 0xc:
(**(code **)(*(int *)this + 0xa4))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0xd:
(**(code **)(*(int *)this + 0xac))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0xe:
(**(code **)(*(int *)this + 0xa8))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0xf:
(**(code **)(*(int *)this + 0x8c))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0x10:
(**(code **)(*(int *)this + 0x80))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0x11:
(**(code **)(*(int *)this + 0x84))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0x12:
case 0x13:
uVar1 = *(undefined2 *)(param_4 + 0xc);
iVar3 = *(int *)this;
goto LAB_004a8dcc;
default:
Warning("Bad field type\n");
uVar4 = 0;
break;
case 0x15:
(**(code **)(*(int *)this + 0x90))
(this,param_3,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0x16:
WriteVMatrix(this,*(char **)(param_4 + 4),param_2,(uint)*(ushort *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0x17:
WriteVMatrixWorldspace(this,*(char **)(param_4 + 4),param_2,(uint)*(ushort *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0x18:
WriteMatrix3x4Worldspace(this,*(char **)(param_4 + 4),param_2,(uint)*(ushort *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0x19:
WriteInterval(this,*(char **)(param_4 + 4),param_2,(uint)*(ushort *)(param_4 + 0xc));
uVar4 = 1;
break;
case 0x1a:
local_10 = (char *)0x0;
iVar3 = (**(code **)(*modelinfo + 8))(modelinfo,*(undefined4 *)param_2);
if (iVar3 != 0) {
(**(code **)(*modelinfo + 0x10))(modelinfo,iVar3);
AllocPooledString((char *)local_20);
local_10 = local_20[0];
}
goto LAB_004a8dbb;
case 0x1b:
local_10 = (char *)0x0;
pcVar2 = (char *)GetMaterialNameFromIndex(*(int *)param_2);
if ((pcVar2 != (char *)0x0) && (local_10 = (char *)0x0, *pcVar2 != '\0')) {
local_10 = pcVar2;
}
LAB_004a8dbb:
uVar1 = *(undefined2 *)(param_4 + 0xc);
iVar3 = *(int *)this;
param_2 = &local_10;
LAB_004a8dcc:
(**(code **)(iVar3 + 0x6c))(this,*(undefined4 *)(param_4 + 4),param_2,uVar1);
uVar4 = 1;
}
return uVar4;
}
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.