COverlayMgr::FadeOverlayFragment
0x001cfb80 · 246 bytes · __thiscall
_ZN11COverlayMgr19FadeOverlayFragmentEP10moverlay_tP18moverlayfragment_t
Decompiled
undefined (3 params)
/* COverlayMgr::FadeOverlayFragment(moverlay_t*, moverlayfragment_t*) */
undefined4 __thiscall
COverlayMgr::FadeOverlayFragment(COverlayMgr *this,moverlay_t *param_1,moverlayfragment_t *param_2)
{
int iVar1;
undefined4 uVar2;
int iVar3;
int iVar4;
uint uVar5;
float fVar6;
uVar2 = 0;
fVar6 = SQRT((*(float *)(param_1 + 0x60) - g_MainViewOrigin) *
(*(float *)(param_1 + 0x60) - g_MainViewOrigin) +
(*(float *)(param_1 + 100) - DAT_003a0044) *
(*(float *)(param_1 + 100) - DAT_003a0044) +
(*(float *)(param_1 + 0x68) - DAT_003a0048) *
(*(float *)(param_1 + 0x68) - DAT_003a0048)) - *(float *)(param_1 + 0xa0);
fVar6 = fVar6 * fVar6;
if (fVar6 < *(float *)(param_1 + 0x98)) {
if ((fVar6 <= *(float *)(param_1 + 0x94)) || (*(float *)(param_1 + 0x94) < 0.0)) {
uVar5 = 0xffffffff;
}
else {
fVar6 = *(float *)(param_1 + 0x9c) * (*(float *)(param_1 + 0x98) - fVar6);
if (fVar6 <= 0.0) {
fVar6 = 0.0;
}
if (1.0 <= fVar6) {
fVar6 = 1.0;
}
uVar5 = (int)(fVar6 * 255.0 + 8388608.0) << 0x18 | 0xffffff;
}
iVar1 = *(int *)(param_2 + 0x1c);
iVar4 = 0;
iVar3 = 0;
if (0 < iVar1) {
do {
iVar3 = iVar3 + 1;
*(uint *)(*(int *)(param_2 + 0x10) + 0x30 + iVar4) = uVar5;
iVar4 = iVar4 + 0x34;
} while (iVar3 != iVar1);
}
uVar2 = 1;
}
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.