aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-11 09:17:11 +0000
committerMartin Kiewitz2010-06-11 09:17:11 +0000
commit3269e5cc4ca2ea04f862767595720ad2044cfd09 (patch)
tree5eb5dda1851891252872c4e474995b5b6853e718 /engines
parent377cfe6fefe6a817a6ce778e7721dc3818780c01 (diff)
downloadscummvm-rg350-3269e5cc4ca2ea04f862767595720ad2044cfd09.tar.gz
scummvm-rg350-3269e5cc4ca2ea04f862767595720ad2044cfd09.tar.bz2
scummvm-rg350-3269e5cc4ca2ea04f862767595720ad2044cfd09.zip
SCI: adjust priority bottom, if its 200 to avoid possible out of bounds (sierra actually does the same)
svn-id: r49592
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/ports.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index cdb6fe4ae1..d230c1eb9f 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -496,6 +496,11 @@ void GfxPorts::priorityBandsInit(int16 bandCount, int16 top, int16 bottom) {
// We fill space that is left over with the highest band (hardcoded 200 limit, because this algo isnt meant to be used on hires)
for (y = _priorityBottom; y < 200; y++)
_priorityBands[y] = _priorityBandCount;
+
+ // adjust, if bottom is 200 (one over the actual screen range) - we could otherwise go possible out of bounds
+ // sierra sci also adjust accordingly
+ if (_priorityBottom == 200)
+ _priorityBottom--;
}
void GfxPorts::priorityBandsInit(byte *data) {