[Scummvm-git-logs] scummvm master -> 066a14bd4c688e82670f4d0b944fcaa969939895

bgK bastien.bouclet at gmail.com
Mon Apr 2 13:39:14 CEST 2018


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:
5fec35d045 MOHAWK: MYST: Initialize more variables
066a14bd4c MOHAWK: MYST: Fix the myst flyby playing over the closed book


Commit: 5fec35d045044d8ca8b6ffa8cc6d3cd0d28d79ed
    https://github.com/scummvm/scummvm/commit/5fec35d045044d8ca8b6ffa8cc6d3cd0d28d79ed
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-04-02T13:38:57+02:00

Commit Message:
MOHAWK: MYST: Initialize more variables

To make static analysis tools quiet.

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


diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index c9f0998..bbecebb 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -46,13 +46,32 @@ Myst::Myst(MohawkEngine_Myst *vm) :
 	_savedCardId = 4329;
 
 	_towerRotationBlinkLabel = false;
+	_towerRotationBlinkLabelCount = 0;
 	_towerRotationSpeed = 0;
+	_towerRotationMapInitialized = 0;
+	_towerRotationMapRunning = false;
 	_towerRotationMapClicked = false;
+	_towerRotationMapTower = nullptr;
+	_towerRotationMapLabel = nullptr;
 	_towerRotationOverSpot = false;
 
 	_libraryBookcaseChanged = false;
+	_libraryBookcaseMoving = false;
+	_libraryBookcaseMovie = nullptr;
+	_libraryBookcaseSoundId = 0;
+
 	_libraryBookPagesTurning = false;
+	_libraryBookNumPages = 0;
+	_libraryBookBaseImage = 0;
+	_libraryBookSound1 = 0;
+	_libraryBookSound2 = 0;
+
 	_libraryCombinationBookPagesTurning = false;
+
+	for (uint i = 0; i < ARRAYSIZE(_fireplaceLines); i++) {
+		_fireplaceLines[i] = 0;
+	}
+
 	_dockVaultState = 0;
 
 	_cabinDoorOpened = 0;
@@ -76,10 +95,30 @@ Myst::Myst(MohawkEngine_Myst *vm) :
 	_treeMinAccessiblePosition = 0;
 	_treeMaxAccessiblePosition = 0;
 
+	_imagerRunning = false;
+	_imagerRedButton = nullptr;
+	_imagerMovie = nullptr;
+	_imagerValidationRunning = false;
+	_imagerValidationCard = 0;
 	_imagerValidationStep = 0;
+	for (uint i = 0; i < ARRAYSIZE(_imagerSound); i++) {
+		_imagerSound[i] = 0;
+	}
+
 	_butterfliesMoviePlayed = false;
 	_state.treeLastMoveTime = _vm->_system->getMillis();
+
 	_rocketPianoSound = 0;
+	_rocketSlider1 = nullptr;
+	_rocketSlider2 = nullptr;
+	_rocketSlider3 = nullptr;
+	_rocketSlider4 = nullptr;
+	_rocketSlider5 = nullptr;
+	_rocketSliderSound = 0;
+	_rocketLeverPosition = 0;
+
+	_generatorControlRoomRunning = false;
+	_generatorVoltage = _state.generatorVoltage;
 
 	_observatoryRunning = false;
 	_observatoryMonthChanging = false;
@@ -98,6 +137,21 @@ Myst::Myst(MohawkEngine_Myst *vm) :
 	_observatoryIncrement = 0;
 
 	_greenBookRunning = false;
+
+	_gullsFlying1 = false;
+	_gullsFlying2 = false;
+	_gullsFlying3 = false;
+	_gullsNextTime = 0;
+
+	_courtyardBoxSound = 0;
+
+	_clockTurningWheel = 0;
+	_clockWeightPosition = 0;
+	_clockMiddleGearMovedAlone = false;
+	_clockLeverPulled = false;
+	for (uint i = 0; i < ARRAYSIZE(_clockGearsPositions); i++) {
+		_clockGearsPositions[i] = 0;
+	}
 }
 
 Myst::~Myst() {


Commit: 066a14bd4c688e82670f4d0b944fcaa969939895
    https://github.com/scummvm/scummvm/commit/066a14bd4c688e82670f4d0b944fcaa969939895
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-04-02T13:38:57+02:00

Commit Message:
MOHAWK: MYST: Fix the myst flyby playing over the closed book

In older releases of Myst the flyby video had the play on card change
flag set to true, causing the bug. As a workaround patch the resource to
mach newer releases.

Fixes #10472.

Changed paths:
    engines/mohawk/myst_areas.cpp
    engines/mohawk/myst_areas.h


diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp
index c9172ce..eff51bf 100644
--- a/engines/mohawk/myst_areas.cpp
+++ b/engines/mohawk/myst_areas.cpp
@@ -196,12 +196,21 @@ MystAreaVideo::MystAreaVideo(MohawkEngine_Myst *vm, ResourceType type, Common::S
 	// Position values require modulus 10000 to keep in sane range.
 	_left = rlstStream->readSint16LE() % 10000;
 	_top = rlstStream->readSint16LE() % 10000;
-	_playOnCardChange = rlstStream->readUint16LE();
+	_playOnCardChange = rlstStream->readUint16LE() != 0;
 	_direction = rlstStream->readSint16LE();
 	_playBlocking = rlstStream->readUint16LE();
 	_loop = rlstStream->readUint16LE();
 	_playRate = rlstStream->readUint16LE();
 
+	// WORKAROUND: Myst v1.0 has playOnCardChange set to true
+	// for the Myst flyby video shown during the intro.
+	// This causes the flyby to play over the closed Myst book picture.
+	// Later releases of the game have that flag set to false.
+	// Here we apply a resource patch to match the newer releases.
+	if (_videoFile == "qtw/intro/intro2.mov") {
+		_playOnCardChange = false;
+	}
+
 	debugC(kDebugResource, "\tvideoFile: \"%s\"", _videoFile.c_str());
 	debugC(kDebugResource, "\tleft: %d", _left);
 	debugC(kDebugResource, "\ttop: %d", _top);
diff --git a/engines/mohawk/myst_areas.h b/engines/mohawk/myst_areas.h
index bfd370d..b389f32 100644
--- a/engines/mohawk/myst_areas.h
+++ b/engines/mohawk/myst_areas.h
@@ -126,7 +126,7 @@ protected:
 	uint16 _loop;
 	int16 _direction; // 1 => forward, -1 => backwards
 	uint16 _playBlocking;
-	uint16 _playOnCardChange;
+	bool _playOnCardChange;
 	uint16 _playRate; // percents
 };
 





More information about the Scummvm-git-logs mailing list