From eecaf4cdfc949a46d7d94c140e8e52e124763280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 31 Oct 2024 17:55:01 +0100 Subject: [PATCH] Remove redundant `BmpWidth`/`BmpHeight` variables They are identical to the `Width`/`Height` variables which specify the size of the glyph in the atlas texture. --- src/engine/client/text.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp index 86eb6f891..dc2646e2e 100644 --- a/src/engine/client/text.cpp +++ b/src/engine/client/text.cpp @@ -558,9 +558,6 @@ private: // set glyph info { - const int BmpWidth = pBitmap->width + x * 2; - const int BmpHeight = pBitmap->rows + y * 2; - Glyph.m_Height = Height; Glyph.m_Width = Width; Glyph.m_CharHeight = RealHeight; @@ -571,8 +568,8 @@ private: Glyph.m_aUVs[0] = X; Glyph.m_aUVs[1] = Y; - Glyph.m_aUVs[2] = Glyph.m_aUVs[0] + BmpWidth; - Glyph.m_aUVs[3] = Glyph.m_aUVs[1] + BmpHeight; + Glyph.m_aUVs[2] = Glyph.m_aUVs[0] + Width; + Glyph.m_aUVs[3] = Glyph.m_aUVs[1] + Height; Glyph.m_State = SGlyph::EState::RENDERED; }