[Scummvm-git-logs] scummvm master -> 608a334c22bb0eb454e79913ae502c2c7ec02e7d
eriktorbjorn
noreply at scummvm.org
Wed Mar 23 15:03:50 UTC 2022
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:
608a334c22 SCUMM: Make recent Loom workarounds optional
Commit: 608a334c22bb0eb454e79913ae502c2c7ec02e7d
https://github.com/scummvm/scummvm/commit/608a334c22bb0eb454e79913ae502c2c7ec02e7d
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-03-23T16:02:49+01:00
Commit Message:
SCUMM: Make recent Loom workarounds optional
Unfortunately that means I had to add the enhancements checkbox to the
EGA Loom settings widget, because I can't see any way to automatically
combine the static and dynamic settings widget. Oh well.
Changed paths:
engines/scumm/detection.cpp
engines/scumm/dialogs.cpp
engines/scumm/dialogs.h
engines/scumm/script_v5.cpp
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 8ebf2287598..5d7bdc91987 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -226,8 +226,8 @@ const ExtraGuiOptions ScummMetaEngineDetection::getExtraGuiOptions(const Common:
gameid == "monkey" ||
gameid == "monkey2" ||
gameid == "samnmax" ||
- (gameid == "loom" && (extra == "VGA" || extra == "Steam")) ||
- ((gameid == "loom" || gameid == "indy3") && platform == Common::kPlatformMacintosh && extra != "Steam")) {
+ gameid == "loom" ||
+ (gameid == "indy3" && platform == Common::kPlatformMacintosh && extra != "Steam")) {
options.push_back(enableEnhancements);
}
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index eac753631af..a5bd71f0b10 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -722,6 +722,12 @@ LoomEgaGameOptionsWidget::LoomEgaGameOptionsWidget(GuiObject *boss, const Common
_overtureTicksValue = new GUI::StaticTextWidget(widgetsBoss(), "LoomEgaGameOptionsDialog.OvertureTicksValue", Common::U32String());
_overtureTicksValue->setFlags(GUI::WIDGET_CLEARBG);
+
+ // Normally this would be added as a static game settings widget, but
+ // I see no way to get both the dynamic and the static one, so we have
+ // to duplicate it here.
+
+ _enableEnhancements = new GUI::CheckboxWidget(widgetsBoss(), "LoomEgaGameOptionsDialog.EnableEnhancements", _("Enable game-specific enhancements"), _("Allow ScummVM to make small enhancements to the game, usually based on other versions of the same game."));
}
void LoomEgaGameOptionsWidget::load() {
@@ -732,20 +738,27 @@ void LoomEgaGameOptionsWidget::load() {
_overtureTicksSlider->setValue(loomOvertureTicks);
updateOvertureTicksValue();
+
+ _enableEnhancements->setState(ConfMan.getBool("enable_enhancements", _domain));
}
bool LoomEgaGameOptionsWidget::save() {
ConfMan.setInt("loom_overture_ticks", _overtureTicksSlider->getValue(), _domain);
+ ConfMan.setBool("enable_enhancements", _enableEnhancements->getState(), _domain);
return true;
}
void LoomEgaGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
layouts.addDialog(layoutName, overlayedLayout)
- .addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
- .addPadding(0, 0, 16, 0)
- .addWidget("OvertureTicksLabel", "OptionsLabel")
- .addWidget("OvertureTicks", "WideSlider")
- .addWidget("OvertureTicksValue", "ShortOptionsLabel")
+ .addLayout(GUI::ThemeLayout::kLayoutVertical, 12)
+ .addPadding(0, 0, 0, 0)
+ .addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
+ .addPadding(0, 0, 12, 0)
+ .addWidget("OvertureTicksLabel", "OptionsLabel")
+ .addWidget("OvertureTicks", "WideSlider")
+ .addWidget("OvertureTicksValue", "ShortOptionsLabel")
+ .closeLayout()
+ .addWidget("EnableEnhancements", "Checkbox")
.closeLayout()
.closeDialog();
}
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 50c0c0725ae..a6016b623ce 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -228,6 +228,7 @@ private:
void defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const override;
void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
+ GUI::CheckboxWidget *_enableEnhancements;
GUI::SliderWidget *_overtureTicksSlider;
GUI::StaticTextWidget *_overtureTicksValue;
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index d6e8ee24580..a0a771dd8b4 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1075,7 +1075,9 @@ void ScummEngine_v5::o5_findObject() {
// let's go with that fix. But we do it by redirecting the click to the
// wall object instead.
- if (_game.id == GID_LOOM && _game.version == 3 && (_game.platform == Common::kPlatformDOS || _game.platform == Common::kPlatformAmiga || _game.platform == Common::kPlatformAtariST) && _currentRoom == 38 && obj == 623) {
+ if (_game.id == GID_LOOM && _game.version == 3 &&
+ (_game.platform == Common::kPlatformDOS || _game.platform == Common::kPlatformAmiga || _game.platform == Common::kPlatformAtariST) &&
+ _currentRoom == 38 && obj == 623 && _enableEnhancements) {
obj = 609;
}
@@ -2392,7 +2394,7 @@ void ScummEngine_v5::o5_startScript() {
// than gliding in from off-stage. The only thing that's affected is
// whether Bobbin or Rusty speaks first, and the dialog makes sense
// either way.
- if (_game.id == GID_LOOM && _game.version == 3 && script == 207 && isScriptRunning(98))
+ if (_game.id == GID_LOOM && _game.version == 3 && script == 207 && isScriptRunning(98) && _enableEnhancements)
return;
// WORKAROUND bug #2198: Script 171 loads a complete room resource,
More information about the Scummvm-git-logs
mailing list