1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 05:58:30 +02: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;
}
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> unlocknotify;
bool anything_unlocked();
int stat_trinkets;
bool fullscreen;
int bestgamedeaths;