SCI/newgui: priority band init fix

svn-id: r44833
This commit is contained in:
Martin Kiewitz 2009-10-09 17:16:34 +00:00
parent ab1184770b
commit efb1c33715

View File

@ -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) {