From 1a633ce6a606bb6f00a99d211d6168b9b3c09bae Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 25 Aug 2020 00:27:14 +0200 Subject: [PATCH] - give Exhumed some automap labels as well. This game didn't have them originally so here the 'native' mode does not exist. --- source/core/statusbar.cpp | 9 +++++---- source/exhumed/src/status.cpp | 25 +++++++++++++++---------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/source/core/statusbar.cpp b/source/core/statusbar.cpp index ba9a3a7a6..d3ed84286 100644 --- a/source/core/statusbar.cpp +++ b/source/core/statusbar.cpp @@ -766,7 +766,7 @@ void DBaseStatusBar::PrintAutomapInfo(FLevelStats& stats) double spacing = stats.spacing * (am_textfont ? *hud_statscale : 1); if (am_nameontop) { - y = spacing; + y = spacing + 1; } else if (stats.screenbottomspace < 0) { @@ -776,13 +776,14 @@ void DBaseStatusBar::PrintAutomapInfo(FLevelStats& stats) { y = 200 - stats.screenbottomspace - spacing; } + const auto &volname = gVolumeNames[volfromlevelnum(currentLevel->levelNumber)]; + if (volname.IsEmpty() && am_nameontop) y = 1; DrawText(twod, stats.font, stats.standardColor, 2 * hud_statscale, y, mapname, DTA_FullscreenScale, FSMode_ScaleToHeight, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_KeepRatio, true, TAG_DONE); y -= spacing; - - if (!(currentLevel->flags & MI_USERMAP) && !(g_gameType & GAMEFLAG_PSEXHUMED)) - DrawText(twod, stats.font, stats.standardColor, 2 * hud_statscale, y, GStrings.localize(gVolumeNames[volfromlevelnum(currentLevel->levelNumber)]), + if (!(currentLevel->flags & MI_USERMAP) && !(g_gameType & GAMEFLAG_PSEXHUMED) && volname.IsNotEmpty()) + DrawText(twod, stats.font, stats.standardColor, 2 * hud_statscale, y, GStrings.localize(volname), DTA_FullscreenScale, FSMode_ScaleToHeight, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_KeepRatio, true, TAG_DONE); diff --git a/source/exhumed/src/status.cpp b/source/exhumed/src/status.cpp index 80e3ff03d..5e71a3ddb 100644 --- a/source/exhumed/src/status.cpp +++ b/source/exhumed/src/status.cpp @@ -819,19 +819,24 @@ private: void PrintLevelStats(int bottomy) { - if (hud_stats) + FLevelStats stats{}; + stats.fontscale = 1.; + stats.spacing = SmallFont->GetHeight(); + stats.screenbottomspace = bottomy; + stats.font = SmallFont; + stats.letterColor = CR_RED; + stats.standardColor = CR_UNTRANSLATED; + stats.time = Scale(leveltime, 1000, 30); + am_textfont = true; // Exhumed has no fallback. + + if (automapMode == am_full) + { + DBaseStatusBar::PrintAutomapInfo(stats); + } + else if (hud_stats) { - FLevelStats stats{}; - stats.fontscale = 1.; - stats.spacing = SmallFont->GetHeight(); - stats.screenbottomspace = bottomy; - stats.font = SmallFont; - stats.letterColor = CR_RED; - stats.standardColor = CR_UNTRANSLATED; stats.completeColor = CR_DARKGREEN; - - stats.time = Scale(leveltime, 1000, 30); stats.kills = nCreaturesKilled; stats.maxkills = nCreaturesTotal; stats.frags = -1;