From a053ef7cd18400058af9ec39e53481ba88455b96 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 1 Sep 2010 23:22:12 +0000 Subject: MOHAWK: Cleanup mouse cursor position handling in Riven This fixes some cursors showing up incorrectly if the cursor moved during ie. a video and then the card changes. Also, remove an unneeded rect check in loadHotspots() that's from the ancient times before script size calculation was fixed and some warnings that don't affect gameplay. svn-id: r52487 --- engines/mohawk/riven.h | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/mohawk/riven.h') diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h index 631285455e..aa97250627 100644 --- a/engines/mohawk/riven.h +++ b/engines/mohawk/riven.h @@ -169,7 +169,6 @@ public: uint16 matchRMAPToCard(uint32); uint32 getCurCardRMAP(); - Common::Point _mousePos; RivenHotspot *_hotspots; int32 _curHotspot; Common::Array _zipModeData; -- cgit v1.2.3 From 1475f756539e81182cb9aaa8188ddb354ea7769f Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 1 Sep 2010 23:39:25 +0000 Subject: MOHAWK: Update videos when the delay opcode is called The fixes a couple scripts which decide to delay through a background video turning into a virtual blocking video. svn-id: r52488 --- engines/mohawk/riven.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'engines/mohawk/riven.h') diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h index aa97250627..d65dd7db05 100644 --- a/engines/mohawk/riven.h +++ b/engines/mohawk/riven.h @@ -153,10 +153,7 @@ private: bool _ignoreNextMouseUp; public: - Common::SeekableReadStream *getExtrasResource(uint32 tag, uint16 id); - bool _activatedSLST; - void runLoadDialog(); - + // Stack/card/script funtions void changeToCard(uint16 dest); void changeToStack(uint16); void refreshCard(); @@ -169,6 +166,7 @@ public: uint16 matchRMAPToCard(uint32); uint32 getCurCardRMAP(); + // Hotspot functions/variables RivenHotspot *_hotspots; int32 _curHotspot; Common::Array _zipModeData; @@ -177,6 +175,7 @@ public: int32 getCurHotspot() { return _curHotspot; } Common::String getHotspotName(uint16 hotspot); + // Variable functions void initVars(); uint32 getVarCount() { return _varCount; } uint32 getGlobalVar(uint32 index); @@ -185,8 +184,13 @@ public: uint32 *matchVarToString(Common::String varName); uint32 *matchVarToString(const char *varName); + // Miscellaneous void setGameOver() { _gameOver = true; } void ignoreNextMouseUp() { _ignoreNextMouseUp = true; } + Common::SeekableReadStream *getExtrasResource(uint32 tag, uint16 id); + bool _activatedSLST; + void runLoadDialog(); + void delayAndUpdate(uint32 ms); }; } // End of namespace Mohawk -- cgit v1.2.3 From 8a168f028bfdf084892abd623942a0c3f9f8de58 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 3 Sep 2010 19:13:58 +0000 Subject: MOHAWK: Improve support for the Riven Demo - The exit button now appears and is functional - The intro movies now play on start up - Add shortcuts for returning to the menu/playing the intro videos again - Make the text when hitting a boundary match the original - Change the wording of the browser button message - Note: The demo's extras.mhk (not the full game's!) is required now svn-id: r52509 --- engines/mohawk/riven.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/mohawk/riven.h') diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h index d65dd7db05..98135bd861 100644 --- a/engines/mohawk/riven.h +++ b/engines/mohawk/riven.h @@ -74,6 +74,7 @@ extern Common::Rect *g_cathJournalRect2; extern Common::Rect *g_atrusJournalRect3; extern Common::Rect *g_cathJournalRect3; extern Common::Rect *g_trapBookRect3; +extern Common::Rect *g_demoExitRect; struct RivenHotspot { uint16 blstID; -- cgit v1.2.3 From 34f570419ad49550c6a7790e2a97a7d88d02fbac Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 5 Sep 2010 00:48:38 +0000 Subject: MOHAWK: Cleanup - Split the main Riven event loop into a separate function for readability and for use in the sunner external functions eventually - Some minor function signature changes (const!) - Rename matchVarToString() to getVar() (I have no idea where that original name came from, considering it takes a string and returns a variable - Use solely Common::String in getVar() svn-id: r52538 --- engines/mohawk/riven.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'engines/mohawk/riven.h') diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h index 98135bd861..13818810f1 100644 --- a/engines/mohawk/riven.h +++ b/engines/mohawk/riven.h @@ -136,6 +136,7 @@ private: uint16 _curCard; uint16 _curStack; void loadCard(uint16); + void handleEvents(); // Hotspot related functions and variables uint16 _hotspotCount; @@ -159,11 +160,11 @@ public: void changeToStack(uint16); void refreshCard(); Common::String getName(uint16 nameResource, uint16 nameID); - Common::String getStackName(uint16 stack); + Common::String getStackName(uint16 stack) const; void runCardScript(uint16 scriptType); void runUpdateScreenScript() { runCardScript(kCardUpdateScript); } - uint16 getCurCard() { return _curCard; } - uint16 getCurStack() { return _curStack; } + uint16 getCurCard() const { return _curCard; } + uint16 getCurStack() const { return _curStack; } uint16 matchRMAPToCard(uint32); uint32 getCurCardRMAP(); @@ -171,19 +172,18 @@ public: RivenHotspot *_hotspots; int32 _curHotspot; Common::Array _zipModeData; - uint16 getHotspotCount() { return _hotspotCount; } + uint16 getHotspotCount() const { return _hotspotCount; } void runHotspotScript(uint16 hotspot, uint16 scriptType); - int32 getCurHotspot() { return _curHotspot; } + int32 getCurHotspot() const { return _curHotspot; } Common::String getHotspotName(uint16 hotspot); // Variable functions void initVars(); - uint32 getVarCount() { return _varCount; } + uint32 getVarCount() const { return _varCount; } uint32 getGlobalVar(uint32 index); Common::String getGlobalVarName(uint32 index); uint32 *getLocalVar(uint32 index); - uint32 *matchVarToString(Common::String varName); - uint32 *matchVarToString(const char *varName); + uint32 *getVar(const Common::String &varName); // Miscellaneous void setGameOver() { _gameOver = true; } -- cgit v1.2.3 From 30080c7e070aa06fa1fb795db90392d85351a62c Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 9 Sep 2010 17:27:02 +0000 Subject: MOHAWK: Add initial work on the Riven marble puzzle The marbles are currently drawn, and you can pick them up, but you can not place them on the grid yet. svn-id: r52661 --- engines/mohawk/riven.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/mohawk/riven.h') diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h index 13818810f1..251a0fc753 100644 --- a/engines/mohawk/riven.h +++ b/engines/mohawk/riven.h @@ -141,7 +141,6 @@ private: // Hotspot related functions and variables uint16 _hotspotCount; void loadHotspots(uint16); - void checkHotspotChange(); void checkInventoryClick(); bool _showHotspots; void updateZipMode(); @@ -176,6 +175,7 @@ public: void runHotspotScript(uint16 hotspot, uint16 scriptType); int32 getCurHotspot() const { return _curHotspot; } Common::String getHotspotName(uint16 hotspot); + void checkHotspotChange(); // Variable functions void initVars(); -- cgit v1.2.3