aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-08-04 11:24:02 +0200
committerThierry Crozat2018-01-23 01:01:18 +0000
commit51c93575491a73e1c8d880b994190173bb0bbd9c (patch)
tree68fd6ac6cb3ac280f6df09b1a13c9c767b6fb079 /engines/supernova
parent37b4a77732a25c5097cdb1513d12de836425307a (diff)
downloadscummvm-rg350-51c93575491a73e1c8d880b994190173bb0bbd9c.tar.gz
scummvm-rg350-51c93575491a73e1c8d880b994190173bb0bbd9c.tar.bz2
scummvm-rg350-51c93575491a73e1c8d880b994190173bb0bbd9c.zip
SUPERNOVA: Implements death screen
Diffstat (limited to 'engines/supernova')
-rw-r--r--engines/supernova/state.cpp23
-rw-r--r--engines/supernova/state.h1
2 files changed, 24 insertions, 0 deletions
diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp
index cd096874ca..d612c234df 100644
--- a/engines/supernova/state.cpp
+++ b/engines/supernova/state.cpp
@@ -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) {
if (section < 128)
section += 128;
diff --git a/engines/supernova/state.h b/engines/supernova/state.h
index b85ff76523..383b1caca7 100644
--- a/engines/supernova/state.h
+++ b/engines/supernova/state.h
@@ -180,6 +180,7 @@ public:
void handleInput();
void handleTime();
void setAnimationTimer(int ticks);
+ void death(const char *message);
};
}