aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-06-09 23:34:40 +0200
committeruruk2014-06-09 23:34:40 +0200
commit63fa2d4906dbe119c552e993ae0f4cd2a4079ddb (patch)
tree1c932035dfddf264b76d6b1c9c5ea40e97a71b2d
parent76fa66fc8ce531d3391a81259e13474b429277f5 (diff)
downloadscummvm-rg350-63fa2d4906dbe119c552e993ae0f4cd2a4079ddb.tar.gz
scummvm-rg350-63fa2d4906dbe119c552e993ae0f4cd2a4079ddb.tar.bz2
scummvm-rg350-63fa2d4906dbe119c552e993ae0f4cd2a4079ddb.zip
CGE2: Simplify if-statements.
-rw-r--r--engines/cge2/cge2_main.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index 764bdde5d8..99b0f26c21 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -533,13 +533,11 @@ bool CGE2Engine::isHero(Sprite *spr) {
void CGE2Engine::tick() {
for (Sprite *spr = _vga->_showQ->first(); spr; spr = spr->_next) {
- if (spr->_time) {
- if (--spr->_time == 0)
+ if (spr->_time && (--spr->_time == 0))
spr->tick();
- }
+
if (_waitRef) {
- if (_waitRef == spr->_ref)
- if (spr->seqTest(_waitSeq))
+ if (_waitRef == spr->_ref && spr->seqTest(_waitSeq))
_waitRef = 0;
}
}