diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 23338506..a65bc454 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -3478,31 +3478,6 @@ SDL_Color Graphics::RGBf(int r, int g, int b) return color; } -void Graphics::drawrect(int x, int y, int w, int h, int r, int g, int b) -{ - SDL_Rect madrect; - //Draw the retangle indicated by that object - madrect.x = x; - madrect.y = y; - madrect.w = w; - madrect.h = 1; - fill_rect(&madrect, getRGB(r, g, b)); - - madrect.w = 1; - madrect.h = h; - fill_rect(&madrect, getRGB(r, g, b)); - - madrect.x = x + w - 1; - madrect.w = 1; - madrect.h = h; - fill_rect(&madrect, getRGB(r, g, b)); - madrect.x = x; - madrect.y = y + h - 1; - madrect.w = w; - madrect.h = 1; - fill_rect(&madrect, getRGB(r, g, b)); -} - bool Graphics::onscreen(int t) { return (t >= -40 && t <= 280); diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index bb3370b0..6af08bcb 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -296,8 +296,6 @@ public: void drawmap(void); - void drawrect(int x, int y, int w, int h, int r, int g, int b); - void drawtowermap(void); void drawtowerspikes(void); diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index a17482fc..291f98ee 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -2525,31 +2525,31 @@ static void rendermapcursor(const bool flashing) // Draw the tower specially if (!flashing || game.noflashingmode) { - graphics.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + 2, 12 - 4, 180 - 4, 16, 245 - (help.glow * 2), 245 - (help.glow * 2)); + graphics.draw_rect(40 + ((game.roomx - 100) * 12) + 2, 21 + 2, 12 - 4, 180 - 4, 16, 245 - (help.glow * 2), 245 - (help.glow * 2)); } else if (map.cursorstate == 1) { if (int(map.cursordelay / 4) % 2 == 0) { - graphics.drawrect(40 + ((game.roomx - 100) * 12), 21, 12, 180, 255, 255, 255); - graphics.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + 2, 12 - 4, 180 - 4, 255, 255, 255); + graphics.draw_rect(40 + ((game.roomx - 100) * 12), 21, 12, 180, 255, 255, 255); + graphics.draw_rect(40 + ((game.roomx - 100) * 12) + 2, 21 + 2, 12 - 4, 180 - 4, 255, 255, 255); } } else if (map.cursorstate == 2 && (int(map.cursordelay / 15) % 2 == 0)) { - graphics.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + 2, 12 - 4, 180 - 4, 16, 245 - (help.glow), 245 - (help.glow)); + graphics.draw_rect(40 + ((game.roomx - 100) * 12) + 2, 21 + 2, 12 - 4, 180 - 4, 16, 245 - (help.glow), 245 - (help.glow)); } return; } if (!flashing || ((map.cursorstate == 2 && int(map.cursordelay / 15) % 2 == 0) || game.noflashingmode)) { - graphics.drawrect(40 + ((game.roomx - 100) * 12 * data.zoom) + 2 + data.xoff, 21 + ((game.roomy - 100) * 9 * data.zoom) + 2 + data.yoff, (12 * data.zoom) - 4, (9 * data.zoom) - 4, 16, 245 - (help.glow), 245 - (help.glow)); + graphics.draw_rect(40 + ((game.roomx - 100) * 12 * data.zoom) + 2 + data.xoff, 21 + ((game.roomy - 100) * 9 * data.zoom) + 2 + data.yoff, (12 * data.zoom) - 4, (9 * data.zoom) - 4, 16, 245 - (help.glow), 245 - (help.glow)); } else if (map.cursorstate == 1 && int(map.cursordelay / 4) % 2 == 0) { - graphics.drawrect(40 + ((game.roomx - 100) * 12 * data.zoom) + data.xoff, 21 + ((game.roomy - 100) * 9 * data.zoom) + data.yoff, 12 * data.zoom, 9 * data.zoom, 255, 255, 255); - graphics.drawrect(40 + ((game.roomx - 100) * 12 * data.zoom) + 2 + data.xoff, 21 + ((game.roomy - 100) * 9 * data.zoom) + 2 + data.yoff, (12 * data.zoom) - 4, (9 * data.zoom) - 4, 255, 255, 255); + graphics.draw_rect(40 + ((game.roomx - 100) * 12 * data.zoom) + data.xoff, 21 + ((game.roomy - 100) * 9 * data.zoom) + data.yoff, 12 * data.zoom, 9 * data.zoom, 255, 255, 255); + graphics.draw_rect(40 + ((game.roomx - 100) * 12 * data.zoom) + 2 + data.xoff, 21 + ((game.roomy - 100) * 9 * data.zoom) + 2 + data.yoff, (12 * data.zoom) - 4, (9 * data.zoom) - 4, 255, 255, 255); } } @@ -3102,8 +3102,8 @@ void teleporterrender(void) //Draw the chosen destination coordinate! //TODO //draw the coordinates //destination - graphics.drawrect(40 + data.xoff + (telex * 12 * data.zoom) + 1, 21 + data.yoff + (teley * 9 * data.zoom) + 1, 12 * data.zoom - 2, 9 * data.zoom - 2, 245 - (help.glow * 2), 16, 16); - graphics.drawrect(40 + data.xoff + (telex * 12 * data.zoom) + 3, 21 + data.yoff + (teley * 9 * data.zoom) + 3, 12 * data.zoom - 6, 9 * data.zoom - 6, 245 - (help.glow * 2), 16, 16); + graphics.draw_rect(40 + data.xoff + (telex * 12 * data.zoom) + 1, 21 + data.yoff + (teley * 9 * data.zoom) + 1, 12 * data.zoom - 2, 9 * data.zoom - 2, 245 - (help.glow * 2), 16, 16); + graphics.draw_rect(40 + data.xoff + (telex * 12 * data.zoom) + 3, 21 + data.yoff + (teley * 9 * data.zoom) + 3, 12 * data.zoom - 6, 9 * data.zoom - 6, 245 - (help.glow * 2), 16, 16); } // Draw the legend itself