From 2598835c54a3869a477d287d2845bbe42790a359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Fri, 18 Aug 2023 02:03:35 +0900 Subject: Fix typo from -Wall -Werror --- src/GameDraw.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/GameDraw.cpp') diff --git a/src/GameDraw.cpp b/src/GameDraw.cpp index 12ac309..911e9ea 100644 --- a/src/GameDraw.cpp +++ b/src/GameDraw.cpp @@ -19,7 +19,7 @@ // You should have received a copy of the GNU General Public License // along with Black Shades. If not, see . -#include +#include #include @@ -927,7 +927,7 @@ void Game::DrawGLScene(void) static char str[256] = ""; if (!debug) { - char *s; + std::string s; switch (person[0].whichgun) { case nogun: s = "UNARMED"; @@ -954,7 +954,7 @@ void Game::DrawGLScene(void) s = "HANDGUN"; break; } - glPrint(&this->text, 10, 90, s, 1, 0.8, 640, 480); + glPrint(&this->text, 10, 90, s.c_str(), 1, 0.8, 640, 480); if(person[0].whichgun!=nogun&&person[0].whichgun!=knife&&person[0].whichgun!=grenade){ glColor4f(0,1,0,1); glPrint(&this->text, 10, 30, "Magazines", @@ -991,7 +991,7 @@ void Game::DrawGLScene(void) } else { sprintf(str, "FPS: %.0f", 1.0f / multiplier); glPrint(&this->text, 10,30,str,0,.8,screenwidth,screenheight); - char *s; + std::string s; switch (enemystate) { case 0: s = "Enemies are in random assassination mode."; @@ -1003,7 +1003,7 @@ void Game::DrawGLScene(void) s = "Enemies are in DIE!!!! mode."; break; } - glPrint(&this->text, 10, 20, s, 0, 0.8, + glPrint(&this->text, 10, 20, s.c_str(), 0, 0.8, screenwidth, screenheight); sprintf(str, "You have pointlessly shot or beaten %d unarmed civilians.", civkills); glPrint(&this->text, 10,60,str,0,.8,screenwidth,screenheight); -- cgit v1.2.3