From 6261fa51e90f1b34904875105be36ed394383fd4 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 2 Jan 2021 00:19:27 -0800 Subject: [PATCH] Remove unused function Graphics::RPrint() This function was marked as unused by cppcheck. --- desktop_version/src/Graphics.cpp | 34 -------------------------------- desktop_version/src/Graphics.h | 2 -- 2 files changed, 36 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 5a75975f..23452697 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -515,40 +515,6 @@ void Graphics::bprintalpha( int x, int y, std::string t, int r, int g, int b, in PrintAlpha(x, y, t, r, g, b, a, cen); } -void Graphics::RPrint( int _x, int _y, std::string _s, int r, int g, int b, bool cen /*= false*/ ) -{ - std::vector& font = flipmode ? flipbfont : bfont; - - r = clamp(r,0,255); - g = clamp(g,0,255); - b = clamp(b,0,255); - ct.colour = getRGB(r, g, b); - - if (cen) - _x = ((308) - (_s.length() / 2)); - int bfontpos = 0; - int curr; - int idx; - std::string::iterator iter = _s.begin(); - while (iter != _s.end()) { - curr = utf8::unchecked::next(iter); - point tpoint; - tpoint.x = _x + bfontpos; - tpoint.y = _y; - - SDL_Rect fontRect = bfont_rect; - fontRect.x = tpoint.x ; - fontRect.y = tpoint.y ; - - idx = font_idx(curr); - if (INBOUNDS_VEC(idx, font)) - { - BlitSurfaceColoured( font[idx], NULL, backBuffer, &fontRect , ct); - } - bfontpos+=bfontlen(curr) ; - } -} - void Graphics::printcrewname( int x, int y, int t ) { //Print the name of crew member t in the right colour diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index 3520ba48..2048c78a 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -111,8 +111,6 @@ public: void PrintAlpha(int _x, int _y, std::string _s, int r, int g, int b, int a, bool cen = false); - void RPrint(int _x, int _y, std::string _s, int r, int g, int b, bool cen = false); - void PrintOffAlpha(int _x, int _y, std::string _s, int r, int g, int b, int a, bool cen = false); void bprint(int x, int y, std::string t, int r, int g, int b, bool cen = false);