diff --git a/engines/mohawk/riven_card.h b/engines/mohawk/riven_card.h index 220c40f6170f..0d752ed5c003 100644 --- a/engines/mohawk/riven_card.h +++ b/engines/mohawk/riven_card.h @@ -80,6 +80,7 @@ class RivenCard { /** 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 @@ class RivenCard { /** 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 6d422b858d2c..03172c86f156 100644 --- a/engines/mohawk/riven_scripts.h +++ b/engines/mohawk/riven_scripts.h @@ -188,10 +188,25 @@ class RivenScriptManager { /** 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 @@ class RivenStackChangeCommand : public RivenCommand { 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 &timerProc);