From 6269075ad67de618722e1c9e1e712950a749002b Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 14 Jan 2016 23:37:13 +0100 Subject: SCI: fix kernelCoordinateToPriority do not check _priorityTop. Sierra never did it (I checked all sorts of SCI versions, kq4 early, kq5, kq6, etc.) and checking it will cause at least a priority issue in lsl2 in room 54 (airplane that is taking off will be drawn using priority 1 instead of 0) --- engines/sci/graphics/ports.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp index bcc991081e..0d00ce01e6 100644 --- a/engines/sci/graphics/ports.cpp +++ b/engines/sci/graphics/ports.cpp @@ -717,8 +717,10 @@ void GfxPorts::kernelGraphAdjustPriority(int top, int bottom) { } byte GfxPorts::kernelCoordinateToPriority(int16 y) { - if (y < _priorityTop) - return _priorityBands[_priorityTop]; + if (y < 0) // Sierra did not check this, we do for safety reasons + return _priorityBands[0]; + // do NOT check for _priorityTop in here. Sierra never did that and it would cause + // at least priority issues in room 54 of lsl2 (airplane) if (y > _priorityBottom) return _priorityBands[_priorityBottom]; return _priorityBands[y]; -- cgit v1.2.3