From e26213546336ecb4f41231469e12e100d6dea762 Mon Sep 17 00:00:00 2001 From: terminx Date: Mon, 2 Sep 2019 05:55:27 +0000 Subject: [PATCH] Use multiples of 5 for the HUD scale option and cap the range at 50-100 git-svn-id: https://svn.eduke32.com/eduke32@8071 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/game.cpp | 4 ++-- source/duke3d/src/game.h | 2 +- source/duke3d/src/menus.cpp | 2 +- source/duke3d/src/osdcmds.cpp | 2 +- source/duke3d/src/sbar.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 15222a9dc..1f4e61382 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -4574,7 +4574,7 @@ void G_HandleLocalKeys(void) } else { - G_SetStatusBarScale(ud.statusbarscale+4); + G_SetStatusBarScale(ud.statusbarscale+5); } G_UpdateScreenArea(); @@ -4600,7 +4600,7 @@ void G_HandleLocalKeys(void) } else { - G_SetStatusBarScale(ud.statusbarscale-4); + G_SetStatusBarScale(ud.statusbarscale-5); } G_UpdateScreenArea(); diff --git a/source/duke3d/src/game.h b/source/duke3d/src/game.h index 28823cb7e..79a51140b 100644 --- a/source/duke3d/src/game.h +++ b/source/duke3d/src/game.h @@ -626,7 +626,7 @@ EXTERN_INLINE_HEADER void SetIfGreater(int32_t *variable, int32_t potentialValue EXTERN_INLINE void G_SetStatusBarScale(int32_t sc) { - ud.statusbarscale = clamp(sc, 36, 100); + ud.statusbarscale = clamp(sc, 50, 100); G_UpdateScreenArea(); } diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 2167553a7..8ca84a157 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -634,7 +634,7 @@ static MenuOption_t MEO_SCREENSETUP_STATUSBARONTOP = MAKE_MENUOPTION(&MF_Redfont static MenuEntry_t ME_SCREENSETUP_STATUSBARONTOP = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_STATUSBARONTOP, Option ); #endif -static MenuRangeInt32_t MEO_SCREENSETUP_SBARSIZE = MAKE_MENURANGE( &ud.statusbarscale, &MF_Redfont, 36, 100, 0, 17, 2 ); +static MenuRangeInt32_t MEO_SCREENSETUP_SBARSIZE = MAKE_MENURANGE( &ud.statusbarscale, &MF_Redfont, 50, 100, 0, 10, 2 ); static MenuEntry_t ME_SCREENSETUP_SBARSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_SBARSIZE, RangeInt32 ); diff --git a/source/duke3d/src/osdcmds.cpp b/source/duke3d/src/osdcmds.cpp index 455b4b9b5..94cd03ddb 100644 --- a/source/duke3d/src/osdcmds.cpp +++ b/source/duke3d/src/osdcmds.cpp @@ -1640,7 +1640,7 @@ int32_t registerosdcommands(void) { "hud_shadows", "enable/disable althud shadows", (void *)&althud_shadows, CVAR_BOOL, 0, 1 }, { "hud_flashing", "enable/disable althud flashing", (void *)&althud_flashing, CVAR_BOOL, 0, 1 }, { "hud_glowingquotes", "enable/disable \"glowing\" quote text", (void *)&hud_glowingquotes, CVAR_BOOL, 0, 1 }, - { "hud_scale","changes the hud scale", (void *)&ud.statusbarscale, CVAR_INT|CVAR_FUNCPTR, 36, 100 }, + { "hud_scale","changes the hud scale", (void *)&ud.statusbarscale, CVAR_INT|CVAR_FUNCPTR, 50, 100 }, { "hud_showmapname", "enable/disable map name display on load", (void *)&hud_showmapname, CVAR_BOOL, 0, 1 }, { "hud_stats", "enable/disable level statistics display", (void *)&ud.levelstats, CVAR_BOOL, 0, 1 }, { "hud_textscale", "sets multiplayer chat message size", (void *)&ud.textscale, CVAR_INT, 100, 400 }, diff --git a/source/duke3d/src/sbar.cpp b/source/duke3d/src/sbar.cpp index 1f15a5e88..4351ecdae 100644 --- a/source/duke3d/src/sbar.cpp +++ b/source/duke3d/src/sbar.cpp @@ -380,7 +380,7 @@ static void G_DrawAltDigiNum(int32_t x, int32_t y, int32_t n, char s, int32_t cs static int32_t invensc(int32_t maximum) // used to reposition the inventory icon selector as the HUD scales { - return scale(maximum << 16, ud.statusbarscale - 36, 100 - 36); + return scale(maximum << 16, ud.statusbarscale - 50, 100 - 50); } void G_DrawInventory(const DukePlayer_t *p)