diff options
author | Martin Kiewitz | 2009-10-23 18:05:14 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-23 18:05:14 +0000 |
commit | 8fa9f9b0eef5c1d74d6ec674528176e76f12187f (patch) | |
tree | ea2b809c461d63d5a694e56cdaaac8703713581d | |
parent | 8bb99f4571302fd8b0c7dc01e2a67500083bac74 (diff) | |
download | scummvm-rg350-8fa9f9b0eef5c1d74d6ec674528176e76f12187f.tar.gz scummvm-rg350-8fa9f9b0eef5c1d74d6ec674528176e76f12187f.tar.bz2 scummvm-rg350-8fa9f9b0eef5c1d74d6ec674528176e76f12187f.zip |
SCI/newgui: Priority band (old gfx) now gets correctly initialized, fixes kq4 intro logo
svn-id: r45347
-rw-r--r-- | engines/sci/gui/gui_gfx.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index b455c3832c..c1a010b89e 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -968,6 +968,14 @@ void SciGuiGfx::PriorityBandsInit(int16 bandCount, int16 top, int16 bottom) { memset(_priorityBands, 0, sizeof(byte) * _priorityTop); for (y = _priorityTop; y < _priorityBottom; y++) _priorityBands[y] = 1 + (((y - _priorityTop) * 2000) / bandSize); + if (_priorityBandCount == 15) { + // When having 15 priority bands, we actually replace band 15 with band 14, cause the original sci interpreter also + // does it that way as well + y = _priorityBottom; + while (_priorityBands[--y] == _priorityBandCount) + _priorityBands[y]--; + } + // We fill space that is left over with the highest band for (y = _priorityBottom; y < _screen->_height; y++) _priorityBands[y] = _priorityBandCount; } |