[Scummvm-git-logs] scummvm branch-2-9 -> da10d36a66230e1faa4f666277640807f29260c6

bluegr noreply at scummvm.org
Wed Nov 27 22:48:48 UTC 2024


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

Summary:
da10d36a66 Revert "SCUMM: Add music quality engine setting for Mac MI2 and Fate of Atlantis"


Commit: da10d36a66230e1faa4f666277640807f29260c6
    https://github.com/scummvm/scummvm/commit/da10d36a66230e1faa4f666277640807f29260c6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-11-28T00:48:03+02:00

Commit Message:
Revert "SCUMM: Add music quality engine setting for Mac MI2 and Fate of Atlantis"

The new Mac sound driver isn't included in 2.9.0, so this music quality
setting had no effect

This reverts commit 522662c9a7ce0343bb354361b5f596b20f106887.

Changed paths:
    engines/scumm/dialogs.cpp
    engines/scumm/dialogs.h
    engines/scumm/metaengine.cpp


diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index ab12a1abc7e..6527a85433f 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -1385,29 +1385,29 @@ void LoomEgaGameOptionsWidget::updateOvertureTicksValue() {
 	_overtureTicksValue->setLabel(Common::String::format("%d:%02d.%d", ticks / 600, (ticks % 600) / 10, ticks % 10));
 }
 
