[Scummvm-git-logs] scummvm master -> fc490a81040e04708ba2a8cf53401bc9e2212eb1

sev- noreply at scummvm.org
Fri Feb 27 14:32:23 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:
fc490a8104 DIRECTOR: Fix regression in text cast member drawing


Commit: fc490a81040e04708ba2a8cf53401bc9e2212eb1
    https://github.com/scummvm/scummvm/commit/fc490a81040e04708ba2a8cf53401bc9e2212eb1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-02-27T15:32:12+01:00

Commit Message:
DIRECTOR: Fix regression in text cast member drawing

The mask could be less than the text surface, thus we account for that

Changed paths:
    engines/director/graphics.cpp


diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 6ceb3697fe4..b8c26b769eb 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -762,8 +762,12 @@ void DirectorPlotData::inkBlitSurface(Common::Rect &srcRect, const Graphics::Sur
 		srcPoint.x = abs(srcRect.left - destRect.left);
 		const byte *msk = mask ? (const byte *)mask->getBasePtr(srcPoint.x, srcPoint.y) : nullptr;
 
-		if (srfMask)
+		if (srfMask) {
+			if (srcPoint.x >= srfMask->w)
+				continue;
+
 			msk = (const byte *)srfMask->getBasePtr(srcPoint.x, srcPoint.y);
+		}
 
 		for (int j = 0; j < destRect.width(); j++, srcPoint.x++) {
 			if (!srfClip.contains(srcPoint)) {
@@ -771,6 +775,10 @@ void DirectorPlotData::inkBlitSurface(Common::Rect &srcRect, const Graphics::Sur
 				continue;
 			}
 
+			// Do not try render beyond the mask bounds
+			if (srfMask && (srcPoint.y >= srfMask->h))
+				continue;
+
 			if (!(mask || srfMask) || (msk && (*msk++))) {
 				if (d->_wm->_pixelformat.bytesPerPixel == 1) {
 					primitives->drawPoint(destRect.left + j, destRect.top + i,




More information about the Scummvm-git-logs mailing list