CFlexSceneFileManager::Init
0x0062c1c0 · 786 bytes · __thiscall
_ZN21CFlexSceneFileManager4InitEv
Decompiled
undefined (1 param)
/* CFlexSceneFileManager::Init() */
undefined4 __thiscall CFlexSceneFileManager::Init(CFlexSceneFileManager *this)
{
char *pcVar1;
code *pcVar2;
int iVar3;
undefined4 uVar4;
int iVar5;
undefined4 local_14;
CFlexSceneFile *local_10;
if (0 < *(int *)(this + 0x18)) {
iVar5 = 0;
do {
pcVar1 = *(char **)(*(int *)(this + 0xc) + iVar5 * 4);
if ((pcVar1 != (char *)0x0) && (iVar3 = _V_stricmp(pcVar1,"phonemes"), iVar3 == 0))
goto LAB_0062c20a;
iVar5 = iVar5 + 1;
} while (iVar5 < *(int *)(this + 0x18));
}
local_14 = 0;
pcVar2 = *(code **)(*filesystem + 0x11c);
uVar4 = UTIL_VarArgs("expressions/%s.vfe","phonemes");
iVar5 = (*pcVar2)(filesystem,uVar4,"GAME",&local_14,0,1,0,0,0);
if (iVar5 != 0) {
local_10 = ::operator_new(0x84);
V_strncpy((char *)local_10,"phonemes",0x80);
*(undefined4 *)(local_10 + 0x80) = local_14;
CUtlVector<CFlexSceneFile*,CUtlMemory<CFlexSceneFile*,int>>::InsertBefore
((CUtlVector<CFlexSceneFile*,CUtlMemory<CFlexSceneFile*,int>> *)(this + 0xc),
*(int *)(this + 0x18),&local_10);
}
LAB_0062c20a:
iVar5 = 0;
if (0 < *(int *)(this + 0x18)) {
do {
pcVar1 = *(char **)(*(int *)(this + 0xc) + iVar5 * 4);
if ((pcVar1 != (char *)0x0) && (iVar3 = _V_stricmp(pcVar1,"phonemes_weak"), iVar3 == 0))
goto LAB_0062c24a;
iVar5 = iVar5 + 1;
} while (iVar5 < *(int *)(this + 0x18));
}
local_14 = 0;
pcVar2 = *(code **)(*filesystem + 0x11c);
uVar4 = UTIL_VarArgs("expressions/%s.vfe","phonemes_weak");
iVar5 = (*pcVar2)(filesystem,uVar4,"GAME",&local_14,0,1,0,0,0);
if (iVar5 != 0) {
local_10 = ::operator_new(0x84);
V_strncpy((char *)local_10,"phonemes_weak",0x80);
*(undefined4 *)(local_10 + 0x80) = local_14;
CUtlVector<CFlexSceneFile*,CUtlMemory<CFlexSceneFile*,int>>::InsertBefore
((CUtlVector<CFlexSceneFile*,CUtlMemory<CFlexSceneFile*,int>> *)(this + 0xc),
*(int *)(this + 0x18),&local_10);
}
LAB_0062c24a:
iVar5 = 0;
if (0 < *(int *)(this + 0x18)) {
do {
pcVar1 = *(char **)(*(int *)(this + 0xc) + iVar5 * 4);
if ((pcVar1 != (char *)0x0) && (iVar3 = _V_stricmp(pcVar1,"phonemes_strong"), iVar3 == 0)) {
return 1;
}
iVar5 = iVar5 + 1;
} while (iVar5 < *(int *)(this + 0x18));
}
local_14 = 0;
pcVar2 = *(code **)(*filesystem + 0x11c);
uVar4 = UTIL_VarArgs("expressions/%s.vfe","phonemes_strong");
iVar5 = (*pcVar2)(filesystem,uVar4,"GAME",&local_14,0,1,0,0,0);
if (iVar5 == 0) {
return 1;
}
local_10 = ::operator_new(0x84);
V_strncpy((char *)local_10,"phonemes_strong",0x80);
*(undefined4 *)(local_10 + 0x80) = local_14;
CUtlVector<CFlexSceneFile*,CUtlMemory<CFlexSceneFile*,int>>::InsertBefore
((CUtlVector<CFlexSceneFile*,CUtlMemory<CFlexSceneFile*,int>> *)(this + 0xc),
*(int *)(this + 0x18),&local_10);
return 1;
}
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.