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

ysj1173886760 42030331+ysj1173886760 at users.noreply.github.com
Thu Aug 19 08:16:25 UTC 2021


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:
afec76a083 DIRECTOR: fix trails of sprite.
1a6c09c57f DIRECTOR: patch scripts in jman-win.
cc24a1fd2c DIRECTOR: add comments for patch.


Commit: afec76a0839e5db06a29fa0dfc2a7656ac5b435d
    https://github.com/scummvm/scummvm/commit/afec76a0839e5db06a29fa0dfc2a7656ac5b435d
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-19T16:12:09+08:00

Commit Message:
DIRECTOR: fix trails of sprite.
This fix is aimed for fixing the bug in jman. And the fix may not be thoroughly.

Changed paths:
    engines/director/castmember.cpp
    engines/director/lingo/lingo-the.cpp


diff --git a/engines/director/castmember.cpp b/engines/director/castmember.cpp
index bb4259565b..3a78185174 100644
--- a/engines/director/castmember.cpp
+++ b/engines/director/castmember.cpp
@@ -828,16 +828,7 @@ void TextCastMember::setText(const Common::U32String &text) {
 	Common::U32String formatting = Common::String::format("\001\016%04x%02x%04x%04x%04x%04x", _fontId, _textSlant, _fontSize, _fgpalinfo1, _fgpalinfo2, _fgpalinfo3);
 	_ptext = text;
 	_ftext = formatting + text;
-
-	// if we have the link to widget, then we modify it directly.
-	// thus we can reach the immediate changing effect
-	if (_widget) {
-		((Graphics::MacText *)_widget)->setText(_ftext);
-		((Graphics::MacText *)_widget)->draw();
-		g_director->getCurrentWindow()->addDirtyRect(_widget->_dims);
-	} else {
-		_modified = true;
-	}
+	_modified = true;
 }
 
 // D4 dictionary book said this is line spacing
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index f7c2e9fa4d..fb93272edf 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -1454,7 +1454,10 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
 			}
 
 			if (castId != sprite->_castId) {
-				g_director->getCurrentWindow()->addDirtyRect(channel->getBbox());
+				if (!sprite->_trails) {
+					g_director->getCurrentMovie()->getWindow()->addDirtyRect(channel->getBbox());
+					channel->_dirty = true;
+				}
 				channel->setCast(castId);
 				channel->_dirty = true;
 			}
@@ -1540,16 +1543,20 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
 		break;
 	case kTheLocH:
 		if (d.asInt() != channel->_currentPoint.x) {
-			g_director->getCurrentMovie()->getWindow()->addDirtyRect(channel->getBbox());
+			if (!channel->_sprite->_trails) {
+				g_director->getCurrentMovie()->getWindow()->addDirtyRect(channel->getBbox());
+				channel->_dirty = true;
+			}
 			channel->_currentPoint.x = d.asInt();
-			channel->_dirty = true;
 		}
 		break;
 	case kTheLocV:
 		if (d.asInt() != channel->_currentPoint.y) {
-			g_director->getCurrentMovie()->getWindow()->addDirtyRect(channel->getBbox());
+			if (!channel->_sprite->_trails) {
+				g_director->getCurrentMovie()->getWindow()->addDirtyRect(channel->getBbox());
+				channel->_dirty = true;
+			}
 			channel->_currentPoint.y = d.asInt();
-			channel->_dirty = true;
 		}
 		break;
 	case kTheMoveableSprite:


Commit: 1a6c09c57f716c9ff8faae3a0c641c10db639f5d
    https://github.com/scummvm/scummvm/commit/1a6c09c57f716c9ff8faae3a0c641c10db639f5d
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-19T16:12:22+08:00

Commit Message:
DIRECTOR: patch scripts in jman-win.

Changed paths:
    engines/director/lingo/lingo-patcher.cpp


diff --git a/engines/director/lingo/lingo-patcher.cpp b/engines/director/lingo/lingo-patcher.cpp
index 29c7d80bed..a8a9b5cded 100644
--- a/engines/director/lingo/lingo-patcher.cpp
+++ b/engines/director/lingo/lingo-patcher.cpp
@@ -152,6 +152,19 @@ struct ScriptPatch {
 	{"jman", "", kPlatformWindows, "mmm:Mars Space Game 05", kMovieScript, 10, 0,
 			68, "set DamageParameter = (gProcessorSpeed/2) + 7)", "set DamageParameter = (gProcessorSpeed/2) + 7"},
 
+	{"jman", "", kPlatformWindows, "MMM:Shared Cast B&W", kMovieScript, 323, 0,
+			187, "set the trails of sprite 19 to 0", "set the locH of sprite 19 to 408"},
+	{"jman", "", kPlatformWindows, "MMM:Shared Cast B&W", kMovieScript, 323, 0,
+		188, "set the locH of sprite 19 to 408", "set the locV of sprite 19 to 168"},
+	{"jman", "", kPlatformWindows, "MMM:Shared Cast B&W", kMovieScript, 323, 0,
+		189, "set the locV of sprite 19 to 168", "set the text of field \"Description\" = description"},
+	{"jman", "", kPlatformWindows, "MMM:Shared Cast B&W", kMovieScript, 323, 0,
+		190, "set the text of field \"Description\" = description", "set the castnum of sprite 19 to the number of cast \"Description\""},
+	{"jman", "", kPlatformWindows, "MMM:Shared Cast B&W", kMovieScript, 323, 0,
+		191, "set the castnum of sprite 19 to the number of cast \"Description\"", "updateStage"},
+	{"jman", "", kPlatformWindows, "MMM:Shared Cast B&W", kMovieScript, 323, 0,
+		192, "updateStage", "set the trails of sprite 19 to 0"},
+
 	{nullptr, nullptr, kPlatformUnknown, nullptr, kNoneScript, 0, 0, 0, nullptr, nullptr}
 };
 


Commit: cc24a1fd2c3ee2bd387eda11fcbcbc7bc88b2283
    https://github.com/scummvm/scummvm/commit/cc24a1fd2c3ee2bd387eda11fcbcbc7bc88b2283
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-19T16:16:02+08:00

Commit Message:
DIRECTOR: add comments for patch.

Changed paths:
    engines/director/lingo/lingo-the.cpp


diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index fb93272edf..08fbc5bfd2 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -1543,6 +1543,8 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
 		break;
 	case kTheLocH:
 		if (d.asInt() != channel->_currentPoint.x) {
+			// adding the dirtyRect only when the trails is false. Other changes which will add dirtyRect may also apply this patch
+			// this is for fixing the bug in jman-win. Currently, i've only patched the LocH, LocV and castNum since those are the only ones used in jman
 			if (!channel->_sprite->_trails) {
 				g_director->getCurrentMovie()->getWindow()->addDirtyRect(channel->getBbox());
 				channel->_dirty = true;




More information about the Scummvm-git-logs mailing list