mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Axe Graphics::ct and Graphics::setcolreal
`ct` was used to be a variable that a color was temporarily stored in before being passed to a draw function. But this is unnecessary and you might as well just have a temporary of the color directly. I guess this was the practice used because temporaries were apparently really bad in Flash. setcolreal() was added in 2.3 to do basically the same thing (set it directly from entities' realcol attributes). But it's no longer needed. Correspondingly, Graphics::setcol has been renamed to Graphics::getcol and now returns an SDL_Color, and Graphics::huetilesetcol has been renamed to Graphics::huetilegetcol for the same reason. Some functions (notably Graphics::drawimagecol and Graphics::drawhuetile) were relying on the `ct` to be implicitly set and weren't ever having it passed in directly. They have been corrected accordingly.
This commit is contained in:
@@ -39,8 +39,8 @@ public:
|
||||
|
||||
bool Makebfont(void);
|
||||
|
||||
void drawhuetile(int x, int y, int t);
|
||||
void huetilesetcol(int t);
|
||||
void drawhuetile(int x, int y, int t, SDL_Color ct);
|
||||
SDL_Color huetilegetcol(int t);
|
||||
SDL_Color bigchunkygetcol(int t);
|
||||
|
||||
void drawgravityline(int t);
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
|
||||
void drawimage(int t, int xp, int yp, bool cent=false);
|
||||
|
||||
void drawimagecol(int t, int xp, int yp, bool cent= false);
|
||||
void drawimagecol(int t, int xp, int yp, SDL_Color ct, bool cent= false);
|
||||
|
||||
void updatetextboxes(void);
|
||||
void drawgui(void);
|
||||
@@ -209,8 +209,6 @@ public:
|
||||
|
||||
SDL_Color RGBf(int r, int g, int b);
|
||||
|
||||
void setcolreal(SDL_Color color);
|
||||
|
||||
void drawbackground(int t);
|
||||
void updatebackground(int t);
|
||||
#ifndef NO_CUSTOM_LEVELS
|
||||
@@ -256,11 +254,9 @@ public:
|
||||
void drawtowerbackground(const TowerBG& bg_obj);
|
||||
void updatetowerbackground(TowerBG& bg_obj);
|
||||
|
||||
void setcol(int t);
|
||||
SDL_Color getcol(int t);
|
||||
void drawfinalmap(void);
|
||||
|
||||
SDL_Color ct;
|
||||
|
||||
int rcol;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user