float16::Convert16bitFloatTo32bits
0x005be950 · 235 bytes · __cdecl
_ZN7float1625Convert16bitFloatTo32bitsEt
Decompiled
undefined (1 param)
/* float16::Convert16bitFloatTo32bits(unsigned short) */
longdouble float16::Convert16bitFloatTo32bits(ushort param_1)
{
float fVar1;
if ((param_1 & 0x7fff) == 0x7c00) {
fVar1 = 65504.0;
if ((short)param_1 < 0) {
return (longdouble)-65504.0;
}
}
else {
if (((byte)(param_1 >> 8) & 0x7c) == 0x7c) {
fVar1 = 0.0;
if ((param_1 & 0x3ff) != 0) goto LAB_005bea10;
}
else if (((param_1 & 0x7c00) == 0) && ((param_1 & 0x3ff) != 0)) {
fVar1 = 1.0;
if ((short)param_1 < 0) {
fVar1 = -1.0;
}
fVar1 = ((float)(param_1 & 0x3ff) + 0.0) * 5.9604645e-08 * fVar1;
goto LAB_005bea10;
}
fVar1 = (float)((param_1 & 0x3ff) << 0xd | (uint)(param_1 >> 0xf) << 0x1f |
(uint)((param_1 >> 10 & 0x1f) != 0) * ((param_1 >> 10 & 0x1f) + 0x70) * 0x800000)
;
}
LAB_005bea10:
return (longdouble)fVar1;
}
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.