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

sev- sev at scummvm.org
Thu Aug 13 22:42:24 UTC 2020


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:
8a54a23121 DIRECTOR: Treat \r as a whitespace in empty script check
c2a7a6586f DIRECTOR: Properly position digital videos


Commit: 8a54a2312107a84b28a405a1650d40dee1e6c267
    https://github.com/scummvm/scummvm/commit/8a54a2312107a84b28a405a1650d40dee1e6c267
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-08-14T00:17:52+02:00

Commit Message:
DIRECTOR: Treat \r as a whitespace in empty script check

Changed paths:
    engines/director/score.cpp


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 4b7986b7d9..93505c3d51 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -869,7 +869,7 @@ void Score::loadActions(Common::SeekableReadStreamEndian &stream) {
 			// Check if it is empty
 			bool empty = true;
 			for (const char *ptr = j->_value.c_str(); *ptr; ptr++)
-				if (*ptr != ' ' || *ptr != '\t' || *ptr != '\n' || *ptr != '\xc2' || *ptr != '-') {
+				if (*ptr != ' ' || *ptr != '\t' || *ptr != '\n' || *ptr != '\r' || *ptr != '\xc2' || *ptr != '-') {
 					empty = false;
 					break;
 				}


Commit: c2a7a6586f2364d1f602c2e6268b450d412f39ac
    https://github.com/scummvm/scummvm/commit/c2a7a6586f2364d1f602c2e6268b450d412f39ac
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-08-14T00:42:00+02:00

Commit Message:
DIRECTOR: Properly position digital videos

Changed paths:
    engines/director/channel.cpp


diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index 7fad08dbb7..d8a69d329a 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -356,16 +356,27 @@ bool Channel::updateWidget() {
 }
 
 void Channel::addRegistrationOffset(Common::Point &pos, bool subtract) {
-	if (_sprite->_cast && _sprite->_cast->_type == kCastBitmap) {
-		BitmapCastMember *bc = (BitmapCastMember *)(_sprite->_cast);
+	if (!_sprite->_cast)
+		return;
 
-		if (subtract) {
-			pos -= Common::Point(bc->_initialRect.left - bc->_regX,
-													 bc->_initialRect.top - bc->_regY);
-		} else {
-			pos += Common::Point(bc->_initialRect.left - bc->_regX,
-													 bc->_initialRect.top - bc->_regY);
+	switch (_sprite->_cast->_type) {
+	case kCastBitmap:
+		{
+			BitmapCastMember *bc = (BitmapCastMember *)(_sprite->_cast);
+
+			if (subtract)
+				pos -= Common::Point(bc->_initialRect.left - bc->_regX,
+															bc->_initialRect.top - bc->_regY);
+			else
+				pos += Common::Point(bc->_initialRect.left - bc->_regX,
+															bc->_initialRect.top - bc->_regY);
 		}
+		break;
+	case kCastDigitalVideo:
+		pos -= Common::Point(_sprite->_cast->_initialRect.width() >> 1, _sprite->_cast->_initialRect.height() >> 1);
+		break;
+	default:
+		break;
 	}
 }
 




More information about the Scummvm-git-logs mailing list