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

bluegr noreply at scummvm.org
Wed Nov 6 23:02:38 UTC 2024


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:
85ebacf0b5 GOB: Fix typo
e8ddc07721 GOB: Fix footstep sounds in Gob2 CD - bug 15341


Commit: 85ebacf0b567021839379cb28c25dfca24cff905
    https://github.com/scummvm/scummvm/commit/85ebacf0b567021839379cb28c25dfca24cff905
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-11-07T01:02:08+02:00

Commit Message:
GOB: Fix typo

Changed paths:
    engines/gob/inter_v3.cpp


diff --git a/engines/gob/inter_v3.cpp b/engines/gob/inter_v3.cpp
index 4268824105c..2ddfefa2adf 100644
--- a/engines/gob/inter_v3.cpp
+++ b/engines/gob/inter_v3.cpp
@@ -82,7 +82,7 @@ void Inter_v3::o3_speakerOn(OpFuncParams &params) {
 	// our PC speaker emulator sometimes "swallows" very short beeper
 	// bursts issued in this way, this is in general quite wonky and
 	// prone to fail, as can be seen in bug report #5808. Therefore,
-	// we explicitely set a length in this case and ignore the next
+	// we explicitly set a length in this case and ignore the next
 	// speaker off command.
 	if (frequency == 50) {
 		length = 5;


Commit: e8ddc077213701d30dbc830628b957fce4ac431a
    https://github.com/scummvm/scummvm/commit/e8ddc077213701d30dbc830628b957fce4ac431a
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-11-07T01:02:09+02:00

Commit Message:
GOB: Fix footstep sounds in Gob2 CD - bug 15341

This is the same workaround as the one done for Gob 3 in a852f30fb272c4b6adec898a09f3fe8c1f631b90

Changed paths:
    engines/gob/inter.h
    engines/gob/inter_v1.cpp


diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 7a0c705ad2b..71f15d41e35 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -351,6 +351,9 @@ protected:
 	void o1_initGoblin(OpGobParams &params);
 
 	void manipulateMap(int16 xPos, int16 yPos, int16 item);
+
+private:
+	bool _ignoreSpeakerOff = false;
 };
 
 class Inter_Geisha : public Inter_v1 {
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index b1674549332..13ce13fcaad 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -1438,11 +1438,30 @@ void Inter_v1::o1_renewTimeInVars(OpFuncParams &params) {
 }
 
 void Inter_v1::o1_speakerOn(OpFuncParams &params) {
-	_vm->_sound->speakerOn(_vm->_game->_script->readValExpr(), -1);
+	int16 frequency = _vm->_game->_script->readValExpr();
+	int32 length = -1;
+
+	_ignoreSpeakerOff = false;
+
+	// WORKAROUND: This is the footsteps sound in Gob2 CD.
+	// We explicitly set a length in this case and ignore the
+	// next speaker off command. This is the same workaround
+	// as the one for Goblins 3 in Inter_v3::o3_speakerOn().
+	// Fixes bug #15341
+	if (_vm->getGameType() == kGameTypeGob2 && frequency == 50) {
+		length = 5;
+
+		_ignoreSpeakerOff = true;
+	}
+
+	_vm->_sound->speakerOn(frequency, length);
 }
 
 void Inter_v1::o1_speakerOff(OpFuncParams &params) {
-	_vm->_sound->speakerOff();
+	if (!_ignoreSpeakerOff)
+		_vm->_sound->speakerOff();
+
+	_ignoreSpeakerOff = false;
 }
 
 void Inter_v1::o1_putPixel(OpFuncParams &params) {




More information about the Scummvm-git-logs mailing list