mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
Refactor tower background to use a separate object instead
Previously, the tower background was controlled by a disparate set of attributes on Graphics and mapclass, and wasn't really encapsulated. (If that's what that word means, I don't particularly care about object-oriented lingo.) But now, all relevant things that a tower background has has been put into a TowerBG struct, so it will be easy to make multiple copies without having to duplicate the code that handles it.
This commit is contained in:
@@ -3292,7 +3292,7 @@ void editorrender()
|
||||
{
|
||||
if(!game.colourblindmode)
|
||||
{
|
||||
graphics.drawtowerbackground();
|
||||
graphics.drawtowerbackground(graphics.towerbg);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3679,8 +3679,8 @@ void editorlogic()
|
||||
game.shouldreturntoeditor = false;
|
||||
}
|
||||
|
||||
map.bypos -= 2;
|
||||
map.bscroll = -2;
|
||||
graphics.towerbg.bypos -= 2;
|
||||
graphics.towerbg.bscroll = -2;
|
||||
|
||||
ed.entframedelay--;
|
||||
if(ed.entframedelay<=0)
|
||||
@@ -3740,14 +3740,14 @@ void editorlogic()
|
||||
}
|
||||
else if (!game.colourblindmode)
|
||||
{
|
||||
graphics.updatetowerbackground();
|
||||
graphics.updatetowerbackground(graphics.towerbg);
|
||||
}
|
||||
|
||||
if (graphics.fademode == 1)
|
||||
{
|
||||
//Return to game
|
||||
map.nexttowercolour();
|
||||
map.colstate = 10;
|
||||
graphics.towerbg.colstate = 10;
|
||||
game.gamestate = TITLEMODE;
|
||||
script.hardreset();
|
||||
graphics.fademode = 4;
|
||||
|
||||
Reference in New Issue
Block a user