aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/game_nebular.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-10-18 11:20:50 -0400
committerPaul Gilbert2014-10-18 11:20:50 -0400
commit72303564f70573dc4bacd9c726dc626920bf21e8 (patch)
tree0609776637669a2681c66641fd36027a1578f645 /engines/mads/nebular/game_nebular.cpp
parent22aaf995ed4f5131ae9cf6753d228718a96293f3 (diff)
downloadscummvm-rg350-72303564f70573dc4bacd9c726dc626920bf21e8.tar.gz
scummvm-rg350-72303564f70573dc4bacd9c726dc626920bf21e8.tar.bz2
scummvm-rg350-72303564f70573dc4bacd9c726dc626920bf21e8.zip
MADS: Hook up Rex game endings to show the correct animation and/or credits
Diffstat (limited to 'engines/mads/nebular/game_nebular.cpp')
-rw-r--r--engines/mads/nebular/game_nebular.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 902f42507a..eae74d6da0 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -27,6 +27,7 @@
#include "mads/game.h"
#include "mads/screen.h"
#include "mads/msurface.h"
+#include "mads/menu_views.h"
#include "mads/nebular/game_nebular.h"
#include "mads/nebular/dialogs_nebular.h"
#include "mads/nebular/globals_nebular.h"
@@ -309,6 +310,31 @@ void GameNebular::setSectionHandler() {
}
void GameNebular::checkShowDialog() {
+ // Handling to start endgame sequences if the win/lose type has been set
+ switch (_winStatus) {
+ case 1:
+ // No shields failure ending
+ AnimationView::execute(_vm, "rexend1");
+ break;
+ case 2:
+ // Shields, but no targetting failure ending
+ AnimationView::execute(_vm, "rexend2");
+ break;
+ case 3:
+ // Completed game successfully, so activate quotes item on the main menu
+ ConfMan.setBool("ShowQuotes", true);
+ ConfMan.flushToDisk();
+
+ AnimationView::execute(_vm, "rexend3");
+ break;
+ case 4:
+ // Decompression ending
+ TextView::execute(_vm, "ending4");
+ break;
+ }
+ _winStatus = 0;
+
+ // Loop for showing dialogs, if any need to be shown
if (_vm->_dialogs->_pendingDialog && _player._stepEnabled && !_globals[kCopyProtectFailed]) {
_player.releasePlayerSprites();