[Scummvm-git-logs] scummvm master -> 4ca6f582645496310db9bf057d72b646fbc8a348

bgK bastien.bouclet at gmail.com
Sat Mar 18 16:18:19 CET 2017


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

Summary:
213e730388 MOHAWK: Add detection for Myst v1.0 English
060caebf47 MOHAWK: In Myst v1.0 English the take page opcode takes no arguments
b7b06e8399 MOHAWK: Allow the mouse cursor to move while drawing in a tight loop
4ca6f58264 GUI: Fix a signed vs unsigned comparison warning


Commit: 213e73038883f2b8498d666bb70851f648198579
    https://github.com/scummvm/scummvm/commit/213e73038883f2b8498d666bb70851f648198579
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2017-03-18T16:14:55+01:00

Commit Message:
MOHAWK: Add detection for Myst v1.0 English

Provided by vonLeheCreative in #9645

Changed paths:
    engines/mohawk/detection_tables.h


diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index 9cc52a7..7da3c14 100644
--- a/engines/mohawk/detection_tables.h
+++ b/engines/mohawk/detection_tables.h
@@ -48,6 +48,24 @@ static const MohawkGameDescription gameDescriptions[] = {
 		0,
 	},
 
+	// Myst
+	// English Windows 3.11, v1.0
+	// From vonLeheCreative, #9645
+	{
+			{
+					"myst",
+					"",
+					AD_ENTRY1("MYST.DAT", "0e4b6fcbd2419d4371365314fb7443f8"),
+					Common::EN_ANY,
+					Common::kPlatformWindows,
+					ADGF_NO_FLAGS,
+					GUI_OPTIONS_MYST
+			},
+			GType_MYST,
+			0,
+			0,
+	},
+
 	// Myst Demo
 	// English Windows 3.11
 	// From CD-ROM Today July, 1994


Commit: 060caebf47838b7466cbd44a5aeb13e24641af94
    https://github.com/scummvm/scummvm/commit/060caebf47838b7466cbd44a5aeb13e24641af94
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2017-03-18T16:15:09+01:00

Commit Message:
MOHAWK: In Myst v1.0 English the take page opcode takes no arguments

Fixes #9645, crash when trying to take a book page.

Changed paths:
    engines/mohawk/myst_scripts.cpp


diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index 596180d..267d644 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -355,7 +355,26 @@ void MystScriptParser::o_changeCardSwitchRtL(uint16 op, uint16 var, uint16 argc,
 }
 
 void MystScriptParser::o_takePage(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
-	uint16 cursorId = argv[0];
+	// In most game releases, the first opcode argument is the new mouse cursor.
+	// However, in the original v1.0 English release this opcode takes no argument.
+	uint16 cursorId; // = argv[0];
+	switch (var) {
+		case 41: // Vault white page
+			cursorId = kWhitePageCursor;
+			break;
+		case 25:  // Fireplace red page
+		case 102: // Red page
+			cursorId = kRedPageCursor;
+			break;
+		case 24:  // Fireplace blue page
+		case 103: // Blue page
+			cursorId = kBluePageCursor;
+			break;
+		default:
+			warning("Unexpected take page variable '%d'", var);
+			cursorId = kDefaultMystCursor;
+	}
+
 	uint16 oldPage = _globals.heldPage;
 
 	debugC(kDebugScript, "Opcode %d: takePage Var %d CursorId %d", op, var, cursorId);


Commit: b7b06e8399c62f72e1e586570da72f8a8f8dced5
    https://github.com/scummvm/scummvm/commit/b7b06e8399c62f72e1e586570da72f8a8f8dced5
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2017-03-18T16:15:09+01:00

Commit Message:
MOHAWK: Allow the mouse cursor to move while drawing in a tight loop

Changed paths:
    engines/mohawk/myst_stacks/channelwood.cpp
    engines/mohawk/myst_stacks/myst.cpp


diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index 21c3042..f006a8e 100644
--- a/engines/mohawk/myst_stacks/channelwood.cpp
+++ b/engines/mohawk/myst_stacks/channelwood.cpp
@@ -368,6 +368,7 @@ void Channelwood::o_waterTankValveOpen(uint16 op, uint16 var, uint16 argc, uint1
 	for (uint i = 0; i < 2; i++)
 		for (uint16 imageId = 3601; imageId >= 3595; imageId--) {
 			_vm->_gfx->copyImageToScreen(imageId, rect);
+			_vm->pollAndDiscardEvents();
 			_vm->_system->updateScreen();
 		}
 
@@ -699,6 +700,7 @@ void Channelwood::o_waterTankValveClose(uint16 op, uint16 var, uint16 argc, uint
 	for (uint i = 0; i < 2; i++)
 		for (uint16 imageId = 3595; imageId <= 3601; imageId++) {
 			_vm->_gfx->copyImageToScreen(imageId, rect);
+			_vm->pollAndDiscardEvents();
 			_vm->_system->updateScreen();
 		}
 
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index f9ba6a4..424dd2f 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -864,6 +864,7 @@ void Myst::o_fireplaceToggleButton(uint16 op, uint16 var, uint16 argc, uint16 *a
 		// Unset button
 		for (uint i = 4795; i >= 4779; i--) {
 			_vm->_gfx->copyImageToScreen(i, getInvokingResource<MystArea>()->getRect());
+			_vm->pollAndDiscardEvents();
 			_vm->_system->updateScreen();
 		}
 		_fireplaceLines[var - 17] &= ~bitmask;
@@ -871,6 +872,7 @@ void Myst::o_fireplaceToggleButton(uint16 op, uint16 var, uint16 argc, uint16 *a
 		// Set button
 		for (uint i = 4779; i <= 4795; i++) {
 			_vm->_gfx->copyImageToScreen(i, getInvokingResource<MystArea>()->getRect());
+			_vm->pollAndDiscardEvents();
 			_vm->_system->updateScreen();
 		}
 		_fireplaceLines[var - 17] |= bitmask;


Commit: 4ca6f582645496310db9bf057d72b646fbc8a348
    https://github.com/scummvm/scummvm/commit/4ca6f582645496310db9bf057d72b646fbc8a348
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2017-03-18T16:17:10+01:00

Commit Message:
GUI: Fix a signed vs unsigned comparison warning

Changed paths:
    gui/gui-manager.cpp


diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 6f9fd8b..76f5577 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -261,7 +261,7 @@ void GuiManager::addToTrash(GuiObject* object, Dialog* parent) {
 	t.parent = 0;
 	// If a dialog was provided, check it is in the dialog stack
 	if (parent != 0) {
-		for (int i = 0 ; i < _dialogStack.size() ; ++i) {
+		for (uint i = 0 ; i < _dialogStack.size() ; ++i) {
 			if (_dialogStack[i] == parent) {
 				t.parent = parent;
 				break;





More information about the Scummvm-git-logs mailing list