diff options
author | Eugene Sandulenko | 2010-06-15 10:16:32 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-06-15 10:16:32 +0000 |
commit | 5d72a614ec75b875e950ecd62222bac3008945bc (patch) | |
tree | 92a51f5d7ae733997dcb35865fde55ae4d6801db | |
parent | 723cb6c0f0a638cc9d4f07c0fccf7bdf0197a6ac (diff) | |
download | scummvm-rg350-5d72a614ec75b875e950ecd62222bac3008945bc.tar.gz scummvm-rg350-5d72a614ec75b875e950ecd62222bac3008945bc.tar.bz2 scummvm-rg350-5d72a614ec75b875e950ecd62222bac3008945bc.zip |
SAGA: Add more thread-related output.
svn-id: r49697
-rw-r--r-- | engines/saga/script.h | 3 | ||||
-rw-r--r-- | engines/saga/sthread.cpp | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/saga/script.h b/engines/saga/script.h index f31af7b2ea..21afeb5c44 100644 --- a/engines/saga/script.h +++ b/engines/saga/script.h @@ -246,16 +246,19 @@ public: } void waitWalk(void *threadObj) { + debug(3, "waitWalk()"); wait(kWaitTypeWalk); _threadObj = threadObj; } void waitDelay(int sleepTime) { + debug(3, "waitDelay(%d)", sleepTime); wait(kWaitTypeDelay); _sleepTime = sleepTime; } void waitFrames(int frames) { + debug(3, "waitFrames(%d)", frames); wait(kWaitTypeWaitFrames); _frameWait = frames; } diff --git a/engines/saga/sthread.cpp b/engines/saga/sthread.cpp index c133f8de88..be674e5acd 100644 --- a/engines/saga/sthread.cpp +++ b/engines/saga/sthread.cpp @@ -58,6 +58,8 @@ ScriptThread &Script::createThread(uint16 scriptModuleNumber, uint16 scriptEntry _threadList.push_front(newThread); + debug(3, "createThread(). Total threads: %d", _threadList.size()); + ScriptThread &tmp = *_threadList.begin(); tmp._stackBuf = (int16 *)malloc(ScriptThread::THREAD_STACK_SIZE * sizeof(int16)); tmp._stackTopIndex = ScriptThread::THREAD_STACK_SIZE - 2; @@ -78,6 +80,8 @@ void Script::wakeUpActorThread(int waitType, void *threadObj) { void Script::wakeUpThreads(int waitType) { ScriptThreadList::iterator threadIterator; + debug(3, "wakeUpThreads(%d)", waitType); + for (threadIterator = _threadList.begin(); threadIterator != _threadList.end(); ++threadIterator) { ScriptThread &thread = *threadIterator; if ((thread._flags & kTFlagWaiting) && (thread._waitType == waitType)) { @@ -89,6 +93,8 @@ void Script::wakeUpThreads(int waitType) { void Script::wakeUpThreadsDelayed(int waitType, int sleepTime) { ScriptThreadList::iterator threadIterator; + debug(3, "wakeUpThreads(%d, %d)", waitType, sleepTime); + for (threadIterator = _threadList.begin(); threadIterator != _threadList.end(); ++threadIterator) { ScriptThread &thread = *threadIterator; if ((thread._flags & kTFlagWaiting) && (thread._waitType == waitType)) { @@ -169,6 +175,8 @@ void Script::executeThreads(uint msec) { void Script::abortAllThreads() { ScriptThreadList::iterator threadIterator; + debug(3, "abortAllThreads()"); + threadIterator = _threadList.begin(); while (threadIterator != _threadList.end()) { |