mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-23 18:24:59 +00:00
Adds clipping to the workaround in "preserveOrRestoreBackground", so it does not overwrite the interface.
svn-id: r22404
This commit is contained in:
parent
56e03a85dd
commit
be6b640b92
@ -196,7 +196,7 @@ void ScreenAnimator::preserveOrRestoreBackground(AnimObject *obj, bool restore)
|
||||
int temp;
|
||||
|
||||
temp = x + width;
|
||||
if (temp >= 40) {
|
||||
if (temp >= 39) {
|
||||
x = 39 - width;
|
||||
}
|
||||
temp = y + height;
|
||||
@ -211,6 +211,18 @@ void ScreenAnimator::preserveOrRestoreBackground(AnimObject *obj, bool restore)
|
||||
// isn't updated on the front buffer in that special scene, so we update
|
||||
// the frontbuffer (screen page 0) too if the object get's redrawn this time
|
||||
if (obj->refreshFlag) {
|
||||
// do not overwrite the interface
|
||||
if (x <= 1) {
|
||||
width--;
|
||||
x = 1;
|
||||
} else if (x >= 39) {
|
||||
x = 39 - width;
|
||||
}
|
||||
if (y <= 8) {
|
||||
y = 8;
|
||||
} else if (y >= 136) {
|
||||
y = 136 - height;
|
||||
}
|
||||
_screen->copyBlockToPage(0, x << 3, y, width << 3, height, obj->background);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user