aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2004-09-27 21:46:25 +0000
committerGregory Montoir2004-09-27 21:46:25 +0000
commitb347a5d4c019e7c5098c302f6931cc18ac226502 (patch)
treeb4489a71bbc526b18c0fdd0067a1c1103e4db528
parent9eede9a4ac949afb99fda1a08e9dab996d407452 (diff)
downloadscummvm-rg350-b347a5d4c019e7c5098c302f6931cc18ac226502.tar.gz
scummvm-rg350-b347a5d4c019e7c5098c302f6931cc18ac226502.tar.bz2
scummvm-rg350-b347a5d4c019e7c5098c302f6931cc18ac226502.zip
Temporary fix for akos codec32 (this should re-use the existing code in Gdi). There are still some glitches, but catalog2 doesn't crash anymore when displaying the HE logo.
svn-id: r15311
-rw-r--r--scumm/akos.cpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp
index c866dc4969..169076d4f5 100644
--- a/scumm/akos.cpp
+++ b/scumm/akos.cpp
@@ -1223,13 +1223,34 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) {
src.bottom = _height - 1;
dst.top = _actorY + ymoveCur;
- dst.right = dst.left + _width;
- dst.bottom = dst.top + _height;
-
- dst.clip(_clipOverride);
+ dst.right = dst.left + _width - 1;
+ dst.bottom = dst.top + _height - 1;
+
+ int diff;
+ diff = dst.left - _clipOverride.left;
+ if (diff < 0) {
+ src.left -= diff;
+ dst.left -= diff;
+ }
+ diff = dst.right - _clipOverride.right;
+ if (diff > 0) {
+ src.right -= diff;
+ dst.right -= diff;
+ }
+ diff = dst.top - _clipOverride.top;
+ if (diff < 0) {
+ src.top -= diff;
+ dst.top -= diff;
+ }
+ diff = dst.bottom - _clipOverride.bottom;
+ if (diff > 0) {
+ src.bottom -= diff;
+ dst.bottom -= diff;
+ }
- _vm->markRectAsDirty(kMainVirtScreen, dst, _actorID);
+ _vm->markRectAsDirty(kMainVirtScreen, dst);
+ // cyx: are these variables really useful ?
if (_draw_top > dst.top)
_draw_top = dst.top;
if (_draw_bottom < dst.bottom)