From 92e03a7b684c019d7670a56feb8e3a6cfd2e85b2 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 28 Jan 2017 14:04:12 +0100 Subject: MOHAWK: Add a command to check if background scripts are running --- engines/mohawk/riven_scripts.cpp | 4 ++++ engines/mohawk/riven_scripts.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'engines') diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp index 331f2261d5..22651fc981 100644 --- a/engines/mohawk/riven_scripts.cpp +++ b/engines/mohawk/riven_scripts.cpp @@ -124,6 +124,10 @@ void RivenScriptManager::runScript(const RivenScriptPtr &script, bool queue) { } } +bool RivenScriptManager::hasQueuedScripts() const { + return !_queue.empty(); +} + RivenScriptPtr RivenScriptManager::createScriptFromData(uint16 commandCount, ...) { va_list args; va_start(args, commandCount); diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h index a5c1ccbdad..665ff46c1f 100644 --- a/engines/mohawk/riven_scripts.h +++ b/engines/mohawk/riven_scripts.h @@ -144,6 +144,9 @@ public: /** Run a script */ void runScript(const RivenScriptPtr &script, bool queue); + /** Are scripts running in the background */ + bool hasQueuedScripts() const; + void stopAllScripts(); struct StoredMovieOpcode { -- cgit v1.2.3