mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Move tower background update code to logic functions
Otherwise it'll go really really quickly, which is not good.
This commit is contained in:
@@ -2348,6 +2348,11 @@ void Graphics::drawtowerspikes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Graphics::drawtowerbackground()
|
void Graphics::drawtowerbackground()
|
||||||
|
{
|
||||||
|
SDL_BlitSurface(towerbuffer,NULL, backBuffer,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Graphics::updatetowerbackground()
|
||||||
{
|
{
|
||||||
int temp;
|
int temp;
|
||||||
|
|
||||||
@@ -2366,8 +2371,6 @@ void Graphics::drawtowerbackground()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_BlitSurface(towerbuffer,NULL, backBuffer,NULL);
|
|
||||||
|
|
||||||
map.tdrawback = false;
|
map.tdrawback = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2394,8 +2397,6 @@ void Graphics::drawtowerbackground()
|
|||||||
drawtowertile3(i * 8, 31*8 - (map.bypos % 8) - map.bscroll, temp, map.colstate);
|
drawtowertile3(i * 8, 31*8 - (map.bypos % 8) - map.bscroll, temp, map.colstate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_BlitSurface(towerbuffer,NULL, backBuffer,NULL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ public:
|
|||||||
void menuoffrender();
|
void menuoffrender();
|
||||||
|
|
||||||
void drawtowerbackground();
|
void drawtowerbackground();
|
||||||
|
void updatetowerbackground();
|
||||||
|
|
||||||
void setcol(int t);
|
void setcol(int t);
|
||||||
void drawfinalmap();
|
void drawfinalmap();
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ void titlelogic()
|
|||||||
map.bypos -= 2;
|
map.bypos -= 2;
|
||||||
map.bscroll = -2;
|
map.bscroll = -2;
|
||||||
|
|
||||||
|
if (!game.colourblindmode)
|
||||||
|
{
|
||||||
|
graphics.updatetowerbackground();
|
||||||
|
}
|
||||||
|
|
||||||
if (game.menucountdown > 0)
|
if (game.menucountdown > 0)
|
||||||
{
|
{
|
||||||
game.menucountdown--;
|
game.menucountdown--;
|
||||||
@@ -96,6 +101,11 @@ void gamecompletelogic()
|
|||||||
map.bscroll = +1;
|
map.bscroll = +1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!game.colourblindmode)
|
||||||
|
{
|
||||||
|
graphics.updatetowerbackground();
|
||||||
|
}
|
||||||
|
|
||||||
if (graphics.fademode == 1)
|
if (graphics.fademode == 1)
|
||||||
{
|
{
|
||||||
//Fix some graphical things
|
//Fix some graphical things
|
||||||
@@ -1542,7 +1552,14 @@ void gamelogic()
|
|||||||
|
|
||||||
if (!game.colourblindmode)
|
if (!game.colourblindmode)
|
||||||
{
|
{
|
||||||
graphics.updatebackground(map.background);
|
if (map.towermode)
|
||||||
|
{
|
||||||
|
graphics.updatetowerbackground();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
graphics.updatebackground(map.background);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!game.blackout)
|
if (!game.blackout)
|
||||||
|
|||||||
@@ -3622,6 +3622,10 @@ void editorlogic()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!game.colourblindmode)
|
||||||
|
{
|
||||||
|
graphics.updatetowerbackground();
|
||||||
|
}
|
||||||
|
|
||||||
if (graphics.fademode == 1)
|
if (graphics.fademode == 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user