fix showfps with st_translucency

This commit is contained in:
Jaime Passos 2019-11-23 18:41:28 -03:00
parent e850d42bc2
commit 2a9db29c58
3 changed files with 7 additions and 3 deletions

View File

@ -421,9 +421,9 @@ void SCR_DisplayTicRate(void)
else if (totaltics == TICRATE) ticcntcolor = V_GREENMAP;
V_DrawString(vid.width-(72*vid.dupx), h,
V_YELLOWMAP|V_NOSCALESTART|V_HUDTRANS, "FPS:");
V_YELLOWMAP|V_NOSCALESTART|V_USERHUDTRANS, "FPS:");
V_DrawString(vid.width-(40*vid.dupx), h,
ticcntcolor|V_NOSCALESTART|V_HUDTRANS, va("%02d/%02u", totaltics, TICRATE));
ticcntcolor|V_NOSCALESTART|V_USERHUDTRANS, va("%02d/%02u", totaltics, TICRATE));
lasttic = ontic;
}

View File

@ -198,7 +198,7 @@ void ST_Ticker(boolean run)
// 0 is default, any others are special palettes.
INT32 st_palette = 0;
INT32 st_translucency = 0;
INT32 st_translucency = 10;
void ST_doPaletteStuff(void)
{

View File

@ -106,6 +106,10 @@ extern RGBA_t *pMasterPalette;
#define V_HUDTRANSHALF 0x000D0000
#define V_HUDTRANS 0x000E0000 // draw the hud translucent
#define V_HUDTRANSDOUBLE 0x000F0000
// Macros follow
#define V_USERHUDTRANSHALF ((10-(cv_translucenthud.value/2))<<V_ALPHASHIFT)
#define V_USERHUDTRANS ((10-cv_translucenthud.value)<<V_ALPHASHIFT)
#define V_USERHUDTRANSDOUBLE ((10-min(cv_translucenthud.value*2, 10))<<V_ALPHASHIFT)
#define V_AUTOFADEOUT 0x00100000 // used by CECHOs, automatic fade out when almost over
#define V_RETURN8 0x00200000 // 8 pixel return instead of 12