CaptionCreateCallback
0x003de860 · 195 bytes · __cdecl
_ZL21CaptionCreateCallbackPKcS0_S0_Pv
Decompiled
undefined (4 params)
/* CaptionCreateCallback(char const*, char const*, char const*, void*) */
undefined4 CaptionCreateCallback(char *param_1,char *param_2,char *param_3,void *param_4)
{
char cVar1;
undefined4 uVar2;
void *local_44 [14];
CUtlBuffer::CUtlBuffer((CUtlBuffer *)local_44,0,0,0);
/* try { // try from 003de8c3 to 003de912 has its CatchHandler @ 003de926 */
cVar1 = (**(code **)(*(int *)(g_pFullFileSystem + 4) + 0x38))
(g_pFullFileSystem + 4,param_1,param_3,(CUtlBuffer *)local_44,0,0,0);
if (cVar1 != '\0') {
cVar1 = SwapClosecaptionFile(local_44[0]);
if (cVar1 != '\0') {
uVar2 = (**(code **)(*(int *)(g_pFullFileSystem + 4) + 0x3c))
(g_pFullFileSystem + 4,param_2,param_3,(CUtlBuffer *)local_44);
goto LAB_003de915;
}
Warning("Failed to create %s\n",param_2);
}
uVar2 = 0;
LAB_003de915:
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_44);
return uVar2;
}
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.