From ed9cf01c78d639f0503ee8ea51c4033ff6158b1b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 30 Aug 2011 12:57:50 +0300 Subject: SAGA: Slight cleanup --- engines/saga/sthread.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/engines/saga/sthread.cpp b/engines/saga/sthread.cpp index afd528f4b5..6e5cc68ae6 100644 --- a/engines/saga/sthread.cpp +++ b/engines/saga/sthread.cpp @@ -102,9 +102,8 @@ void Script::wakeUpThreadsDelayed(int waitType, int sleepTime) { void Script::executeThreads(uint msec) { ScriptThreadList::iterator threadIterator; - if (_vm->_interface->_statusTextInput) { + if (_vm->_interface->_statusTextInput) return; - } threadIterator = _threadList.begin(); @@ -129,11 +128,10 @@ void Script::executeThreads(uint msec) { switch (thread._waitType) { case kWaitTypeDelay: - if (thread._sleepTime < msec) { + if (thread._sleepTime < msec) thread._sleepTime = 0; - } else { + else thread._sleepTime -= msec; - } if (thread._sleepTime == 0) thread._flags &= ~kTFlagWaiting; @@ -141,11 +139,9 @@ void Script::executeThreads(uint msec) { case kWaitTypeWalk: { - ActorData *actor; - actor = (ActorData *)thread._threadObj; - if (actor->_currentAction == kActionWait) { + ActorData *actor = (ActorData *)thread._threadObj; + if (actor->_currentAction == kActionWait) thread._flags &= ~kTFlagWaiting; - } } break; @@ -157,9 +153,8 @@ void Script::executeThreads(uint msec) { } if (!(thread._flags & kTFlagWaiting)) { - if (runThread(thread)) { + if (runThread(thread)) break; - } } ++threadIterator; -- cgit v1.2.3