mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Move title usages of towerbg to titlebg
With the previous commit in place, we can now simply move some usages of the previous towerbg to use a separate object instead. That way, we don't have to mess with a monolithic state, or some better way to phrase what I just said, and we instead have two separate objects that can coexist side-by-side.
This commit is contained in:
@@ -628,10 +628,10 @@ void mapclass::updatetowerglow(TowerBG& bg_obj)
|
||||
|
||||
void mapclass::nexttowercolour()
|
||||
{
|
||||
graphics.towerbg.colstate+=5;
|
||||
if (graphics.towerbg.colstate >= 30) graphics.towerbg.colstate = 0;
|
||||
int check = graphics.towerbg.colstate % 5; //current state of phase
|
||||
int cmode = (graphics.towerbg.colstate - check) / 5; // current colour transition
|
||||
graphics.titlebg.colstate+=5;
|
||||
if (graphics.titlebg.colstate >= 30) graphics.titlebg.colstate = 0;
|
||||
int check = graphics.titlebg.colstate % 5; //current state of phase
|
||||
int cmode = (graphics.titlebg.colstate - check) / 5; // current colour transition
|
||||
|
||||
switch(cmode)
|
||||
{
|
||||
@@ -655,15 +655,15 @@ void mapclass::nexttowercolour()
|
||||
break;
|
||||
}
|
||||
|
||||
graphics.towerbg.tdrawback = true;
|
||||
graphics.titlebg.tdrawback = true;
|
||||
}
|
||||
|
||||
void mapclass::settowercolour(int t)
|
||||
{
|
||||
graphics.towerbg.colstate=t*5;
|
||||
if (graphics.towerbg.colstate >= 30) graphics.towerbg.colstate = 0;
|
||||
int check = graphics.towerbg.colstate % 5; //current state of phase
|
||||
int cmode = (graphics.towerbg.colstate - check) / 5; // current colour transition
|
||||
graphics.titlebg.colstate=t*5;
|
||||
if (graphics.titlebg.colstate >= 30) graphics.titlebg.colstate = 0;
|
||||
int check = graphics.titlebg.colstate % 5; //current state of phase
|
||||
int cmode = (graphics.titlebg.colstate - check) / 5; // current colour transition
|
||||
|
||||
switch(cmode)
|
||||
{
|
||||
@@ -687,7 +687,7 @@ void mapclass::settowercolour(int t)
|
||||
break;
|
||||
}
|
||||
|
||||
graphics.towerbg.tdrawback = true;
|
||||
graphics.titlebg.tdrawback = true;
|
||||
}
|
||||
|
||||
bool mapclass::spikecollide(int x, int y)
|
||||
|
||||
Reference in New Issue
Block a user