diff options
author | Strangerke | 2016-05-20 22:04:10 +0200 |
---|---|---|
committer | Strangerke | 2016-05-20 22:04:10 +0200 |
commit | bd2008f9859eea09fa835e24f7b56316f3d84360 (patch) | |
tree | 3ac4f72cf003674150bef8ae7d1d12de7c8a5b14 | |
parent | bd4ef7ffb4db991df8f3cbc6619f54cb599fb535 (diff) | |
download | scummvm-rg350-bd2008f9859eea09fa835e24f7b56316f3d84360.tar.gz scummvm-rg350-bd2008f9859eea09fa835e24f7b56316f3d84360.tar.bz2 scummvm-rg350-bd2008f9859eea09fa835e24f7b56316f3d84360.zip |
GNAP: Remove some obsolete comments, take better advantage of the possible values of gfxItem._flags (0 and 1)
-rw-r--r-- | engines/gnap/gamesys.cpp | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/engines/gnap/gamesys.cpp b/engines/gnap/gamesys.cpp index 3285985474..26af3fb8ab 100644 --- a/engines/gnap/gamesys.cpp +++ b/engines/gnap/gamesys.cpp @@ -804,7 +804,7 @@ void GameSys::drawSprites() { if (gfxItem2->_prevFrame._spriteId != -1) { bool transparent = false; if (gfxItem2->_currFrame._spriteId != -1) { - if (gfxItem2->_flags & 1) { + if (gfxItem2->_flags) { transparent = true; } else { int resourceId = (gfxItem2->_sequenceId & 0xFFFF0000) | gfxItem2->_currFrame._spriteId; @@ -822,7 +822,7 @@ void GameSys::drawSprites() { if (gfxItem2->_currFrame._spriteId != -1) { bool transparent = false; - if (gfxItem2->_flags & 1) { + if (gfxItem2->_flags) { transparent = true; } else { int resourceId = (gfxItem2->_sequenceId & 0xFFFF0000) | gfxItem2->_currFrame._spriteId; @@ -845,7 +845,7 @@ void GameSys::drawSprites() { if (gfxItem5->_updFlag) { if (gfxItem5->_currFrame._spriteId != -1) { - if (gfxItem5->_flags & 1) { + if (gfxItem5->_flags) { seqDrawStaticFrame(gfxItem5->_surface, gfxItem5->_currFrame, nullptr); } else { int resourceId = (gfxItem5->_sequenceId & 0xFFFF0000) | gfxItem5->_currFrame._spriteId; @@ -855,7 +855,7 @@ void GameSys::drawSprites() { } } } else if (gfxItem5->_updRectsCount > 0) { - if (gfxItem5->_flags & 1) { + if (gfxItem5->_flags) { for (int n = 0; n < gfxItem5->_updRectsCount; ++n) seqDrawStaticFrame(gfxItem5->_surface, gfxItem5->_prevFrame, &gfxItem5->_updRects[n]); } else { @@ -969,8 +969,8 @@ void GameSys::handleReqRemoveSpriteDrawItems() { for (int j = 0; j < _removeSpriteDrawItemsCount; ++j) { for (int i = 0; i < _gfxItemsCount; ++i) { GfxItem *gfxItem = &_gfxItems[i]; - if (gfxItem->_sequenceId == -1 && !gfxItem->_animation && (gfxItem->_flags & 1) && - gfxItem->_id == _removeSpriteDrawItems[j]._id && _removeSpriteDrawItems[j]._surface == gfxItem->_surface) { + if (gfxItem->_sequenceId == -1 && !gfxItem->_animation && gfxItem->_flags + && gfxItem->_id == _removeSpriteDrawItems[j]._id && _removeSpriteDrawItems[j]._surface == gfxItem->_surface) { gfxItem->_flags = 0; gfxItem->_currFrame._duration = 0; gfxItem->_currFrame._spriteId = -1; @@ -996,8 +996,6 @@ void GameSys::fatUpdateFrame() { int duration, currFrameNum; - // NOTE Skipped avi code (reqAviStart) - for (int i = 0; i < _gfxItemsCount; ++i) { GfxItem *gfxItem = &_gfxItems[i]; SequenceAnimation *animation = gfxItem->_animation; @@ -1130,23 +1128,21 @@ void GameSys::fatUpdateFrame() { if (_grabSpriteChanged) { for (int i = 0; i < _gfxItemsCount; ++i) { GfxItem *gfxItem = &_gfxItems[i]; - if (gfxItem->_sequenceId == -1 && !gfxItem->_animation && (gfxItem->_flags & 1) && - gfxItem->_id == _grabSpriteId && gfxItem->_surface == _grabSpriteSurface1) { - gfxItem->_currFrame._duration = 0; - gfxItem->_currFrame._isScaled = false; - gfxItem->_currFrame._rect = _grabSpriteRect; - gfxItem->_currFrame._spriteId = _grabSpriteSurface2 ? 1 : -1;// TODO - gfxItem->_currFrame._soundId = -1; - gfxItem->_updFlag = true; - gfxItem->_surface = _grabSpriteSurface2; - break; - } + if (gfxItem->_sequenceId == -1 && !gfxItem->_animation && gfxItem->_flags + && gfxItem->_id == _grabSpriteId && gfxItem->_surface == _grabSpriteSurface1) { + gfxItem->_currFrame._duration = 0; + gfxItem->_currFrame._isScaled = false; + gfxItem->_currFrame._rect = _grabSpriteRect; + gfxItem->_currFrame._spriteId = _grabSpriteSurface2 ? 1 : -1;// TODO + gfxItem->_currFrame._soundId = -1; + gfxItem->_updFlag = true; + gfxItem->_surface = _grabSpriteSurface2; + break; + } } _grabSpriteChanged = false; } - // NOTE Skipped avi code (reqAviStart) - debugC(kDebugBasic, "GameSys::fatUpdateFrame() _fatSequenceItems.size(): %d", _fatSequenceItems.size()); for (uint i = 0; i < _fatSequenceItems.size(); ++i) { @@ -1231,7 +1227,6 @@ void GameSys::fatUpdate() { handleReqRemoveSequenceItem(); handleReqRemoveSequenceItems(); handleReqRemoveSpriteDrawItems(); - // NOTE Skipped avi stuff (reqAviStop) fatUpdateFrame(); } |