Replace drawrect with draw_rect

Turns out `graphics.drawrect` exists. Well, not anymore!
This was another function from before the renderer rewrite which tried
to draw a rectangle by using four filled rectangles. We can draw
outline rectangles properly now, so let's make sure everywhere does it!
This commit is contained in:
AllyTally
2023-05-22 16:09:32 -03:00
committed by Misa Elizabeth Kai
parent d1b9f4f410
commit 8b1dcecd5a
3 changed files with 9 additions and 36 deletions

View File

@@ -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);