diff options
author | Strangerke | 2016-03-25 18:19:39 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 09:54:21 +0200 |
commit | dca374efcde85472676a67e2af3decfeee51589e (patch) | |
tree | c76a81bc609ccca2cf8e0242242d2b890b6ac3a9 /engines | |
parent | f3a164342b4f62c3bdf02c226880e6d2d6316a66 (diff) | |
download | scummvm-rg350-dca374efcde85472676a67e2af3decfeee51589e.tar.gz scummvm-rg350-dca374efcde85472676a67e2af3decfeee51589e.tar.bz2 scummvm-rg350-dca374efcde85472676a67e2af3decfeee51589e.zip |
GNAP: Change another variable to boolean
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gnap/gamesys.cpp | 10 | ||||
-rw-r--r-- | engines/gnap/resource.cpp | 2 | ||||
-rw-r--r-- | engines/gnap/resource.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/engines/gnap/gamesys.cpp b/engines/gnap/gamesys.cpp index d3e1195f4a..88b5ea2e53 100644 --- a/engines/gnap/gamesys.cpp +++ b/engines/gnap/gamesys.cpp @@ -491,7 +491,7 @@ void GameSys::seqInsertGfx(int index, int duration) { (_backgroundImageValue3 - _backgroundImageValue1); gfxItem->_currFrame._rect.top = gfxItem->_currFrame._rect.bottom - scaleValue * (gfxItem->_currFrame._rect.bottom - gfxItem->_currFrame._rect.top) / 1000; gfxItem->_currFrame._rect.right = scaleValue * (gfxItem->_currFrame._rect.right - gfxItem->_currFrame._rect.left) / 1000 + gfxItem->_currFrame._rect.left; - gfxItem->_currFrame._isScaled = 1; + gfxItem->_currFrame._isScaled = true; } gfxItem->_currFrame._duration -= totalDuration; if (gfxItem->_currFrame._soundId != -1) @@ -772,7 +772,7 @@ void GameSys::seqDrawSpriteFrame(SpriteResource *spriteResource, SequenceFrame & const int x = clipRect.left, y = clipRect.top; - debug(1, "GameSys::seqDrawSpriteFrame() destX: %d; destY: %d; frame.isScaled: %d", x, y, frame._isScaled); + debug(1, "GameSys::seqDrawSpriteFrame() destX: %d; destY: %d; frame.isScaled: %d", x, y, frame._isScaled ? 1 : 0); // 32bit sprite drawing if (frame._isScaled) { @@ -1099,7 +1099,7 @@ void GameSys::fatUpdateFrame() { (_backgroundImageValue3 - _backgroundImageValue1); gfxItem->_currFrame._rect.top = gfxItem->_currFrame._rect.bottom - v17 * (gfxItem->_currFrame._rect.bottom - gfxItem->_currFrame._rect.top) / 1000; gfxItem->_currFrame._rect.right = v17 * (gfxItem->_currFrame._rect.right - gfxItem->_currFrame._rect.left) / 1000 + gfxItem->_currFrame._rect.left; - gfxItem->_currFrame._isScaled = 1; + gfxItem->_currFrame._isScaled = true; } gfxItem->_currFrame._duration -= duration; if (gfxItem->_currFrame._soundId != -1) @@ -1157,7 +1157,7 @@ void GameSys::fatUpdateFrame() { gfxItem->_prevFrame._soundId = -1; gfxItem->_prevFrame._unusedVal = -1; gfxItem->_currFrame._duration = 0; - gfxItem->_currFrame._isScaled = 0; + gfxItem->_currFrame._isScaled = false; gfxItem->_currFrame._rect = _newSpriteDrawItems[k]._rect; gfxItem->_currFrame._spriteId = _newSpriteDrawItems[k]._surface ? 0xCAFEBABE : -1;// TODO gfxItem->_currFrame._soundId = -1; @@ -1173,7 +1173,7 @@ void GameSys::fatUpdateFrame() { if (gfxItem->_sequenceId == -1 && !gfxItem->_animation && (gfxItem->_flags & 1) && gfxItem->_id == _grabSpriteId && gfxItem->_surface == _grabSpriteSurface1) { gfxItem->_currFrame._duration = 0; - gfxItem->_currFrame._isScaled = 0; + gfxItem->_currFrame._isScaled = false; gfxItem->_currFrame._rect = _grabSpriteRect; gfxItem->_currFrame._spriteId = _grabSpriteSurface2 ? 1 : -1;// TODO gfxItem->_currFrame._soundId = -1; diff --git a/engines/gnap/resource.cpp b/engines/gnap/resource.cpp index 17fe8f918a..d83598b149 100644 --- a/engines/gnap/resource.cpp +++ b/engines/gnap/resource.cpp @@ -28,7 +28,7 @@ namespace Gnap { void SequenceFrame::loadFromStream(Common::MemoryReadStream &stream) { _duration = stream.readUint16LE(); - _isScaled = stream.readUint16LE(); + _isScaled = (stream.readUint16LE() != 0); _rect.left = stream.readUint32LE(); _rect.top = stream.readUint32LE(); _rect.right = stream.readUint32LE(); diff --git a/engines/gnap/resource.h b/engines/gnap/resource.h index 20dd8d4192..52acdc56f3 100644 --- a/engines/gnap/resource.h +++ b/engines/gnap/resource.h @@ -47,7 +47,7 @@ enum { struct SequenceFrame { int16 _duration; - int16 _isScaled; + bool _isScaled; Common::Rect _rect; int32 _spriteId; int32 _soundId; |