- allow using a better font for the map name on the automap.

- allow displaying the map label on the automap.

So far only for Duke and related games, the rest will follow.
This commit is contained in:
Christoph Oelckers 2020-08-24 00:05:36 +02:00
parent f6417f5876
commit e7c1595531
3 changed files with 21 additions and 18 deletions

View file

@ -473,6 +473,10 @@ CUSTOM_CVAR(Int, playergender, 0, CVAR_USERINFO|CVAR_ARCHIVE)
}
CVAR(Bool, am_textfont, false, CVAR_ARCHIVE)
CVAR(Bool, am_showlabel, false, CVAR_ARCHIVE)
// Internal settings for demo recording and the multiplayer menu. These won't get saved and only are CVARs so that the menu code can use them.
CVAR(Int, m_recstat, false, CVAR_NOSET)
CVAR(Int, m_coop, 0, CVAR_NOSET)
@ -492,23 +496,8 @@ CVAR(String, m_netport, "19014", CVAR_NOSET)
// Currently unavailable due to dependency on an obsolete OpenGL feature
{ "deliriumblur", "enable/disable delirium blur effect(polymost)", (void *)&gDeliriumBlur, CVAR_BOOL, 0, 1 },
// This one gets changed at run time by the game code, so making it persistent does not work
// This option is not really useful anymore
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
// This requires a different approach, because it got used like a CCMD, not a CVAR.
{ "skill","changes the game skill setting", (void *)&ud.m_player_skill, CVAR_INT|CVAR_FUNCPTR|CVAR_NOSAVE/*|CVAR_NOMULTI*/, 0, 5 },
// just as a reminder:
/*
else if (!Bstrcasecmp(parm->name, "vid_gamma"))
{
}
else if (!Bstrcasecmp(parm->name, "vid_brightness") || !Bstrcasecmp(parm->name, "vid_contrast"))
{
}
*/
#endif

View file

@ -70,6 +70,9 @@ EXTERN_CVAR(Int, althud_numberpal)
EXTERN_CVAR(Int, althud_shadows)
EXTERN_CVAR(Int, althud_flashing)
EXTERN_CVAR(Bool, am_textfont)
EXTERN_CVAR(Bool, am_showlabel)
EXTERN_CVAR(Int, r_fov)
EXTERN_CVAR(Bool, r_horizcenter)

View file

@ -656,12 +656,23 @@ void drawoverheadmap(int cposx, int cposy, int czoom, int cang)
if (/*textret == 0 &&*/ ud.overhead_on == 2)
{
FString mapname;
if (am_showlabel) mapname.Format(TEXTCOLOR_GOLD "%s: %s%s", currentLevel->LabelName(), (am_textfont && isNamWW2GI()) ? TEXTCOLOR_ORANGE : TEXTCOLOR_UNTRANSLATED, currentLevel->DisplayName());
else mapname = currentLevel->DisplayName();
double scale = isRR() ? 0.5 : 1.;
int top = isRR() ? 0 : (hud_size != Hud_Nothing ? 147 : 179);
FFont* font = SmallFont2;
int color = CR_UNTRANSLATED;
if (am_textfont)
{
scale *= 0.66;
font = isNamWW2GI()? ConFont : SmallFont;
if (isNamWW2GI()) color = CR_ORANGE;
}
int top = (isRR() && !am_textfont) ? 0 : (hud_size != Hud_Nothing ? 147 : 179);
if (!(currentLevel->flags & MI_USERMAP))
DrawText(twod, SmallFont2, CR_UNDEFINED, 5, top+6, GStrings.localize(gVolumeNames[volfromlevelnum(currentLevel->levelNumber)]),
DrawText(twod, font, color, 5, top+6, GStrings.localize(gVolumeNames[volfromlevelnum(currentLevel->levelNumber)]),
DTA_FullscreenScale, FSMode_ScaleToFit43, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_KeepRatio, true, TAG_DONE);
DrawText(twod, SmallFont2, CR_UNDEFINED, 5, top + 12, currentLevel->DisplayName(),
DrawText(twod, font, color, 5, top + ((isRR() && am_textfont)? 15:12), mapname,
DTA_FullscreenScale, FSMode_ScaleToFit43, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_KeepRatio, true, TAG_DONE);
}