diff options
-rw-r--r-- | engines/mohawk/riven_card.h | 2 | ||||
-rw-r--r-- | engines/mohawk/riven_scripts.h | 21 |
2 files changed, 23 insertions, 0 deletions
diff --git a/engines/mohawk/riven_card.h b/engines/mohawk/riven_card.h index 220c40f617..0d752ed5c0 100644 --- a/engines/mohawk/riven_card.h +++ b/engines/mohawk/riven_card.h @@ -80,6 +80,7 @@ public: /** Get the card's sound description with the specified index */ SLSTRecord getSound(uint16 index) const; + /** Replace an ambient sound list with another one */ void overrideSound(uint16 index, uint16 withIndex); /** Play the card's movie with the specified index */ @@ -103,6 +104,7 @@ public: /** Get the hotspot with the specified BLST id */ RivenHotspot *getHotspotByBlstId(const uint16 blstId) const; + /** Get the currently hovered hotspot if any */ RivenHotspot *getCurHotspot() const; /** Get all the hotspots in the card. To be used for debugging features only */ diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h index 6d422b858d..03172c86f1 100644 --- a/engines/mohawk/riven_scripts.h +++ b/engines/mohawk/riven_scripts.h @@ -188,10 +188,25 @@ public: /** Run queued scripts */ void runQueuedScripts(); + /** + * Are queued scripts currently running? + * + * The game is mostly non-interactive while scripts are running. + * This method is used to check if user interaction should be permitted. + */ bool runningQueuedScripts() const; + /** + * Stop running all the scripts + * + * This is effective immediately after the current command completes. + * The next command in the script is not executed. The next scripts + * in the queue are skipped until the queue is empty. + * Scripts execution then resumes normally. + */ void stopAllScripts(); + /** Should all the scripts stop immediately? */ bool stoppingAllScripts() const; struct StoredMovieOpcode { @@ -364,6 +379,12 @@ private: bool _byStackId; // Otherwise by stack name id }; +/** + * A command to delay execution of card specific hardcoded scripts + * + * Timers are queued as script commands so that they don't run when the doFrame method + * is called from an inner game loop. + */ class RivenTimerCommand : public RivenCommand { public: RivenTimerCommand(MohawkEngine_Riven *vm, const Common::SharedPtr<RivenStack::TimerProc> &timerProc); |