V_UnicodeToUCS2
0x0025e060 · 128 bytes · __cdecl
_Z15V_UnicodeToUCS2PKwiPci
Decompiled
undefined (4 params)
/* V_UnicodeToUCS2(wchar_t const*, int, char*, int) */
uint V_UnicodeToUCS2(wchar_t *param_1,int param_2,char *param_3,int param_4)
{
iconv_t __cd;
size_t sVar1;
uint uVar2;
size_t local_2c;
size_t local_28;
wchar_t *local_24;
char *local_20 [4];
__cd = iconv_open("UCS-2LE","UTF-32LE");
local_2c = param_2;
local_28 = param_4;
local_24 = param_1;
local_20[0] = param_3;
uVar2 = 0xffffffff;
if (__cd != (iconv_t)0x0) {
sVar1 = iconv(__cd,(char **)&local_24,&local_2c,local_20,&local_28);
iconv_close(__cd);
uVar2 = 0;
if (-1 < (int)sVar1) {
uVar2 = (uint)param_2 >> 2;
}
}
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.