From 9767eb91f408ab296d97f1cda709e5975568a2a7 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 3 Sep 2021 15:26:57 -0700 Subject: [PATCH] drawpixeltextbox: Remove now-unused parameters They go bye-bye. This is a friendly reminder that the map menu rendering code is heavily copy-pasted, dear god... --- desktop_version/src/Graphics.cpp | 2 +- desktop_version/src/Graphics.h | 2 +- desktop_version/src/Render.cpp | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index f7acef0c..1b8d3328 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1289,7 +1289,7 @@ void Graphics::drawcrewman( int x, int y, int t, bool act, bool noshift /*=false } } -void Graphics::drawpixeltextbox( int x, int y, int w, int h, int w2, int h2, int r, int g, int b, int xo, int yo ) +void Graphics::drawpixeltextbox( int x, int y, int w, int h, int r, int g, int b ) { //given these parameters, draw a textbox with a pixel width diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index 532b7b9f..ca248dd9 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -99,7 +99,7 @@ public: void drawtextbox(int x, int y, int w, int h, int r, int g, int b); - void drawpixeltextbox(int x, int y, int w, int h, int w2, int h2, int r, int g, int b, int xo, int yo); + void drawpixeltextbox(int x, int y, int w, int h, int r, int g, int b); void drawcrewman(int x, int y, int t, bool act, bool noshift =false); diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index 7e77f2c3..463083ff 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -884,7 +884,7 @@ static void menurender(void) case 0: { //Show teleporter save info - graphics.drawpixeltextbox(17, 65-20, 286, 90, 36,12, 65, 185, 207,0,4); + graphics.drawpixeltextbox(17, 65-20, 286, 90, 65, 185, 207); graphics.bigprint(-1, 20, "Tele Save", tr, tg, tb, true); graphics.Print(0, 80-20, game.tele_currentarea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); @@ -903,7 +903,7 @@ static void menurender(void) case 1: { //Show quick save info - graphics.drawpixeltextbox(17, 65-20, 286, 90, 36,12, 65, 185, 207,0,4); + graphics.drawpixeltextbox(17, 65-20, 286, 90, 65, 185, 207); graphics.bigprint(-1, 20, "Quick Save", tr, tg, tb, true); graphics.Print(0, 80-20, game.quick_currentarea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); @@ -2095,7 +2095,7 @@ void maprender(void) if (map.finalmode || (map.custommode&&!map.customshowmm)) { //draw the map image - graphics.drawpixeltextbox(35, 16, 250, 190, 32,24, 65, 185, 207,4,0); + graphics.drawpixeltextbox(35, 16, 250, 190, 65, 185, 207); graphics.drawimage(1, 40, 21, false); for (int j = 0; j < 20; j++) { @@ -2110,7 +2110,7 @@ void maprender(void) else if(map.custommode) { //draw the map image - graphics.drawpixeltextbox(35+map.custommmxoff, 16+map.custommmyoff, map.custommmxsize+10, map.custommmysize+10, (map.custommmxsize+10)/8, (map.custommmysize+10)/8, 65, 185, 207,4,0); + graphics.drawpixeltextbox(35+map.custommmxoff, 16+map.custommmyoff, map.custommmxsize+10, map.custommmysize+10, 65, 185, 207); if (graphics.minimap_mounted) { graphics.drawpartimage(1, 40+map.custommmxoff, 21+map.custommmyoff, map.custommmxsize, map.custommmysize); @@ -2227,7 +2227,7 @@ void maprender(void) else { //draw the map image - graphics.drawpixeltextbox(35, 16, 250, 190, 32,24, 65, 185, 207,4,0); + graphics.drawpixeltextbox(35, 16, 250, 190, 65, 185, 207); graphics.drawimage(1, 40, 21, false); //black out areas we can't see yet @@ -2550,7 +2550,7 @@ void maprender(void) { graphics.Print(0, 36, "Game saved ok!", 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2), true); - graphics.drawpixeltextbox(17, 65, 286, 90, 36,12, 65, 185, 207,0,4); + graphics.drawpixeltextbox(17, 65, 286, 90, 65, 185, 207); if (graphics.flipmode) { @@ -2595,7 +2595,7 @@ void maprender(void) { graphics.Print(0, 36, "Game saved ok!", 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2), true); - graphics.drawpixeltextbox(17, 65, 286, 90, 36,12, 65, 185, 207,0,4); + graphics.drawpixeltextbox(17, 65, 286, 90, 65, 185, 207); if (graphics.flipmode) { @@ -2801,7 +2801,7 @@ void teleporterrender(void) FillRect(graphics.backBuffer, 0, 12, 320, 240, 10, 24, 26); //draw the map image - graphics.drawpixeltextbox(35, 16, 250, 190, 32,24, 65, 185, 207,4,0); + graphics.drawpixeltextbox(35, 16, 250, 190, 65, 185, 207); graphics.drawimage(1, 40, 21, false); //black out areas we can't see yet for (int j = 0; j < 20; j++)