[Scummvm-git-logs] scummvm master -> 6dc925227526db48355bd6fb1758c11a182f12f1

bluegr noreply at scummvm.org
Wed Aug 19 11:47:11 UTC 2026


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

Summary:
6dc9252275 MADE: Return the selected synthesizer type to the game scripts


Commit: 6dc925227526db48355bd6fb1758c11a182f12f1
    https://github.com/scummvm/scummvm/commit/6dc925227526db48355bd6fb1758c11a182f12f1
Author: synacktic (bsutherland at webbula.com)
Date: 2026-08-19T14:47:06+03:00

Commit Message:
MADE: Return the selected synthesizer type to the game scripts

Return the correct synthesizer type in sfGetSynthType(), so that the
game scripts in Return to Zork handle Adlib and MT-32-specific music
arrangements, when the corresponding sound types are configured.
Use 0 as a default value for the base player used by the Mac version.

Tested with Return to Zork V1.1: -e mt32 reports 4 and -e adlib
reports 2.

Assisted-by: Claude:claude-opus-5
Assisted-by: Codex:gpt-5

Changed paths:
    engines/made/music.cpp
    engines/made/music.h
    engines/made/scriptfuncs.cpp


diff --git a/engines/made/music.cpp b/engines/made/music.cpp
index c9618866587..4a17bd9b5e5 100644
--- a/engines/made/music.cpp
+++ b/engines/made/music.cpp
@@ -202,6 +202,17 @@ void DOSMusicPlayer::syncSoundSettings() {
 		_driver->syncSoundSettings();
 }
 
+SynthType DOSMusicPlayer::getSynthType() const {
+	switch (_driverType) {
+	case MT_MT32:
+		return kSynthTypeMT32;
+	case MT_ADLIB:
+		return kSynthTypeAdLib;
+	default:
+		return kSynthTypeDefault;
+	}
+}
+
 void DOSMusicPlayer::onTimer() {
 	if (_parser)
 		_parser->onTimer();
diff --git a/engines/made/music.h b/engines/made/music.h
index b9db4068f9a..ef5aa42ecf9 100644
--- a/engines/made/music.h
+++ b/engines/made/music.h
@@ -36,6 +36,15 @@ namespace Made {
 
 class GenericResource;
 
+/** Synthesizer types reported to game scripts. */
+enum SynthType {
+	kSynthTypeDefault = 0,
+	kSynthTypePCSpeaker = 1,
+	kSynthTypeAdLib = 2,
+	kSynthTypeAdLibGold = 3,
+	kSynthTypeMT32 = 4
+};
+
 class MusicPlayer {
 public:
 	virtual ~MusicPlayer() {}
@@ -50,6 +59,8 @@ public:
 
 	virtual bool isPlaying() = 0;
 	virtual void syncSoundSettings() = 0;
+
+	virtual SynthType getSynthType() const { return kSynthTypeDefault; }
 };
 
 class DOSMusicPlayer : public MusicPlayer {
@@ -71,6 +82,8 @@ public:
 	bool isPlaying() override;
 	void syncSoundSettings() override;
 
+	SynthType getSynthType() const override;
+
 private:
 	MadeEngine *_vm;
 	MidiParser *_parser;
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp
index 238a409b39b..6d3637757b6 100644
--- a/engines/made/scriptfuncs.cpp
+++ b/engines/made/scriptfuncs.cpp
@@ -1128,16 +1128,7 @@ int16 ScriptFunctions::sfSetSoundVolume(int16 argc, int16 *argv) {
 }
 
 int16 ScriptFunctions::sfGetSynthType(int16 argc, int16 *argv) {
-	// 0 = Default
-	// 1 = PCSPKR
-	// 2 = SBFM/ADLIB
-	// 3 = ADLIBG
-	// 4 = MT32MPU
-
-	// There doesn't seem to be any difference in the music no matter what this returns
-
-	//warning("Unimplemented opcode: sfGetSynthType");
-	return 0;
+	return _vm->_music ? _vm->_music->getSynthType() : kSynthTypeDefault;
 }
 
 int16 ScriptFunctions::sfIsSlowSystem(int16 argc, int16 *argv) {




More information about the Scummvm-git-logs mailing list