[Scummvm-git-logs] scummvm master -> 58fd2a74144e2e71e147a4306316301ad70c9db2
mikrosk
noreply at scummvm.org
Tue Oct 6 02:55:12 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
58fd2a7414 SCUMM: byleRLEDecodeFast: Apply HE actor clip rectangle before horizontal clipping
Commit: 58fd2a74144e2e71e147a4306316301ad70c9db2
https://github.com/scummvm/scummvm/commit/58fd2a74144e2e71e147a4306316301ad70c9db2
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2026-10-06T12:52:20+10:00
Commit Message:
SCUMM: byleRLEDecodeFast: Apply HE actor clip rectangle before horizontal clipping
"Let's Explore the Farm with Buzzy" (farm-win-updated-demo-us.zip)
triggered the "compData.x >= compData.boundsRect.left && compData.x <
compData.boundsRect.right" assertion.
This was caused by commit 546fa65d454, it moved the leading/trailing
column skip computation (linesToSkip, trailingLinesToSkip) ahead of
markAsDirty(). The skips are computed against the full screen, then the
clip rectangle narrows boundsRect.
The generic / mainstream path is not affected.
Changed paths:
engines/scumm/akos.cpp
engines/scumm/akos.h
engines/scumm/base-costume-optimised.cpp
engines/scumm/base-costume.cpp
engines/scumm/base-costume.h
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 5d5ff261650..8333a7ed785 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -644,18 +644,20 @@ void AkosRenderer::markRectAsDirty(Common::Rect rect) {
_vm->markRectAsDirty(kMainVirtScreen, rect, _actorID);
}
-void AkosRenderer::markAsDirty(const Common::Rect &rect, ByleRLEData &compData, bool &decode) {
+void AkosRenderer::clipBoundsRect(Common::Rect &boundsRect) {
if (_vm->_game.heversion >= 71) {
if (_clipOverride.right > _clipOverride.left && _clipOverride.bottom > _clipOverride.top) {
- compData.boundsRect = _clipOverride;
- compData.boundsRect.right += 1;
- compData.boundsRect.bottom += 1;
+ boundsRect = _clipOverride;
+ boundsRect.right += 1;
+ boundsRect.bottom += 1;
- compData.boundsRect.right = CLIP<int16>(compData.boundsRect.right, 0, _vm->_screenWidth);
- compData.boundsRect.bottom = CLIP<int16>(compData.boundsRect.bottom, 0, _vm->_screenHeight);
+ boundsRect.right = CLIP<int16>(boundsRect.right, 0, _vm->_screenWidth);
+ boundsRect.bottom = CLIP<int16>(boundsRect.bottom, 0, _vm->_screenHeight);
}
}
+}
+void AkosRenderer::markAsDirty(const Common::Rect &rect, ByleRLEData &compData, bool &decode) {
if (_actorHitMode) {
if (_actorHitX < rect.left || _actorHitX >= rect.right || _actorHitY < rect.top || _actorHitY >= rect.bottom)
decode = false;
diff --git a/engines/scumm/akos.h b/engines/scumm/akos.h
index f7c317324ea..dcfe41db38d 100644
--- a/engines/scumm/akos.h
+++ b/engines/scumm/akos.h
@@ -136,6 +136,7 @@ private:
void majMinCodecDecompress(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numSkipBefore, int32 numSkipAfter, byte transparency, int maskLeft, int maskTop, int zBuf);
void markRectAsDirty(Common::Rect rect);
+ void clipBoundsRect(Common::Rect &boundsRect) override;
void markAsDirty(const Common::Rect &rect, ByleRLEData &compData, bool &decode) override;
};
diff --git a/engines/scumm/base-costume-optimised.cpp b/engines/scumm/base-costume-optimised.cpp
index fbeba7182cd..4d44df51d8d 100644
--- a/engines/scumm/base-costume-optimised.cpp
+++ b/engines/scumm/base-costume-optimised.cpp
@@ -69,6 +69,7 @@ byte BaseCostumeRenderer::paintCelByleRLECommon(
compData.boundsRect.top = 0;
compData.boundsRect.right = _out.w;
compData.boundsRect.bottom = _out.h;
+ clipBoundsRect(compData.boundsRect);
if (actorIsScaled) {
/* Scale direction */
@@ -1585,6 +1586,8 @@ void BaseCostumeRenderer::byleRLEDecodeFast(ByleRLEData &compData, const byte *x
} else {
if (_shadowMode == 1) {
shadowMode = ShadowMode::Mode1;
+ } else if (_shadowMode == 2) {
+ error("AkosRenderer::byleRLEDecode(): shadowMode 2 not implemented.");
} else if (_shadowMode == 3) {
if (_vm->_game.heversion >= 90) {
shadowMode = ShadowMode::Mode3_HE;
diff --git a/engines/scumm/base-costume.cpp b/engines/scumm/base-costume.cpp
index 42d5b59eaee..d93b33e2cec 100644
--- a/engines/scumm/base-costume.cpp
+++ b/engines/scumm/base-costume.cpp
@@ -196,6 +196,7 @@ byte BaseCostumeRenderer::paintCelByleRLECommon(
compData.skipWidth = _width;
compData.scaleXStep = _drawActorToRight ? 1 : -1;
+ clipBoundsRect(compData.boundsRect);
markAsDirty(rect, compData, decode);
if (!decode)
return 0;
diff --git a/engines/scumm/base-costume.h b/engines/scumm/base-costume.h
index 16642542c65..2ee3dcf99e0 100644
--- a/engines/scumm/base-costume.h
+++ b/engines/scumm/base-costume.h
@@ -182,7 +182,8 @@ protected:
void skipCelLines(ByleRLEData &compData, int num);
private:
- // helper function to be called from paintCelByleRLECommon
+ // helper functions to be called from paintCelByleRLECommon
+ virtual void clipBoundsRect(Common::Rect &boundsRect) {}
virtual void markAsDirty(const Common::Rect &rect, ByleRLEData &compData, bool &decode) {}
};
More information about the Scummvm-git-logs
mailing list