mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Remove unused drawing overloads
This commit is contained in:
parent
254c46b846
commit
a6ff75d32e
3 changed files with 3 additions and 151 deletions
|
@ -529,13 +529,6 @@ int Graphics::set_color(const SDL_Color color)
|
|||
return set_color(color.r, color.g, color.b, color.a);
|
||||
}
|
||||
|
||||
SDL_Color Graphics::get_color(void)
|
||||
{
|
||||
SDL_Color color = {0, 0, 0, 0};
|
||||
SDL_GetRenderDrawColor(gameScreen.m_renderer, &color.r, &color.g, &color.b, &color.a);
|
||||
return color;
|
||||
}
|
||||
|
||||
int Graphics::fill_rect(const SDL_Rect* rect)
|
||||
{
|
||||
const int result = SDL_RenderFillRect(gameScreen.m_renderer, rect);
|
||||
|
@ -546,17 +539,6 @@ int Graphics::fill_rect(const SDL_Rect* rect)
|
|||
return result;
|
||||
}
|
||||
|
||||
int Graphics::fill_rect(const int x, const int y, const int w, const int h)
|
||||
{
|
||||
const SDL_Rect rect = {x, y, w, h};
|
||||
return fill_rect(&rect);
|
||||
}
|
||||
|
||||
int Graphics::fill_rect(void)
|
||||
{
|
||||
return fill_rect(NULL);
|
||||
}
|
||||
|
||||
int Graphics::fill_rect(const SDL_Rect* rect, const int r, const int g, const int b, const int a)
|
||||
{
|
||||
set_color(r, g, b, a);
|
||||
|
@ -609,17 +591,6 @@ int Graphics::draw_rect(const SDL_Rect* rect)
|
|||
return result;
|
||||
}
|
||||
|
||||
int Graphics::draw_rect(const int x, const int y, const int w, const int h)
|
||||
{
|
||||
const SDL_Rect rect = {x, y, w, h};
|
||||
return draw_rect(&rect);
|
||||
}
|
||||
|
||||
int Graphics::draw_rect()
|
||||
{
|
||||
return draw_rect(NULL);
|
||||
}
|
||||
|
||||
int Graphics::draw_rect(const SDL_Rect* rect, const int r, const int g, const int b, const int a)
|
||||
{
|
||||
set_color(r, g, b, a);
|
||||
|
@ -662,90 +633,6 @@ int Graphics::draw_line(const int x, const int y, const int x2, const int y2)
|
|||
return result;
|
||||
}
|
||||
|
||||
int Graphics::draw_line(const SDL_Rect* rect)
|
||||
{
|
||||
return draw_line(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h);
|
||||
}
|
||||
|
||||
int Graphics::draw_line(const int x, const int y, const int x2, const int y2, const SDL_Color color)
|
||||
{
|
||||
set_color(color);
|
||||
return draw_line(x, y, x2, y2);
|
||||
}
|
||||
|
||||
int Graphics::draw_line(const SDL_Rect* rect, const SDL_Color color)
|
||||
{
|
||||
return draw_line(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h, color);
|
||||
}
|
||||
|
||||
int Graphics::draw_line(const int x, const int y, const int x2, const int y2, const int r, const int g, const int b, const int a)
|
||||
{
|
||||
set_color(r, g, b, a);
|
||||
return draw_line(x, y, x2, y2);
|
||||
}
|
||||
|
||||
int Graphics::draw_line(const int x, const int y, const int x2, const int y2, const int r, const int g, const int b)
|
||||
{
|
||||
return draw_line(x, y, x2, y2, r, g, b, 255);
|
||||
}
|
||||
|
||||
int Graphics::draw_line(const SDL_Rect* rect, const int r, const int g, const int b, const int a)
|
||||
{
|
||||
return draw_line(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h, r, g, b, a);
|
||||
}
|
||||
|
||||
int Graphics::draw_line(const SDL_Rect* rect, const int r, const int g, const int b)
|
||||
{
|
||||
return draw_line(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h, r, g, b, 255);
|
||||
}
|
||||
|
||||
int Graphics::draw_point(const int x, const int y)
|
||||
{
|
||||
const int result = SDL_RenderDrawPoint(gameScreen.m_renderer, x, y);
|
||||
if (result != 0)
|
||||
{
|
||||
WHINE_ONCE_ARGS(("Could not draw point: %s", SDL_GetError()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int Graphics::draw_point(const SDL_Point* point)
|
||||
{
|
||||
return draw_point(point->x, point->y);
|
||||
}
|
||||
|
||||
int Graphics::draw_point(const int x, const int y, const SDL_Color color)
|
||||
{
|
||||
set_color(color);
|
||||
return draw_point(x, y);
|
||||
}
|
||||
|
||||
int Graphics::draw_point(const SDL_Point* point, const SDL_Color color)
|
||||
{
|
||||
return draw_point(point->x, point->y, color);
|
||||
}
|
||||
|
||||
int Graphics::draw_point(const int x, const int y, const int r, const int g, const int b, const int a)
|
||||
{
|
||||
set_color(r, g, b, a);
|
||||
return draw_point(x, y);
|
||||
}
|
||||
|
||||
int Graphics::draw_point(const int x, const int y, const int r, const int g, const int b)
|
||||
{
|
||||
return draw_point(x, y, r, g, b, 255);
|
||||
}
|
||||
|
||||
int Graphics::draw_point(const SDL_Point* point, const int r, const int g, const int b, const int a)
|
||||
{
|
||||
return draw_point(point->x, point->y, r, g, b, a);
|
||||
}
|
||||
|
||||
int Graphics::draw_point(const SDL_Point* point, const int r, const int g, const int b)
|
||||
{
|
||||
return draw_point(point->x, point->y, r, g, b, 255);
|
||||
}
|
||||
|
||||
int Graphics::draw_points(const SDL_Point* points, const int count)
|
||||
{
|
||||
const int result = SDL_RenderDrawPoints(gameScreen.m_renderer, points, count);
|
||||
|
@ -756,21 +643,10 @@ int Graphics::draw_points(const SDL_Point* points, const int count)
|
|||
return result;
|
||||
}
|
||||
|
||||
int Graphics::draw_points(const SDL_Point* points, const int count, const SDL_Color color)
|
||||
{
|
||||
set_color(color);
|
||||
return draw_points(points, count);
|
||||
}
|
||||
|
||||
int Graphics::draw_points(const SDL_Point* points, const int count, const int r, const int g, const int b, const int a)
|
||||
{
|
||||
set_color(r, g, b, a);
|
||||
return draw_points(points, count);
|
||||
}
|
||||
|
||||
int Graphics::draw_points(const SDL_Point* points, const int count, const int r, const int g, const int b)
|
||||
{
|
||||
return draw_points(points, count, r, g, b, 255);
|
||||
set_color(r, g, b);
|
||||
return draw_points(points, count);
|
||||
}
|
||||
|
||||
void Graphics::draw_sprite(const int x, const int y, const int t, const int r, const int g, const int b)
|
||||
|
|
|
@ -203,11 +203,7 @@ public:
|
|||
int set_color(Uint8 r, Uint8 g, Uint8 b);
|
||||
int set_color(SDL_Color color);
|
||||
|
||||
SDL_Color get_color(void);
|
||||
|
||||
int fill_rect(const SDL_Rect* rect);
|
||||
int fill_rect(int x, int y, int w, int h);
|
||||
int fill_rect(void);
|
||||
int fill_rect(const SDL_Rect* rect, int r, int g, int b, int a);
|
||||
int fill_rect(int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
int fill_rect(int x, int y, int w, int h, int r, int g, int b);
|
||||
|
@ -218,8 +214,6 @@ public:
|
|||
int fill_rect(SDL_Color color);
|
||||
|
||||
int draw_rect(const SDL_Rect* rect);
|
||||
int draw_rect(int x, int y, int w, int h);
|
||||
int draw_rect(void);
|
||||
int draw_rect(const SDL_Rect* rect, int r, int g, int b, int a);
|
||||
int draw_rect(int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
int draw_rect(int x, int y, int w, int h, int r, int g, int b);
|
||||
|
@ -228,26 +222,8 @@ public:
|
|||
int draw_rect(int x, int y, int w, int h, SDL_Color color);
|
||||
|
||||
int draw_line(int x, int y, int x2, int y2);
|
||||
int draw_line(const SDL_Rect* rect);
|
||||
int draw_line(int x, int y, int x2, int y2, SDL_Color color);
|
||||
int draw_line(const SDL_Rect* rect, SDL_Color color);
|
||||
int draw_line(int x, int y, int x2, int y2, int r, int g, int b, int a);
|
||||
int draw_line(int x, int y, int x2, int y2, int r, int g, int b);
|
||||
int draw_line(const SDL_Rect* rect, int r, int g, int b, int a);
|
||||
int draw_line(const SDL_Rect* rect, int r, int g, int b);
|
||||
|
||||
int draw_point(int x, int y);
|
||||
int draw_point(const SDL_Point* point);
|
||||
int draw_point(int x, int y, SDL_Color color);
|
||||
int draw_point(const SDL_Point* point, SDL_Color color);
|
||||
int draw_point(int x, int y, int r, int g, int b, int a);
|
||||
int draw_point(int x, int y, int r, int g, int b);
|
||||
int draw_point(const SDL_Point* point, int r, int g, int b, int a);
|
||||
int draw_point(const SDL_Point* point, int r, int g, int b);
|
||||
|
||||
int draw_points(const SDL_Point* points, int count);
|
||||
int draw_points(const SDL_Point* points, int count, SDL_Color color);
|
||||
int draw_points(const SDL_Point* points, int count, int r, int g, int b, int a);
|
||||
int draw_points(const SDL_Point* points, int count, int r, int g, int b);
|
||||
|
||||
void map_tab(int opt, const char* text, bool selected = false);
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace roomname_translator
|
|||
fullscreen_rect.w = 320;
|
||||
fullscreen_rect.h = 240;
|
||||
graphics.set_blendmode(SDL_BLENDMODE_BLEND);
|
||||
graphics.fill_rect(0, 0, 0, 96);
|
||||
graphics.fill_rect(graphics.getRGBA(0, 0, 0, 96));
|
||||
graphics.set_blendmode(SDL_BLENDMODE_NONE);
|
||||
if (help_screen)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue