KeyValues::ParseIncludedKeys
0x00252220 · 373 bytes · __thiscall
_ZN9KeyValues17ParseIncludedKeysEPKcS1_P15IBaseFileSystemS1_R10CUtlVectorIPS_10CUtlMemoryIS5_iEE
Decompiled
undefined (6 params)
/* KeyValues::ParseIncludedKeys(char const*, char const*, IBaseFileSystem*, char const*,
CUtlVector<KeyValues*, CUtlMemory<KeyValues*, int> >&) */
void __thiscall
KeyValues::ParseIncludedKeys
(KeyValues *this,char *param_1,char *param_2,IBaseFileSystem *param_3,char *param_4,
CUtlVector *param_5)
{
char *pcVar1;
char cVar2;
int iVar3;
char *pcVar4;
KeyValues *this_00;
int in_GS_OFFSET;
undefined4 local_224;
char local_220 [512];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (param_3 != (IBaseFileSystem *)0x0) {
V_strncpy(local_220,param_1,0x200);
iVar3 = _V_strlen(local_220);
if (0 < iVar3) {
if ((local_220[iVar3 + -1] != '/') && (local_220[iVar3 + -1] != '\\')) {
pcVar4 = local_220 + iVar3 + -1;
while (*pcVar4 = '\0', pcVar4 != local_220) {
pcVar1 = pcVar4 + -1;
pcVar4 = pcVar4 + -1;
if ((*pcVar1 == '/') || (*pcVar1 == '\\')) break;
}
}
}
V_strncat(local_220,param_2,0x200,-1);
this_00 = operator_new((KeyValues *)0x2c,(uint)param_2);
Init(this_00,*(IKeyValuesSystem **)(this + 0x14),false);
/* try { // try from 00252308 to 0025230c has its CatchHandler @ 0025239d */
SetName(this_00,local_220);
this_00[0x11] = (KeyValues)(this[0x11] != (KeyValues)0x0);
local_224 = this_00;
cVar2 = LoadFromFile(this_00,param_3,local_220,param_4);
if (cVar2 == '\0') {
DevMsg("KeyValues::ParseIncludedKeys: Couldn\'t load included keyvalue file %s\n",local_220);
deleteThis();
}
else {
CUtlVector<KeyValues*,CUtlMemory<KeyValues*,int>>::InsertBefore
((CUtlVector<KeyValues*,CUtlMemory<KeyValues*,int>> *)param_5,
*(int *)(param_5 + 0xc),(KeyValues **)&local_224);
}
}
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
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.