[Scummvm-git-logs] scummvm master -> 1ec516729e987016d4d059a343b213e208aabbea

sev- sev at scummvm.org
Mon Mar 30 23:11:15 UTC 2020


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

Summary:
d55836e5cd DIRECTOR: Implement kTransRevealUp
9cff7e0354 DIRECTOR: Implemented rest of kTransAlgoReveal transitions
1ec516729e DIRECTOR: Text formatting and added safeguard checks to transitions


Commit: d55836e5cd1dc29af9c75ba2b76592a9f3bf0d62
    https://github.com/scummvm/scummvm/commit/d55836e5cd1dc29af9c75ba2b76592a9f3bf0d62
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-03-31T01:11:03+02:00

Commit Message:
DIRECTOR: Implement kTransRevealUp

Changed paths:
    engines/director/transitions.cpp


diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index 81cf8f9dd1..986ad2e48c 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -177,6 +177,29 @@ void Frame::playTransition(Score *score) {
 		return;
 	}
 
+	Graphics::ManagedSurface *blitFrom;
+	bool fullredraw = false;
+
+	switch (transProps[t.type].algo) {
+	case kTransAlgoDissolve:
+		dissolveTrans(t, score, clipRect);
+		return;
+
+	case kTransAlgoCenterOut:
+	case kTransAlgoCover:
+		blitFrom = score->_surface;
+		break;
+
+	case kTransAlgoReveal:
+		blitFrom = score->_backSurface2;
+		fullredraw = true;
+		break;
+
+	default:
+		blitFrom = score->_surface;
+		break;
+	}
+
 	rfrom = clipRect;
 	rto = clipRect;
 
