diff options
author | David Fioramonti | 2018-09-01 03:35:12 -0700 |
---|---|---|
committer | Bastien Bouclet | 2018-09-09 16:11:12 +0200 |
commit | d7b511b98ba160339b8d302d7b585fb09ba0517c (patch) | |
tree | 4b914ff9bc442a26eab04226a3a7a55125c2054c /engines/mohawk | |
parent | a66e661df194963d4e649d122c33255e05a2e588 (diff) | |
download | scummvm-rg350-d7b511b98ba160339b8d302d7b585fb09ba0517c.tar.gz scummvm-rg350-d7b511b98ba160339b8d302d7b585fb09ba0517c.tar.bz2 scummvm-rg350-d7b511b98ba160339b8d302d7b585fb09ba0517c.zip |
MOHAWK: RIVEN: Return to main menu after the credits
Like the original the game loop returns to the main menu
after the credits end.
The variable states are reset and the player can start
a new game or load an old one.
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/riven_graphics.cpp | 3 | ||||
-rw-r--r-- | engines/mohawk/riven_stack.cpp | 11 | ||||
-rw-r--r-- | engines/mohawk/riven_stacks/ospit.cpp | 1 |
3 files changed, 13 insertions, 2 deletions
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index 084019df5e..71339d6ff3 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -656,6 +656,9 @@ void RivenGraphics::beginCredits() { // Clear the old cache clearCache(); + _creditsImage = kRivenCreditsZeroImage; + _creditsPos = 0; + // Now cache all the credits images for (uint16 i = kRivenCreditsZeroImage; i <= kRivenCreditsLastImage; i++) { MohawkSurface *surface = _bitmapDecoder->decodeImage(_vm->getExtrasResource(ID_TBMP, i)); diff --git a/engines/mohawk/riven_stack.cpp b/engines/mohawk/riven_stack.cpp index 17baf94595..c0a7587f1a 100644 --- a/engines/mohawk/riven_stack.cpp +++ b/engines/mohawk/riven_stack.cpp @@ -258,7 +258,16 @@ void RivenStack::runCredits(uint16 video, uint32 delay, uint32 videoFrameCountOv _vm->doFrame(); } - _vm->setGameEnded(); + videoPtr->stop(); + _vm->_cursor->showCursor(); + + // Clear the game state + _vm->startNewGame(); + + // Go to the main menu + RivenScriptPtr goToMainMenu = _vm->_scriptMan->createScriptWithCommand( + new RivenStackChangeCommand(_vm, kStackAspit, 1, true, true)); + _vm->_scriptMan->runScript(goToMainMenu, true); } void RivenStack::installCardTimer() { diff --git a/engines/mohawk/riven_stacks/ospit.cpp b/engines/mohawk/riven_stacks/ospit.cpp index d01a0c0860..c0dc13da8f 100644 --- a/engines/mohawk/riven_stacks/ospit.cpp +++ b/engines/mohawk/riven_stacks/ospit.cpp @@ -142,7 +142,6 @@ void OSpit::xbookclick(const ArgumentArray &args) { // use the trap book, he will shoot the player. Dead on arrival. // Run the credits from here. if (_vm->_vars["agehn"] == 3) { - _vm->_scriptMan->stopAllScripts(); runCredits(args[0], 5000, 995); return; } |