From 8e5ac98a4b6082caf68ad205dc6cadffa4df5051 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 6 Aug 2017 06:33:20 +0200 Subject: MOHAWK: Riven: Add keyboard navigation --- engines/mohawk/riven_card.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'engines/mohawk/riven_card.h') diff --git a/engines/mohawk/riven_card.h b/engines/mohawk/riven_card.h index cfcacdb8b8..c5a5795eaa 100644 --- a/engines/mohawk/riven_card.h +++ b/engines/mohawk/riven_card.h @@ -99,7 +99,10 @@ public: RivenHotspot *getHotspotContainingPoint(const Common::Point &point) const; /** Get the hotspot with the specified name */ - RivenHotspot *getHotspotByName(const Common::String &name) const; + RivenHotspot *getHotspotByName(const Common::String &name, bool optional = false) const; + + /** Find an enabled hotspot with a name matching one of the arguments */ + RivenHotspot *findEnabledHotspotByName(uint n, ...) const; /** Get the hotspot with the specified BLST id */ RivenHotspot *getHotspotByBlstId(const uint16 blstId) const; @@ -125,6 +128,9 @@ public: /** Handle a mouse move event */ RivenScriptPtr onMouseMove(const Common::Point &mouse); + /** Handle a keyboard action */ + RivenScriptPtr onKeyAction(RivenKeyAction keyAction); + /** General frame update handler */ RivenScriptPtr onFrame(); @@ -145,6 +151,7 @@ private: void loadCardMovieList(uint16 id); void loadCardHotspotEnableList(uint16 id); void loadCardWaterEffectList(uint16 id); + void applyPatches(uint16 id); void setCurrentCardVariable(); RivenScriptPtr getScript(uint16 scriptType) const; @@ -254,9 +261,12 @@ public: /** Write all of the hotspot's data to standard output */ void dump() const; - /** Apply patches to hotspot's scripts to fix bugs in the original game scripts */ + /** Apply patches to the hotspot's scripts to fix bugs in the original game scripts */ void applyScriptPatches(uint32 cardGlobalId); + /** Apply patches to the hotspot's properties to fix bugs in the original game scripts */ + void applyPropertiesPatches(uint32 cardGlobalId); + private: enum { kFlagZip = 1, -- cgit v1.2.3