mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Move warpfcol, warpbcol, and warprect off of Graphics
These are all temporary variables only used when drawing the all-sides warp background. warpskip isn't though, it's a persistent variable.
This commit is contained in:
@@ -84,8 +84,6 @@ void Graphics::init(void)
|
|||||||
backgrounddrawn = false;
|
backgrounddrawn = false;
|
||||||
|
|
||||||
warpskip = 0;
|
warpskip = 0;
|
||||||
SDL_zero(warpfcol);
|
|
||||||
SDL_zero(warpbcol);
|
|
||||||
|
|
||||||
spcol = 0;
|
spcol = 0;
|
||||||
spcoldel = 0;
|
spcoldel = 0;
|
||||||
@@ -122,7 +120,6 @@ void Graphics::init(void)
|
|||||||
trinketr = 0;
|
trinketr = 0;
|
||||||
trinketg = 0;
|
trinketg = 0;
|
||||||
trinketb = 0;
|
trinketb = 0;
|
||||||
warprect = SDL_Rect();
|
|
||||||
|
|
||||||
translucentroomname = false;
|
translucentroomname = false;
|
||||||
|
|
||||||
@@ -2654,7 +2651,11 @@ void Graphics::drawbackground( int t )
|
|||||||
SDL_BlitSurface(warpbuffer_lerp, &towerbuffer_rect, backBuffer, NULL);
|
SDL_BlitSurface(warpbuffer_lerp, &towerbuffer_rect, backBuffer, NULL);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
{
|
||||||
//Warp zone, central
|
//Warp zone, central
|
||||||
|
SDL_Color warpbcol;
|
||||||
|
SDL_Color warpfcol;
|
||||||
|
|
||||||
switch(rcol)
|
switch(rcol)
|
||||||
{
|
{
|
||||||
//Akward ordering to match tileset
|
//Akward ordering to match tileset
|
||||||
@@ -2694,7 +2695,7 @@ void Graphics::drawbackground( int t )
|
|||||||
for (int i = 10 ; i >= 0; i--)
|
for (int i = 10 ; i >= 0; i--)
|
||||||
{
|
{
|
||||||
const int temp = (i * 16) + backoffset;
|
const int temp = (i * 16) + backoffset;
|
||||||
setwarprect(160 - temp, 120 - temp, temp * 2, temp * 2);
|
const SDL_Rect warprect = {160 - temp, 120 - temp, temp * 2, temp * 2};
|
||||||
if (i % 2 == warpskip)
|
if (i % 2 == warpskip)
|
||||||
{
|
{
|
||||||
FillRect(backBuffer, warprect, warpbcol);
|
FillRect(backBuffer, warprect, warpbcol);
|
||||||
@@ -2705,6 +2706,7 @@ void Graphics::drawbackground( int t )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 6:
|
case 6:
|
||||||
//Final Starfield
|
//Final Starfield
|
||||||
ClearSurface(backBuffer);
|
ClearSurface(backBuffer);
|
||||||
@@ -3303,14 +3305,6 @@ SDL_Color Graphics::bigchunkygetcol(int t)
|
|||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Graphics::setwarprect( int a, int b, int c, int d )
|
|
||||||
{
|
|
||||||
warprect.x = a;
|
|
||||||
warprect.y = b;
|
|
||||||
warprect.w = c;
|
|
||||||
warprect.h = d;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Graphics::textboxcenterx(void)
|
void Graphics::textboxcenterx(void)
|
||||||
{
|
{
|
||||||
if (!INBOUNDS_VEC(m, textboxes))
|
if (!INBOUNDS_VEC(m, textboxes))
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ public:
|
|||||||
|
|
||||||
void drawfade(void);
|
void drawfade(void);
|
||||||
|
|
||||||
void setwarprect(int a, int b, int c, int d);
|
|
||||||
|
|
||||||
void createtextboxreal(
|
void createtextboxreal(
|
||||||
const std::string& t,
|
const std::string& t,
|
||||||
int xp,
|
int xp,
|
||||||
@@ -307,8 +305,6 @@ public:
|
|||||||
int oldmenuoffset;
|
int oldmenuoffset;
|
||||||
bool resumegamemode;
|
bool resumegamemode;
|
||||||
|
|
||||||
SDL_Rect warprect;
|
|
||||||
|
|
||||||
int crewframe;
|
int crewframe;
|
||||||
int crewframedelay;
|
int crewframedelay;
|
||||||
|
|
||||||
@@ -339,8 +335,6 @@ public:
|
|||||||
float backboxint[numbackboxes];
|
float backboxint[numbackboxes];
|
||||||
|
|
||||||
int warpskip;
|
int warpskip;
|
||||||
SDL_Color warpfcol;
|
|
||||||
SDL_Color warpbcol;
|
|
||||||
|
|
||||||
bool translucentroomname;
|
bool translucentroomname;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user