mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +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:
@@ -1373,7 +1373,7 @@ void Game::updatestate()
|
||||
gamestate = TITLEMODE;
|
||||
graphics.fademode = 4;
|
||||
graphics.backgrounddrawn = true;
|
||||
map.tdrawback = true;
|
||||
graphics.towerbg.tdrawback = true;
|
||||
createmenu(Menu::timetrialcomplete);
|
||||
state = 0;
|
||||
break;
|
||||
@@ -2942,7 +2942,7 @@ void Game::updatestate()
|
||||
gamestate = TITLEMODE;
|
||||
graphics.fademode = 4;
|
||||
graphics.backgrounddrawn = true;
|
||||
map.tdrawback = true;
|
||||
graphics.towerbg.tdrawback = true;
|
||||
music.play(6);
|
||||
state = 0;
|
||||
break;
|
||||
@@ -3278,7 +3278,7 @@ void Game::updatestate()
|
||||
gamestate = TITLEMODE;
|
||||
graphics.fademode = 4;
|
||||
graphics.backgrounddrawn = true;
|
||||
map.tdrawback = true;
|
||||
graphics.towerbg.tdrawback = true;
|
||||
createmenu(Menu::nodeathmodecomplete);
|
||||
state = 0;
|
||||
break;
|
||||
@@ -7129,7 +7129,7 @@ void Game::quittomenu()
|
||||
FILESYSTEM_unmountassets(); // should be before music.play(6)
|
||||
music.play(6);
|
||||
graphics.backgrounddrawn = false;
|
||||
map.tdrawback = true;
|
||||
graphics.towerbg.tdrawback = true;
|
||||
graphics.flipmode = false;
|
||||
//Don't be stuck on the summary screen,
|
||||
//or "who do you want to play the level with?"
|
||||
@@ -7223,7 +7223,7 @@ void Game::returntoeditor()
|
||||
ed.level[i+(j*ed.maxwidth)].warpdir=ed.kludgewarpdir[i+(j*ed.maxwidth)];
|
||||
}
|
||||
}
|
||||
map.scrolldir = 0;
|
||||
graphics.towerbg.scrolldir = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -7233,7 +7233,7 @@ void Game::returntopausemenu()
|
||||
returntomenu(kludge_ingametemp);
|
||||
gamestate = MAPMODE;
|
||||
map.kludge_to_bg();
|
||||
map.tdrawback = true;
|
||||
graphics.towerbg.tdrawback = true;
|
||||
graphics.backgrounddrawn = false;
|
||||
mapheld = true;
|
||||
graphics.flipmode = graphics.setflipmode;
|
||||
|
||||
Reference in New Issue
Block a user