From b259b9430095ed0d2962011bf547883bf14b8874 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 2 Aug 2020 08:48:23 +0200 Subject: [PATCH] - implemented status bar scale control for Blood. --- source/blood/src/controls.cpp | 20 +++++++++++++++++--- source/blood/src/view.cpp | 5 ++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/source/blood/src/controls.cpp b/source/blood/src/controls.cpp index cfe5a12d1..43dcff19f 100644 --- a/source/blood/src/controls.cpp +++ b/source/blood/src/controls.cpp @@ -134,8 +134,15 @@ void ctrlGetInput(void) if (gViewMode == 3) { buttonMap.ClearButton(gamefunc_Shrink_Screen); - G_ChangeHudLayout(-1); - } + if (!SHIFTS_IS_PRESSED) + { + G_ChangeHudLayout(-1); + } + else + { + hud_scale = hud_scale - 4; + } + } if (gViewMode == 2 || gViewMode == 4) { gZoom = ClipLow(gZoom - (gZoom >> 4), 64); @@ -148,7 +155,14 @@ void ctrlGetInput(void) if (gViewMode == 3) { buttonMap.ClearButton(gamefunc_Enlarge_Screen); - G_ChangeHudLayout(1); + if (!SHIFTS_IS_PRESSED) + { + G_ChangeHudLayout(1); + } + else + { + hud_scale = hud_scale + 4; + } } if (gViewMode == 2 || gViewMode == 4) { diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index 98f7a352e..0e7e4a30e 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -1190,7 +1190,10 @@ void viewResizeView(int size) gViewX0 = 0; gViewY0 = 0; gViewX1 = xdim-1; - gViewY1 = ydim-1-(25*ydim)/200; + int gy1 = (25 * ydim) / 200; + if (gViewSize == 3) // full status bar must scale the bottom to the actual display height. + gy1 = Scale(gy1, hud_scale, 100); + gViewY1 = ydim-1- gy1; if (gGameOptions.nGameType > 0 && gGameOptions.nGameType <= 3) { gViewY0 = (tilesiz[2229].y*ydim*((gNetPlayers+3)/4))/200;