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:
@@ -1182,7 +1182,7 @@ void titlerender()
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!game.colourblindmode) graphics.drawtowerbackground();
|
||||
if(!game.colourblindmode) graphics.drawtowerbackground(graphics.towerbg);
|
||||
|
||||
tr = graphics.col_tr;
|
||||
tg = graphics.col_tg;
|
||||
@@ -1211,7 +1211,7 @@ void gamecompleterender()
|
||||
{
|
||||
FillRect(graphics.backBuffer, 0x000000);
|
||||
|
||||
if(!game.colourblindmode) graphics.drawtowerbackground();
|
||||
if(!game.colourblindmode) graphics.drawtowerbackground(graphics.towerbg);
|
||||
|
||||
tr = graphics.col_tr;
|
||||
tg = graphics.col_tg;
|
||||
@@ -1397,7 +1397,7 @@ void gamerender()
|
||||
{
|
||||
if (!game.colourblindmode)
|
||||
{
|
||||
graphics.drawtowerbackground();
|
||||
graphics.drawtowerbackground(graphics.towerbg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user