CXboxSystem::GetModSaveContainerNames
0x0023ff70 · 275 bytes · __thiscall
_ZN11CXboxSystem24GetModSaveContainerNamesEPKcPPKwPS1_
Decompiled
undefined (4 params)
/* CXboxSystem::GetModSaveContainerNames(char const*, wchar_t const**, char const**) */
void __thiscall
CXboxSystem::GetModSaveContainerNames
(CXboxSystem *this,char *param_1,wchar_t **param_2,char **param_3)
{
int iVar1;
wchar_t *pwVar2;
int iVar3;
char *pcVar4;
if (g_szModSaveContainerDisplayName == 0) {
iVar1 = _V_stricmp(param_1,"episodic");
if (iVar1 == 0) {
iVar1 = *g_pVGuiLocalize;
pcVar4 = "#GameUI_Console_Ep1_Saves";
}
else {
iVar1 = _V_stricmp(param_1,"ep2");
if (iVar1 == 0) {
iVar1 = *g_pVGuiLocalize;
pcVar4 = "#GameUI_Console_Ep2_Saves";
}
else {
iVar1 = _V_stricmp(param_1,"portal");
if (iVar1 == 0) {
iVar1 = *g_pVGuiLocalize;
pcVar4 = "#GameUI_Console_Portal_Saves";
}
else {
iVar3 = _V_stricmp(param_1,"tf");
iVar1 = *g_pVGuiLocalize;
if (iVar3 == 0) {
pcVar4 = "#GameUI_Console_TF2_Saves";
}
else {
pcVar4 = "#GameUI_Console_HL2_Saves";
}
}
}
}
pwVar2 = (wchar_t *)(**(code **)(iVar1 + 0xc))(g_pVGuiLocalize,pcVar4);
V_wcsncpy(&g_szModSaveContainerDisplayName,pwVar2,0x200);
V_snprintf(g_szModSaveContainerName,0x2a,"%s_saves",param_1);
}
*param_2 = &g_szModSaveContainerDisplayName;
*param_3 = g_szModSaveContainerName;
return;
}
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.