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/threads/timerthread.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/threads/timerthread.cpp')
-rw-r--r-- | engines/illusions/threads/timerthread.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/illusions/threads/timerthread.cpp b/engines/illusions/threads/timerthread.cpp index 417d113210..de1502d9f2 100644 --- a/engines/illusions/threads/timerthread.cpp +++ b/engines/illusions/threads/timerthread.cpp @@ -52,10 +52,18 @@ int TimerThread::onUpdate() { } void TimerThread::onSuspend() { - _durationElapsed = getDurationElapsed(_startTime, _endTime); + onPause(); } void TimerThread::onNotify() { + onUnpause(); +} + +void TimerThread::onPause() { + _durationElapsed = getDurationElapsed(_startTime, _endTime); +} + +void TimerThread::onUnpause() { uint32 currTime = getCurrentTime(); _startTime = currTime; if (_duration <= _durationElapsed) @@ -65,10 +73,6 @@ void TimerThread::onNotify() { _durationElapsed = 0; } -void TimerThread::onPause() { - onSuspend(); -} - void TimerThread::onResume() { onNotify(); } |