- use the generalized code to display automap labels in Blood.

This commit is contained in:
Christoph Oelckers 2020-08-24 23:59:09 +02:00
parent 6672b8af99
commit 777bbd4bd8
2 changed files with 19 additions and 36 deletions

View file

@ -187,48 +187,30 @@ private:
void PrintLevelStats(PLAYER* pPlayer, int bottomy)
{
FLevelStats stats{};
stats.fontscale = 1.;
stats.spacing = SmallFont->GetHeight() + 1;
stats.screenbottomspace = bottomy;
stats.font = SmallFont;
stats.letterColor = CR_DARKRED;
stats.standardColor = CR_DARKGRAY;
stats.time = Scale(gLevelTime, 1000, kTicsPerSec);
if (automapMode == am_full)
{
FString pBuffer;
const char *pTitle = currentLevel->DisplayName();
const char *pFilename = currentLevel->LabelName();
if (pTitle)
pBuffer.Format("%s: %s", pFilename, pTitle);
else
pBuffer = pFilename;
#if 0
int nViewY;
if (g ViewSize > 3)
nViewY = gViewY1S-16;
else
nViewY = gViewY0S+1;
viewDrawText(3, pBuffer, gViewX1S /2, nViewY, -128, 0, 2, 0, 256);
#else
// This needs fixing across games, so for the time being just print the text into the upper left corner
viewDrawText(3, pBuffer, 3, 3, -128, 0, 0, 0, 256);
#endif
#if 0 // needs to be generalized
if (automapFollow)
Printf(PRINT_NOTIFY, "MAP FOLLOW MODE\n");
else
Printf(PRINT_NOTIFY, "MAP SCROLL MODE\n");
#endif
if (!am_textfont)
{
stats.font = SmallFont2;
stats.spacing = 6;
}
if (hud_size <= Hud_StbarOverlay) stats.screenbottomspace = 56;
DBaseStatusBar::PrintAutomapInfo(stats);
}
if (automapMode == am_off && hud_stats)
{
FLevelStats stats{};
stats.fontscale = 1.;
stats.spacing = SmallFont->GetHeight() + 1;
stats.screenbottomspace = bottomy;
stats.font = SmallFont;
stats.letterColor = CR_DARKRED;
stats.standardColor = CR_DARKGRAY;
stats.completeColor = CR_DARKGREEN;
stats.time = Scale(gLevelTime, 1000, kTicsPerSec);
stats.kills = gKillMgr.at4;
stats.maxkills = gKillMgr.at0;
stats.frags = gGameOptions.nGameType == 3? pPlayer->fragCount : -1;

View file

@ -182,7 +182,6 @@ void DDukeCommonStatusBar::PrintLevelStats(int bottomy)
FLevelStats stats{};
auto pp = &ps[myconnectindex];
stats.fontscale = isRR() ? 0.5 : 1.;
stats.spacing = isRR() ? 10 : 7;
stats.screenbottomspace = bottomy;
stats.time = Scale(pp->player_par, 1000, REALGAMETICSPERSEC);
stats.font = SmallFont;
@ -200,6 +199,7 @@ void DDukeCommonStatusBar::PrintLevelStats(int bottomy)
stats.font = SmallFont2;
stats.spacing = 6;
}
else stats.spacing = ConFont->GetHeight() + 1;
stats.standardColor = (isNamWW2GI() && am_textfont)? CR_ORANGE : CR_UNTRANSLATED;
stats.letterColor = CR_GOLD;
DBaseStatusBar::PrintAutomapInfo(stats);
@ -208,6 +208,7 @@ void DDukeCommonStatusBar::PrintLevelStats(int bottomy)
{
// JBF 20040124: display level stats in screen corner
stats.spacing = isRR() ? 10 : 7;
stats.kills = pp->actors_killed;
stats.maxkills = !isRR() && ud.player_skill > 3 ? -2 : pp->max_actors_killed;
stats.frags = ud.multimode > 1 && !ud.coop ? pp->frag - pp->fraggedself : -1;