diff options
author | Nicola Mettifogo | 2008-02-02 00:41:31 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-02-02 00:41:31 +0000 |
commit | 249877fa82e6af59e6084bb3fa92cda49fb281aa (patch) | |
tree | 37d639e6aacf885844d77707e4b77a50c9ac4fab /engines/parallaction/graphics.cpp | |
parent | 7adfb1a2955f84a310d31777b193bdf5f33e0c0b (diff) | |
download | scummvm-rg350-249877fa82e6af59e6084bb3fa92cda49fb281aa.tar.gz scummvm-rg350-249877fa82e6af59e6084bb3fa92cda49fb281aa.tar.bz2 scummvm-rg350-249877fa82e6af59e6084bb3fa92cda49fb281aa.zip |
Moved depth buffer and palette rotation data into BackgroundInfo.
svn-id: r30725
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r-- | engines/parallaction/graphics.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 551d865537..ca912e3f23 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -260,17 +260,18 @@ void Gfx::animatePalette() { // avoid forcing setPalette when not needed bool done = false; + PaletteFxRange *range; for (uint16 i = 0; i < 4; i++) { + range = &_backgroundInfo->ranges[i]; - if ((_palettefx[i]._flags & 1) == 0) continue; // animated palette + if ((range->_flags & 1) == 0) continue; // animated palette + range->_timer += range->_step * 2; // update timer - _palettefx[i]._timer += _palettefx[i]._step * 2; // update timer + if (range->_timer < 0x4000) continue; // check timeout - if (_palettefx[i]._timer < 0x4000) continue; // check timeout + range->_timer = 0; // reset timer - _palettefx[i]._timer = 0; // reset timer - - _palette.rotate(_palettefx[i]._first, _palettefx[i]._last, (_palettefx[i]._flags & 2) != 0); + _palette.rotate(range->_first, range->_last, (range->_flags & 2) != 0); done = true; } @@ -733,7 +734,7 @@ void Gfx::grabBackground(const Common::Rect& r, Graphics::Surface &dst) { uint16 Gfx::queryMask(uint16 v) { for (uint16 _si = 0; _si < 3; _si++) { - if (_bgLayers[_si+1] > v) return _si; + if (_backgroundInfo->layers[_si+1] > v) return _si; } return BUFFER_FOREGROUND; @@ -757,10 +758,6 @@ Gfx::Gfx(Parallaction* vm) : _screenX = 0; _screenY = 0; - _bgLayers[0] = _bgLayers[1] = _bgLayers[2] = _bgLayers[3] = 0; - - memset(_palettefx, 0, sizeof(_palettefx)); - _halfbrite = false; _hbCircleRadius = 0; |