diff options
-rw-r--r-- | scumm/akos.cpp | 13 | ||||
-rw-r--r-- | scumm/akos.h | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp index c9b91f165a..0f38148997 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -872,7 +872,7 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { if (_actorHitX < rect.left || _actorHitX >= rect.right || _actorHitY < rect.top || _actorHitY >= rect.bottom) return 0; } else - _vm->markRectAsDirty(kMainVirtScreen, rect, _actorID); + markRectAsDirty(rect); if (rect.top >= _out.h || rect.bottom <= 0) return 0; @@ -940,6 +940,11 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { return drawFlag; } +void AkosRenderer::markRectAsDirty(Common::Rect rect) { + rect.left -= _vm->virtscr[0].xstart & 7; + rect.right -= _vm->virtscr[0].xstart & 7; + _vm->markRectAsDirty(kMainVirtScreen, rect, _actorID); +} byte AkosRenderer::codec5(int xmoveCur, int ymoveCur) { Common::Rect clip; @@ -962,7 +967,7 @@ byte AkosRenderer::codec5(int xmoveCur, int ymoveCur) { maxw = _out.w; maxh = _out.h; - _vm->markRectAsDirty(kMainVirtScreen, clip, _actorID); + markRectAsDirty(clip); clip.clip(maxw, maxh); @@ -1133,7 +1138,7 @@ byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) { clip.clip(_clipOverride); } - _vm->markRectAsDirty(kMainVirtScreen, clip, _actorID); + markRectAsDirty(clip); skip_x = 0; skip_y = 0; @@ -1225,7 +1230,7 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { src = dst; src.moveTo(0, 0); - _vm->markRectAsDirty(kMainVirtScreen, dst, _actorID); + markRectAsDirty(dst); if (_draw_top > dst.top) _draw_top = dst.top; diff --git a/scumm/akos.h b/scumm/akos.h index 4985e8b46e..69e48b08c2 100644 --- a/scumm/akos.h +++ b/scumm/akos.h @@ -99,6 +99,8 @@ protected: void akos16SkipData(int32 numskip); void akos16DecodeLine(byte *buf, int32 numbytes, int32 dir); void akos16Decompress(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency, int maskLeft, int maskTop, int zBuf); + + void markRectAsDirty(Common::Rect rect); }; } // End of namespace Scumm |