mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-11 13:45:25 +00:00
SCI: Fixed bug #3037945 - "PQ3 : Graphical Glitch with White Mercedes on Freeway"
svn-id: r54975
This commit is contained in:
parent
d3340b0d0c
commit
4b836d611f
@ -534,7 +534,20 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) {
|
||||
case SCI_DISPLAY_RESTOREUNDER:
|
||||
bitsGetRect(argv[0], &rect);
|
||||
rect.translate(-_ports->getPort()->left, -_ports->getPort()->top);
|
||||
bitsRestore(argv[0]);
|
||||
if (g_sci->getGameId() == GID_PQ3 && g_sci->getEngineState()->currentRoomNumber() == 29) {
|
||||
// WORKAROUND: PQ3 calls this without calling the associated
|
||||
// kDisplay(SCI_DISPLAY_SAVEUNDER) call before. Theoretically,
|
||||
// this would result in no rect getting restored. However, we
|
||||
// still maintain a pointer from the previous room, resulting
|
||||
// in invalidated content being restored on screen, and causing
|
||||
// graphics glitches. Thus, we simply don't restore a rect in
|
||||
// that room. The correct fix for this would be to erase hunk
|
||||
// pointers when changing rooms, but this will suffice for now,
|
||||
// as restoring from a totally invalid pointer is very rare.
|
||||
// Fixes bug #3037945.
|
||||
} else {
|
||||
bitsRestore(argv[0]);
|
||||
}
|
||||
kernelGraphRedrawBox(rect);
|
||||
// finishing loop
|
||||
argc = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user