diff options
author | johndoe123 | 2015-11-19 17:40:13 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 09bbb482a8ccdfb8e36128d40364900b99aa2a13 (patch) | |
tree | 45aba751e4c2fc6826c3e9db26ee4bee28e0da9d /engines/illusions/thread.cpp | |
parent | 601c6f408210344c73dcf4f3bab34b493132387a (diff) | |
download | scummvm-rg350-09bbb482a8ccdfb8e36128d40364900b99aa2a13.tar.gz scummvm-rg350-09bbb482a8ccdfb8e36128d40364900b99aa2a13.tar.bz2 scummvm-rg350-09bbb482a8ccdfb8e36128d40364900b99aa2a13.zip |
ILLUSIONS: DUCKMAN: Implement opcodes 70/71 for pausing/unpausing during the menu
Also change some input functions to return uint istead of byte to allow bigger bitmasks.
Diffstat (limited to 'engines/illusions/thread.cpp')
-rw-r--r-- | engines/illusions/thread.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/illusions/thread.cpp b/engines/illusions/thread.cpp index d12d11a81c..cea0b9728e 100644 --- a/engines/illusions/thread.cpp +++ b/engines/illusions/thread.cpp @@ -49,6 +49,9 @@ void Thread::onNotify() { void Thread::onPause() { } +void Thread::onUnpause() { +} + void Thread::onResume() { } @@ -72,6 +75,14 @@ void Thread::pause() { } } +void Thread::unpause() { + if (!_terminated) { + --_pauseCtr; + if (_pauseCtr == 0) + onUnpause(); + } +} + void Thread::resume() { if (!_terminated) { --_pauseCtr; @@ -246,6 +257,14 @@ void ThreadList::pauseThreads(uint32 threadId) { } } +void ThreadList::unpauseThreads(uint32 threadId) { + for (Iterator it = _threads.begin(); it != _threads.end(); ++it) { + Thread *thread = *it; + if (thread->_threadId != threadId) + thread->unpause(); + } +} + void ThreadList::suspendThreads(uint32 threadId) { for (Iterator it = _threads.begin(); it != _threads.end(); ++it) { Thread *thread = *it; |