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

bgK bastien.bouclet at gmail.com
Sat Apr 21 17:38:33 CEST 2018


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:
5a1fc8c230 MOHAWK: MYST: Enhance: slow down sound receiver max spin rate
bfa97d8f7a MOHAWK: MYST: Make sound receiver hint boundary line up with orig
7c7010204b MOHAWK: MYST: Always redraw the sound receiver at constant speeds
e421b18c38 Merge branch 'dafioram-myst_soundrecvrChanges'


Commit: 5a1fc8c23039c877fb1bc887631b04a5b93b6d51
    https://github.com/scummvm/scummvm/commit/5a1fc8c23039c877fb1bc887631b04a5b93b6d51
Author: David Fioramonti (dafioram at gmail.com)
Date: 2018-04-21T07:27:54-07:00

Commit Message:
MOHAWK: MYST: Enhance: slow down sound receiver max spin rate

This slows down the Selentic age sound receiver spin rate
when fully depressing either of the turn buttons.

This is a deviation from the original and improves
the users experience.

In the original when the button is fully depressed
the receiver turns so fast that it is impossible
to predict what angle you full be at when you let go.

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


diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index 2463150..6d5aabd 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -970,13 +970,13 @@ void Selenitic::soundReceiver_run() {
 void Selenitic::soundReceiverIncreaseSpeed() {
 	switch (_soundReceiverSpeed) {
 	case 1:
-		_soundReceiverSpeed = 10;
+		_soundReceiverSpeed = 5; // The original has this at 10
 		break;
-	case 10:
-		_soundReceiverSpeed = 50;
+	case 5:
+		_soundReceiverSpeed = 10; // The original has this at 50 too fast!
 		break;
-	case 50:
-		_soundReceiverSpeed = 100;
+	case 10:
+		_soundReceiverSpeed = 13; // The original has this at 100, way too fast!
 		break;
 	}
 }


Commit: bfa97d8f7a87d02eb60ce4198988ef34d791837f
    https://github.com/scummvm/scummvm/commit/bfa97d8f7a87d02eb60ce4198988ef34d791837f
Author: David Fioramonti (dafioram at gmail.com)
Date: 2018-04-21T07:27:59-07:00

Commit Message:
MOHAWK: MYST: Make sound receiver hint boundary line up with orig

In the original the sound reciever would provide a hint of the
source sound direction when the user was less than 5 degrees
away. In ScummVM it was less than or equal to 5 degrees.
Now it matches the behavior of the original.

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


diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index 6d5aabd..a74f331 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -1023,7 +1023,7 @@ uint16 Selenitic::soundReceiverCurrentSound(uint16 source, uint16 position) {
 	if (sourceEnabled) {
 		if (position == solution) {
 			soundId = soundIdGood;
-		} else if (position > solution && position <= solution + 50) {
+		} else if (position > solution && position < solution + 50) {
 			_soundReceiverNearBlinkCounter++;
 			if (_soundReceiverNearBlinkCounter % 2) {
 				_soundReceiverLeftButton->drawConditionalDataToScreen(2);
@@ -1031,7 +1031,7 @@ uint16 Selenitic::soundReceiverCurrentSound(uint16 source, uint16 position) {
 				_soundReceiverLeftButton->drawConditionalDataToScreen(0);
 			}
 			soundId = soundIdNear;
-		} else if (position < solution && position >= solution - 50) {
+		} else if (position < solution && position > solution - 50) {
 			_soundReceiverNearBlinkCounter++;
 			if (_soundReceiverNearBlinkCounter % 2) {
 				_soundReceiverRightButton->drawConditionalDataToScreen(2);


Commit: 7c7010204bc0099a806b3b68c01040564e07ae0f
    https://github.com/scummvm/scummvm/commit/7c7010204bc0099a806b3b68c01040564e07ae0f
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-04-21T17:32:11+02:00

Commit Message:
MOHAWK: MYST: Always redraw the sound receiver at constant speeds

Fixes the sound receiver display stopping for a little while
every second or so when keeping a direction button pressed.

Changed paths:
    engines/mohawk/myst_stacks/selenitic.cpp
    engines/mohawk/myst_stacks/selenitic.h


diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index a74f331..a91b995 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -61,7 +61,7 @@ Selenitic::Selenitic(MohawkEngine_Myst *vm) :
 
 	_soundReceiverCurrentSource = nullptr;
 	_soundReceiverPosition = nullptr;
-	_soundReceiverSpeed = 0;
+	_soundReceiverSpeed = kSoundReceiverSpeedStill;
 	_soundReceiverViewer = nullptr;
 	_soundReceiverRightButton = nullptr;
 	_soundReceiverLeftButton = nullptr;
@@ -669,7 +669,7 @@ void Selenitic::soundReceiverLeftRight(uint direction) {
 	_vm->_sound->stopEffect();
 
 	_soundReceiverDirection = direction;
-	_soundReceiverSpeed = 1;
+	_soundReceiverSpeed = kSoundReceiverSpeedSlow;
 	_soundReceiverStartTime = _vm->_system->getMillis();
 
 	soundReceiverUpdate();
@@ -951,7 +951,7 @@ void Selenitic::soundReceiver_run() {
 		if (_soundReceiverDirection) {
 			uint32 currentTime = _vm->_system->getMillis();
 
-			if (_soundReceiverSpeed == 50 && currentTime > _soundReceiverStartTime + 500) {
+			if (_soundReceiverSpeed == kSoundReceiverSpeedFast && currentTime > _soundReceiverStartTime + 500) {
 				soundReceiverIncreaseSpeed();
 				_soundReceiverStartTime = currentTime;
 			} else if (currentTime > _soundReceiverStartTime + 1000) {
@@ -959,8 +959,9 @@ void Selenitic::soundReceiver_run() {
 				_soundReceiverStartTime = currentTime;
 			}
 
-			if (currentTime > _soundReceiverStartTime + 100)
+			if (_soundReceiverSpeed > kSoundReceiverSpeedSlow || currentTime > _soundReceiverStartTime + 100) {
 				soundReceiverUpdate();
+			}
 		} else if (!_soundReceiverSigmaPressed) {
 			soundReceiverUpdateSound();
 		}
@@ -969,14 +970,20 @@ void Selenitic::soundReceiver_run() {
 
 void Selenitic::soundReceiverIncreaseSpeed() {
 	switch (_soundReceiverSpeed) {
-	case 1:
-		_soundReceiverSpeed = 5; // The original has this at 10
+	case kSoundReceiverSpeedStill:
+		// Should not happen
 		break;
-	case 5:
-		_soundReceiverSpeed = 10; // The original has this at 50 too fast!
+	case kSoundReceiverSpeedSlow:
+		_soundReceiverSpeed = kSoundReceiverSpeedNormal;
 		break;
-	case 10:
-		_soundReceiverSpeed = 13; // The original has this at 100, way too fast!
+	case kSoundReceiverSpeedNormal:
+		_soundReceiverSpeed = kSoundReceiverSpeedFast;
+		break;
+	case kSoundReceiverSpeedFast:
+		_soundReceiverSpeed = kSoundReceiverSpeedFaster;
+		break;
+	case kSoundReceiverSpeedFaster:
+		// Can't go faster
 		break;
 	}
 }
diff --git a/engines/mohawk/myst_stacks/selenitic.h b/engines/mohawk/myst_stacks/selenitic.h
index 1dc1505..368f6f2 100644
--- a/engines/mohawk/myst_stacks/selenitic.h
+++ b/engines/mohawk/myst_stacks/selenitic.h
@@ -74,6 +74,14 @@ private:
 	DECLARE_OPCODE(o_mazeRunnerRight_init);
 	DECLARE_OPCODE(o_mazeRunnerLeft_init);
 
+	enum SoundReceiverSpeed {
+		kSoundReceiverSpeedStill  = 0,
+		kSoundReceiverSpeedSlow   = 1,
+		kSoundReceiverSpeedNormal = 5,   // The original has this at 10
+		kSoundReceiverSpeedFast   = 10,  // The original has this at 50 too fast!
+		kSoundReceiverSpeedFaster = 13,  // The original has this at 100, way too fast!
+	};
+
 	void soundReceiver_run();
 
 	MystGameState::Selenitic &_state;
@@ -84,7 +92,7 @@ private:
 	MystAreaImageSwitch *_soundReceiverCurrentSource; // 112
 	uint16 *_soundReceiverPosition; // 116
 	uint16 _soundReceiverDirection; // 120
-	uint16 _soundReceiverSpeed; // 122
+	SoundReceiverSpeed _soundReceiverSpeed; // 122
 	uint32 _soundReceiverStartTime; //124
 	uint _soundReceiverNearBlinkCounter;
 	MystAreaImageSwitch *_soundReceiverViewer; // 128


Commit: e421b18c3874702d66ff4bdd7e6c2416160c4270
    https://github.com/scummvm/scummvm/commit/e421b18c3874702d66ff4bdd7e6c2416160c4270
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-04-21T17:36:46+02:00

Commit Message:
Merge branch 'dafioram-myst_soundrecvrChanges'

Changed paths:
    engines/mohawk/myst_stacks/selenitic.cpp
    engines/mohawk/myst_stacks/selenitic.h







More information about the Scummvm-git-logs mailing list