mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
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:
committed by
Misa Elizabeth Kai
parent
d1b9f4f410
commit
8b1dcecd5a
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user