Sys_FindFirst
0x002151e0 · 121 bytes · __cdecl
_Z13Sys_FindFirstPKcPci
Decompiled
undefined (3 params)
/* Sys_FindFirst(char const*, char*, int) */
char * Sys_FindFirst(char *param_1,char *param_2,int param_3)
{
char *pcVar1;
if (g_hfind != -1) {
Sys_Error("Sys_FindFirst without close");
(**(code **)(*g_pFileSystem + 0x7c))(g_pFileSystem,g_hfind);
}
pcVar1 = (char *)(**(code **)(*g_pFileSystem + 0x70))(g_pFileSystem,param_1,&g_hfind);
if ((pcVar1 != (char *)0x0) && (param_2 != (char *)0x0)) {
V_FileBase(pcVar1,param_2,param_3);
return pcVar1;
}
return pcVar1;
}
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.