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

mduggan noreply at scummvm.org
Sun Jan 5 04:03:36 UTC 2025


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3e3a39a981 DGDS: Fix TTM flood fill operator
e9f7727bda DGDS: Avoid drawing scroll bmp out of bounds


Commit: 3e3a39a9815e7f74ecdd846be3df05f6d81a218d
    https://github.com/scummvm/scummvm/commit/3e3a39a9815e7f74ecdd846be3df05f6d81a218d
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2025-01-05T13:22:19+11:00

Commit Message:
DGDS: Fix TTM flood fill operator

Fixes the appearance of the sludge-filled river in Willy Beamish.

Changed paths:
    engines/dgds/ttm.cpp


diff --git a/engines/dgds/ttm.cpp b/engines/dgds/ttm.cpp
index b5a62f1e39f..16e560b1cf3 100644
--- a/engines/dgds/ttm.cpp
+++ b/engines/dgds/ttm.cpp
@@ -1037,7 +1037,9 @@ void TTMInterpreter::handleOperation(TTMEnviro &env, TTMSeq &seq, uint16 op, byt
 		break;
 	}
 	case 0xaf00: { // FLOOD FILL x,y
-		Graphics::FloodFill f(_vm->_compositionBuffer.surfacePtr(), 0, seq._drawColFG);
+		Graphics::Surface *surf = _vm->_compositionBuffer.surfacePtr();
+		byte oldCol = surf->getPixel(ivals[0], ivals[1]);
+		Graphics::FloodFill f(surf, oldCol, seq._drawColFG);
 		f.addSeed(ivals[0], ivals[1]);
 		f.fill();
 		break;


Commit: e9f7727bda5cd0a395ba44e498e8ab0bf8ddad18
    https://github.com/scummvm/scummvm/commit/e9f7727bda5cd0a395ba44e498e8ab0bf8ddad18
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2025-01-05T14:50:46+11:00

Commit Message:
DGDS: Avoid drawing scroll bmp out of bounds

Fixes small glitches in Willy Beamish intro

Changed paths:
    engines/dgds/image.cpp


diff --git a/engines/dgds/image.cpp b/engines/dgds/image.cpp
index 029c19144fe..dca26ed708f 100644
--- a/engines/dgds/image.cpp
+++ b/engines/dgds/image.cpp
@@ -314,8 +314,8 @@ void Image::drawScrollBitmap(int16 x, int16 y, int16 width, int16 height, int16
 	int tileH = _frames[0]->h;
 	byte *dst = (byte *)dstSurf.getBasePtr(0, 0);
 
-	int nXTiles = (width + tileW - 1) / tileW;
-	int nYTiles = (height + tileH - 1) / tileH;
+	int nXTiles = MIN((width + tileW - 1) / tileW, (int)_matrixX);
+	int nYTiles = MIN((height + tileH - 1) / tileH, (int)_matrixY);
 
 	for (int yTile = 0; yTile < nYTiles; yTile++) {
 		int tileDstY = y + yTile * tileH;
@@ -324,6 +324,9 @@ void Image::drawScrollBitmap(int16 x, int16 y, int16 width, int16 height, int16
 			tileRowIndex += _matrixY;
 		assert(tileRowIndex >= 0 && tileRowIndex < _matrixY);
 
+		if (tileDstY >= drawWin.bottom)
+			continue;
+
 		for (int xTile = 0; xTile < nXTiles; xTile++) {
 			int tileDstX = x + xTile * tileW;
 			Common::Rect tileDest(Common::Point(tileDstX, tileDstY), tileW, tileH);




More information about the Scummvm-git-logs mailing list