From 51f03c8215c35116eca4bc1ef9060724512a1e87 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 16 Dec 2018 00:37:34 +0100 Subject: [PATCH] - a few more fixes. --- src/textures/skyboxtexture.cpp | 1 + src/v_font.cpp | 5 +++-- src/v_font.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/textures/skyboxtexture.cpp b/src/textures/skyboxtexture.cpp index 6b5346ac2..45e79bf74 100644 --- a/src/textures/skyboxtexture.cpp +++ b/src/textures/skyboxtexture.cpp @@ -38,6 +38,7 @@ FSkyBox::FSkyBox(const char *name) : FTexture(name) { FTextureID texid = TexMan.CheckForTexture(name, ETextureType::Wall); + previous = nullptr; if (texid.isValid()) { previous = TexMan.GetTexture(texid); diff --git a/src/v_font.cpp b/src/v_font.cpp index aaf450725..da3335236 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -149,7 +149,7 @@ public: FSinglePicFont(const char *picname); // FFont interface - FTexture *GetChar (int code, int *const width) const; + FTexture *GetChar(int code, int translation, int *const width, bool *redirected = nullptr) const override; int GetCharWidth (int code) const; protected: @@ -1465,9 +1465,10 @@ FSinglePicFont::FSinglePicFont(const char *picname) : // //========================================================================== -FTexture *FSinglePicFont::GetChar (int code, int *const width) const +FTexture *FSinglePicFont::GetChar (int code, int translation, int *const width, bool *redirected) const { *width = SpaceWidth; + if (redirected) *redirected = false; if (code == 'a' || code == 'A') { return TexMan.GetPalettedTexture(PicNum, true); diff --git a/src/v_font.h b/src/v_font.h index 96283947a..7e8373532 100644 --- a/src/v_font.h +++ b/src/v_font.h @@ -82,7 +82,7 @@ public: FFont (const char *fontname, const char *nametemplate, int first, int count, int base, int fdlump, int spacewidth=-1, bool notranslate = false); virtual ~FFont (); - FTexture *GetChar (int code, int translation, int *const width, bool *redirected = nullptr) const; + virtual FTexture *GetChar (int code, int translation, int *const width, bool *redirected = nullptr) const; virtual int GetCharWidth (int code) const; FRemapTable *GetColorTranslation (EColorRange range, PalEntry *color = nullptr) const; int GetLump() const { return Lump; }