aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-09 17:16:34 +0000
committerMartin Kiewitz2009-10-09 17:16:34 +0000
commitefb1c33715606d94f12e169669104f72a4423ce4 (patch)
treeff7d72c8ac3350f7b41d363ebfa002040073bb0d
parentab1184770b4b53f4f16af51813a5e03c53139e1b (diff)
downloadscummvm-rg350-efb1c33715606d94f12e169669104f72a4423ce4.tar.gz
scummvm-rg350-efb1c33715606d94f12e169669104f72a4423ce4.tar.bz2
scummvm-rg350-efb1c33715606d94f12e169669104f72a4423ce4.zip
SCI/newgui: priority band init fix
svn-id: r44833
-rw-r--r--engines/sci/gui/gui_gfx.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp
index 6f1c03a73e..02c23c5528 100644
--- a/engines/sci/gui/gui_gfx.cpp
+++ b/engines/sci/gui/gui_gfx.cpp
@@ -1079,11 +1079,13 @@ void SciGuiGfx::PriorityBandsInit(int16 top, int16 bottom) {
_priorityTop = top;
_priorityBottom = bottom;
- bandSize = (_priorityBottom - _priorityTop) / _priorityBandCount;
+ bandSize = (_priorityBottom - _priorityTop) / (_priorityBandCount - 1);
memset(_priorityBands, 0, _priorityTop);
for (y = _priorityTop; y < _priorityBottom; y++)
_priorityBands[y] = (byte)(1 + (y - _priorityTop) / bandSize);
+ for (y = _priorityBottom; y < _screen->_height; y++)
+ _priorityBands[y] = _priorityBandCount;
}
void SciGuiGfx::PriorityBandsInit(byte *data) {