diff options
author | Johannes Schickel | 2006-05-10 20:45:42 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-05-10 20:45:42 +0000 |
commit | be6b640b92d83b606efb7a926dfa6172f153e31e (patch) | |
tree | a4b4a0cb88934520c2550e13c5c7a41f06208fb3 /engines | |
parent | 56e03a85ddfaf9bca000c42855ec5f79e80dcb8c (diff) | |
download | scummvm-rg350-be6b640b92d83b606efb7a926dfa6172f153e31e.tar.gz scummvm-rg350-be6b640b92d83b606efb7a926dfa6172f153e31e.tar.bz2 scummvm-rg350-be6b640b92d83b606efb7a926dfa6172f153e31e.zip |
Adds clipping to the workaround in "preserveOrRestoreBackground", so it does not overwrite the interface.
svn-id: r22404
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/animator.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/kyra/animator.cpp b/engines/kyra/animator.cpp index 7c9860cdae..c45d745f0f 100644 --- a/engines/kyra/animator.cpp +++ b/engines/kyra/animator.cpp @@ -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 { |