diff options
author | Paul Gilbert | 2015-03-07 17:01:07 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-03-07 17:01:07 -0500 |
commit | c80c74e49926daed108f73e115fda7ba5901eb61 (patch) | |
tree | 9a8eb56a34d1b7f0908271e405f7f7bc3fa53d9c /engines/mads/nebular | |
parent | a22d7f2d5f27701766dbf36d50e0a31ea7b26d69 (diff) | |
download | scummvm-rg350-c80c74e49926daed108f73e115fda7ba5901eb61.tar.gz scummvm-rg350-c80c74e49926daed108f73e115fda7ba5901eb61.tar.bz2 scummvm-rg350-c80c74e49926daed108f73e115fda7ba5901eb61.zip |
MADS: Refactoring of text/animation views to show outside game loop
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r-- | engines/mads/nebular/game_nebular.cpp | 56 | ||||
-rw-r--r-- | engines/mads/nebular/menu_nebular.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes8.cpp | 6 |
3 files changed, 36 insertions, 28 deletions
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp index 965ef7fad2..8c8d4ab974 100644 --- a/engines/mads/nebular/game_nebular.cpp +++ b/engines/mads/nebular/game_nebular.cpp @@ -61,6 +61,35 @@ ProtectionResult GameNebular::checkCopyProtection() { } void GameNebular::startGame() { + // First handle any ending credits from a just finished game session. + // Note that, with the exception of the decompression ending, which doesn't + // use animations, the remaining animations will automatically launch their + // own text view credits when the animation is completed + 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; + } + + checkShowDialog(); + _winStatus = 0; + /* // Check copy protection ProtectionResult protectionResult = checkCopyProtection(); @@ -310,32 +339,9 @@ 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]) { + if (_vm->_dialogs->_pendingDialog && (_player._stepEnabled || _winStatus) + && !_globals[kCopyProtectFailed]) { _player.releasePlayerSprites(); // Make a thumbnail in case it's needed for making a savegame diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp index 2fdef3443d..358a978cfa 100644 --- a/engines/mads/nebular/menu_nebular.cpp +++ b/engines/mads/nebular/menu_nebular.cpp @@ -136,12 +136,14 @@ void MainMenu::doFrame() { addSpriteSlot(); } + _vm->_events->setCursor(CURSOR_ARROW); _vm->_events->showCursor(); } else { if ((_menuItemIndex == -1) || (_frameIndex == 0)) { if (++_menuItemIndex == 6) { // Reached end of display animation + _vm->_events->setCursor(CURSOR_ARROW); _vm->_events->showCursor(); return; } else if (_menuItemIndex == 4 && !shouldShowQuotes()) { diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp index 4b8d7d5dd8..8a30f88548 100644 --- a/engines/mads/nebular/nebular_scenes8.cpp +++ b/engines/mads/nebular/nebular_scenes8.cpp @@ -719,7 +719,7 @@ void Scene803::step() { else _game._winStatus = 3; - _vm->quitGame(); + return; } } @@ -957,7 +957,7 @@ void Scene804::step() { assert(!_globals[kCopyProtectFailed]); _game._winStatus = 4; - _vm->quitGame(); + return; } break; @@ -969,7 +969,7 @@ void Scene804::step() { assert(!_globals[kCopyProtectFailed]); _game._winStatus = 4; - _vm->quitGame(); + return; } } |