HasZipSuffix
0x000ede30 · 259 bytes · __cdecl
_Z12HasZipSuffixPKc
Decompiled
undefined (1 param)
/* HasZipSuffix(char const*) */
bool HasZipSuffix(char *param_1)
{
size_t sVar1;
int iVar2;
char *pcVar3;
bool bVar4;
sVar1 = strlen(param_1);
pcVar3 = param_1 + sVar1;
if ((param_1 < pcVar3) && (*pcVar3 != '.')) {
do {
pcVar3 = pcVar3 + -1;
if (pcVar3 == param_1) goto LAB_000ede6c;
} while (*pcVar3 != '.');
}
else if (param_1 == pcVar3) {
LAB_000ede6c:
if (*pcVar3 != '.') {
return false;
}
}
iVar2 = _V_stricmp(pcVar3,".Z");
if ((((iVar2 == 0) || (iVar2 = _V_stricmp(pcVar3,".zip"), iVar2 == 0)) ||
(iVar2 = _V_stricmp(pcVar3,".zoo"), iVar2 == 0)) ||
(((iVar2 = _V_stricmp(pcVar3,".arc"), iVar2 == 0 ||
(iVar2 = _V_stricmp(pcVar3,".lzh"), iVar2 == 0)) ||
((iVar2 = _V_stricmp(pcVar3,".arj"), iVar2 == 0 ||
(iVar2 = _V_stricmp(pcVar3,".gz"), iVar2 == 0)))))) {
bVar4 = true;
}
else {
iVar2 = _V_stricmp(pcVar3,".tgz");
bVar4 = iVar2 == 0;
}
return bVar4;
}
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.