diff --git a/src/gamedata/fonts/v_font.cpp b/src/gamedata/fonts/v_font.cpp index c4e2dc792..a78930ff2 100644 --- a/src/gamedata/fonts/v_font.cpp +++ b/src/gamedata/fonts/v_font.cpp @@ -915,7 +915,7 @@ int stripaccent(int code) FFont *V_GetFont(const char *name, const char *fontlumpname) { - if (!stricmp(name, "DBIGFONT")) name = "BigFont"; // several mods have used the name CONFONT directly and effectively duplicated the font. + if (!stricmp(name, "DBIGFONT")) name = "BigFont"; else if (!stricmp(name, "CONFONT")) name = "ConsoleFont"; // several mods have used the name CONFONT directly and effectively duplicated the font. FFont *font = FFont::FindFont (name); if (font == nullptr) @@ -1506,15 +1506,14 @@ void V_InitFonts() // The font has been replaced, so we need to create a copy of the original as well. SmallFont = new FFont("SmallFont", "FONTA%02u", nullptr, HU_FONTSTART, HU_FONTSIZE, 1, -1); SmallFont->SetCursor('['); - - OriginalSmallFont = new FFont("SmallFont", "FONTA%02u", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, 1, -1, -1, false, true); - OriginalSmallFont->SetCursor('['); } else { SmallFont = new FFont("SmallFont", "FONTA%02u", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, 1, -1); SmallFont->SetCursor('['); } + OriginalSmallFont = new FFont("OriginalSmallFont", "FONTA%02u", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, 1, -1, -1, false, true); + OriginalSmallFont->SetCursor('['); } else if (Wads.CheckNumForName("STCFN033", ns_graphics) >= 0) { @@ -1525,18 +1524,21 @@ void V_InitFonts() { // The font has been replaced, so we need to create a copy of the original as well. SmallFont = new FFont("SmallFont", "STCFN%.3d", nullptr, HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1); - OriginalSmallFont = new FFont("SmallFont", "STCFN%.3d", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1, -1, false, true); } else { SmallFont = new FFont("SmallFont", "STCFN%.3d", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1); } + OriginalSmallFont = new FFont("OriginalSmallFont", "STCFN%.3d", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1, -1, false, true); } } - uint32_t colors[256] = {}; - SmallFont->RecordAllTextureColors(colors); - if (OriginalSmallFont != nullptr) OriginalSmallFont->SetDefaultTranslation(colors); - NewSmallFont->SetDefaultTranslation(colors); + if (SmallFont) + { + uint32_t colors[256] = {}; + SmallFont->RecordAllTextureColors(colors); + if (OriginalSmallFont != nullptr) OriginalSmallFont->SetDefaultTranslation(colors); + NewSmallFont->SetDefaultTranslation(colors); + } if (!(SmallFont2 = V_GetFont("SmallFont2"))) // Only used by Strife { @@ -1557,6 +1559,22 @@ void V_InitFonts() } } + if (gameinfo.gametype & GAME_Raven) + { + OriginalBigFont = new FFont("OriginalBigFont", "FONTB%02u", "defbigfont", HU_FONTSTART, HU_FONTSIZE, 1, -1, -1, false, true); + } + else + { + OriginalBigFont = new FFont("OriginalBigFont", nullptr, "bigfont", HU_FONTSTART, HU_FONTSIZE, 1, -1, -1, false, true); + } + + if (BigFont) + { + uint32_t colors[256] = {}; + BigFont->RecordAllTextureColors(colors); + if (OriginalBigFont != nullptr) OriginalBigFont->SetDefaultTranslation(colors); + } + // let PWAD BIGFONTs override the stock BIGUPPER font. (This check needs to be made smarter.) if (BigUpper && BigFont->Type != FFont::Folder && BigUpper->Type == FFont::Folder) { @@ -1591,7 +1609,7 @@ void V_InitFonts() // SmallFont and SmallFont2 have no default provided by the engine. BigFont only has in non-Raven games. if (SmallFont == nullptr) { - SmallFont = ConFont; + SmallFont = OriginalSmallFont; } if (SmallFont2 == nullptr) { @@ -1599,11 +1617,7 @@ void V_InitFonts() } if (BigFont == nullptr) { - BigFont = NewSmallFont; - } - if (OriginalSmallFont == nullptr) - { - OriginalSmallFont = SmallFont; + BigFont = OriginalBigFont; } AlternativeSmallFont = OriginalSmallFont; UpdateGenericUI(false); diff --git a/src/gamedata/fonts/v_font.h b/src/gamedata/fonts/v_font.h index e80047f80..312e37900 100644 --- a/src/gamedata/fonts/v_font.h +++ b/src/gamedata/fonts/v_font.h @@ -175,7 +175,7 @@ protected: }; -extern FFont *SmallFont, *SmallFont2, *BigFont, *BigUpper, *ConFont, *IntermissionFont, *NewConsoleFont, *NewSmallFont, *CurrentConsoleFont, *OriginalSmallFont, *AlternativeSmallFont; +extern FFont *SmallFont, *SmallFont2, *BigFont, *BigUpper, *ConFont, *IntermissionFont, *NewConsoleFont, *NewSmallFont, *CurrentConsoleFont, *OriginalSmallFont, *AlternativeSmallFont, *OriginalBigFont; void V_InitFonts(); void V_ClearFonts(); diff --git a/src/v_video.cpp b/src/v_video.cpp index 9a6eb4cad..ae9b1ae78 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -108,7 +108,7 @@ CUSTOM_CVAR(Int, vid_rendermode, 4, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOIN // No further checks needed. All this changes now is which scene drawer the render backend calls. } -CUSTOM_CVAR(Int, vid_enablevulkan, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) +CUSTOM_CVAR(Int, vid_enablevulkan, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) { // [SP] This may seem pointless - but I don't want to implement live switching just // yet - I'm pretty sure it's going to require a lot of reinits and destructions to @@ -149,7 +149,7 @@ public: int DisplayWidth, DisplayHeight; -FFont *SmallFont, *SmallFont2, *BigFont, *BigUpper, *ConFont, *IntermissionFont, *NewConsoleFont, *NewSmallFont, *CurrentConsoleFont, *OriginalSmallFont, *AlternativeSmallFont; +FFont *SmallFont, *SmallFont2, *BigFont, *BigUpper, *ConFont, *IntermissionFont, *NewConsoleFont, *NewSmallFont, *CurrentConsoleFont, *OriginalSmallFont, *AlternativeSmallFont, *OriginalBigFont; uint32_t Col2RGB8[65][256]; uint32_t *Col2RGB8_LessPrecision[65]; @@ -919,6 +919,7 @@ DEFINE_GLOBAL(NewConsoleFont) DEFINE_GLOBAL(NewSmallFont) DEFINE_GLOBAL(AlternativeSmallFont) DEFINE_GLOBAL(OriginalSmallFont) +DEFINE_GLOBAL(OriginalBigFont) DEFINE_GLOBAL(IntermissionFont) DEFINE_GLOBAL(CleanXfac) DEFINE_GLOBAL(CleanYfac) diff --git a/wadsrc/static/zscript/base.zs b/wadsrc/static/zscript/base.zs index 4a13897b8..5a4bd11cf 100644 --- a/wadsrc/static/zscript/base.zs +++ b/wadsrc/static/zscript/base.zs @@ -26,6 +26,7 @@ struct _ native // These are the global variables, the struct is only here to av native readonly Font NewSmallFont; native readonly Font AlternativeSmallFont; native readonly Font OriginalSmallFont; + native readonly Font OriginalBigFont; native readonly Font intermissionfont; native readonly int CleanXFac; native readonly int CleanYFac;