-// Options for various Mac games
-MacGameOptionsWidget::MacGameOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain, int gameId, const Common::String &extra) :
-	ScummOptionsContainerWidget(boss, name, "MacGameOptionsWidget", domain), _sndQualitySlider(nullptr), _sndQualityValue(nullptr), _enableOriginalGUICheckbox(nullptr), _enableCopyProtectionCheckbox(nullptr), _quality(0) {
-	GUI::StaticTextWidget *text = new GUI::StaticTextWidget(widgetsBoss(), "MacGameOptionsWidget.SndQualityLabel", _("Music Quality:"));
+// Mac Loom/MI1 options
+LoomMonkeyMacGameOptionsWidget::LoomMonkeyMacGameOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain, int gameId) :
+	ScummOptionsContainerWidget(boss, name, "LoomMonkeyMacGameOptionsWidget", domain), _sndQualitySlider(nullptr), _sndQualityValue(nullptr), _enableOriginalGUICheckbox(nullptr), _enableCopyProtectionCheckbox(nullptr), _quality(0) {
+	GUI::StaticTextWidget *text = new GUI::StaticTextWidget(widgetsBoss(), "LoomMonkeyMacGameOptionsWidget.SndQualityLabel", _("Music Quality:"));
 	text->setAlign(Graphics::TextAlign::kTextAlignEnd);
 
-	_sndQualitySlider = new GUI::SliderWidget(widgetsBoss(), "MacGameOptionsWidget.SndQuality", gameId == GID_MONKEY ?
+	_sndQualitySlider = new GUI::SliderWidget(widgetsBoss(), "LoomMonkeyMacGameOptionsWidget.SndQuality", gameId == GID_MONKEY ?
 		_("Select music quality. The original lets you choose this from the Game menu.") :
 		_("Select music quality. The original determines the basic setup by hardware detection and speed tests, "
 			"but also allows changes through the Game menu to some degree."), kQualitySliderUpdate);
-	_sndQualitySlider->setMinValue(gameId == GID_LOOM ? 0 : 6);
+	_sndQualitySlider->setMinValue(gameId == GID_MONKEY ? 6 : 0);
 	_sndQualitySlider->setMaxValue(9);
-	_sndQualityValue = new GUI::StaticTextWidget(widgetsBoss(), "MacGameOptionsWidget.SndQualityValue", Common::U32String());
+	_sndQualityValue = new GUI::StaticTextWidget(widgetsBoss(), "LoomMonkeyMacGameOptionsWidget.SndQualityValue", Common::U32String());
 	_sndQualityValue->setFlags(GUI::WIDGET_CLEARBG);
 	updateQualitySlider();
-	createEnhancementsWidget(widgetsBoss(), "MacGameOptionsWidget");
-	_enableOriginalGUICheckbox = createOriginalGUICheckbox(widgetsBoss(), "MacGameOptionsWidget.EnableOriginalGUI");
+	createEnhancementsWidget(widgetsBoss(), "LoomMonkeyMacGameOptionsWidget");
+	_enableOriginalGUICheckbox = createOriginalGUICheckbox(widgetsBoss(), "LoomMonkeyMacGameOptionsWidget.EnableOriginalGUI");
 
-	if (gameId == GID_MONKEY || gameId == GID_MONKEY2 || (gameId == GID_INDY4 && extra == "Floppy"))
-		_enableCopyProtectionCheckbox = createCopyProtectionCheckbox(widgetsBoss(), "MacGameOptionsWidget.EnableCopyProtection");
+	if (gameId == GID_MONKEY)
+		_enableCopyProtectionCheckbox = createCopyProtectionCheckbox(widgetsBoss(), "LoomMonkeyMacGameOptionsWidget.EnableCopyProtection");
 }
 
-void MacGameOptionsWidget::load() {
+void LoomMonkeyMacGameOptionsWidget::load() {
 	ScummOptionsContainerWidget::load();
 
 	_quality = 0;
@@ -1430,7 +1430,7 @@ void MacGameOptionsWidget::load() {
 		_enableCopyProtectionCheckbox->setState(ConfMan.getBool("copy_protection", _domain));
 }
 
-bool MacGameOptionsWidget::save() {
+bool LoomMonkeyMacGameOptionsWidget::save() {
 	bool res = ScummOptionsContainerWidget::save();
 	ConfMan.setInt("mac_snd_quality", _quality, _domain);
 	ConfMan.setBool("original_gui", _enableOriginalGUICheckbox->getState(), _domain);
@@ -1441,7 +1441,7 @@ bool MacGameOptionsWidget::save() {
 	return res;
 }
 
-void MacGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
+void LoomMonkeyMacGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
 	layouts.addDialog(layoutName, overlayedLayout)
 		.addLayout(GUI::ThemeLayout::kLayoutVertical, 5)
 			.addPadding(0, 0, 0, 0)
@@ -1467,7 +1467,7 @@ void MacGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::S
 		.closeDialog();
 }
 
-void MacGameOptionsWidget::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
+void LoomMonkeyMacGameOptionsWidget::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
 	switch (cmd) {
 	case kQualitySliderUpdate:
 		updateQualitySlider();
@@ -1478,7 +1478,7 @@ void MacGameOptionsWidget::handleCommand(GUI::CommandSender *sender, uint32 cmd,
 	}
 }
 
-void MacGameOptionsWidget::updateQualitySlider() {
+void LoomMonkeyMacGameOptionsWidget::updateQualitySlider() {
 	_quality = _sndQualitySlider->getValue();
 	static const char *const descr1[] = { _s("auto"), _s("Low"), _s("Medium"), _s("High") };
 	static const char *const descr2[] = { _s("auto"), _s("Good"), _s("Better"), _s("Best") };
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 877a3ec6eca..9a50a6c4cfc 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -301,12 +301,12 @@ private:
 };
 
 /**
-* Options widget for various Macintosh games.
+* Options widget for Mac Loom.
 */
-class MacGameOptionsWidget : public ScummOptionsContainerWidget {
+class LoomMonkeyMacGameOptionsWidget : public ScummOptionsContainerWidget {
 public:
-	MacGameOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain, int gameId, const Common::String &extra);
-	~MacGameOptionsWidget() override {};
+	LoomMonkeyMacGameOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain, int gameId);
+	~LoomMonkeyMacGameOptionsWidget() override {};
 
 	void load() override;
 	bool save() override;
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index c7d2a0ac111..fa354c6849a 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -606,7 +606,7 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildLoomOptionsWidget(GUI::GuiObj
 	else if (extra == "Steam" && platform == Common::kPlatformMacintosh)
 		return nullptr;
 	else if (platform == Common::kPlatformMacintosh)
-		return new Scumm::MacGameOptionsWidget(boss, name, target, GID_LOOM, extra);
+		return new Scumm::LoomMonkeyMacGameOptionsWidget(boss, name, target, GID_LOOM);
 
 	// These EGA Loom settings are only relevant for the EGA
 	// version, since that is the only one that has an overture.
@@ -618,7 +618,7 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildMI1OptionsWidget(GUI::GuiObje
 	Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target));
 
 	if (platform == Common::kPlatformMacintosh && extra != "Steam")
-		return new Scumm::MacGameOptionsWidget(boss, name, target, GID_MONKEY, extra);
+		return new Scumm::LoomMonkeyMacGameOptionsWidget(boss, name, target, GID_MONKEY);
 
 	if (extra != "CD" && extra != "FM-TOWNS" && extra != "SEGA")
 		return nullptr;
@@ -630,7 +630,6 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildMI1OptionsWidget(GUI::GuiObje
 GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
 	Common::String gameid = ConfMan.get("gameid", target);
 	Common::String extra = ConfMan.get("extra", target);
-	Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target));
 
 	if (gameid == "loom") {
 		GUI::OptionsContainerWidget *widget = buildLoomOptionsWidget(boss, name, target);
@@ -640,14 +639,6 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidget(GUI::GuiO
 		GUI::OptionsContainerWidget *widget = buildMI1OptionsWidget(boss, name, target);
 		if (widget)
 			return widget;
-	} else if (platform == Common::kPlatformMacintosh) {
-		GUI::OptionsContainerWidget *widget = nullptr;
-		if (gameid == "monkey2")
-			widget = new Scumm::MacGameOptionsWidget(boss, name, target, GID_MONKEY2, extra);
-		else if (gameid == "atlantis")
-			widget = new Scumm::MacGameOptionsWidget(boss, name, target, GID_INDY4, extra);
-		if (widget)
-			return widget;
 	}
 #ifdef USE_ENET
 	else if (gameid == "football" || gameid == "baseball2001" || gameid == "football2002" ||




More information about the Scummvm-git-logs mailing list