From 4b763f0e9e2cbd9bc1656212d546e92a80ec4e72 Mon Sep 17 00:00:00 2001 From: lolbot-iichan Date: Sun, 16 Jun 2019 21:06:56 +0300 Subject: WINTERMUTE: Add debugN + comment for getNumScripts() --- engines/wintermute/base/scriptables/script_engine.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engines/wintermute/base/scriptables') diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp index a24b41214b..0e16006d46 100644 --- a/engines/wintermute/base/scriptables/script_engine.cpp +++ b/engines/wintermute/base/scriptables/script_engine.cpp @@ -433,6 +433,15 @@ int ScEngine::getNumScripts(int *running, int *waiting, int *persistent) { numPersistent++; break; default: + // Those states were not handled in original WME as well: + // * SCRIPT_FINISHED, + // * SCRIPT_ERROR, + // * SCRIPT_WAITING_SCRIPT, + // * SCRIPT_THREAD_FINISHED + debugN("ScEngine::GetNumScripts - unhandled enum: %d\n", _scripts[i]->_state); + + // This method calculates thread counts to be shown at debug screen only + // Extend BaseGame::displayDebugInfo() if you want to handle those states break; } numTotal++; -- cgit v1.2.3