1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

Add function Game::anything_unlocked()

This will be a useful shorthand to ask "do we have the Secret Lab, or
any Time Trial, or Intermission replays, or No Death Mode, or Flip Mode
unlocked?"
This commit is contained in:
Misa 2020-04-26 12:43:30 -07:00 committed by Ethan Lee
parent dc2adea8ee
commit 833bbdbbef
2 changed files with 18 additions and 0 deletions

View file

@ -7313,3 +7313,20 @@ int Game::crewmates()
} }
return temp; return temp;
} }
bool Game::anything_unlocked()
{
for (size_t i = 0; i < unlock.size(); i++)
{
if (unlock[i] &&
(i == 8 // Secret Lab
|| i >= 9 || i <= 14 // any Time Trial
|| i == 16 // Intermission replays
|| i == 17 // No Death Mode
|| i == 18)) // Flip Mode
{
return true;
}
}
return false;
}

View file

@ -286,6 +286,7 @@ public:
std::vector<int> unlock; std::vector<int> unlock;
std::vector<int> unlocknotify; std::vector<int> unlocknotify;
bool anything_unlocked();
int stat_trinkets; int stat_trinkets;
bool fullscreen; bool fullscreen;
int bestgamedeaths; int bestgamedeaths;