mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-08 18:09:45 +01:00
Remove useless arguments from drawimagecol()
Turns out, the r, g, and b arguments don't actually do anything! There was a call to RGBf() in the function. RGBf() is just getRGB() but first adds 128 and then divides by 3 to each of the color channels beforehand. Unfortunately, RGBf() does not have any side effects, and the function threw away the return value. Bravo. This also reveals that the website images drawn in the credits in the main menu are only recolored because of a stale `ct` set by the previous graphics.bigprint(), and not because any color values were passed in to drawimagecol()... What fun surprises the game has in store for me every day.
This commit is contained in:
parent
58ae93c4cc
commit
f237f41d8e
3 changed files with 5 additions and 9 deletions
|
@ -1090,17 +1090,13 @@ void Graphics::updatetextboxes(void)
|
|||
}
|
||||
}
|
||||
|
||||
void Graphics::drawimagecol( int t, int xp, int yp, int r = 0, int g = 0, int b = 0, bool cent/*= false*/ )
|
||||
void Graphics::drawimagecol( int t, int xp, int yp, bool cent/*= false*/ )
|
||||
{
|
||||
if (!INBOUNDS_VEC(t, images))
|
||||
{
|
||||
return;
|
||||
}
|
||||
SDL_Rect trect;
|
||||
if(r+g+b != 0)
|
||||
{
|
||||
RGBf(r,g,b);
|
||||
}
|
||||
|
||||
point tpoint;
|
||||
if (cent)
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
|
||||
void drawimage(int t, int xp, int yp, bool cent=false);
|
||||
|
||||
void drawimagecol(int t, int xp, int yp, int r, int g, int b, bool cent= false);
|
||||
void drawimagecol(int t, int xp, int yp, bool cent= false);
|
||||
|
||||
void updatetextboxes(void);
|
||||
void drawgui(void);
|
||||
|
|
|
@ -433,16 +433,16 @@ static void menurender(void)
|
|||
graphics.Print( -1, 50, "VVVVVV is a game by", tr, tg, tb, true);
|
||||
graphics.bigprint( 40, 65, "Terry Cavanagh", tr, tg, tb, true, 2);
|
||||
|
||||
graphics.drawimagecol(7, -1, 86, tr *0.75, tg *0.75, tb *0.75, true);
|
||||
graphics.drawimagecol(7, -1, 86, true);
|
||||
|
||||
graphics.Print( -1, 120, "and features music by", tr, tg, tb, true);
|
||||
graphics.bigprint( 40, 135, "Magnus P~lsson", tr, tg, tb, true, 2);
|
||||
graphics.drawimagecol(8, -1, 156, tr *0.75, tg *0.75, tb *0.75, true);
|
||||
graphics.drawimagecol(8, -1, 156, true);
|
||||
break;
|
||||
case Menu::credits2:
|
||||
graphics.Print( -1, 50, "Roomnames are by", tr, tg, tb, true);
|
||||
graphics.bigprint( 40, 65, "Bennett Foddy", tr, tg, tb, true);
|
||||
graphics.drawimagecol(9, -1, 86, tr*0.75, tg *0.75, tb *0.75, true);
|
||||
graphics.drawimagecol(9, -1, 86, true);
|
||||
graphics.Print( -1, 110, "C++ version by", tr, tg, tb, true);
|
||||
graphics.bigprint( 40, 125, "Simon Roth", tr, tg, tb, true);
|
||||
graphics.bigprint( 40, 145, "Ethan Lee", tr, tg, tb, true);
|
||||
|
|
Loading…
Reference in a new issue