[Scummvm-git-logs] scummvm master -> 437eadd10eb796945e4480c20933808997b15f44

athrxx noreply at scummvm.org
Wed May 8 15:51:42 UTC 2024


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

Summary:
437eadd10e SCUMM: (INDY4/FM-Towns) - fix bug no. 15120


Commit: 437eadd10eb796945e4480c20933808997b15f44
    https://github.com/scummvm/scummvm/commit/437eadd10eb796945e4480c20933808997b15f44
Author: athrxx (athrxx at scummvm.org)
Date: 2024-05-08T17:50:11+02:00

Commit Message:
SCUMM: (INDY4/FM-Towns) - fix bug no. 15120

(Corrupted graphics during screen transitions without "smooth scrolling")

Changed paths:
    engines/scumm/gfx.cpp


diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 83ca5c4bae1..8415a2e1d52 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -4590,7 +4590,7 @@ void ScummEngine::scrollEffect(int dir) {
 			{
 				src = vs->getPixels(0, y - step);
 				_system->copyRectToScreen(src,
-					vsPitch,
+					vsPitch * m,
 					0, (vs->h - step) * m,
 					vs->w * m, step * m);
 			}
@@ -4612,7 +4612,7 @@ void ScummEngine::scrollEffect(int dir) {
 			{
 				src = vs->getPixels(0, vs->h - y);
 				_system->copyRectToScreen(src,
-					vsPitch,
+					vsPitch * m,
 					0, 0,
 					vs->w * m, step * m);
 			}
@@ -4626,13 +4626,15 @@ void ScummEngine::scrollEffect(int dir) {
 		x = 1 + step;
 		while (x < vs->w) {
 			moveScreen(-step * m, 0, vs->h * m);
-
-			src = vs->getPixels(x - step, 0);
-			_system->copyRectToScreen(src,
-				vsPitch,
-				(vs->w - step) * m, 0,
-				step * m, vs->h * m);
-
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+			if (_townsScreen) {
+				towns_drawStripToScreen(vs, vs->w - step, vs->topline, x - step, vs->topline, step, vs->h);
+			} else
+#endif
+			{
+				src = vs->getPixels(x - step, 0);
+				_system->copyRectToScreen(src, vsPitch * m, (vs->w - step) * m, 0, step * m, vs->h * m);
+			}
 			waitForTimer(delay, true);
 			x += step;
 		}
@@ -4642,12 +4644,15 @@ void ScummEngine::scrollEffect(int dir) {
 		x = 1 + step;
 		while (x < vs->w) {
 			moveScreen(step * m, 0, vs->h * m);
-
-			src = vs->getPixels(vs->w - x, 0);
-			_system->copyRectToScreen(src,
-				vsPitch,
-				0, 0,
-				step, vs->h);
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+			if (_townsScreen) {
+				towns_drawStripToScreen(vs, 0, vs->topline, vs->w - x, vs->topline, step, vs->h);
+			} else
+#endif
+			{
+				src = vs->getPixels(vs->w - x, 0);
+				_system->copyRectToScreen(src, vsPitch * m, 0, 0, step * m, vs->h * m);
+			}
 
 			waitForTimer(delay, true);
 			x += step;




More information about the Scummvm-git-logs mailing list