TWINE: activate achievement LBA_ACH_005

This commit is contained in:
Martin Gerhardy 2021-03-07 11:37:16 +01:00
parent 3d5ed0bf8a
commit cb49b7a42c
2 changed files with 5 additions and 2 deletions

View File

@ -45,6 +45,7 @@ namespace TwinE {
static const char allowedCharIndex[] = " ABCDEFGHIJKLM.NOPQRSTUVWXYZ-abcdefghijklm?nopqrstuvwxyz!0123456789\040\b\r\0";
void MenuOptions::newGame() {
_engine->setTotalPlayTime(0);
_engine->_music->stopMusic();
_engine->_sound->stopSamples();

View File

@ -472,8 +472,10 @@ void Scene::changeScene() {
if (needChangeScene == LBA1SceneId::Polar_Island_end_scene) {
_engine->unlockAchievement("LBA_ACH_001");
// TODO: if you finish in under 4 hours - unlock the achievement - see version 4 savegames
// _engine->unlockAchievment("LBA_ACH_005");
// if you finish the game in less than 4 hours
if (_engine->getTotalPlayTime() <= 1000 * 60 * 60 * 4) {
_engine->unlockAchievement("LBA_ACH_005");
}
} else if (needChangeScene == LBA1SceneId::Brundle_Island_Secret_room) {
_engine->unlockAchievement("LBA_ACH_006");
}