diff options
-rw-r--r-- | engines/mohawk/POTFILES | 3 | ||||
-rw-r--r-- | engines/mohawk/riven_inventory.cpp | 11 | ||||
-rw-r--r-- | engines/mohawk/riven_inventory.h | 4 | ||||
-rw-r--r-- | engines/mohawk/riven_stack.cpp | 5 | ||||
-rw-r--r-- | engines/mohawk/riven_stacks/aspit.cpp | 33 |
5 files changed, 35 insertions, 21 deletions
diff --git a/engines/mohawk/POTFILES b/engines/mohawk/POTFILES index 5181975edd..3ed2309dc5 100644 --- a/engines/mohawk/POTFILES +++ b/engines/mohawk/POTFILES @@ -1,6 +1,7 @@ engines/mohawk/detection.cpp engines/mohawk/dialogs.cpp +engines/mohawk/mohawk.cpp engines/mohawk/myst.cpp engines/mohawk/riven.cpp +engines/mohawk/riven_stack.cpp engines/mohawk/riven_stacks/aspit.cpp -engines/mohawk/mohawk.cpp diff --git a/engines/mohawk/riven_inventory.cpp b/engines/mohawk/riven_inventory.cpp index 6e6f575c0c..9872e79a3e 100644 --- a/engines/mohawk/riven_inventory.cpp +++ b/engines/mohawk/riven_inventory.cpp @@ -33,7 +33,8 @@ namespace Mohawk { RivenInventory::RivenInventory(MohawkEngine_Riven *vm) : _vm(vm), _inventoryDrawn(false), - _forceVisible(false) { + _forceVisible(false), + _forceHidden(false) { _atrusJournalRect1 = Common::Rect(295, 402, 313, 426); _atrusJournalRect2 = Common::Rect(259, 402, 278, 426); @@ -176,6 +177,10 @@ bool RivenInventory::isVisible() const { return true; } + if (_forceHidden) { + return false; + } + if (_vm->getFeatures() & GF_DEMO) { // The inventory is always visible in the demo return true; @@ -209,4 +214,8 @@ void RivenInventory::forceVisible(bool visible) { _forceVisible = visible; } +void RivenInventory::forceHidden(bool hidden) { + _forceHidden = hidden; +} + } // End of namespace Mohawk diff --git a/engines/mohawk/riven_inventory.h b/engines/mohawk/riven_inventory.h index ff4f68cb76..7c75b48374 100644 --- a/engines/mohawk/riven_inventory.h +++ b/engines/mohawk/riven_inventory.h @@ -51,6 +51,9 @@ public: /** Force the inventory to be visible even in situations where it usually is not */ void forceVisible(bool visible); + /** Force the inventory to be hidden even in situations where it usually is not */ + void forceHidden(bool hidden); + private: bool isVisible() const; void draw(); @@ -60,6 +63,7 @@ private: bool _inventoryDrawn; bool _forceVisible; + bool _forceHidden; // Rects for the inventory object positions Common::Rect _atrusJournalRect1; diff --git a/engines/mohawk/riven_stack.cpp b/engines/mohawk/riven_stack.cpp index 79e1ba157c..66c4d57177 100644 --- a/engines/mohawk/riven_stack.cpp +++ b/engines/mohawk/riven_stack.cpp @@ -30,6 +30,7 @@ #include "mohawk/resource.h" #include "common/events.h" +#include "common/translation.h" #include "gui/message.h" @@ -177,8 +178,8 @@ uint16 RivenStack::getComboDigit(uint32 correctCombo, uint32 digit) { } void RivenStack::runDemoBoundaryDialog() { - GUI::MessageDialog dialog("Exploration beyond this point available only within the full version of\n" - "the game."); + GUI::MessageDialog dialog(_("Exploration beyond this point available only within the full version of\n" + "the game.")); dialog.runModal(); } diff --git a/engines/mohawk/riven_stacks/aspit.cpp b/engines/mohawk/riven_stacks/aspit.cpp index 0835d28d9f..4b67cd1e34 100644 --- a/engines/mohawk/riven_stacks/aspit.cpp +++ b/engines/mohawk/riven_stacks/aspit.cpp @@ -39,12 +39,12 @@ namespace RivenStacks { ASpit::ASpit(MohawkEngine_Riven *vm) : RivenStack(vm, kStackAspit) { - REGISTER_COMMAND(ASpit, xastartupbtnhide); // Inaccurate but sufficient - REGISTER_COMMAND(ASpit, xasetupcomplete); // Inaccurate but sufficient - REGISTER_COMMAND(ASpit, xaatrusopenbook); // Done - REGISTER_COMMAND(ASpit, xaatrusbookback); // Done - REGISTER_COMMAND(ASpit, xaatrusbookprevpage); // Done - REGISTER_COMMAND(ASpit, xaatrusbooknextpage); // Done + REGISTER_COMMAND(ASpit, xastartupbtnhide); + REGISTER_COMMAND(ASpit, xasetupcomplete); + REGISTER_COMMAND(ASpit, xaatrusopenbook); + REGISTER_COMMAND(ASpit, xaatrusbookback); + REGISTER_COMMAND(ASpit, xaatrusbookprevpage); + REGISTER_COMMAND(ASpit, xaatrusbooknextpage); REGISTER_COMMAND(ASpit, xacathopenbook); REGISTER_COMMAND(ASpit, xacathbookback); REGISTER_COMMAND(ASpit, xacathbookprevpage); @@ -52,14 +52,14 @@ ASpit::ASpit(MohawkEngine_Riven *vm) : REGISTER_COMMAND(ASpit, xtrapbookback); REGISTER_COMMAND(ASpit, xatrapbookclose); REGISTER_COMMAND(ASpit, xatrapbookopen); - REGISTER_COMMAND(ASpit, xarestoregame); // Done -// REGISTER_COMMAND(ASpit, xadisablemenureturn); -// REGISTER_COMMAND(ASpit, xaenablemenureturn); -// REGISTER_COMMAND(ASpit, xalaunchbrowser); -// REGISTER_COMMAND(ASpit, xadisablemenuintro); -// REGISTER_COMMAND(ASpit, xaenablemenuintro); -// REGISTER_COMMAND(ASpit, xademoquit); -// REGISTER_COMMAND(ASpit, xaexittomain); + REGISTER_COMMAND(ASpit, xarestoregame); + REGISTER_COMMAND(ASpit, xadisablemenureturn); + REGISTER_COMMAND(ASpit, xaenablemenureturn); + REGISTER_COMMAND(ASpit, xalaunchbrowser); + REGISTER_COMMAND(ASpit, xadisablemenuintro); + REGISTER_COMMAND(ASpit, xaenablemenuintro); + REGISTER_COMMAND(ASpit, xademoquit); + REGISTER_COMMAND(ASpit, xaexittomain); } void ASpit::xastartupbtnhide(uint16 argc, uint16 *argv) { @@ -332,8 +332,7 @@ void ASpit::xadisablemenuintro(uint16 argc, uint16 *argv) { // playing the intro. Ctrl+p will play the intro movies instead. // The original also had this shortcut. - // Hide the "exit" button here - //_vm->_inventory->forceVisible(false); + _vm->_inventory->forceHidden(true); } void ASpit::xaenablemenuintro(uint16 argc, uint16 *argv) { @@ -342,7 +341,7 @@ void ASpit::xaenablemenuintro(uint16 argc, uint16 *argv) { // The original also had this shortcut. // Show the "exit" button here - //_vm->_inventory->forceVisible(true); + _vm->_inventory->forceHidden(false); } void ASpit::xademoquit(uint16 argc, uint16 *argv) { |