aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2011-08-30 12:57:50 +0300
committerFilippos Karapetis2011-08-30 12:59:34 +0300
commited9cf01c78d639f0503ee8ea51c4033ff6158b1b (patch)
tree0bdd267ff89fe8bf75cdbad62be37daab8f62850 /engines
parent0567d6cec5cd11db790b6aec966fcb0463deffba (diff)
downloadscummvm-rg350-ed9cf01c78d639f0503ee8ea51c4033ff6158b1b.tar.gz
scummvm-rg350-ed9cf01c78d639f0503ee8ea51c4033ff6158b1b.tar.bz2
scummvm-rg350-ed9cf01c78d639f0503ee8ea51c4033ff6158b1b.zip
SAGA: Slight cleanup
Diffstat (limited to 'engines')
-rw-r--r--engines/saga/sthread.cpp17
1 files 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;