SUPERNOVA: Implements death screen

This commit is contained in:
Joseph-Eugene Winzer 2017-08-04 11:24:02 +02:00 committed by Thierry Crozat
parent 37b4a77732
commit 51c9357549
2 changed files with 24 additions and 0 deletions

View file

@ -805,6 +805,29 @@ void GameManager::closeLocker(const Room *room, Object *obj, Object *lock, int s
} }
} }
void GameManager::death(const char *message) {
_vm->paletteFadeOut();
_guiEnabled = false;
_vm->renderImage(11, 0);
_vm->renderMessage(message);
_vm->playSound(kAudioDeath);
_vm->paletteFadeIn();
getInput();
_vm->paletteFadeOut();
_vm->removeMessage();
// TODO: Load screen
destroyRooms();
initRooms();
initState();
initGui();
_inventory.clear();
changeRoom(INTRO);
_vm->paletteFadeIn();
_guiEnabled = true;
}
int GameManager::invertSection(int section) { int GameManager::invertSection(int section) {
if (section < 128) if (section < 128)
section += 128; section += 128;

View file

@ -180,6 +180,7 @@ public:
void handleInput(); void handleInput();
void handleTime(); void handleTime();
void setAnimationTimer(int ticks); void setAnimationTimer(int ticks);
void death(const char *message);
}; };
} }