@@ -184,6 +207,10 @@ void Frame::playTransition(Score *score) {
 		bool stop = false;
 		rto = clipRect;
 
+		if (transProps[t.type].algo == kTransAlgoReveal) {
+			score->_backSurface->copyFrom(*score->_surface);
+		}
+
 		switch (t.type) {
 		case kTransCenterOutHorizontal: // 5
 			t.xpos += t.xStepSize;
@@ -208,6 +235,10 @@ void Frame::playTransition(Score *score) {
 			rfrom = rto;
 			break;
 
+		case kTransRevealUp:		// 15
+			rto.moveTo(0, -t.yStepSize * i);
+			break;
+
 		case kTransCoverDown:	// 29
 			rto.setHeight(clipRect.height());
 			rto.moveTo(0, -clipRect.height() + t.yStepSize * i);
@@ -255,7 +286,7 @@ void Frame::playTransition(Score *score) {
 		if (stop)
 			break;
 
-		score->_backSurface->blitFrom(*score->_surface, rfrom, Common::Point(rto.left, rto.top));
+		score->_backSurface->blitFrom(*blitFrom, rfrom, Common::Point(rto.left, rto.top));
 
 		rto.clip(clipRect);
 
@@ -263,8 +294,11 @@ void Frame::playTransition(Score *score) {
 		if (processQuitEvent(true))
 			break;
 
-		if (rto.height() > 0 && rto.width() > 0)
+		if (fullredraw) {
+			g_system->copyRectToScreen(score->_backSurface->getPixels(), score->_backSurface->pitch, 0, 0, clipRect.width(), clipRect.height());
+		} else if (rto.height() > 0 && rto.width() > 0) {
 			g_system->copyRectToScreen(score->_backSurface->getBasePtr(rto.left, rto.top), score->_backSurface->pitch, rto.left, rto.top, rto.width(), rto.height()); // transition
+		}
 
 		g_system->updateScreen();
 	}


Commit: 9cff7e03547e3fa5c65684bbc173aa6691b01ec0
    https://github.com/scummvm/scummvm/commit/9cff7e03547e3fa5c65684bbc173aa6691b01ec0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-03-31T01:11:04+02:00

Commit Message:
DIRECTOR: Implemented rest of kTransAlgoReveal transitions

Changed paths:
    engines/director/transitions.cpp


diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index 986ad2e48c..4ce79cf1c1 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -239,6 +239,34 @@ void Frame::playTransition(Score *score) {
 			rto.moveTo(0, -t.yStepSize * i);
 			break;
 
+		case kTransRevealUpRight:	// 16
+			rto.moveTo(t.xStepSize * i, -t.yStepSize * i);
+			break;
+
+		case kTransRevealRight:		// 17
+			rto.moveTo(t.xStepSize * i, 0);
+			break;
+
+		case kTransRevealDownRight:	// 18
+			rto.moveTo(t.xStepSize * i, t.yStepSize * i);
+			break;
+
+		case kTransRevealDown:		// 19
+			rto.moveTo(0, t.yStepSize * i);
+			break;
+
+		case kTransRevealDownLeft:	// 20
+			rto.moveTo(-t.xStepSize * i, t.yStepSize * i);
+			break;
+
+		case kTransRevealLeft:		// 21
+			rto.moveTo(-t.xStepSize * i, 0);
+			break;
+
+		case kTransRevealUpLeft:	// 22
+			rto.moveTo(-t.xStepSize * i, -t.yStepSize * i);
+			break;
+
 		case kTransCoverDown:	// 29
 			rto.setHeight(clipRect.height());
 			rto.moveTo(0, -clipRect.height() + t.yStepSize * i);


Commit: 1ec516729e987016d4d059a343b213e208aabbea
    https://github.com/scummvm/scummvm/commit/1ec516729e987016d4d059a343b213e208aabbea
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-03-31T01:11:04+02:00

Commit Message:
DIRECTOR: Text formatting and added safeguard checks to transitions

Changed paths:
    engines/director/transitions.cpp


diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index 4ce79cf1c1..d4cd467393 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -212,21 +212,21 @@ void Frame::playTransition(Score *score) {
 		}
 
 		switch (t.type) {
-		case kTransCenterOutHorizontal: // 5
+		case kTransCenterOutHorizontal:						// 5
 			t.xpos += t.xStepSize;
 			rto.setWidth(t.xpos * 2);
 			rto.moveTo(clipRect.width() / 2 - t.xpos, 0);
 			rfrom = rto;
 			break;
 
-		case kTransCenterOutVertical: // 7
+		case kTransCenterOutVertical:						// 7
 			t.ypos += t.yStepSize;
 			rto.setHeight(t.ypos * 2);
 			rto.moveTo(0, clipRect.height() / 2 - t.ypos);
 			rfrom = rto;
 			break;
 
-		case kTransCenterOutSquare: // 9
+		case kTransCenterOutSquare: 						// 9
 			t.ypos += t.yStepSize;
 			rto.setHeight(t.ypos * 2);
 			t.xpos += t.xStepSize;
@@ -235,74 +235,89 @@ void Frame::playTransition(Score *score) {
 			rfrom = rto;
 			break;
 
-		case kTransRevealUp:		// 15
+		case kTransRevealUp:								// 15
 			rto.moveTo(0, -t.yStepSize * i);
 			break;
 
-		case kTransRevealUpRight:	// 16
+		case kTransRevealUpRight:							// 16
 			rto.moveTo(t.xStepSize * i, -t.yStepSize * i);
 			break;
 
-		case kTransRevealRight:		// 17
+		case kTransRevealRight:								// 17
 			rto.moveTo(t.xStepSize * i, 0);
 			break;
 
-		case kTransRevealDownRight:	// 18
+		case kTransRevealDownRight:							// 18
 			rto.moveTo(t.xStepSize * i, t.yStepSize * i);
 			break;
 
-		case kTransRevealDown:		// 19
+		case kTransRevealDown:								// 19
 			rto.moveTo(0, t.yStepSize * i);
 			break;
 
-		case kTransRevealDownLeft:	// 20
+		case kTransRevealDownLeft:							// 20
 			rto.moveTo(-t.xStepSize * i, t.yStepSize * i);
 			break;
 
-		case kTransRevealLeft:		// 21
+		case kTransRevealLeft:								// 21
 			rto.moveTo(-t.xStepSize * i, 0);
 			break;
 
-		case kTransRevealUpLeft:	// 22
+		case kTransRevealUpLeft:							// 22
 			rto.moveTo(-t.xStepSize * i, -t.yStepSize * i);
 			break;
 
-		case kTransCoverDown:	// 29
+		case kTransDissolvePixelsFast:						// 23
+			error("Frame::playTransition(): Fall through to dissolve transition");
+			break;
+
+		case kTransDissolvePatterns:						// 26
+			error("Frame::playTransition(): Fall through to dissolve transition");
+			break;
+
+		case kTransCoverDown:								// 29
 			rto.setHeight(clipRect.height());
 			rto.moveTo(0, -clipRect.height() + t.yStepSize * i);
 			break;
 
-		case kTransCoverDownLeft: // 30
+		case kTransCoverDownLeft:							// 30
 			rto.moveTo(clipRect.width() - t.xStepSize * i, -clipRect.height() + t.yStepSize * i);
 			break;
 
-		case kTransCoverDownRight: // 31
+		case kTransCoverDownRight:							// 31
 			rto.moveTo(-clipRect.width() + t.xStepSize * i, -clipRect.height() + t.yStepSize * i);
 			break;
 
-		case kTransCoverLeft:	// 32
+		case kTransCoverLeft:								// 32
 			rto.moveTo(clipRect.width() - t.xStepSize * i, 0);
 			break;
 
-		case kTransCoverRight:	// 33
+		case kTransCoverRight:								// 33
 			rto.moveTo(-clipRect.width() + t.xStepSize * i, 0);
 			break;
 
-		case kTransCoverUp:		// 34
+		case kTransCoverUp:									// 34
 			rto.moveTo(0, clipRect.height() - t.yStepSize * i);
 			break;
 
-		case kTransCoverUpLeft:	// 35
+		case kTransCoverUpLeft:								// 35
 			rto.moveTo(clipRect.width() - t.xStepSize * i, clipRect.height() - t.yStepSize * i);
 			break;
 
-		case kTransCoverUpRight:	// 36
+		case kTransCoverUpRight:							// 36
 			rto.moveTo(-clipRect.width() + t.xStepSize * i, clipRect.height() - t.yStepSize * i);
 			break;
 
-		case kTransDissolvePixels: // 51
-			warning("Frame::playTransition(): Unhandled transition type %s %d %d", transProps[t.type].name, t.duration, _transChunkSize);
-			stop = true;
+		case kTransDissolveBitsFast:						// 50
+			error("Frame::playTransition(): Fall through to dissolve transition");
+			break;
+
+		case kTransDissolvePixels:							// 51
+			error("Frame::playTransition(): Fall through to dissolve transition");
+			break;
+
+		case kTransDissolveBits:							// 52
+			error("Frame::playTransition(): Fall through to dissolve transition");
 			break;
 
 		default:




More information about the Scummvm-git-logs mailing list