[Scummvm-git-logs] scummvm master -> 8461f2521859e46295fa1080d665ace9cb7616fe

sev- noreply at scummvm.org
Wed Nov 8 10:46:15 UTC 2023


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

Summary:
a982378482 SCUMM: Initial work on more fine-grained enhancement setting
2c368d42ce SCUMM: Add GUIO_ENHANCEMENTS to The Curse of Monkey Island
d8d689f06f SCUMM: Reword comment
fe2bb48762 SCUMM: Make parts of ScummGameOptionsWidget private or protected
30940b4ff1 SCUMM: Reword bit flags in terms of shifts
1b36ac06a6 SCUMM: Add I18N note to enhancements pop-up
de0a096ff6 SCUMM: Set-up enhancement groups and add bit flags
d5fa7aeb90 SCUMM: Mark all enhancements with their respective classes
13fb771bf3 SCUMM: Convert enable_enhancements to new flags
2c474ff163 SCUMM: Insert comment explaining enhancement categories in detail
c6872cdbbf SCUMM: Clean-up for enhancement groupings
e7f4f25881 SCUMM: Clean-up and explain enhancement classes
8461f25218 SCUMM: Rename enhancementClassActive to enhancementEnabled


Commit: a982378482bb61e423dbf6ce4bd65fb14f39466a
    https://github.com/scummvm/scummvm/commit/a982378482bb61e423dbf6ce4bd65fb14f39466a
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Initial work on more fine-grained enhancement setting

There was discussion a while back about how people may want to enable
some of the SCUMM enhancements, but not all since some of them affect
gameplay beyond simple bugfixing. This is an initial attempt at the GUI
part of it. The details are very much still up for discussion.

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


diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index e4fb7ab5ebf..989c6bf402e 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -36,6 +36,13 @@ namespace Scumm {
 #define GUIO_LOWLATENCYAUDIO                           GUIO_GAMEOPTIONS5
 #define GUIO_NETWORK                                   GUIO_GAMEOPTIONS6
 
+/* Game enhancements */
+enum {
+	kEnhancementsBugs = 0x0001,
+	kEnhancementsGlitches = 0x0002,
+	kEnhancementsContent = 0x0004
+};
+
 /**
  * Descriptor of a specific SCUMM game. Used internally to store
  * information about the tons of game variants that exist.
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 1254339cd9c..280c3653c68 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -33,6 +33,7 @@
 #include "gui/gui-manager.h"
 #include "gui/widget.h"
 #include "gui/widgets/edittext.h"
+#include "gui/widgets/popup.h"
 #include "gui/ThemeEval.h"
 
 #include "scumm/dialogs.h"
@@ -1042,12 +1043,41 @@ void LoomTownsDifficultyDialog::handleCommand(GUI::CommandSender *sender, uint32
 
 // Game options widgets
 
-// 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.
+void ScummOptionsContainerWidget::load() {
+	if (_enhancementsPopUp)
+		_enhancementsPopUp->setSelectedTag(ConfMan.getInt("enhancements", _domain));
+}
+
+bool ScummOptionsContainerWidget::save() {
+	if (_enhancementsPopUp)
+		ConfMan.setInt("enhancements", _enhancementsPopUp->getSelectedTag(), _domain);
+	return true;
+}
+
+void ScummOptionsContainerWidget::createEnhancementsWidget(GuiObject *boss, const Common::String &name) {
+	GUI::StaticTextWidget *text = new GUI::StaticTextWidget(boss, name + ".EnhancementsLabel", _("Enhancements:"));
+	text->setAlign(Graphics::TextAlign::kTextAlignEnd);
+
+	_enhancementsPopUp = new GUI::PopUpWidget(boss, name + ".Enhancements", _("Allow ScummVM to make small enhancements to the game, usually based on other versions of the same game."));
 
-GUI::CheckboxWidget *ScummOptionsContainerWidget::createEnhancementsCheckbox(GuiObject *boss, const Common::String &name) {
-	return new GUI::CheckboxWidget(boss, name, _("Enable game-specific enhancements"), _("Allow ScummVM to make small enhancements to the game, usually based on other versions of the same game."));
+	// At least one user has expressed an interest in having bugfixes and
+	// content fixes, but not fixes for minor glitches. I don't expect that
+	// anyone wants enhancements but no bugfixes, though.
+
+	_enhancementsPopUp->appendEntry(_("None"), 0);
+	_enhancementsPopUp->appendEntry(_("Fix bugs"), kEnhancementsBugs);
+	_enhancementsPopUp->appendEntry(_("Fix bugs and glitches"), kEnhancementsBugs | kEnhancementsGlitches);
+	_enhancementsPopUp->appendEntry(_("Fix bugs and content"), kEnhancementsBugs | kEnhancementsContent);
+	_enhancementsPopUp->appendEntry(_("Fix bugs, glitches, and content"), kEnhancementsBugs | kEnhancementsGlitches | kEnhancementsContent);
+}
+
+GUI::ThemeEval &ScummOptionsContainerWidget::addEnhancementsLayout(GUI::ThemeEval &layouts) const {
+	layouts.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
+		.addPadding(0, 0, 12, 0)
+		.addWidget("EnhancementsLabel", "OptionsLabel")
+		.addWidget("Enhancements", "PopUp")
+	.closeLayout();
+	return layouts;
 }
 
 GUI::CheckboxWidget *ScummOptionsContainerWidget::createOriginalGUICheckbox(GuiObject *boss, const Common::String &name) {
@@ -1071,6 +1101,91 @@ void ScummOptionsContainerWidget::updateAdjustmentSlider(GUI::SliderWidget *slid
 
 }
 
+// SCUMM game settings
+
+ScummGameOptionsWidget::ScummGameOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain, const ExtraGuiOptions &options) :
+		ScummOptionsContainerWidget(boss, name, "ScummGameOptionsDialog", domain),
+		_options(options), _smoothScrollCheckbox(nullptr),
+		_semiSmoothScrollCheckbox(nullptr) {
+	for (uint i = 0; i < _options.size(); i++) {
+		GUI::CheckboxWidget *checkbox = nullptr;
+		if (strcmp(_options[i].configOption, "enhancements") == 0) {
+			createEnhancementsWidget(widgetsBoss(), _dialogLayout);
+		} else {
+			Common::String id = Common::String::format("%d", i + 1);
+
+			checkbox = new GUI::CheckboxWidget(widgetsBoss(),
+				_dialogLayout + ".customOption" + id + "Checkbox", _(_options[i].label), _(_options[i].tooltip));
+
+			if (strcmp(_options[i].configOption, "smooth_scroll") == 0) {
+				_smoothScrollCheckbox = checkbox;
+				_smoothScrollCheckbox->setCmd(kSmoothScrollCmd);
+			} else if (strcmp(_options[i].configOption, "semi_smooth_scroll") == 0) {
+				_semiSmoothScrollCheckbox = checkbox;
+			}
+		}
+		_checkboxes.push_back(checkbox);
+	}
+}
+
+void ScummGameOptionsWidget::load() {
+	ScummOptionsContainerWidget::load();
+
+	for (uint i = 0; i < _options.size(); i++) {
+		if (!_checkboxes[i])
+			continue;
+
+		bool isChecked = _options[i].defaultState;
+		if (ConfMan.hasKey(_options[i].configOption, _domain))
+			isChecked = ConfMan.getBool(_options[i].configOption, _domain);
+		_checkboxes[i]->setState(isChecked);
+	}
+
+	if (_smoothScrollCheckbox && _semiSmoothScrollCheckbox)
+		_semiSmoothScrollCheckbox->setEnabled(_smoothScrollCheckbox->getState());
+}
+
+bool ScummGameOptionsWidget::save() {
+	ScummOptionsContainerWidget::save();
+
+	for (uint i = 0; i < _options.size(); i++) {
+		if (_checkboxes[i])
+			ConfMan.setBool(_options[i].configOption, _checkboxes[i]->isEnabled() && _checkboxes[i]->getState(), _domain);
+	}
+
+	return true;
+}
+
+void ScummGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
+	layouts.addDialog(layoutName, overlayedLayout);
+	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(0, 0, 8, 8);
+
+	for (uint i = 0; i < _options.size(); i++) {
+		if (strcmp(_options[i].configOption, "enhancements") != 0) {
+			Common::String id = Common::String::format("%d", i + 1);
+			layouts.addWidget("customOption" + id + "Checkbox", "Checkbox");
+		}
+	}
+
+	if (_enhancementsPopUp)
+		addEnhancementsLayout(layouts);
+
+	layouts.closeLayout().closeDialog();
+}
+
+void ScummGameOptionsWidget::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
+	switch (cmd) {
+	case kSmoothScrollCmd: {
+		if (_semiSmoothScrollCheckbox)
+			_semiSmoothScrollCheckbox->setEnabled(data != 0);
+		break;
+	}
+	default:
+		GUI::OptionsContainerWidget::handleCommand(sender, cmd, data);
+		break;
+	}
+}
+
 // EGA Loom Overture settings
 
 LoomEgaGameOptionsWidget::LoomEgaGameOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
@@ -1097,11 +1212,13 @@ LoomEgaGameOptionsWidget::LoomEgaGameOptionsWidget(GuiObject *boss, const Common
 
 	_overtureTicksValue->setFlags(GUI::WIDGET_CLEARBG);
 
-	_enableEnhancementsCheckbox = createEnhancementsCheckbox(widgetsBoss(), "LoomEgaGameOptionsDialog.EnableEnhancements");
+	createEnhancementsWidget(widgetsBoss(), "LoomEgaGameOptionsDialog");
 	_enableOriginalGUICheckbox = createOriginalGUICheckbox(widgetsBoss(), "LoomEgaGameOptionsDialog.EnableOriginalGUI");
 }
 
 void LoomEgaGameOptionsWidget::load() {
+	ScummOptionsContainerWidget::load();
+
 	int loomOvertureTicks = 0;
 
 	if (ConfMan.hasKey("loom_overture_ticks", _domain))
@@ -1110,13 +1227,13 @@ void LoomEgaGameOptionsWidget::load() {
 	_overtureTicksSlider->setValue(loomOvertureTicks);
 	updateOvertureTicksValue();
 
-	_enableEnhancementsCheckbox->setState(ConfMan.getBool("enable_enhancements", _domain));
 	_enableOriginalGUICheckbox->setState(ConfMan.getBool("original_gui", _domain));
 }
 
 bool LoomEgaGameOptionsWidget::save() {
+	ScummOptionsContainerWidget::save();
+
 	ConfMan.setInt("loom_overture_ticks", _overtureTicksSlider->getValue(), _domain);
-	ConfMan.setBool("enable_enhancements", _enableEnhancementsCheckbox->getState(), _domain);
 	ConfMan.setBool("original_gui", _enableOriginalGUICheckbox->getState(), _domain);
 	return true;
 }
@@ -1127,9 +1244,9 @@ void LoomEgaGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Commo
 			.addPadding(0, 0, 0, 0)
 			.addLayout(GUI::ThemeLayout::kLayoutVertical, 4)
 				.addPadding(0, 0, 10, 0)
-				.addWidget("EnableOriginalGUI", "Checkbox")
-				.addWidget("EnableEnhancements", "Checkbox")
-			.closeLayout()
+				.addWidget("EnableOriginalGUI", "Checkbox");
+	addEnhancementsLayout(layouts)
+		.closeLayout()
 			.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
 				.addPadding(0, 0, 10, 0)
 				.addWidget("OvertureTicksLabel", "OptionsLabel")
@@ -1180,11 +1297,13 @@ LoomVgaGameOptionsWidget::LoomVgaGameOptionsWidget(GuiObject *boss, const Common
 
 	_playbackAdjustmentValue->setFlags(GUI::WIDGET_CLEARBG);
 
-	_enableEnhancementsCheckbox = createEnhancementsCheckbox(widgetsBoss(), "LoomVgaGameOptionsDialog.EnableEnhancements");
+	createEnhancementsWidget(widgetsBoss(), "LoomVgaGameOptionsDialog");
 	_enableOriginalGUICheckbox = createOriginalGUICheckbox(widgetsBoss(), "LoomVgaGameOptionsDialog.EnableOriginalGUI");
 }
 
 void LoomVgaGameOptionsWidget::load() {
+	ScummOptionsContainerWidget::load();
+
 	int playbackAdjustment = 0;
 
 	if (ConfMan.hasKey("loom_playback_adjustment", _domain))
@@ -1193,13 +1312,12 @@ void LoomVgaGameOptionsWidget::load() {
 	_playbackAdjustmentSlider->setValue(playbackAdjustment);
 	updatePlaybackAdjustmentValue();
 
-	_enableEnhancementsCheckbox->setState(ConfMan.getBool("enable_enhancements", _domain));
 	_enableOriginalGUICheckbox->setState(ConfMan.getBool("original_gui", _domain));
 }
 
 bool LoomVgaGameOptionsWidget::save() {
+	ScummOptionsContainerWidget::save();
 	ConfMan.setInt("loom_playback_adjustment", _playbackAdjustmentSlider->getValue(), _domain);
-	ConfMan.setBool("enable_enhancements", _enableEnhancementsCheckbox->getState(), _domain);
 	ConfMan.setBool("original_gui", _enableOriginalGUICheckbox->getState(), _domain);
 	return true;
 }
@@ -1210,8 +1328,8 @@ void LoomVgaGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Commo
 			.addPadding(0, 0, 0, 0)
 			.addLayout(GUI::ThemeLayout::kLayoutVertical, 4)
 				.addPadding(0, 0, 10, 0)
-				.addWidget("EnableOriginalGUI", "Checkbox")
-				.addWidget("EnableEnhancements", "Checkbox")
+				.addWidget("EnableOriginalGUI", "Checkbox");
+	addEnhancementsLayout(layouts)
 			.closeLayout()
 			.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
 				.addPadding(0, 0, 10, 0)
@@ -1271,11 +1389,13 @@ MI1CdGameOptionsWidget::MI1CdGameOptionsWidget(GuiObject *boss, const Common::St
 
 	_outlookAdjustmentValue->setFlags(GUI::WIDGET_CLEARBG);
 
-	_enableEnhancementsCheckbox = createEnhancementsCheckbox(widgetsBoss(), "MI1CdGameOptionsDialog.EnableEnhancements");
+	createEnhancementsWidget(widgetsBoss(), "MI1CdGameOptionsDialog");
 	_enableOriginalGUICheckbox = createOriginalGUICheckbox(widgetsBoss(), "MI1CdGameOptionsDialog.EnableOriginalGUI");
 }
 
 void MI1CdGameOptionsWidget::load() {
+	ScummOptionsContainerWidget::load();
+
 	int introAdjustment = 0;
 	int outlookAdjustment = 0;
 
@@ -1290,14 +1410,14 @@ void MI1CdGameOptionsWidget::load() {
 	_outlookAdjustmentSlider->setValue(outlookAdjustment);
 	updateOutlookAdjustmentValue();
 
-	_enableEnhancementsCheckbox->setState(ConfMan.getBool("enable_enhancements", _domain));
 	_enableOriginalGUICheckbox->setState(ConfMan.getBool("original_gui", _domain));
 }
 
 bool MI1CdGameOptionsWidget::save() {
+	ScummOptionsContainerWidget::save();
+
 	ConfMan.setInt("mi1_intro_adjustment", _introAdjustmentSlider->getValue(), _domain);
 	ConfMan.setInt("mi1_outlook_adjustment", _outlookAdjustmentSlider->getValue(), _domain);
-	ConfMan.setBool("enable_enhancements", _enableEnhancementsCheckbox->getState(), _domain);
 	ConfMan.setBool("original_gui", _enableOriginalGUICheckbox->getState(), _domain);
 	return true;
 }
@@ -1308,8 +1428,8 @@ void MI1CdGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common:
 			.addPadding(0, 0, 0, 0)
 			.addLayout(GUI::ThemeLayout::kLayoutVertical, 4)
 				.addPadding(0, 0, 10, 0)
-				.addWidget("EnableOriginalGUI", "Checkbox")
-				.addWidget("EnableEnhancements", "Checkbox")
+				.addWidget("EnableOriginalGUI", "Checkbox");
+	addEnhancementsLayout(layouts)
 			.closeLayout()
 			.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
 				.addPadding(0, 0, 12, 0)
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 3c0f2654590..b71626a6ff8 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -222,12 +222,45 @@ private:
 class ScummOptionsContainerWidget : public GUI::OptionsContainerWidget {
 public:
 	ScummOptionsContainerWidget(GuiObject *boss, const Common::String &name, const Common::String &dialogLayout, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, dialogLayout, false, domain) {
+		OptionsContainerWidget(boss, name, dialogLayout, false, domain),
+		_enhancementsPopUp(nullptr) {
 	}
 
-	GUI::CheckboxWidget *createEnhancementsCheckbox(GuiObject *boss, const Common::String &name);
+	void load() override;
+	bool save() override;
+
+	void createEnhancementsWidget(GuiObject *boss, const Common::String &name);
+	GUI::ThemeEval &addEnhancementsLayout(GUI::ThemeEval &layouts) const;
 	GUI::CheckboxWidget *createOriginalGUICheckbox(GuiObject *boss, const Common::String &name);
 	void updateAdjustmentSlider(GUI::SliderWidget *slider, GUI::StaticTextWidget *value);
+
+	GUI::PopUpWidget *_enhancementsPopUp;
+};
+
+/**
+ * Options widget for SCUMM games in general.
+ */
+class ScummGameOptionsWidget : public ScummOptionsContainerWidget {
+public:
+	ScummGameOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain, const ExtraGuiOptions &options);
+	~ScummGameOptionsWidget() override {};
+
+	void load() override;
+	bool save() override;
+
+private:
+	enum {
+		kSmoothScrollCmd = 'SMSC'
+	};
+
+	GUI::CheckboxWidget *_smoothScrollCheckbox;
+	GUI::CheckboxWidget *_semiSmoothScrollCheckbox;
+
+	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;
+
+	ExtraGuiOptions _options;
+	Common::Array<GUI::CheckboxWidget *> _checkboxes;
 };
 
 /**
@@ -249,7 +282,6 @@ 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 *_enableEnhancementsCheckbox;
 	GUI::CheckboxWidget *_enableOriginalGUICheckbox;
 
 	GUI::SliderWidget *_overtureTicksSlider;
@@ -277,7 +309,6 @@ 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 *_enableEnhancementsCheckbox;
 	GUI::CheckboxWidget *_enableOriginalGUICheckbox;
 
 	GUI::SliderWidget *_playbackAdjustmentSlider;
@@ -306,7 +337,6 @@ 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 *_enableEnhancementsCheckbox;
 	GUI::CheckboxWidget *_enableOriginalGUICheckbox;
 
 	GUI::SliderWidget *_introAdjustmentSlider;
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index f33955eaaf1..4f16a8e5479 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -561,34 +561,50 @@ SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int
 	return desc;
 }
 
-GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
-	Common::String gameid = ConfMan.get("gameid", target);
+GUI::OptionsContainerWidget *ScummMetaEngine::buildLoomOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
+	Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target));
+	if (platform != Common::kPlatformUnknown && platform != Common::kPlatformDOS)
+		return nullptr;
+
 	Common::String extra = ConfMan.get("extra", target);
 
-	if (gameid == "loom") {
-		Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target));
-		if (platform != Common::kPlatformUnknown && platform != Common::kPlatformDOS)
-			return MetaEngine::buildEngineOptionsWidget(boss, name, target);
+	// The VGA Loom settings are only relevant for the DOS CD version, not
+	// the Steam version (which is assumed to be well timed already).
 
-		// The VGA Loom settings are only relevant for the DOS CD
-		// version, not the Steam version (which is assumed to be well
-		// timed already).
+	if (extra == "VGA")
+		return new Scumm::LoomVgaGameOptionsWidget(boss, name, target);
 
-		if (extra == "VGA")
-			return new Scumm::LoomVgaGameOptionsWidget(boss, name, target);
+	if (extra == "Steam")
+		return MetaEngine::buildEngineOptionsWidget(boss, name, target);
 
-		if (extra == "Steam")
-			return MetaEngine::buildEngineOptionsWidget(boss, name, target);
+	// These EGA Loom settings are only relevant for the EGA
+	// version, since that is the only one that has an overture.
 
-		// These EGA Loom settings are only relevant for the EGA
-		// version, since that is the only one that has an overture.
+	return new Scumm::LoomEgaGameOptionsWidget(boss, name, target);
+}
 
-		return new Scumm::LoomEgaGameOptionsWidget(boss, name, target);
-	} else if (gameid == "monkey") {
-		if (extra != "CD" && extra != "FM-TOWNS" && extra != "SEGA")
-			return MetaEngine::buildEngineOptionsWidget(boss, name, target);
+GUI::OptionsContainerWidget *ScummMetaEngine::buildMI1OptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
+	Common::String extra = ConfMan.get("extra", target);
 
-		return new Scumm::MI1CdGameOptionsWidget(boss, name, target);
+	if (extra != "CD" && extra != "FM-TOWNS" && extra != "SEGA")
+		return nullptr;
+
+	return new Scumm::MI1CdGameOptionsWidget(boss, name, target);
+}
+
+
+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);
+
+	if (gameid == "loom") {
+		GUI::OptionsContainerWidget *widget = buildLoomOptionsWidget(boss, name, target);
+		if (widget)
+			return widget;
+	} else if (gameid == "monkey") {
+		GUI::OptionsContainerWidget *widget = buildMI1OptionsWidget(boss, name, target);
+		if (widget)
+			return widget;
 	}
 #ifdef USE_ENET
 	else if (gameid == "football" || gameid == "baseball2001" || gameid == "football2002" ||
@@ -596,6 +612,11 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidget(GUI::GuiO
 		return new Scumm::HENetworkGameOptionsWidget(boss, name, target, gameid);
 #endif
 
+	const ExtraGuiOptions engineOptions = getExtraGuiOptions(target);
+
+	if (!engineOptions.empty())
+		return new Scumm::ScummGameOptionsWidget(boss, name, target, engineOptions);
+
 	return MetaEngine::buildEngineOptionsWidget(boss, name, target);
 }
 
@@ -641,7 +662,7 @@ static const ExtraGuiOption smoothScrolling = {
 	"smooth_scroll",
 	true,
 	0,
-	1
+	0
 };
 
 static const ExtraGuiOption semiSmoothScrolling = {
@@ -649,14 +670,14 @@ static const ExtraGuiOption semiSmoothScrolling = {
 	_s("Allow scrolling to be less smooth during the fast camera movement in the intro."),
 	"semi_smooth_scroll",
 	false,
-	1,
+	0,
 	0
 };
 
 static const ExtraGuiOption enableEnhancements {
-	_s("Enable game-specific enhancements"),
-	_s("Allow ScummVM to make small enhancements to the game, usually based on other versions of the same game."),
-	"enable_enhancements",
+	"",
+	"",
+	"enhancements",
 	true,
 	0,
 	0
@@ -755,6 +776,16 @@ const ExtraGuiOptions ScummMetaEngine::getExtraGuiOptions(const Common::String &
 	return options;
 }
 
+void ScummMetaEngine::registerDefaultSettings(const Common::String &) const {
+	const ExtraGuiOptions engineOptions = getExtraGuiOptions("");
+	for (uint i = 0; i < engineOptions.size(); i++) {
+		if (strcmp(engineOptions[i].configOption, "enhancements") == 0)
+			ConfMan.registerDefault(engineOptions[i].configOption, kEnhancementsBugs | kEnhancementsGlitches | kEnhancementsContent);
+		else
+			ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
+	}
+}
+
 Common::KeymapArray ScummMetaEngine::initKeymaps(const char *target) const {
 	using namespace Common;
 	using namespace Scumm;
diff --git a/engines/scumm/metaengine.h b/engines/scumm/metaengine.h
index 3df81be41be..2bfe69e6ebc 100644
--- a/engines/scumm/metaengine.h
+++ b/engines/scumm/metaengine.h
@@ -37,9 +37,15 @@ class ScummMetaEngine : public MetaEngine {
 	SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
 
 	const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
+	void registerDefaultSettings(const Common::String &) const override;
+
 	GUI::OptionsContainerWidget *buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
 
 	Common::KeymapArray initKeymaps(const char *target) const override;
+
+private:
+	GUI::OptionsContainerWidget *buildLoomOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const;
+	GUI::OptionsContainerWidget *buildMI1OptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const;
 };
 
 #endif // SCUMM_METAENGINE_H
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index dbdc7fe0c6f..b1acb619291 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -922,12 +922,12 @@ Common::Error ScummEngine::init() {
 		}
 	}
 
-
 	ConfMan.registerDefault("original_gui", true);
 	if (ConfMan.hasKey("original_gui", _targetName)) {
 		_useOriginalGUI = ConfMan.getBool("original_gui");
 	}
-	_enableEnhancements = ConfMan.getBool("enable_enhancements");
+	ConfMan.registerDefault("enhancements", kEnhancementsBugs | kEnhancementsGlitches | kEnhancementsContent);
+	_enableEnhancements = ConfMan.getInt("enhancements") != 0; // TODO
 	_enableAudioOverride = ConfMan.getBool("audio_override");
 
 	// Add default file directories.
@@ -1326,6 +1326,16 @@ Common::Error ScummEngine::init() {
 }
 
 void ScummEngine::setupScumm(const Common::String &macResourceFile) {
+	// TODO: This may be the wrong place for it
+	// Enhancements used to be on or off, but now has multiple levels.
+	if (ConfMan.hasKey("enable_enhancements")) {
+		if (!ConfMan.hasKey("enhancements")) {
+			ConfMan.setInt("enhancements", ConfMan.getBool("enable_enhancements") ? kEnhancementsBugs | kEnhancementsGlitches | kEnhancementsContent : 0);
+		}
+		ConfMan.removeKey("enable_enhancements", ConfMan.getActiveDomainName());
+		ConfMan.flushToDisk();
+	}
+
 	Common::String macInstrumentFile;
 	Common::String macFontFile;
 


Commit: 2c368d42cebdac775e4006cdaea7d24aa1786911
    https://github.com/scummvm/scummvm/commit/2c368d42cebdac775e4006cdaea7d24aa1786911
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Add GUIO_ENHANCEMENTS to The Curse of Monkey Island

Changed paths:
    engines/scumm/detection_tables.h


diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index 187a658d032..0f178e5ec00 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -221,8 +221,8 @@ static const GameSettings gameVariantsTable[] = {
 	{"dig",  "Demo", 0, GID_DIG, 7, 0, MDT_NONE, GF_DEMO, UNK, GUIO3(GUIO_NOMIDI, GUIO_ORIGINALGUI, GUIO_LOWLATENCYAUDIO)},
 	{"dig",  "Steam", "steam", GID_DIG, 7, 0, MDT_NONE, 0, UNK, GUIO4(GUIO_NOMIDI, GUIO_ENHANCEMENTS, GUIO_ORIGINALGUI, GUIO_LOWLATENCYAUDIO)},
 
-	{"comi", "", 0, GID_CMI, 8, 0, MDT_NONE, 0, Common::kPlatformWindows, GUIO4(GUIO_NOMIDI, GUIO_NOASPECT, GUIO_ORIGINALGUI, GUIO_LOWLATENCYAUDIO)},
-	{"comi", "Demo", 0, GID_CMI, 8, 0, MDT_NONE, GF_DEMO, Common::kPlatformWindows, GUIO4(GUIO_NOMIDI, GUIO_NOASPECT, GUIO_ORIGINALGUI, GUIO_LOWLATENCYAUDIO)},
+	{"comi", "", 0, GID_CMI, 8, 0, MDT_NONE, 0, Common::kPlatformWindows, GUIO5(GUIO_NOMIDI, GUIO_NOASPECT, GUIO_ENHANCEMENTS, GUIO_ORIGINALGUI, GUIO_LOWLATENCYAUDIO)},
+	{"comi", "Demo", 0, GID_CMI, 8, 0, MDT_NONE, GF_DEMO, Common::kPlatformWindows, GUIO5(GUIO_NOMIDI, GUIO_NOASPECT, GUIO_ENHANCEMENTS, GUIO_ORIGINALGUI, GUIO_LOWLATENCYAUDIO)},
 
 	// Humongous Entertainment Scumm Version 6
 	{"activity", "", 0, GID_HEGAME, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)},


Commit: d8d689f06fee2864c936ddd12dc8fe06b4aded42
    https://github.com/scummvm/scummvm/commit/d8d689f06fee2864c936ddd12dc8fe06b4aded42
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Reword comment

Changed paths:
    engines/scumm/scumm.cpp


diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index b1acb619291..88108a05f1a 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1327,7 +1327,8 @@ Common::Error ScummEngine::init() {
 
 void ScummEngine::setupScumm(const Common::String &macResourceFile) {
 	// TODO: This may be the wrong place for it
-	// Enhancements used to be on or off, but now has multiple levels.
+	// Enhancements used to be all or nothing, but now there are different
+	// types of them.
 	if (ConfMan.hasKey("enable_enhancements")) {
 		if (!ConfMan.hasKey("enhancements")) {
 			ConfMan.setInt("enhancements", ConfMan.getBool("enable_enhancements") ? kEnhancementsBugs | kEnhancementsGlitches | kEnhancementsContent : 0);


Commit: fe2bb48762ea57c7535845ed67283ae7bf80e591
    https://github.com/scummvm/scummvm/commit/fe2bb48762ea57c7535845ed67283ae7bf80e591
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Make parts of ScummGameOptionsWidget private or protected

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


diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 280c3653c68..3dcebcf222e 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -1160,14 +1160,17 @@ void ScummGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common:
 	layouts.addDialog(layoutName, overlayedLayout);
 	layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(0, 0, 8, 8);
 
+	bool hasEnhancements = false;
+
 	for (uint i = 0; i < _options.size(); i++) {
 		if (strcmp(_options[i].configOption, "enhancements") != 0) {
 			Common::String id = Common::String::format("%d", i + 1);
 			layouts.addWidget("customOption" + id + "Checkbox", "Checkbox");
-		}
+		} else
+			hasEnhancements = true;
 	}
 
-	if (_enhancementsPopUp)
+	if (hasEnhancements)
 		addEnhancementsLayout(layouts);
 
 	layouts.closeLayout().closeDialog();
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index b71626a6ff8..647cbf97faa 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -229,11 +229,13 @@ public:
 	void load() override;
 	bool save() override;
 
+protected:
 	void createEnhancementsWidget(GuiObject *boss, const Common::String &name);
 	GUI::ThemeEval &addEnhancementsLayout(GUI::ThemeEval &layouts) const;
 	GUI::CheckboxWidget *createOriginalGUICheckbox(GuiObject *boss, const Common::String &name);
 	void updateAdjustmentSlider(GUI::SliderWidget *slider, GUI::StaticTextWidget *value);
 
+private:
 	GUI::PopUpWidget *_enhancementsPopUp;
 };
 


Commit: 30940b4ff1e984471d5177057aa481534cbb2776
    https://github.com/scummvm/scummvm/commit/30940b4ff1e984471d5177057aa481534cbb2776
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Reword bit flags in terms of shifts

Changed paths:
    engines/scumm/detection.h


diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index 989c6bf402e..0bd9538da2f 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -38,9 +38,9 @@ namespace Scumm {
 
 /* Game enhancements */
 enum {
-	kEnhancementsBugs = 0x0001,
-	kEnhancementsGlitches = 0x0002,
-	kEnhancementsContent = 0x0004
+	kEnhancementsBugs = 1 << 0,
+	kEnhancementsGlitches = 1 << 1,
+	kEnhancementsContent = 1 << 2
 };
 
 /**


Commit: 1b36ac06a65c4d14b48076ecbd45ae7d0b77c897
    https://github.com/scummvm/scummvm/commit/1b36ac06a65c4d14b48076ecbd45ae7d0b77c897
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Add I18N note to enhancements pop-up

Changed paths:
    engines/scumm/dialogs.cpp


diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 3dcebcf222e..b65bcec3944 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -1064,6 +1064,8 @@ void ScummOptionsContainerWidget::createEnhancementsWidget(GuiObject *boss, cons
 	// content fixes, but not fixes for minor glitches. I don't expect that
 	// anyone wants enhancements but no bugfixes, though.
 
+	// I18N: Game enhancements pop-up list
+
 	_enhancementsPopUp->appendEntry(_("None"), 0);
 	_enhancementsPopUp->appendEntry(_("Fix bugs"), kEnhancementsBugs);
 	_enhancementsPopUp->appendEntry(_("Fix bugs and glitches"), kEnhancementsBugs | kEnhancementsGlitches);


Commit: de0a096ff66b339fe6e8b533f93cf7af47a77907
    https://github.com/scummvm/scummvm/commit/de0a096ff66b339fe6e8b533f93cf7af47a77907
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Set-up enhancement groups and add bit flags

This also removes the enhancement pop-up list which isn't
needed anymore.

For further information about enhancement groupings:
https://github.com/scummvm/scummvm/pull/5102#issuecomment-1608278733

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


diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index 0bd9538da2f..f53098ab70d 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -38,9 +38,22 @@ namespace Scumm {
 
 /* Game enhancements */
 enum {
-	kEnhancementsBugs = 1 << 0,
-	kEnhancementsGlitches = 1 << 1,
-	kEnhancementsContent = 1 << 2
+	kEnhGameBreakingBugs    = 1 << 0, // Gamebreaking Bug Fixes
+	kEnhMinorBugFixes       = 1 << 1, // Minor Bug Fixes
+	kEnhTextLocFixes        = 1 << 2, // Text and Localization Fixes
+	kEnhVisualFixes         = 1 << 3, // Visual Corrections
+	kEnhAudioFixes          = 1 << 4, // Audio Corrections
+	kEnhTimingFixes         = 1 << 5, // Timing Adjustments
+	kEnhSubtitleFormatFixes = 1 << 6, // Subtitle Color/Format Corrections
+	kEnhRestoredContent     = 1 << 7, // Restored Cut Content
+	kEnhUIUX                = 1 << 8, // UI/UX Enhancements
+};
+
+enum {
+	kEnhGrp0 = (kEnhMinorBugFixes | kEnhTextLocFixes),
+	kEnhGrp1 = (kEnhVisualFixes | kEnhAudioFixes | kEnhTimingFixes | kEnhSubtitleFormatFixes),
+	kEnhGrp2 = (kEnhRestoredContent),
+	kEnhGrp3 = (kEnhUIUX)
 };
 
 /**
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index b65bcec3944..c436c5712c9 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -1044,41 +1044,114 @@ void LoomTownsDifficultyDialog::handleCommand(GUI::CommandSender *sender, uint32
 // Game options widgets
 
 void ScummOptionsContainerWidget::load() {
-	if (_enhancementsPopUp)
-		_enhancementsPopUp->setSelectedTag(ConfMan.getInt("enhancements", _domain));
+	int32 enhancementsFlags = (int32)ConfMan.getInt("enhancements", _domain);
+
+	for (uint i = 0; i < _enhancementsCheckboxes.size(); i++) {
+		int32 targetFlags = 0;
+		enhancementsFlags &= ~kEnhGameBreakingBugs; // Always active, so don't worry about it!
+
+		if (_enhancementsCheckboxes[i]) {
+			switch (_enhancementsCheckboxes[i]->getCmd()) {
+			case kEnhancementGroup0Cmd:
+				targetFlags |= kEnhGrp0;
+				break;
+			case kEnhancementGroup1Cmd:
+				targetFlags |= kEnhGrp1;
+				break;
+			case kEnhancementGroup2Cmd:
+				targetFlags |= kEnhGrp2;
+				break;
+			case kEnhancementGroup3Cmd:
+				targetFlags |= kEnhGrp3;
+				break;
+			default:
+				break;
+			}
+
+			_enhancementsCheckboxes[i]->setState(enhancementsFlags & targetFlags);
+		}
+	}
 }
 
 bool ScummOptionsContainerWidget::save() {
-	if (_enhancementsPopUp)
-		ConfMan.setInt("enhancements", _enhancementsPopUp->getSelectedTag(), _domain);
+	int32 enhancementsFlags = kEnhGameBreakingBugs; // Always active!
+
+	for (uint i = 0; i < _enhancementsCheckboxes.size(); i++) {
+		if (_enhancementsCheckboxes[i]) {
+			switch (_enhancementsCheckboxes[i]->getCmd()) {
+			case kEnhancementGroup0Cmd:
+				if (_enhancementsCheckboxes[i]->getState()) {
+					enhancementsFlags |= kEnhGrp0;
+				} else {
+					enhancementsFlags &= ~kEnhGrp0;
+				}
+				break;
+
+			case kEnhancementGroup1Cmd:
+				if (_enhancementsCheckboxes[i]->getState()) {
+					enhancementsFlags |= kEnhGrp1;
+				} else {
+					enhancementsFlags &= ~kEnhGrp1;
+				}
+				break;
+
+			case kEnhancementGroup2Cmd:
+				if (_enhancementsCheckboxes[i]->getState()) {
+					enhancementsFlags |= kEnhGrp2;
+				} else {
+					enhancementsFlags &= ~kEnhGrp2;
+				}
+				break;
+
+			case kEnhancementGroup3Cmd:
+				if (_enhancementsCheckboxes[i]->getState()) {
+					enhancementsFlags |= kEnhGrp3;
+				} else {
+					enhancementsFlags &= ~kEnhGrp3;
+				}
+				break;
+
+			default:
+				break;
+			}
+		}
+	}
+
+	ConfMan.setInt("enhancements", enhancementsFlags, _domain);
+
 	return true;
 }
 
 void ScummOptionsContainerWidget::createEnhancementsWidget(GuiObject *boss, const Common::String &name) {
-	GUI::StaticTextWidget *text = new GUI::StaticTextWidget(boss, name + ".EnhancementsLabel", _("Enhancements:"));
-	text->setAlign(Graphics::TextAlign::kTextAlignEnd);
-
-	_enhancementsPopUp = new GUI::PopUpWidget(boss, name + ".Enhancements", _("Allow ScummVM to make small enhancements to the game, usually based on other versions of the same game."));
+	GUI::StaticTextWidget *text = new GUI::StaticTextWidget(boss, name + ".enhancementsLabel", _("Enhancements:"));
+	text->setAlign(Graphics::TextAlign::kTextAlignStart);
 
-	// At least one user has expressed an interest in having bugfixes and
-	// content fixes, but not fixes for minor glitches. I don't expect that
-	// anyone wants enhancements but no bugfixes, though.
+	// I18N: Game enhancements groups
+	GUI::CheckboxWidget *enh0 = new GUI::CheckboxWidget(boss, name + ".enhancementGroup0",
+		_("Fix original bugs"), _("tooltip"), kEnhancementGroup0Cmd);
+	GUI::CheckboxWidget *enh1 = new GUI::CheckboxWidget(boss, name + ".enhancementGroup1",
+		_("Audio-visual improvements"), _("tooltip"), kEnhancementGroup1Cmd);
+	GUI::CheckboxWidget *enh2 = new GUI::CheckboxWidget(boss, name + ".enhancementGroup2",
+		_("Restored content"), _("tooltip"), kEnhancementGroup2Cmd);
+	GUI::CheckboxWidget *enh3 = new GUI::CheckboxWidget(boss, name + ".enhancementGroup3",
+		_("Modern UI/UX adjustments"), _("tooltip"), kEnhancementGroup3Cmd);
 
-	// I18N: Game enhancements pop-up list
-
-	_enhancementsPopUp->appendEntry(_("None"), 0);
-	_enhancementsPopUp->appendEntry(_("Fix bugs"), kEnhancementsBugs);
-	_enhancementsPopUp->appendEntry(_("Fix bugs and glitches"), kEnhancementsBugs | kEnhancementsGlitches);
-	_enhancementsPopUp->appendEntry(_("Fix bugs and content"), kEnhancementsBugs | kEnhancementsContent);
-	_enhancementsPopUp->appendEntry(_("Fix bugs, glitches, and content"), kEnhancementsBugs | kEnhancementsGlitches | kEnhancementsContent);
+	_enhancementsCheckboxes.push_back(enh0);
+	_enhancementsCheckboxes.push_back(enh1);
+	_enhancementsCheckboxes.push_back(enh2);
+	_enhancementsCheckboxes.push_back(enh3);
 }
 
 GUI::ThemeEval &ScummOptionsContainerWidget::addEnhancementsLayout(GUI::ThemeEval &layouts) const {
-	layouts.addLayout(GUI::ThemeLayout::kLayoutHorizontal, 12)
-		.addPadding(0, 0, 12, 0)
-		.addWidget("EnhancementsLabel", "OptionsLabel")
-		.addWidget("Enhancements", "PopUp")
-	.closeLayout();
+	// Do not open/close layout: this is handled outside!
+	layouts.addPadding(0, 0, 8, 8)
+		.addSpace(10)
+		.addWidget("enhancementsLabel", "OptionsLabel")
+		.addWidget("enhancementGroup0", "Checkbox")
+		.addWidget("enhancementGroup1", "Checkbox")
+		.addWidget("enhancementGroup2", "Checkbox")
+		.addWidget("enhancementGroup3", "Checkbox");
+
 	return layouts;
 }
 
@@ -1172,8 +1245,9 @@ void ScummGameOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common:
 			hasEnhancements = true;
 	}
 
-	if (hasEnhancements)
+	if (hasEnhancements) {
 		addEnhancementsLayout(layouts);
+	}
 
 	layouts.closeLayout().closeDialog();
 }
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 647cbf97faa..0958cfaf657 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -222,10 +222,16 @@ private:
 class ScummOptionsContainerWidget : public GUI::OptionsContainerWidget {
 public:
 	ScummOptionsContainerWidget(GuiObject *boss, const Common::String &name, const Common::String &dialogLayout, const Common::String &domain) :
-		OptionsContainerWidget(boss, name, dialogLayout, false, domain),
-		_enhancementsPopUp(nullptr) {
+		OptionsContainerWidget(boss, name, dialogLayout, false, domain) {
 	}
 
+	enum {
+		kEnhancementGroup0Cmd = 'ENH0',
+		kEnhancementGroup1Cmd = 'ENH1',
+		kEnhancementGroup2Cmd = 'ENH2',
+		kEnhancementGroup3Cmd = 'ENH3'
+	};
+
 	void load() override;
 	bool save() override;
 
@@ -235,8 +241,8 @@ protected:
 	GUI::CheckboxWidget *createOriginalGUICheckbox(GuiObject *boss, const Common::String &name);
 	void updateAdjustmentSlider(GUI::SliderWidget *slider, GUI::StaticTextWidget *value);
 
-private:
-	GUI::PopUpWidget *_enhancementsPopUp;
+	Common::Array<GUI::CheckboxWidget *> _enhancementsCheckboxes;
+
 };
 
 /**
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index 4f16a8e5479..fb1190abcd8 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -249,6 +249,10 @@ bool ScummEngine::hasFeature(EngineFeature f) const {
 		(f == kSupportsQuitDialogOverride && (_useOriginalGUI || !ChainedGamesMan.empty()));
 }
 
+bool Scumm::ScummEngine::enhancementClassActive(int32 cls) {
+	return _activeEnhancements && cls;
+}
+
 
 /**
  * Create a ScummEngine instance, based on the given detector data.
@@ -780,7 +784,7 @@ void ScummMetaEngine::registerDefaultSettings(const Common::String &) const {
 	const ExtraGuiOptions engineOptions = getExtraGuiOptions("");
 	for (uint i = 0; i < engineOptions.size(); i++) {
 		if (strcmp(engineOptions[i].configOption, "enhancements") == 0)
-			ConfMan.registerDefault(engineOptions[i].configOption, kEnhancementsBugs | kEnhancementsGlitches | kEnhancementsContent);
+			ConfMan.registerDefault(engineOptions[i].configOption, kEnhGameBreakingBugs | kEnhGrp0);
 		else
 			ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
 	}
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 88108a05f1a..1f96fc29f9a 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -926,8 +926,11 @@ Common::Error ScummEngine::init() {
 	if (ConfMan.hasKey("original_gui", _targetName)) {
 		_useOriginalGUI = ConfMan.getBool("original_gui");
 	}
-	ConfMan.registerDefault("enhancements", kEnhancementsBugs | kEnhancementsGlitches | kEnhancementsContent);
+
+	// Register original bug fixes as defaults...
+	ConfMan.registerDefault("enhancements", kEnhGameBreakingBugs | kEnhGrp0);
 	_enableEnhancements = ConfMan.getInt("enhancements") != 0; // TODO
+	_activeEnhancements = (int32)ConfMan.getInt("enhancements");
 	_enableAudioOverride = ConfMan.getBool("audio_override");
 
 	// Add default file directories.
@@ -1331,7 +1334,7 @@ void ScummEngine::setupScumm(const Common::String &macResourceFile) {
 	// types of them.
 	if (ConfMan.hasKey("enable_enhancements")) {
 		if (!ConfMan.hasKey("enhancements")) {
-			ConfMan.setInt("enhancements", ConfMan.getBool("enable_enhancements") ? kEnhancementsBugs | kEnhancementsGlitches | kEnhancementsContent : 0);
+			ConfMan.setInt("enhancements", ConfMan.getBool("enable_enhancements") ? kEnhGameBreakingBugs | kEnhGrp0 : 0);
 		}
 		ConfMan.removeKey("enable_enhancements", ConfMan.getActiveDomainName());
 		ConfMan.flushToDisk();
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index b21d550b956..1d52f3e0218 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -551,6 +551,7 @@ public:
 	int _insideCreateResource = 0; // Counter for HE sound
 
 	bool _enableEnhancements = false;
+	int32 _activeEnhancements = 0;
 	bool _useOriginalGUI = true;
 	bool _enableAudioOverride = false;
 	bool _enableCOMISong = false;
@@ -581,6 +582,7 @@ public:
 
 	void errorString(const char *buf_input, char *buf_output, int buf_output_size) override;
 	bool hasFeature(EngineFeature f) const override;
+	bool enhancementClassActive(int32 cls);
 	void syncSoundSettings() override;
 
 	Common::Error loadGameState(int slot) override;


Commit: d5fa7aeb90f5b587dce528f0448b10185f143bb7
    https://github.com/scummvm/scummvm/commit/d5fa7aeb90f5b587dce528f0448b10185f143bb7
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Mark all enhancements with their respective classes

Changed paths:
    engines/scumm/actor.cpp
    engines/scumm/akos.cpp
    engines/scumm/boxes.cpp
    engines/scumm/charset.cpp
    engines/scumm/costume.cpp
    engines/scumm/detection.h
    engines/scumm/dialogs.cpp
    engines/scumm/gfx.cpp
    engines/scumm/gfx_gui.cpp
    engines/scumm/gfx_mac.cpp
    engines/scumm/he/script_v72he.cpp
    engines/scumm/imuse_digi/dimuse_scripts.cpp
    engines/scumm/input.cpp
    engines/scumm/metaengine.cpp
    engines/scumm/object.cpp
    engines/scumm/players/player_towns.cpp
    engines/scumm/resource.cpp
    engines/scumm/resource_v4.cpp
    engines/scumm/script.cpp
    engines/scumm/script_v2.cpp
    engines/scumm/script_v5.cpp
    engines/scumm/script_v6.cpp
    engines/scumm/scumm.cpp
    engines/scumm/scumm.h
    engines/scumm/sound.cpp
    engines/scumm/string.cpp


diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 0976e199dde..f60dad42e03 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -242,7 +242,7 @@ void Actor_v7::initActor(int mode) {
 		_visible = false;
 
 	Actor::initActor(mode);
-	
+
 	_forceClip = 100;
 	_vm->_classData[_number] = _vm->_classData[0];
 }
@@ -417,7 +417,7 @@ void Actor_v3::setupActorScale() {
 	// in the German release (and then it'd probably be better to restore
 	// that safeguard instead, since the game clearly doesn't expect you
 	// to go back inside the castle), but I don't own this version.  -dwa
-	if (_number == 2 && _costume == 7 && _vm->_game.id == GID_INDY3 && _vm->_currentRoom == 12 && _vm->_enableEnhancements) {
+	if (_number == 2 && _costume == 7 && _vm->_game.id == GID_INDY3 && _vm->_currentRoom == 12 && _vm->enhancementClassActive(kEnhMinorBugFixes)) {
 		_scalex = 0x50;
 		_scaley = 0x50;
 	} else {
@@ -874,7 +874,7 @@ void Actor::startWalkAnim(int cmd, int angle) {
 		angle = _facing;
 
 	if (_vm->_game.version >= 7)
-		angle = remapDirection(normalizeAngle(_vm->_costumeLoader->hasManyDirections(_costume), angle), false); 
+		angle = remapDirection(normalizeAngle(_vm->_costumeLoader->hasManyDirections(_costume), angle), false);
 
 	if (_walkScript) {
 		int args[NUM_SCRIPT_LOCAL];
@@ -1614,7 +1614,7 @@ void Actor_v7::turnToDirection(int newdir) {
 	if (newdir == -1 || _ignoreTurns)
 		return;
 
-	newdir = remapDirection((newdir + 360) % 360, false); 
+	newdir = remapDirection((newdir + 360) % 360, false);
 	_moving &= ~MF_TURN;
 
 	if (newdir != _facing) {
@@ -1648,7 +1648,7 @@ void Actor::putActor(int dstX, int dstY, int newRoom) {
 	// WORKAROUND: The green transparency of the tank in the Hall of Oddities
 	// is positioned one pixel too far to the left. This appears to be a bug
 	// in the original game as well.
-	if (_vm->_game.id == GID_SAMNMAX && newRoom == 16 && _number == 5 && dstX == 235 && dstY == 236 && _vm->_enableEnhancements)
+	if (_vm->_game.id == GID_SAMNMAX && newRoom == 16 && _number == 5 && dstX == 235 && dstY == 236 && _vm->enhancementClassActive(kEnhMinorBugFixes))
 		dstX++;
 
 	_pos.x = dstX;
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 2ae11e7b585..2ed04d8e481 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -418,7 +418,7 @@ byte AkosRenderer::drawLimb(const Actor *a, int limb) {
 			// WORKAROUND bug #13532: There is a frame (of Freddi's eye) in US release of Freddi 3 accidentaly being big
 			// and an horizontal line at the bottom, causing this line to appear at the bottom of the screen.
 			// We draw the whole frame one pixel down so it does not appear on screen.
-			if (_vm->_game.id == GID_FREDDI3 && _vm->_language == Common::EN_USA && a->_costume == 258 && (code & AKC_CelMask) == 35 && _vm->_enableEnhancements)
+			if (_vm->_game.id == GID_FREDDI3 && _vm->_language == Common::EN_USA && a->_costume == 258 && (code & AKC_CelMask) == 35 && _vm->enhancementClassActive(kEnhVisualChanges))
 				yMoveCur += 1;
 
 			if (i == extra - 1) {
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index 6561bf9ee30..5cb08719ba8 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -176,7 +176,7 @@ byte ScummEngine::getMaskFromBox(int box) {
 	// stands at a specific place near Nur-Ab-Sal's abode. This is a bug in
 	// the data files, as it also occurs with the original engine. We work
 	// around it here anyway.
-	if (_game.id == GID_INDY4 && _currentRoom == 225 && _roomResource == 94 && box == 8 && _enableEnhancements)
+	if (_game.id == GID_INDY4 && _currentRoom == 225 && _roomResource == 94 && box == 8 && enhancementClassActive(kEnhMinorBugFixes))
 		return 0;
 
 	if (_game.version == 8)
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index bd659e5c0f8..e3226423a12 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -1558,7 +1558,7 @@ CharsetRendererMac::CharsetRendererMac(ScummEngine *vm, const Common::String &fo
 	// (At the time of writing, there are still cases, at least in Loom,
 	// where text isn't correctly positioned.)
 
-	_useCorrectFontSpacing = _vm->_game.id == GID_LOOM || _vm->_enableEnhancements;
+	_useCorrectFontSpacing = _vm->_game.id == GID_LOOM || _vm->enhancementClassActive(kEnhSubtitleFormatChanges);
 	_pad = false;
 	_glyphSurface = nullptr;
 
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 429110972dc..61fced96542 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -765,7 +765,7 @@ void ClassicCostumeLoader::loadCostume(int id) {
 	// WORKAROUND bug #13433: Guybrush can give the stick to two dogs: the one
 	// guarding the jail, and the one in front of the mansion. But the palette
 	// for this costume is invalid in the second case on Amiga, causing a glitch.
-	if (_vm->_game.id == GID_MONKEY2 && _vm->_game.platform == Common::kPlatformAmiga && _vm->_currentRoom == 53 && id == 55 && _numColors == 16 && _vm->_enableEnhancements) {
+	if (_vm->_game.id == GID_MONKEY2 && _vm->_game.platform == Common::kPlatformAmiga && _vm->_currentRoom == 53 && id == 55 && _numColors == 16 && _vm->enhancementClassActive(kEnhMinorBugFixes)) {
 		// Note: handmade, trying to match the colors between rooms 53 and 29,
 		// and based on (similar) costume 1.
 		_palette = amigaMonkey2Costume55Room53;
@@ -937,7 +937,7 @@ byte ClassicCostumeRenderer::drawLimb(const Actor *a, int limb) {
 
 			bool mirror = _mirror;
 
-			if (_vm->_game.id == GID_TENTACLE && _vm->_currentRoom == 61 && a->_number == 1 && _loaded._id == 324 && _vm->_enableEnhancements) {
+			if (_vm->_game.id == GID_TENTACLE && _vm->_currentRoom == 61 && a->_number == 1 && _loaded._id == 324 && _vm->enhancementClassActive(kEnhMinorBugFixes)) {
 				if (limb == 0) {
 					_mirror = true;
 					xmoveCur--;
diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index f53098ab70d..dedca919803 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -38,20 +38,20 @@ namespace Scumm {
 
 /* Game enhancements */
 enum {
-	kEnhGameBreakingBugs    = 1 << 0, // Gamebreaking Bug Fixes
-	kEnhMinorBugFixes       = 1 << 1, // Minor Bug Fixes
-	kEnhTextLocFixes        = 1 << 2, // Text and Localization Fixes
-	kEnhVisualFixes         = 1 << 3, // Visual Corrections
-	kEnhAudioFixes          = 1 << 4, // Audio Corrections
-	kEnhTimingFixes         = 1 << 5, // Timing Adjustments
-	kEnhSubtitleFormatFixes = 1 << 6, // Subtitle Color/Format Corrections
-	kEnhRestoredContent     = 1 << 7, // Restored Cut Content
-	kEnhUIUX                = 1 << 8, // UI/UX Enhancements
+	kEnhGameBreakingBugFixes  = 1 << 0, // Gamebreaking Bug Fixes
+	kEnhMinorBugFixes         = 1 << 1, // Minor Bug Fixes
+	kEnhTextLocFixes          = 1 << 2, // Text and Localization Fixes
+	kEnhVisualChanges         = 1 << 3, // Visual Corrections
+	kEnhAudioChanges          = 1 << 4, // Audio Corrections
+	kEnhTimingChanges         = 1 << 5, // Timing Adjustments
+	kEnhSubtitleFormatChanges = 1 << 6, // Subtitle Color/Format Corrections
+	kEnhRestoredContent       = 1 << 7, // Restored Cut Content
+	kEnhUIUX                  = 1 << 8, // UI/UX Enhancements
 };
 
 enum {
 	kEnhGrp0 = (kEnhMinorBugFixes | kEnhTextLocFixes),
-	kEnhGrp1 = (kEnhVisualFixes | kEnhAudioFixes | kEnhTimingFixes | kEnhSubtitleFormatFixes),
+	kEnhGrp1 = (kEnhVisualChanges | kEnhAudioChanges | kEnhTimingChanges | kEnhSubtitleFormatChanges),
 	kEnhGrp2 = (kEnhRestoredContent),
 	kEnhGrp3 = (kEnhUIUX)
 };
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index c436c5712c9..07807b615a0 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -455,7 +455,7 @@ const char *InfoDialog::getPlainEngineString(int stringno, bool forceHardcodedSt
 		result = (const char *)_vm->getStringAddressVar(string_map_table_v6[stringno - 1].num);
 
 		if (!result) {
-			if (stringno >= 22 && stringno <= 27 && _vm->_game.id == GID_TENTACLE && _vm->_enableEnhancements && strcmp(_vm->_game.variant, "Floppy")) {
+			if (stringno >= 22 && stringno <= 27 && _vm->_game.id == GID_TENTACLE && _vm->enhancementClassActive(kEnhTextLocFixes) && strcmp(_vm->_game.variant, "Floppy")) {
 				result = getStaticResString(_vm->_language, stringno - 1).string;
 			} else {
 				result = string_map_table_v6[stringno - 1].string;
@@ -1048,7 +1048,7 @@ void ScummOptionsContainerWidget::load() {
 
 	for (uint i = 0; i < _enhancementsCheckboxes.size(); i++) {
 		int32 targetFlags = 0;
-		enhancementsFlags &= ~kEnhGameBreakingBugs; // Always active, so don't worry about it!
+		enhancementsFlags &= ~kEnhGameBreakingBugFixes; // Always active, so don't worry about it!
 
 		if (_enhancementsCheckboxes[i]) {
 			switch (_enhancementsCheckboxes[i]->getCmd()) {
@@ -1074,7 +1074,7 @@ void ScummOptionsContainerWidget::load() {
 }
 
 bool ScummOptionsContainerWidget::save() {
-	int32 enhancementsFlags = kEnhGameBreakingBugs; // Always active!
+	int32 enhancementsFlags = kEnhGameBreakingBugFixes; // Always active!
 
 	for (uint i = 0; i < _enhancementsCheckboxes.size(); i++) {
 		if (_enhancementsCheckboxes[i]) {
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 7109e6354c5..dc81a8c3dda 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -2223,7 +2223,7 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width,
 	// FM-TOWNS release.  We take care not to apply this palette change to the
 	// text or inventory, as they still require the original colors.
 	if (_vm->_game.id == GID_INDY3 && (_vm->_game.features & GF_OLD256) && _vm->_game.platform != Common::kPlatformFMTowns
-		&& _vm->_roomResource == 46 && smapLen == 43159 && vs->number == kMainVirtScreen && _vm->_enableEnhancements) {
+		&& _vm->_roomResource == 46 && smapLen == 43159 && vs->number == kMainVirtScreen && _vm->enhancementClassActive(kEnhMinorBugFixes)) {
 		if (_roomPalette[11] == 11 && _roomPalette[86] == 86)
 			_roomPalette[11] = 86;
 		if (_roomPalette[13] == 13 && _roomPalette[80] == 80)
@@ -2246,7 +2246,7 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width,
 			_vm->_currentRoom == 36 &&
 			vs->number == kMainVirtScreen &&
 			y == 8 && x >= 7 && x <= 30 && height == 88 &&
-			_vm->_enableEnhancements) {
+			_vm->enhancementClassActive(kEnhVisualChanges)) {
 		_roomPalette[47] = 15;
 
 		byte result = decompressBitmap(dstPtr, vs->pitch, smap_ptr + offset, height);
@@ -2267,7 +2267,7 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width,
 			_vm->_currentRoom == 11 &&
 			vs->number == kMainVirtScreen &&
 			y == 24 && x >= 28 && x <= 52 && height == 56 &&
-			_vm->_enableEnhancements) {
+			_vm->enhancementClassActive(kEnhVisualChanges)) {
 		_roomPalette[1] = 15;
 
 		byte result = decompressBitmap(dstPtr, vs->pitch, smap_ptr + offset, height);
diff --git a/engines/scumm/gfx_gui.cpp b/engines/scumm/gfx_gui.cpp
index 52433d0260a..aba6b40f80e 100644
--- a/engines/scumm/gfx_gui.cpp
+++ b/engines/scumm/gfx_gui.cpp
@@ -2030,7 +2030,7 @@ void ScummEngine::queryQuit(bool returnToLauncher) {
 		// WORKAROUND: In the german version of LOOM FM-Towns, the string in the game data is stored with a '\r'
 		// character at the end. This means that the string being displayed on screen will end with "(J oder N)J",
 		// and localizedYesKey will be assigned to '\r'. Let's fix this by truncating the relevant string.
-		if (_enableEnhancements && _game.id == GID_LOOM &&
+		if (enhancementClassActive(kEnhMinorBugFixes) && _game.id == GID_LOOM &&
 			_game.platform == Common::kPlatformFMTowns &&
 			strstr(msgLabelPtr, "(J oder N)J\r")) {
 			msgLabelPtr[Common::strnlen(msgLabelPtr, sizeof(msgLabelPtr)) - 1] = '\0';
diff --git a/engines/scumm/gfx_mac.cpp b/engines/scumm/gfx_mac.cpp
index 638ecb49d43..89eabf4412a 100644
--- a/engines/scumm/gfx_mac.cpp
+++ b/engines/scumm/gfx_mac.cpp
@@ -82,7 +82,7 @@ void ScummEngine::mac_drawStripToScreen(VirtScreen *vs, int top, int x, int y, i
 	if (_renderMode == Common::kRenderMacintoshBW) {
 		for (int h = 0; h < height; h++) {
 			for (int w = 0; w < width; w++) {
-				int color = _enableEnhancements ? _shadowPalette[pixels[w]] : pixels[w];
+				int color = enhancementClassActive(kEnhVisualChanges) ? _shadowPalette[pixels[w]] : pixels[w];
 				if (ts[2 * w] == CHARSET_MASK_TRANSPARENCY)
 					mac[2 * w] = Graphics::macEGADither[color][0];
 				if (ts[2 * w + 1] == CHARSET_MASK_TRANSPARENCY)
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 799c000486e..3447066367d 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -907,7 +907,7 @@ void ScummEngine_v72he::o72_actorOps() {
 		a->_talkColor = pop();
 		// WORKAROUND bug #13730: defined subtitles color 16 is very dark and hard to read on the dark background.
 		// we change it to brighter color to ease reading.
-		if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && a->_talkColor == 16 && _enableEnhancements)
+		if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && a->_talkColor == 16 && enhancementClassActive(kEnhSubtitleFormatChanges))
 			a->_talkColor = 200;
 		break;
 	case SO_ACTOR_NAME:
@@ -2189,7 +2189,7 @@ void ScummEngine_v72he::decodeParseString(int m, int n) {
 			_string[m].color = pop();
 			// WORKAROUND bug #13730: defined subtitles color 16 is very dark and hard to read on the dark background.
 			// we change it to brighter color to ease reading.
-			if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && _string[m].color == 16 && _enableEnhancements)
+			if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && _string[m].color == 16 && enhancementClassActive(kEnhSubtitleFormatChanges))
 				_string[m].color = 200;
 		} else {
 			push(colors);
diff --git a/engines/scumm/imuse_digi/dimuse_scripts.cpp b/engines/scumm/imuse_digi/dimuse_scripts.cpp
index 7c363f40a99..48b1d716b4d 100644
--- a/engines/scumm/imuse_digi/dimuse_scripts.cpp
+++ b/engines/scumm/imuse_digi/dimuse_scripts.cpp
@@ -483,7 +483,7 @@ void IMuseDigital::playFtMusic(const char *songName, int transitionType, int vol
 					// WORKAROUND for bug in the original: at the beginning of the game, going in
 					// and out of the bar a couple of times breaks and temporarily stops the music
 					// Here, we override the fade out, just like the remastered does
-					if (oldSoundId == soundId && soundId == 622 && _vm->_enableEnhancements) {
+					if (oldSoundId == soundId && soundId == 622 && _vm->enhancementClassActive(kEnhAudioChanges)) {
 						diMUSEFadeParam(soundId, DIMUSE_P_VOLUME, volume, 200);
 					}
 				} else if (diMUSEStartStream(soundId, 126, DIMUSE_BUFFER_MUSIC)) {
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 820eeb6e1f0..ec77273d221 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -1135,7 +1135,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
 			return;
 		}
 
-		if (_enableEnhancements && _game.id == GID_LOOM &&
+		if (enhancementClassActive(kEnhUIUX) && _game.id == GID_LOOM &&
 			mainmenuKeyEnabled && (lastKeyHit.keycode == Common::KEYCODE_d && lastKeyHit.hasFlags(Common::KBD_CTRL))) {
 			// Drafts menu
 			showDraftsInventory();
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index fb1190abcd8..bed9ab59d42 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -250,7 +250,7 @@ bool ScummEngine::hasFeature(EngineFeature f) const {
 }
 
 bool Scumm::ScummEngine::enhancementClassActive(int32 cls) {
-	return _activeEnhancements && cls;
+	return _activeEnhancements & cls;
 }
 
 
@@ -784,7 +784,7 @@ void ScummMetaEngine::registerDefaultSettings(const Common::String &) const {
 	const ExtraGuiOptions engineOptions = getExtraGuiOptions("");
 	for (uint i = 0; i < engineOptions.size(); i++) {
 		if (strcmp(engineOptions[i].configOption, "enhancements") == 0)
-			ConfMan.registerDefault(engineOptions[i].configOption, kEnhGameBreakingBugs | kEnhGrp0);
+			ConfMan.registerDefault(engineOptions[i].configOption, kEnhGameBreakingBugFixes | kEnhGrp0);
 		else
 			ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
 	}
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 3b9c71432df..74f7bfffce2 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -705,7 +705,7 @@ void ScummEngine::drawObject(int obj, int arg) {
 	// copyright reasons, so we just patch the impacted bytes from a fixed OI
 	// (made with BMRP.EXE).
 	if (_game.id == GID_INDY3 && (_game.features & GF_OLD256) && _currentRoom == 135
-	    && od.obj_nr == 324 && numstrip == od.width / 8 && _enableEnhancements) {
+	    && od.obj_nr == 324 && numstrip == od.width / 8 && enhancementClassActive(kEnhVisualChanges)) {
 		// Extra safety: make sure that the OI has the expected length. Indy3
 		// should always be GF_SMALL_HEADER, but that's implicit, so do an
 		// explicit check, since we're doing some low-level byte tricks.
diff --git a/engines/scumm/players/player_towns.cpp b/engines/scumm/players/player_towns.cpp
index b1a1c23d2a4..506e34ea5bf 100644
--- a/engines/scumm/players/player_towns.cpp
+++ b/engines/scumm/players/player_towns.cpp
@@ -245,7 +245,7 @@ void Player_Towns_v1::startSound(int sound) {
 		velocity = velocity ? velocity >> 2 : ptr[14] >> 1;
 		uint16 len = READ_LE_UINT16(ptr) + 2;
 		playPcmTrack(sound, ptr + 6, velocity, 64, note ? note : (len > 50 ? ptr[50] : 60), READ_LE_UINT16(ptr + 10));
-	} else if (type == 1 || (_vm->_game.id == GID_INDY3 && sound == 40 && _vm->_enableEnhancements)) {
+	} else if (type == 1 || (_vm->_game.id == GID_INDY3 && sound == 40 && _vm->enhancementClassActive(kEnhAudioChanges))) {
 		// WORKAROUND: Indy 3 FMTOWNS: No/distorted music in Venice
 		// The Venice music does not exist as CD audio and the original doesn't feature music
 		// in this scene. It does, however, exist as Euphony track albeit with an odd sound
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index e0abe6a9a63..6df93015e68 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -1767,7 +1767,7 @@ void ScummEngine::applyWorkaroundIfNeeded(ResType type, int idx) {
 	// immediately overwritten. This probably affects all CD versions, so we
 	// just have to add further patches as they are reported.
 
-	if (_game.id == GID_MONKEY && type == rtRoom && idx == 25 && _enableEnhancements) {
+	if (_game.id == GID_MONKEY && type == rtRoom && idx == 25 && enhancementClassActive(kEnhRestoredContent)) {
 		tryPatchMI1CannibalScript(getResourceAddress(type, idx), size);
 	} else
 
diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp
index 9e862496f8e..5753721a5a0 100644
--- a/engines/scumm/resource_v4.cpp
+++ b/engines/scumm/resource_v4.cpp
@@ -57,7 +57,7 @@ int ScummEngine_v4::readResTypeList(ResType type) {
 			Common::String md5 = Common::computeStreamMD5AsString(rolandPatchFile);
 			if (md5 == "64ab9552f71dd3344767718eb01e5fd5") {
 				uint32 patchOffsets[19] = {
-					28957,	23427,	35913,	49919,	51918, 
+					28957,	23427,	35913,	49919,	51918,
 					53643,	55368,	57093,	58818,	62502,
 					73,		66844,	71991,	83107,	91566,
 					95614,	98650,	105020,	112519
@@ -202,7 +202,7 @@ void ScummEngine_v4::loadCharset(int no) {
 	// does exist, but at the invalid \x86 position.  So we replace \x85 with
 	// \x86 (and then \x86 with \x87 so that the whole charset resource keeps
 	// the same size), but only when detecting the faulty 904.LFL file.
-	if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA) && no == 4 && size == 4857 && _language == Common::FR_FRA && _enableEnhancements) {
+	if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA) && no == 4 && size == 4857 && _language == Common::FR_FRA && enhancementClassActive(kEnhTextLocFixes)) {
 		Common::MemoryReadStream stream(data, size);
 		Common::String md5 = Common::computeStreamMD5AsString(stream);
 
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index 25efbb6ae61..34f4477ad94 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -713,7 +713,7 @@ void ScummEngine::writeVar(uint var, int value) {
 		// Any modifications here depend on knowing if the script will
 		// set the timer value back to something sensible afterwards.
 
-		if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && var == VAR_TIMER_NEXT && _enableEnhancements) {
+		if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && var == VAR_TIMER_NEXT && enhancementClassActive(kEnhTimingChanges)) {
 			// "Wirst Du brutzeln, wie eine grobe Bratwurst!"
 			if (value == 1 && _language == Common::DE_DEU)
 				value = 4;
@@ -733,7 +733,7 @@ void ScummEngine::writeVar(uint var, int value) {
 		// throughout the intro. This does not apply to the VGA talkie
 		// version, because there the fire isn't animated.
 
-		else if (_game.id == GID_LOOM && !(_game.features & GF_DEMO) && _game.version < 4 && vm.slot[_currentScript].number == 44 && var == VAR_TIMER_NEXT && _enableEnhancements) {
+		else if (_game.id == GID_LOOM && !(_game.features & GF_DEMO) && _game.version < 4 && vm.slot[_currentScript].number == 44 && var == VAR_TIMER_NEXT && enhancementClassActive(kEnhTimingChanges)) {
 			Actor *a = derefActorSafe(4, "writeVar");
 			if (a) {
 				a->setAnimSpeed((value == 0) ? 6 : 0);
@@ -993,7 +993,7 @@ void ScummEngine::runExitScript() {
 	//
 	// The same sound effect is also used in the underwater cavern (room
 	// 33), so we do the same fade out as in that room's exit script.
-	if (_game.id == GID_DIG && _currentRoom == 44 && _enableEnhancements) {
+	if (_game.id == GID_DIG && _currentRoom == 44 && enhancementClassActive(kEnhAudioChanges)) {
 		int scriptCmds[] = { 14, 215, 0x600, 0, 30, 0, 0, 0 };
 		_sound->soundKludge(scriptCmds, ARRAYSIZE(scriptCmds));
 	}
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 5d17f4c94c4..1d1bfa36168 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -420,7 +420,7 @@ void ScummEngine_v2::decodeParseString() {
 	else if (_game.id == GID_MANIAC && _game.version == 1
 		&& _game.platform == Common::kPlatformDOS
 		&& !(_game.features & GF_DEMO) && _language == Common::EN_ANY
-		&& vm.slot[_currentScript].number == 260 && _enableEnhancements
+		&& vm.slot[_currentScript].number == 260 && enhancementClassActive(kEnhTextLocFixes)
 		&& strncmp((char *)buffer + 26, " tring ", 7) == 0) {
 		for (byte *p = ptr; p >= buffer + 29; p--)
 			*(p + 1) = *p;
@@ -480,7 +480,7 @@ void ScummEngine_v2::writeVar(uint var, int value) {
 			&& _game.platform != Common::kPlatformNES
 			&& vm.slot[_currentScript].number == 4
 			&& VAR(VAR_CLICK_AREA) == kSentenceClickArea
-			&& var == 34 && value == 0 && _enableEnhancements) {
+			&& var == 34 && value == 0 && enhancementClassActive(kEnhRestoredContent)) {
 		value = 1;
 	}
 
@@ -887,7 +887,7 @@ void ScummEngine_v2::o2_verbOps() {
 		// erroneously set one of the verbs' ("Unlock") y coordinate to 1600 instead of
 		// 168 via scripts. We apply the fix and mark it as an enhancement.
 		if (_game.id == GID_MANIAC && _game.version == 2 && _language == Common::IT_ITA &&
-			slot == 15 && y == 1600 && _enableEnhancements) {
+			slot == 15 && y == 1600 && enhancementClassActive(kEnhTextLocFixes)) {
 			vs->curRect.top = 168;
 		} else {
 			vs->curRect.top = y;
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index f24739ad031..f40ce587896 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -428,7 +428,7 @@ void ScummEngine_v5::o5_actorOps() {
 	// also observed when doing the QA for the PC version.
 	if (_game.id == GID_MONKEY2 && _game.platform == Common::kPlatformFMTowns &&
 		vm.slot[_currentScript].number == 45 && _currentRoom == 45 &&
-		(_scriptPointer - _scriptOrgPointer == 0xA9) && _enableEnhancements) {
+		(_scriptPointer - _scriptOrgPointer == 0xA9) && enhancementClassActive(kEnhRestoredContent)) {
 		_scriptPointer += 0xCF - 0xA1;
 		writeVar(32811, 0); // clear bit 43
 		return;
@@ -448,7 +448,7 @@ void ScummEngine_v5::o5_actorOps() {
 	// this, but in a different way which doesn't look as portable between releases.
 	if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA || (_game.id == GID_MONKEY && !(_game.features & GF_ULTIMATE_TALKIE))) &&
 		_roomResource == 87 && vm.slot[_currentScript].number == 10002 && act == 9 &&
-		_enableEnhancements) {
+		enhancementClassActive(kEnhVisualChanges)) {
 		const int scriptNr = (_game.version == 5) ? 122 : 119;
 		if (!isScriptRunning(scriptNr)) {
 			a->putActor(0);
@@ -480,7 +480,7 @@ void ScummEngine_v5::o5_actorOps() {
 			// But in the VGA CD version, only costume 0 is used
 			// and the close-up is missing the cigar smoke.
 
-			if (_game.id == GID_MONKEY && _currentRoom == 76 && act == 12 && i == 0 && _enableEnhancements) {
+			if (_game.id == GID_MONKEY && _currentRoom == 76 && act == 12 && i == 0 && enhancementClassActive(kEnhVisualChanges)) {
 				i = 76;
 			}
 
@@ -537,7 +537,7 @@ void ScummEngine_v5::o5_actorOps() {
 
 			if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns &&
 				(a->_costume == 23 || a->_costume == 28 || a->_costume == 29) &&
-				(_currentRoom == 20 || _currentRoom == 28 || _currentRoom == 32) && _enableEnhancements) {
+				(_currentRoom == 20 || _currentRoom == 28 || _currentRoom == 32) && enhancementClassActive(kEnhVisualChanges)) {
 				break;
 			}
 
@@ -650,7 +650,7 @@ void ScummEngine_v5::o5_setClass() {
 		if (_game.id == GID_MONKEY && _game.platform != Common::kPlatformFMTowns &&
 		    _game.platform != Common::kPlatformSegaCD && _roomResource == 59 &&
 		    vm.slot[_currentScript].number == 10002 && obj == 915 && cls == 6 &&
-		    _currentPalette[251 * 3] == 0 && _enableEnhancements &&
+			_currentPalette[251 * 3] == 0 && enhancementClassActive(kEnhVisualChanges) &&
 		    !(_game.features & GF_ULTIMATE_TALKIE)) {
 			// True as long as Guybrush isn't done with the voodoo recipe on the
 			// Sea Monkey. The Ultimate Talkie Edition probably does this as a way
@@ -745,7 +745,7 @@ void ScummEngine_v5::o5_add() {
 	// We restore the old behavior by adding 0, not 1, to the second
 	// variable when examining the clock tower.
 
-	if (_game.id == GID_MONKEY && vm.slot[_currentScript].number == 210 && _currentRoom == 35 && _resultVarNumber == 248 && a == 1 && _enableEnhancements) {
+	if (_game.id == GID_MONKEY && vm.slot[_currentScript].number == 210 && _currentRoom == 35 && _resultVarNumber == 248 && a == 1 && enhancementClassActive(kEnhRestoredContent)) {
 		a = 0;
 	}
 
@@ -912,7 +912,7 @@ void ScummEngine_v5::o5_cursorCommand() {
 			// if we even want that "fixed", but it does lead to bug tickets in Monkey 1 FM-TOWNS") and the
 			// "fix" restores the original appearance (which - as per usual - is a matter of personal taste...).
 			// So let people make their own choice with the Enhancement setting.
-			int m = (_game.platform == Common::kPlatformFMTowns && _game.id == GID_MONKEY && !_enableEnhancements) ? 2 : 1;
+			int m = (_game.platform == Common::kPlatformFMTowns && _game.id == GID_MONKEY && !enhancementClassActive(kEnhVisualChanges)) ? 2 : 1;
 			for (i = 0; i < 16; i++)
 				_charsetColorMap[i] = _charsetData[_string[1]._default.charset][i] = (unsigned char)table[i * m];
 		}
@@ -935,7 +935,7 @@ void ScummEngine_v5::o5_cutscene() {
 	// from the zeppelin with the biplane is missing the `[1]` parameter
 	// which disables the verb interface. For some reason, this only causes
 	// a problem on the FM-TOWNS version, though... also happens under UNZ.
-	if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns && _currentRoom == 80 && vm.slot[_currentScript].number == 201 && args[0] == 0 && _enableEnhancements) {
+	if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns && _currentRoom == 80 && vm.slot[_currentScript].number == 201 && args[0] == 0 && enhancementClassActive(kEnhVisualChanges)) {
 		args[0] = 1;
 	}
 
@@ -1076,7 +1076,7 @@ void ScummEngine_v5::o5_drawObject() {
 	// be called if Bit[129] is set in that script, so if it does happen, it means
 	// the check was missing, and so we ignore the next 32 bytes of Dread's reaction.
 	if (_game.id == GID_MONKEY2 && !(_game.features & GF_ULTIMATE_TALKIE) && _currentRoom == 22 && vm.slot[_currentScript].number == 201 && obj == 237 &&
-		state == 1 && readVar(0x8000 + 129) == 1 && _enableEnhancements) {
+		state == 1 && readVar(0x8000 + 129) == 1 && enhancementClassActive(kEnhMinorBugFixes)) {
 		_scriptPointer += 32;
 		return;
 	}
@@ -1087,7 +1087,7 @@ void ScummEngine_v5::o5_drawObject() {
 	// picked up the real Grail. This was probably done as a way to unconditionally
 	// reset the animation if it's already been played, but we can just do an
 	// unconditional reset of all previous frames instead, restoring the first one.
-	if (_game.id == GID_INDY3 && _roomResource == 87 && vm.slot[_currentScript].number == 200 && obj == 899 && state == 1 && VAR(VAR_TIMER_NEXT) != 12 && _enableEnhancements) {
+	if (_game.id == GID_INDY3 && _roomResource == 87 && vm.slot[_currentScript].number == 200 && obj == 899 && state == 1 && VAR(VAR_TIMER_NEXT) != 12 && enhancementClassActive(kEnhRestoredContent)) {
 		i = _numLocalObjects - 1;
 		do {
 			if (_objs[i].obj_nr)
@@ -1103,7 +1103,7 @@ void ScummEngine_v5::o5_drawObject() {
 	// all later versions; this smaller workaround appears to be enough.
 	if (_game.id == GID_LOOM && _game.version == 3 && !(_game.features & GF_OLD256) && _roomResource == 32 &&
 		vm.slot[_currentScript].number == 10002 && obj == 540 && state == 1 && xpos == 255 && ypos == 255 &&
-		_enableEnhancements) {
+		enhancementClassActive(kEnhMinorBugFixes)) {
 		if (getState(541) == 1) {
 			putState(obj, state);
 			obj = 541;
@@ -1242,7 +1242,7 @@ void ScummEngine_v5::o5_findObject() {
 
 	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) {
+		_currentRoom == 38 && obj == 623 && enhancementClassActive(kEnhMinorBugFixes)) {
 		obj = 609;
 	}
 
@@ -1251,7 +1251,7 @@ void ScummEngine_v5::o5_findObject() {
 	// script is responsible for actually moving you to the other room and
 	// this script is empty, redirect the action to the cave object's
 	// script instead.
-	if (_game.id == GID_LOOM && _game.version == 4 && _currentRoom == 33 && obj == 482 && _enableEnhancements) {
+	if (_game.id == GID_LOOM && _game.version == 4 && _currentRoom == 33 && obj == 482 && enhancementClassActive(kEnhMinorBugFixes)) {
 		obj = 468;
 	}
 
@@ -1636,7 +1636,7 @@ void ScummEngine_v5::o5_isLessEqual() {
 	// together that they look like one. This adjusts the timing of the
 	// second one.
 
-	if (_game.id == GID_LOOM && _game.version >= 4 && _language == Common::EN_ANY && vm.slot[_currentScript].number == 95 && var == VAR_MUSIC_TIMER && b == 1708 && _enableEnhancements) {
+	if (_game.id == GID_LOOM && _game.version >= 4 && _language == Common::EN_ANY && vm.slot[_currentScript].number == 95 && var == VAR_MUSIC_TIMER && b == 1708 && enhancementClassActive(kEnhVisualChanges)) {
 		b = 1815;
 	}
 
@@ -1664,10 +1664,9 @@ void ScummEngine_v5::o5_notEqualZero() {
 	// otherwise Wally won't be able to read the map, and you'll be completely
 	// stuck on Scabb Island with no way of going back to the Phatt Island
 	// Library, since Dread's ship is gone.
-	//
-	// Not using `_enableEnhancements`, since we always want to solve a dead-end
-	// in a Monkey Island game!
-	if (_game.id == GID_MONKEY2 && ((_roomResource == 22 && vm.slot[_currentScript].number == 202) || (_roomResource == 2 && vm.slot[_currentScript].number == 10002) || vm.slot[_currentScript].number == 97)) {
+	if (_game.id == GID_MONKEY2 && ((_roomResource == 22 && vm.slot[_currentScript].number == 202) ||
+		(_roomResource == 2 && vm.slot[_currentScript].number == 10002) ||
+		vm.slot[_currentScript].number == 97) && enhancementClassActive(kEnhGameBreakingBugFixes)) {
 		int var = fetchScriptWord();
 		a = readVar(var);
 
@@ -1685,7 +1684,7 @@ void ScummEngine_v5::o5_notEqualZero() {
 		//
 		// Note that fixing this unveils the script error causing the possible
 		// dead-end described above.
-		if (!(_game.features & GF_ULTIMATE_TALKIE) && var == 0x8000 + 70 && a == 0 && getOwner(519) == VAR(VAR_EGO) && _enableEnhancements) {
+		if (!(_game.features & GF_ULTIMATE_TALKIE) && var == 0x8000 + 70 && a == 0 && getOwner(519) == VAR(VAR_EGO) && enhancementClassActive(kEnhRestoredContent)) {
 			a = 1;
 		}
 
@@ -1773,7 +1772,7 @@ void ScummEngine_v5::o5_loadRoom() {
 	// the one where Indy enters the office for the first time. If object 23 (National
 	// Archeology) is in possession of Indy (owner == 1) then it's safe to force the
 	// coat (object 24) and broken window (object 25) into the room.
-	if (_game.id == GID_INDY4 && room == 1 && _objectOwnerTable[23] == 1 && _enableEnhancements) {
+	if (_game.id == GID_INDY4 && room == 1 && _objectOwnerTable[23] == 1 && enhancementClassActive(kEnhMinorBugFixes)) {
 		putState(24, 1);
 		putState(25, 1);
 	}
@@ -1784,7 +1783,7 @@ void ScummEngine_v5::o5_loadRoom() {
 	// you will always get the close-up where he's wearing his own clothes.
 
 	if (_game.id == GID_LOOM && _game.version == 3 && room == 29 &&
-		vm.slot[_currentScript].number == 112 && _enableEnhancements) {
+		vm.slot[_currentScript].number == 112 && enhancementClassActive(kEnhVisualChanges)) {
 		Actor *a = derefActorSafe(VAR(VAR_EGO), "o5_loadRoom");
 
 		// Bobbin's normal costume is number 1. If he's wearing anything
@@ -1976,14 +1975,14 @@ void ScummEngine_v5::o5_putActor() {
 	// other coordinates. The difference is never more than a single pixel,
 	// so there's not much reason to correct those.
 
-	if (_game.id == GID_MONKEY && _currentRoom == 76 && act == 12 && _enableEnhancements) {
+	if (_game.id == GID_MONKEY && _currentRoom == 76 && act == 12 && enhancementClassActive(kEnhVisualChanges)) {
 		if (x == 176 && y == 80) {
 			x = 174;
 			y = 86;
 		} else if (x == 176 && y == 78) {
 			x = 172;
 		}
-	} else if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && _currentRoom == 42 && vm.slot[_currentScript].number == 201 && act == 6 && x == 136 && y == 0 && _enableEnhancements) {
+	} else if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && _currentRoom == 42 && vm.slot[_currentScript].number == 201 && act == 6 && x == 136 && y == 0 && enhancementClassActive(kEnhVisualChanges)) {
 		// WORKAROUND: bug #2762: When switching back to Zak after using the blue
 		// crystal on the bird in Lima, the bird will disappear, come back and
 		// disappear again. This is really strange and only happens with the
@@ -2255,7 +2254,7 @@ void ScummEngine_v5::o5_roomOps() {
 			// we want the original color 3 for the cigar smoke. It
 			// should be ok since there is no GUI in this scene.
 
-			if (_game.id == GID_MONKEY && _currentRoom == 76 && d == 3 && _enableEnhancements) {
+			if (_game.id == GID_MONKEY && _currentRoom == 76 && d == 3 && enhancementClassActive(kEnhVisualChanges)) {
 				// Do nothing
 			} else {
 				setPalColor(d, a, b, c);	/* index, r, g, b */
@@ -2563,7 +2562,7 @@ void ScummEngine_v5::o5_setState() {
 	// though, since it properly resets the state of the (invisible) laundry claim
 	// ticket part of the door, so we just reuse its setState and setClass calls.
 	if (_game.id == GID_MONKEY2 && _currentRoom == 13 && vm.slot[_currentScript].number == 200 &&
-		obj == 108 && state == 1 && getState(100) != 1 && getState(111) != 2 && _enableEnhancements) {
+		obj == 108 && state == 1 && getState(100) != 1 && getState(111) != 2 && enhancementClassActive(kEnhMinorBugFixes)) {
 		putState(111, 2);
 		markObjectRectAsDirty(111);
 		putClass(111, 160, true);
@@ -2670,7 +2669,7 @@ void ScummEngine_v5::o5_stopSound() {
 	// 10001 regardless of which room it is. We figure out which one by
 	// looking at which rooms we're moving between.
 
-	if (_game.id == GID_MONKEY && (_game.features & GF_AUDIOTRACKS) && sound == 126 && vm.slot[_currentScript].number == 10001 && VAR(VAR_ROOM) == 43 && VAR(VAR_NEW_ROOM) == 76 && _enableEnhancements) {
+	if (_game.id == GID_MONKEY && (_game.features & GF_AUDIOTRACKS) && sound == 126 && vm.slot[_currentScript].number == 10001 && VAR(VAR_ROOM) == 43 && VAR(VAR_NEW_ROOM) == 76 && enhancementClassActive(kEnhAudioChanges)) {
 		return;
 	}
 
@@ -2678,7 +2677,7 @@ void ScummEngine_v5::o5_stopSound() {
 	// music status variable when you stop it. Wendy's music would then
 	// resume when leaving some rooms (such as room 3 with the chandelier),
 	// even though her CD player was off.
-	if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformNES && sound == 75 && vm.slot[_currentScript].number == 50 && VAR(VAR_EGO) == 6 && VAR(224) == sound && _enableEnhancements) {
+	if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformNES && sound == 75 && vm.slot[_currentScript].number == 50 && VAR(VAR_EGO) == 6 && VAR(224) == sound && enhancementClassActive(kEnhAudioChanges)) {
 		VAR(224) = 0;
 	}
 
@@ -2729,7 +2728,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) && _enableEnhancements)
+	if (_game.id == GID_LOOM && _game.version == 3 && script == 207 && isScriptRunning(98) && enhancementClassActive(kEnhVisualChanges))
 		return;
 
 	// WORKAROUND bug #2198: Script 171 loads a complete room resource,
@@ -2756,7 +2755,7 @@ void ScummEngine_v5::o5_startScript() {
 	// stealth") is missing a Local[0] value for the actor number. This
 	// causes the line to be silently skipped (as in the original).
 	if (_game.id == GID_LOOM && _game.version == 3 && _roomResource == 23 && script == 232 && data[0] == 0 &&
-		vm.slot[_currentScript].number >= 422 && vm.slot[_currentScript].number <= 425 && _enableEnhancements) {
+		vm.slot[_currentScript].number >= 422 && vm.slot[_currentScript].number <= 425 && enhancementClassActive(kEnhRestoredContent)) {
 		// Restore the missing line by attaching it to the shepherd on which the
 		// draft was used.
 		data[0] = vm.slot[_currentScript].number % 10;
@@ -2809,7 +2808,7 @@ void ScummEngine_v5::o5_stopScript() {
 
 	if (_game.id == GID_INDY4 && script == 164 && _roomResource == 50 &&
 		vm.slot[_currentScript].number == 213 && VAR(VAR_HAVE_MSG) &&
-		getOwner(933) == VAR(VAR_EGO) && getClass(933, 146) && _enableEnhancements) {
+		getOwner(933) == VAR(VAR_EGO) && getClass(933, 146) && enhancementClassActive(kEnhRestoredContent)) {
 		// WORKAROUND bug #2215: Due to a script bug, a line of text is skipped
 		// which Indy is supposed to speak when he finds Orichalcum in some old
 		// bones in the caves below Crete, if (and only if) he has already put
@@ -3076,7 +3075,7 @@ void ScummEngine_v5::o5_walkActorTo() {
 	// it, as in the other releases. Another v5 bug fixed on SegaCD, though!
 	if (_game.id == GID_MONKEY && !(_game.features & GF_ULTIMATE_TALKIE) && _game.platform != Common::kPlatformSegaCD &&
 		_currentRoom == 30 && vm.slot[_currentScript].number == 207 && a->_number == 11 &&
-		x == 232 && y == 141 &&	_enableEnhancements) {
+		x == 232 && y == 141 && enhancementClassActive(kEnhVisualChanges)) {
 		if (whereIsObject(387) == WIO_ROOM && getState(387) == 1 && getState(437) == 1) {
 			int args[NUM_SCRIPT_LOCAL];
 			memset(args, 0, sizeof(args));
@@ -3245,7 +3244,7 @@ void ScummEngine_v5::decodeParseString() {
 					_currentRoom == 36 &&
 					vm.slot[_currentScript].number == 201 &&
 					color == 2 &&
-					_enableEnhancements) {
+					 enhancementClassActive(kEnhVisualChanges)) {
 				color = findClosestPaletteColor(_currentPalette, 256, 0, 171, 0);
 			}
 
@@ -3326,20 +3325,20 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 	const int len = resStrLen(_scriptPointer);
 
 	if (_game.id == GID_LOOM && _game.version == 4 && _language == Common::EN_ANY &&
-			vm.slot[_currentScript].number == 95 && _enableEnhancements &&
+		vm.slot[_currentScript].number == 95 && enhancementClassActive(kEnhTextLocFixes) &&
 			strcmp((const char *)_scriptPointer, "I am Choas.") == 0) {
 		// WORKAROUND: This happens when Chaos introduces
 		// herself to bishop Mandible. Of all the places to put
 		// a typo...
 		printString(textSlot, (const byte *)"I am Chaos.");
 	} else if (_game.id == GID_LOOM && _game.version == 4 && _roomResource == 90 &&
-			vm.slot[_currentScript].number == 203 && _string[textSlot].color == 0x0F && _enableEnhancements) {
+			   vm.slot[_currentScript].number == 203 && _string[textSlot].color == 0x0F && enhancementClassActive(kEnhSubtitleFormatChanges)) {
 		// WORKAROUND: When Mandible speaks with Goodmold, his second
 		// speech line is missing its color parameter.
 		_string[textSlot].color = 0x0A;
 		printString(textSlot, _scriptPointer);
 	} else if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns && _roomResource == 80 &&
-			vm.slot[_currentScript].number == 201 && _enableEnhancements) {
+			   vm.slot[_currentScript].number == 201 && enhancementClassActive(kEnhSubtitleFormatChanges)) {
 		// WORKAROUND: When Indy and his father escape the zeppelin
 		// with the biplane in the FM-TOWNS version, they share the
 		// same text color. Indeed, they're not given any explicit
@@ -3353,7 +3352,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 			_string[textSlot].color = 0x0E;
 		printString(textSlot, _scriptPointer);
 	} else if (_game.id == GID_INDY4 && _roomResource == 23 && vm.slot[_currentScript].number == 167 &&
-			len == 24 && _enableEnhancements && memcmp(_scriptPointer+16, "pregod", 6) == 0) {
+			len == 24 && enhancementClassActive(kEnhTextLocFixes) && memcmp(_scriptPointer+16, "pregod", 6) == 0) {
 		// WORKAROUND for bug #2961: At the end of Indy4, if Ubermann is told
 		// to use 20 orichalcum beads, he'll count "pregod8" and "pregod9"
 		// instead of "18" and "19", in some releases.
@@ -3370,7 +3369,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 		printString(textSlot, tmpBuf);
 	} else if (_game.id == GID_INDY4 && _language == Common::EN_ANY && _roomResource == 10 &&
 			vm.slot[_currentScript].number == 209 && _actorToPrintStrFor == 4 && len == 81 &&
-			strcmp(_game.variant, "Floppy") != 0 && _enableEnhancements) {
+			strcmp(_game.variant, "Floppy") != 0 && enhancementClassActive(kEnhSubtitleFormatChanges)) {
 		// WORKAROUND: The English Talkie version of Indy4 changed Kerner's
 		// lines when he uses the phone booth in New York, but the text doesn't
 		// match the voice and it mentions the wrong person, in most releases.
@@ -3388,7 +3387,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 		}
 	} else if (_game.id == GID_INDY4 && vm.slot[_currentScript].number == 161 && _actorToPrintStrFor == 2 &&
 			_game.platform != Common::kPlatformAmiga && strcmp(_game.variant, "Floppy") != 0 &&
-			_enableEnhancements) {
+			enhancementClassActive(kEnhAudioChanges)) {
 		// WORKAROUND: In Indy 4, if one plays as Sophia and looks at Indy, then
 		// her "There's nothing to look at." reaction line will be said with
 		// Indy's voice, because script 68-161 doesn't check for Sophia in this
@@ -3421,7 +3420,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 			(_roomResource == 45 && vm.slot[_currentScript].number == 200 &&
 			isValidActor(10) && _actors[10]->isInCurrentRoom())) &&
 			_actorToPrintStrFor == 255 && _string[textSlot].color != 0x0F &&
-			_enableEnhancements) {
+			enhancementClassActive(kEnhSubtitleFormatChanges)) {
 		// WORKAROUND: When Guybrush goes to the church at the end of Monkey1,
 		// the color for the ghost priest's lines is inconsistent in the v5
 		// releases (except for the SegaCD one with the smaller palette).
@@ -3433,7 +3432,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 			_game.platform != Common::kPlatformSegaCD &&
 			(vm.slot[_currentScript].number == 140 || vm.slot[_currentScript].number == 294) &&
 			_actorToPrintStrFor == 255 && _string[textSlot].color == 0x06 &&
-			_enableEnhancements) {
+			enhancementClassActive(kEnhSubtitleFormatChanges)) {
 		// WORKAROUND: In MI1 CD, the colors when the navigator head speaks are
 		// not the intended ones (dark purple instead of brown), because the
 		// original `Color(6)` parameter was kept without adjusting it for the
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index a64b6d62624..abc1e0f8564 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -887,7 +887,7 @@ void ScummEngine_v6::o6_startScript() {
 	// This also happens with the original interpreters and with the remaster.
 	if (_game.id == GID_TENTACLE && _roomResource == 13 &&
 		vm.slot[_currentScript].number == 21 && script == 106 &&
-		args[0] == 91 && _enableEnhancements) {
+		args[0] == 91 && enhancementClassActive(kEnhRestoredContent)) {
 		return;
 	}
 
@@ -905,7 +905,7 @@ void ScummEngine_v6::o6_startScript() {
 	// This fix checks for this situation happening (and only this one), and makes a call
 	// to a soundKludge operation like script 29 would have done.
 	if (_game.id == GID_CMI && _currentRoom == 19 &&
-		vm.slot[_currentScript].number == 168 && script == 118 && _enableEnhancements) {
+		vm.slot[_currentScript].number == 168 && script == 118 && enhancementClassActive(kEnhAudioChanges)) {
 		int list[16] = { 4096, 1278, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 		_sound->soundKludge(list, 2);
 	}
@@ -915,7 +915,7 @@ void ScummEngine_v6::o6_startScript() {
 	// stopping and starting their speech. This was a script bug in the original
 	// game, which would also block the "That was informative" reaction from Sam.
 	if (_game.id == GID_SAMNMAX && _roomResource == 59 &&
-		vm.slot[_currentScript].number == 201 && script == 48 && _enableEnhancements) {
+		vm.slot[_currentScript].number == 201 && script == 48 && enhancementClassActive(kEnhRestoredContent)) {
 		o6_breakHere();
 	}
 
@@ -1300,7 +1300,7 @@ void ScummEngine_v6::o6_loadRoom() {
 	// WORKAROUND bug #13378: During Sam's reactions to Max beating up the
 	// scientist in the intro, we sometimes have to slow down animations
 	// artificially. This is where we speed them back up again.
-	if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && room == 6 && _enableEnhancements) {
+	if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && room == 6 && enhancementClassActive(kEnhTimingChanges)) {
 		int actors[] = { 2, 3, 10 };
 
 		for (int i = 0; i < ARRAYSIZE(actors); i++) {
@@ -1426,7 +1426,7 @@ void ScummEngine_v6::o6_animateActor() {
 	int act = pop();
 
 	if (_game.id == GID_SAMNMAX && _roomResource == 35 && vm.slot[_currentScript].number == 202 &&
-		act == 4 && anim == 14 && _enableEnhancements) {
+		act == 4 && anim == 14 && enhancementClassActive(kEnhMinorBugFixes)) {
 		// WORKAROUND bug #2068 (Animation glitch at World of Fish).
 		// Before starting animation 14 of the fisherman, make sure he isn't
 		// talking anymore, otherwise the fishing line may appear twice when Max
@@ -1438,7 +1438,7 @@ void ScummEngine_v6::o6_animateActor() {
 	}
 
 	if (_game.id == GID_SAMNMAX && _roomResource == 47 && vm.slot[_currentScript].number == 202 &&
-		act == 2 && anim == 249 && _enableEnhancements) {
+		act == 2 && anim == 249 && enhancementClassActive(kEnhMinorBugFixes)) {
 		// WORKAROUND for bug #3832: parts of Bruno are left on the screen when he
 		// escapes Bumpusville with Trixie. Bruno (act. 11) and Trixie (act. 12) are
 		// properly removed from the scene by the script, but not the combined actor
@@ -1725,7 +1725,7 @@ void ScummEngine_v6::o6_beginOverride() {
 	//
 	// To amend this, we intercept this exact script override and we force the playback of sound 2277,
 	// which is the iMUSE sequence which would have been played after the dialogue.
-	if (_enableEnhancements && _game.id == GID_CMI && _currentRoom == 37 && vm.slot[_currentScript].number == 251 &&
+	if (enhancementClassActive(kEnhAudioChanges) && _game.id == GID_CMI && _currentRoom == 37 && vm.slot[_currentScript].number == 251 &&
 		_sound->isSoundRunning(2275) != 0 && (_scriptPointer - _scriptOrgPointer) == 0x1A) {
 		int list[16] = {0x1001, 2277, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 		_sound->soundKludge(list, 2);
@@ -2034,7 +2034,7 @@ void ScummEngine_v6::o6_actorOps() {
 		// chattering teeth, but yet when he comes back he's not wearing them
 		// during this cutscene.
 		if (_game.id == GID_TENTACLE && _currentRoom == 13 && vm.slot[_currentScript].number == 211 &&
-			a->_number == 8 && i == 53 && _enableEnhancements) {
+			a->_number == 8 && i == 53 && enhancementClassActive(kEnhVisualChanges)) {
 			i = 69;
 		}
 		a->setActorCostume(i);
@@ -2654,7 +2654,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// will feel off -- so we can't use the _forcedWaitForMessage trick.
 	if (_game.id == GID_SAMNMAX && _roomResource == 11 && vm.slot[_currentScript].number == 67
 		&& getOwner(70) != 2 && !readVar(0x8000 + 67) && !readVar(0x8000 + 39) && readVar(0x8000 + 12) == 1
-		&& !getClass(126, 6) && _enableEnhancements) {
+		&& !getClass(126, 6) && enhancementClassActive(kEnhRestoredContent)) {
 		if (VAR(VAR_HAVE_MSG)) {
 			_scriptPointer--;
 			o6_breakHere();
@@ -2669,7 +2669,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// a talkActor opcode.
 	if (_game.id == GID_TENTACLE && vm.slot[_currentScript].number == 307
 			&& VAR(VAR_EGO) != 2 && _actorToPrintStrFor == 2
-			&& _enableEnhancements) {
+			&& enhancementClassActive(kEnhMinorBugFixes)) {
 		_scriptPointer += resStrLen(_scriptPointer) + 1;
 		return;
 	}
@@ -2680,7 +2680,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// hasn't been properly replaced... Fixed in the 2017 remaster, though.
 	if (_game.id == GID_FT && _language == Common::FR_FRA
 		&& _roomResource == 7 && vm.slot[_currentScript].number == 77
-		&& _actorToPrintStrFor == 1 && _enableEnhancements) {
+		&& _actorToPrintStrFor == 1 && enhancementClassActive(kEnhTextLocFixes)) {
 		const int len = resStrLen(_scriptPointer) + 1;
 		if (len == 93 && memcmp(_scriptPointer + 16 + 18, "piano-low-kick", 14) == 0) {
 			byte *tmpBuf = new byte[len - 14 + 3];
@@ -2706,7 +2706,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// no stable offset for all the floppy, CD and translated versions, and
 	// no easy way to only target the impacted lines.
 	if (_game.id == GID_TENTACLE && vm.slot[_currentScript].number == 9
-		&& vm.localvar[_currentScript][0] == 216 && _actorToPrintStrFor == 4 && _enableEnhancements) {
+		&& vm.localvar[_currentScript][0] == 216 && _actorToPrintStrFor == 4 && enhancementClassActive(kEnhRestoredContent)) {
 		_forcedWaitForMessage = true;
 		_scriptPointer--;
 
@@ -2724,7 +2724,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// [0166] (73)   } else {
 	//
 	// Here we simulate that opcode.
-	if (_game.id == GID_DIG && vm.slot[_currentScript].number == 88 && _enableEnhancements) {
+	if (_game.id == GID_DIG && vm.slot[_currentScript].number == 88 && enhancementClassActive(kEnhRestoredContent)) {
 		if (offset == 0x158 || offset == 0x214 || offset == 0x231 || offset == 0x278) {
 			_forcedWaitForMessage = true;
 			_scriptPointer--;
@@ -2743,7 +2743,7 @@ void ScummEngine_v6::o6_talkActor() {
 	if (_game.id == GID_DIG && _roomResource == 58 && vm.slot[_currentScript].number == 402
 		&& _actorToPrintStrFor == 3 && vm.localvar[_currentScript][0] == 0
 		&& readVar(0x8000 + 94) && readVar(0x8000 + 78) && !readVar(0x8000 + 97)
-		&& _scummVars[269] == 3 && getState(388) == 2 && _enableEnhancements) {
+		&& _scummVars[269] == 3 && getState(388) == 2 && enhancementClassActive(kEnhRestoredContent)) {
 		_forcedWaitForMessage = true;
 		_scriptPointer--;
 
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 1f96fc29f9a..793dddc8d7b 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -928,8 +928,7 @@ Common::Error ScummEngine::init() {
 	}
 
 	// Register original bug fixes as defaults...
-	ConfMan.registerDefault("enhancements", kEnhGameBreakingBugs | kEnhGrp0);
-	_enableEnhancements = ConfMan.getInt("enhancements") != 0; // TODO
+	ConfMan.registerDefault("enhancements", kEnhGameBreakingBugFixes | kEnhGrp0);
 	_activeEnhancements = (int32)ConfMan.getInt("enhancements");
 	_enableAudioOverride = ConfMan.getBool("audio_override");
 
@@ -1334,7 +1333,7 @@ void ScummEngine::setupScumm(const Common::String &macResourceFile) {
 	// types of them.
 	if (ConfMan.hasKey("enable_enhancements")) {
 		if (!ConfMan.hasKey("enhancements")) {
-			ConfMan.setInt("enhancements", ConfMan.getBool("enable_enhancements") ? kEnhGameBreakingBugs | kEnhGrp0 : 0);
+			ConfMan.setInt("enhancements", ConfMan.getBool("enable_enhancements") ? kEnhGameBreakingBugFixes | kEnhGrp0 : 0);
 		}
 		ConfMan.removeKey("enable_enhancements", ConfMan.getActiveDomainName());
 		ConfMan.flushToDisk();
@@ -1483,7 +1482,7 @@ void ScummEngine::setupScumm(const Common::String &macResourceFile) {
 	}
 
 	// Skip the sound pre-loading
-	if (_game.id == GID_SAMNMAX && _bootParam == 0 && _enableEnhancements) {
+	if (_game.id == GID_SAMNMAX && _bootParam == 0 && enhancementClassActive(kEnhUIUX)) {
 		_bootParam = -1;
 	}
 
@@ -2405,7 +2404,7 @@ Common::Error ScummEngine::go() {
 		// custom names for save states. We do this in order to avoid
 		// lag and/or lose keyboard inputs.
 
-		if (_enableEnhancements) {
+		if (enhancementClassActive(kEnhUIUX)) {
 			// INDY3:
 			if (_game.id == GID_INDY3 && _currentRoom == 14) {
 				delta = 3;
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 1d52f3e0218..f8ef9fb2a52 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -550,8 +550,7 @@ public:
 	ResourceManager *_res = nullptr;
 	int _insideCreateResource = 0; // Counter for HE sound
 
-	bool _enableEnhancements = false;
-	int32 _activeEnhancements = 0;
+	int32 _activeEnhancements = kEnhGameBreakingBugFixes;
 	bool _useOriginalGUI = true;
 	bool _enableAudioOverride = false;
 	bool _enableCOMISong = false;
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 94e4215f756..070873f1df9 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -1442,7 +1442,7 @@ void Sound::startCDTimer() {
 	// LOOM Steam uses a fixed 240Hz rate. This was probably done to get rid of some
 	// audio glitches which are confirmed to be in the original. So let's activate this
 	// fix for the DOS version of LOOM as well, if enhancements are enabled.
-	if (_isLoomSteam || (_vm->_game.id == GID_LOOM && _vm->_enableEnhancements))
+	if (_isLoomSteam || (_vm->_game.id == GID_LOOM && _vm->enhancementClassActive(kEnhMinorBugFixes)))
 		interval = 1000000 / LOOM_STEAM_CDDA_RATE;
 
 	_vm->getTimerManager()->removeTimerProc(&cdTimerHandler);
@@ -1676,7 +1676,7 @@ int ScummEngine::readSoundResource(ResId idx) {
 				// Some of the Mac MI2 music only exists as Roland tracks. The
 				// original interpreter doesn't play them. I don't think there
 				// is any similarly missing FoA music.
-				if (_game.id == GID_MONKEY2 && _game.platform == Common::kPlatformMacintosh && !_enableEnhancements) {
+				if (_game.id == GID_MONKEY2 && _game.platform == Common::kPlatformMacintosh && !enhancementClassActive(kEnhAudioChanges)) {
 					pri = -1;
 					break;
 				}
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 7867f0992f8..72f67c01955 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -70,7 +70,7 @@ void ScummEngine::printString(int m, const byte *msg) {
 			vm.slot[_currentScript].number == 203 &&
 			_actorToPrintStrFor == 255 && strcmp((const char *)msg, " ") == 0 &&
 			getOwner(200) == VAR(VAR_EGO) && VAR(VAR_HAVE_MSG) &&
-			_enableEnhancements) {
+			enhancementClassActive(kEnhMinorBugFixes)) {
 			return;
 		}
 
@@ -82,7 +82,7 @@ void ScummEngine::printString(int m, const byte *msg) {
 		// In the italian CD version, the whole scene is sped up to
 		// keep up with Sam's speech. We compensate for this by slowing
 		// down the other animations.
-		if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && _enableEnhancements) {
+		if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && enhancementClassActive(kEnhTimingChanges)) {
 			Actor *a;
 
 			if (_language == Common::DE_DEU && strcmp(_game.variant, "Floppy") != 0) {
@@ -214,7 +214,7 @@ bool ScummEngine::handleNextCharsetCode(Actor *a, int *code) {
 			// one or more embedded "wait" codes. Rather than
 			// relying on the calculated talk delay, hard-code
 			// better ones.
-			if (_game.id == GID_SAMNMAX && _enableEnhancements && isScriptRunning(65)) {
+			if (_game.id == GID_SAMNMAX && enhancementClassActive(kEnhTimingChanges) && isScriptRunning(65)) {
 				typedef struct {
 					const char *str;
 					const int16 talkDelay;
@@ -1479,7 +1479,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
 					// uses `startAnim(7)` for this.
 					if (_game.id == GID_SAMNMAX && _currentRoom == 52 && vm.slot[_currentScript].number == 102 &&
 						chr == 9 && readVar(0x8000 + 95) != 0 && (VAR(171) == 997 || VAR(171) == 998) &&
-						dst[-2] == 8 && _enableEnhancements) {
+						dst[-2] == 8 && enhancementClassActive(kEnhMinorBugFixes)) {
 						dst[-2] = 7;
 					}
 
@@ -1510,7 +1510,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
 	// WORKAROUND bug #12249 (occurs also in original): Missing actor animation in German versions of SAMNMAX
 	// Adding the missing startAnim(14) animation escape sequence while copying the text fixes it.
 	if (_game.id == GID_SAMNMAX && _currentRoom == 56 && vm.slot[_currentScript].number == 200 &&
-		_language == Common::DE_DEU && _enableEnhancements) {
+		_language == Common::DE_DEU && enhancementClassActive(kEnhMinorBugFixes)) {
 		// 0xE5E6 is the CD version, 0xE373 is for the floppy version
 		if (vm.slot[_currentScript].offs == 0xE5E6 || vm.slot[_currentScript].offs == 0xE373) {
 			*dst++ = 0xFF;


Commit: 13fb771bf3bcad1cb8a0083454c09feabba8bbb1
    https://github.com/scummvm/scummvm/commit/13fb771bf3bcad1cb8a0083454c09feabba8bbb1
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Convert enable_enhancements to new flags

Changed paths:
    engines/scumm/scumm.cpp


diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 793dddc8d7b..84c81ec86f0 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -929,6 +929,14 @@ Common::Error ScummEngine::init() {
 
 	// Register original bug fixes as defaults...
 	ConfMan.registerDefault("enhancements", kEnhGameBreakingBugFixes | kEnhGrp0);
+	if (!ConfMan.hasKey("enhancements", _targetName)) {
+		if (ConfMan.hasKey("enable_enhancements", _targetName) && ConfMan.getBool("enable_enhancements", _targetName)) {
+			// Was the "enable_enhancements" key previously set to true?
+			// Convert it to a full activation of the enhancement flags then!
+			ConfMan.setInt("enhancements", kEnhGameBreakingBugFixes | kEnhGrp0 | kEnhGrp1 | kEnhGrp2 | kEnhGrp3);
+		}
+	}
+
 	_activeEnhancements = (int32)ConfMan.getInt("enhancements");
 	_enableAudioOverride = ConfMan.getBool("audio_override");
 


Commit: 2c474ff1631e5a784b8a851d92d48c2be7991b42
    https://github.com/scummvm/scummvm/commit/2c474ff1631e5a784b8a851d92d48c2be7991b42
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Insert comment explaining enhancement categories in detail

Changed paths:
    engines/scumm/detection.h


diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index dedca919803..e135322fbe8 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -37,6 +37,7 @@ namespace Scumm {
 #define GUIO_NETWORK                                   GUIO_GAMEOPTIONS6
 
 /* Game enhancements */
+
 enum {
 	kEnhGameBreakingBugFixes  = 1 << 0, // Gamebreaking Bug Fixes
 	kEnhMinorBugFixes         = 1 << 1, // Minor Bug Fixes
@@ -49,6 +50,41 @@ enum {
 	kEnhUIUX                  = 1 << 8, // UI/UX Enhancements
 };
 
+/* How are the enhancements grouped? - A practical guide to follow if you're lost:
+*
+*  GROUP 1: Fix original bugs
+*
+*  This category includes both game-breaking bugs which cause the game to crash/deadlock and
+*  minor bug fixes (e.g. text and localization issues). Enhancements in this category should
+*  pertain stuff which is very clearly a bug (for example a badly shaped walkbox, a wrong accent
+*  in a word from the subtitles, a strip of pixels which is very clearly out of place/with the
+*  wrong palette, AND NOT include things like subtitles and boxes color changes, enhancements
+*  which make a version similar to another, etc.). Basically when this and only this is active,
+*  the game should not have deadlock situations and the immersiveness should not be broken by
+*  very evident graphical glitches, charset issues, etc.
+*
+*  GROUP 2: Audio-visual improvements
+*
+*  This category comprises visual and audio changes as well as timing adjustments. This is the
+*  category in which we can basically put everything which I said not to put in the previous
+*  category. This includes: changing the spacing of the font from the original, changing colors
+*  of subtitles for consistency, changes to the subtitles content in order to match the speech
+*  or to fix the localization, music changes (like the ones in COMI and FT), graphic changes
+*  which are not as essential as the ones from the previous category, etc.
+*
+*  GROUP 3: Restored content
+*
+*  This category reintroduces content cut or unused which was not in the original. This
+*  can include content which was somehow masked by mistake by the scripts.
+*
+*  GROUP 4:
+*
+*  This category pertains to all enhancements to the user interface and user experience:
+*  e.g. the artificial loading screen at the beginning of Sam&Max, speeding up the framerate
+*  in old original menus to have a decent keyboard polling rate.
+*
+*/
+
 enum {
 	kEnhGrp0 = (kEnhMinorBugFixes | kEnhTextLocFixes),
 	kEnhGrp1 = (kEnhVisualChanges | kEnhAudioChanges | kEnhTimingChanges | kEnhSubtitleFormatChanges),


Commit: c6872cdbbff253f08adf649928eb67cf33f4fcc9
    https://github.com/scummvm/scummvm/commit/c6872cdbbff253f08adf649928eb67cf33f4fcc9
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Clean-up for enhancement groupings

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


diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index e135322fbe8..116a44b1876 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -77,7 +77,7 @@ enum {
 *  This category reintroduces content cut or unused which was not in the original. This
 *  can include content which was somehow masked by mistake by the scripts.
 *
-*  GROUP 4:
+*  GROUP 4: Modern UI/UX adjustments
 *
 *  This category pertains to all enhancements to the user interface and user experience:
 *  e.g. the artificial loading screen at the beginning of Sam&Max, speeding up the framerate
@@ -86,10 +86,10 @@ enum {
 */
 
 enum {
-	kEnhGrp0 = (kEnhMinorBugFixes | kEnhTextLocFixes),
-	kEnhGrp1 = (kEnhVisualChanges | kEnhAudioChanges | kEnhTimingChanges | kEnhSubtitleFormatChanges),
-	kEnhGrp2 = (kEnhRestoredContent),
-	kEnhGrp3 = (kEnhUIUX)
+	kEnhGrp1 = (kEnhMinorBugFixes | kEnhTextLocFixes),
+	kEnhGrp2 = (kEnhVisualChanges | kEnhAudioChanges | kEnhTimingChanges | kEnhSubtitleFormatChanges),
+	kEnhGrp3 = (kEnhRestoredContent),
+	kEnhGrp4 = (kEnhUIUX)
 };
 
 /**
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 07807b615a0..4101db77e5f 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -1052,9 +1052,6 @@ void ScummOptionsContainerWidget::load() {
 
 		if (_enhancementsCheckboxes[i]) {
 			switch (_enhancementsCheckboxes[i]->getCmd()) {
-			case kEnhancementGroup0Cmd:
-				targetFlags |= kEnhGrp0;
-				break;
 			case kEnhancementGroup1Cmd:
 				targetFlags |= kEnhGrp1;
 				break;
@@ -1064,6 +1061,9 @@ void ScummOptionsContainerWidget::load() {
 			case kEnhancementGroup3Cmd:
 				targetFlags |= kEnhGrp3;
 				break;
+			case kEnhancementGroup4Cmd:
+				targetFlags |= kEnhGrp4;
+				break;
 			default:
 				break;
 			}
@@ -1079,14 +1079,6 @@ bool ScummOptionsContainerWidget::save() {
 	for (uint i = 0; i < _enhancementsCheckboxes.size(); i++) {
 		if (_enhancementsCheckboxes[i]) {
 			switch (_enhancementsCheckboxes[i]->getCmd()) {
-			case kEnhancementGroup0Cmd:
-				if (_enhancementsCheckboxes[i]->getState()) {
-					enhancementsFlags |= kEnhGrp0;
-				} else {
-					enhancementsFlags &= ~kEnhGrp0;
-				}
-				break;
-
 			case kEnhancementGroup1Cmd:
 				if (_enhancementsCheckboxes[i]->getState()) {
 					enhancementsFlags |= kEnhGrp1;
@@ -1111,6 +1103,14 @@ bool ScummOptionsContainerWidget::save() {
 				}
 				break;
 
+			case kEnhancementGroup4Cmd:
+				if (_enhancementsCheckboxes[i]->getState()) {
+					enhancementsFlags |= kEnhGrp4;
+				} else {
+					enhancementsFlags &= ~kEnhGrp4;
+				}
+				break;
+
 			default:
 				break;
 			}
@@ -1127,19 +1127,27 @@ void ScummOptionsContainerWidget::createEnhancementsWidget(GuiObject *boss, cons
 	text->setAlign(Graphics::TextAlign::kTextAlignStart);
 
 	// I18N: Game enhancements groups
-	GUI::CheckboxWidget *enh0 = new GUI::CheckboxWidget(boss, name + ".enhancementGroup0",
-		_("Fix original bugs"), _("tooltip"), kEnhancementGroup0Cmd);
 	GUI::CheckboxWidget *enh1 = new GUI::CheckboxWidget(boss, name + ".enhancementGroup1",
-		_("Audio-visual improvements"), _("tooltip"), kEnhancementGroup1Cmd);
+		_("Fix original bugs"),
+		_("Fixes bugs which were present in the original release, and noticeable graphical/audio glitches."),
+		kEnhancementGroup1Cmd);
 	GUI::CheckboxWidget *enh2 = new GUI::CheckboxWidget(boss, name + ".enhancementGroup2",
-		_("Restored content"), _("tooltip"), kEnhancementGroup2Cmd);
+		_("Audio-visual improvements"),
+		_("Makes adjustments not related to bugs for certain audio and graphics elements (e.g. version consistency changes)."),
+		kEnhancementGroup2Cmd);
 	GUI::CheckboxWidget *enh3 = new GUI::CheckboxWidget(boss, name + ".enhancementGroup3",
-		_("Modern UI/UX adjustments"), _("tooltip"), kEnhancementGroup3Cmd);
+		_("Restored content"),
+		_("Restores dialogs, graphics, and audio elements which were originally cut in the original release."),
+		kEnhancementGroup3Cmd);
+	GUI::CheckboxWidget *enh4 = new GUI::CheckboxWidget(boss, name + ".enhancementGroup4",
+		_("Modern UI/UX adjustments"),
+		_("Activates some modern comforts; e.g it removes the fake sound loading screen in Sam&Max, and makes early save menus snappier."),
+		kEnhancementGroup4Cmd);
 
-	_enhancementsCheckboxes.push_back(enh0);
 	_enhancementsCheckboxes.push_back(enh1);
 	_enhancementsCheckboxes.push_back(enh2);
 	_enhancementsCheckboxes.push_back(enh3);
+	_enhancementsCheckboxes.push_back(enh4);
 }
 
 GUI::ThemeEval &ScummOptionsContainerWidget::addEnhancementsLayout(GUI::ThemeEval &layouts) const {
@@ -1147,10 +1155,10 @@ GUI::ThemeEval &ScummOptionsContainerWidget::addEnhancementsLayout(GUI::ThemeEva
 	layouts.addPadding(0, 0, 8, 8)
 		.addSpace(10)
 		.addWidget("enhancementsLabel", "OptionsLabel")
-		.addWidget("enhancementGroup0", "Checkbox")
 		.addWidget("enhancementGroup1", "Checkbox")
 		.addWidget("enhancementGroup2", "Checkbox")
-		.addWidget("enhancementGroup3", "Checkbox");
+		.addWidget("enhancementGroup3", "Checkbox")
+		.addWidget("enhancementGroup4", "Checkbox");
 
 	return layouts;
 }
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 0958cfaf657..ea15e8d2449 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -226,10 +226,10 @@ public:
 	}
 
 	enum {
-		kEnhancementGroup0Cmd = 'ENH0',
 		kEnhancementGroup1Cmd = 'ENH1',
 		kEnhancementGroup2Cmd = 'ENH2',
-		kEnhancementGroup3Cmd = 'ENH3'
+		kEnhancementGroup3Cmd = 'ENH3',
+		kEnhancementGroup4Cmd = 'ENH4'
 	};
 
 	void load() override;
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index bed9ab59d42..58b004bb632 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -784,7 +784,7 @@ void ScummMetaEngine::registerDefaultSettings(const Common::String &) const {
 	const ExtraGuiOptions engineOptions = getExtraGuiOptions("");
 	for (uint i = 0; i < engineOptions.size(); i++) {
 		if (strcmp(engineOptions[i].configOption, "enhancements") == 0)
-			ConfMan.registerDefault(engineOptions[i].configOption, kEnhGameBreakingBugFixes | kEnhGrp0);
+			ConfMan.registerDefault(engineOptions[i].configOption, kEnhGameBreakingBugFixes | kEnhGrp1);
 		else
 			ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
 	}
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 84c81ec86f0..3ff80787d08 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -928,12 +928,12 @@ Common::Error ScummEngine::init() {
 	}
 
 	// Register original bug fixes as defaults...
-	ConfMan.registerDefault("enhancements", kEnhGameBreakingBugFixes | kEnhGrp0);
+	ConfMan.registerDefault("enhancements", kEnhGameBreakingBugFixes | kEnhGrp1);
 	if (!ConfMan.hasKey("enhancements", _targetName)) {
 		if (ConfMan.hasKey("enable_enhancements", _targetName) && ConfMan.getBool("enable_enhancements", _targetName)) {
 			// Was the "enable_enhancements" key previously set to true?
 			// Convert it to a full activation of the enhancement flags then!
-			ConfMan.setInt("enhancements", kEnhGameBreakingBugFixes | kEnhGrp0 | kEnhGrp1 | kEnhGrp2 | kEnhGrp3);
+			ConfMan.setInt("enhancements", kEnhGameBreakingBugFixes | kEnhGrp1 | kEnhGrp2 | kEnhGrp3 | kEnhGrp4);
 		}
 	}
 
@@ -1341,7 +1341,7 @@ void ScummEngine::setupScumm(const Common::String &macResourceFile) {
 	// types of them.
 	if (ConfMan.hasKey("enable_enhancements")) {
 		if (!ConfMan.hasKey("enhancements")) {
-			ConfMan.setInt("enhancements", ConfMan.getBool("enable_enhancements") ? kEnhGameBreakingBugFixes | kEnhGrp0 : 0);
+			ConfMan.setInt("enhancements", ConfMan.getBool("enable_enhancements") ? kEnhGameBreakingBugFixes | kEnhGrp1 : 0);
 		}
 		ConfMan.removeKey("enable_enhancements", ConfMan.getActiveDomainName());
 		ConfMan.flushToDisk();


Commit: e7f4f25881739d08db4ad95dd19143d4daa8b079
    https://github.com/scummvm/scummvm/commit/e7f4f25881739d08db4ad95dd19143d4daa8b079
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Clean-up and explain enhancement classes

Changed paths:
    engines/scumm/charset.cpp
    engines/scumm/detection.h
    engines/scumm/he/script_v72he.cpp
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index e3226423a12..5f34ae4944f 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -1558,7 +1558,7 @@ CharsetRendererMac::CharsetRendererMac(ScummEngine *vm, const Common::String &fo
 	// (At the time of writing, there are still cases, at least in Loom,
 	// where text isn't correctly positioned.)
 
-	_useCorrectFontSpacing = _vm->_game.id == GID_LOOM || _vm->enhancementClassActive(kEnhSubtitleFormatChanges);
+	_useCorrectFontSpacing = _vm->_game.id == GID_LOOM || _vm->enhancementClassActive(kEnhSubFmtCntChanges);
 	_pad = false;
 	_glyphSurface = nullptr;
 
diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index 116a44b1876..aa7e1920354 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -38,19 +38,111 @@ namespace Scumm {
 
 /* Game enhancements */
 
+/* "How should I mark an enhancement?" - A practical guide for the developer:
+*
+*  Hi! If you're here it means that you are probably trying to make up
+*  your mind about how to correctly mark your brand new game enhancement:
+*  if that's the case... congratulations, you've come to the right place! :-)
+*
+*  Marking a piece of code as an enhancement is as simple as guarding it with
+*  a conditional check using the enhancementClassActive(<class>) function.
+*  For example:
+*
+*      if (enhancementClassActive(<kMyBeautifulEnhancementClass>)) {
+*          // Piece of code which makes Guybrush hair white
+*      }
+*
+*  That's it! :-)
+*
+*  You've probably noticed that the function above needs a class in order to work.
+*  Of course there is no one kind of enhancement: each of them might tackle
+*  different aspect of the game, from the graphics to the gameplay itself.
+*  So it all comes to identifying the correct class for your enhancement.
+*
+*  We identify nine different enhancement classes:
+*
+*  --- Gamebreaking Bug Fixes ---
+*
+*  This is a class of enhancements which is ALWAYS active; it encapsulates
+*  code changes which were not in the original game but which are absolutely
+*  necessary in order to avoid deadlocks or even crashes! Being able to differentiate
+*  between original code and these enhancements can be quite useful for future
+*  developers and their research (e.g. "why is this code different from the disassembly?",
+*  "why did they change it like that?").
+*
+*  --- Minor Bug Fixes ---
+*
+*  Did the original developers blit a green pixel on a blue tinted background
+*  and YOU'RE ABSOLUTELY SURE that they didn't do that on purpose? Is one of the
+*  voice files playing as garbled noise instead of sounding like normal speech?
+*  Is the game looking like there is something which is clearly wrong with it?
+*  This is the class you're looking for, then!
+*
+*  --- Text and Localization Fixes ---
+*
+*  If you spot any issues which pertain texts (accents not being rendered properly
+*  on localizations, placeholder lines forgotten by the developers, obvious typos), and
+*  which are NOT about the format of the subtitle (color, position) or the content,
+*  then this is the class you should be using.
+*  Do not use this class when changing an already grammatically correct line to another
+*  line for the purpose of matching the text to the speech line!
+*  Use "Subtitle Format/Content Changes" instead.
+*
+*  --- Visual Changes ---
+*
+*  Any graphical change which is not classifiable as a "fix" but is, as a matter of fact,
+*  a deliberate change which strays away from the original intentions, should be marked
+*  with this class. Some examples of this are enhancements which modify palettes and add
+*  or edit graphical elements in order to better match a particular "reference" version.
+*
+*  --- Audio Changes ---
+*
+*  Like above, but for anything sound related.
+*
+*  --- Timing Adjustments ---
+*
+*  Are you making a scene slower or faster for any reason? Are you changing the framerate
+*  of an in-game situation? Choose this class!
+*
+*  --- Subtitles Format/Content Changes ---
+*
+*  Any changes to the subtitles format should be classified under this class.
+*  This also includes changes to the subtitles content when not under the "fix" umbrella,
+*  for example when you are changing an already grammatically and graphically correct line
+*  to match it with the corresponding speech file.
+*
+*  --- Restored Cut Content ---
+*
+*  Have you found any line of dialog, a graphical element or even a piece of music which
+*  is in the game data but is not being used? Go nuts with this enhancement class then! :-)
+*
+*  --- UI/UX Enhancements ---
+*
+*  These old games are beautiful. But sometimes they can be so clunky... :-)
+*  If you make any changes in order to yield a slightly-less-clunky user experience
+*  you should classify them under this class. Here's a couple of real use cases:
+*  - SAMNMAX:     the CD version of the game begins with what seems to be a fake loading
+*                 screen for the sounds. We have an enhancement which just skips that :-)
+*  - Early games: some early titles use a save menu screen which is piloted by SCUMM scripts,
+*                 and therefore run at an in-game framerate. This causes lag and lost keypresses
+*                 from your keyboard when attempting to write the names of your savegames.
+*                 We remove the framerate cap so that writing is not painful anymore... :-P
+*
+*/
+
 enum {
 	kEnhGameBreakingBugFixes  = 1 << 0, // Gamebreaking Bug Fixes
 	kEnhMinorBugFixes         = 1 << 1, // Minor Bug Fixes
 	kEnhTextLocFixes          = 1 << 2, // Text and Localization Fixes
-	kEnhVisualChanges         = 1 << 3, // Visual Corrections
-	kEnhAudioChanges          = 1 << 4, // Audio Corrections
+	kEnhVisualChanges         = 1 << 3, // Visual Changes
+	kEnhAudioChanges          = 1 << 4, // Audio Changes
 	kEnhTimingChanges         = 1 << 5, // Timing Adjustments
-	kEnhSubtitleFormatChanges = 1 << 6, // Subtitle Color/Format Corrections
+	kEnhSubFmtCntChanges      = 1 << 6, // Subtitles Format/Content Changes
 	kEnhRestoredContent       = 1 << 7, // Restored Cut Content
 	kEnhUIUX                  = 1 << 8, // UI/UX Enhancements
 };
 
-/* How are the enhancements grouped? - A practical guide to follow if you're lost:
+/* "How are the enhancements grouped?" - A practical guide to follow if you're lost:
 *
 *  GROUP 1: Fix original bugs
 *
@@ -87,7 +179,7 @@ enum {
 
 enum {
 	kEnhGrp1 = (kEnhMinorBugFixes | kEnhTextLocFixes),
-	kEnhGrp2 = (kEnhVisualChanges | kEnhAudioChanges | kEnhTimingChanges | kEnhSubtitleFormatChanges),
+	kEnhGrp2 = (kEnhVisualChanges | kEnhAudioChanges | kEnhTimingChanges | kEnhSubFmtCntChanges),
 	kEnhGrp3 = (kEnhRestoredContent),
 	kEnhGrp4 = (kEnhUIUX)
 };
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 3447066367d..142046d17e3 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -907,7 +907,7 @@ void ScummEngine_v72he::o72_actorOps() {
 		a->_talkColor = pop();
 		// WORKAROUND bug #13730: defined subtitles color 16 is very dark and hard to read on the dark background.
 		// we change it to brighter color to ease reading.
-		if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && a->_talkColor == 16 && enhancementClassActive(kEnhSubtitleFormatChanges))
+		if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && a->_talkColor == 16 && enhancementClassActive(kEnhSubFmtCntChanges))
 			a->_talkColor = 200;
 		break;
 	case SO_ACTOR_NAME:
@@ -2189,7 +2189,7 @@ void ScummEngine_v72he::decodeParseString(int m, int n) {
 			_string[m].color = pop();
 			// WORKAROUND bug #13730: defined subtitles color 16 is very dark and hard to read on the dark background.
 			// we change it to brighter color to ease reading.
-			if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && _string[m].color == 16 && enhancementClassActive(kEnhSubtitleFormatChanges))
+			if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && _string[m].color == 16 && enhancementClassActive(kEnhSubFmtCntChanges))
 				_string[m].color = 200;
 		} else {
 			push(colors);
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index f40ce587896..8f6bbc59de5 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -3332,13 +3332,13 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 		// a typo...
 		printString(textSlot, (const byte *)"I am Chaos.");
 	} else if (_game.id == GID_LOOM && _game.version == 4 && _roomResource == 90 &&
-			   vm.slot[_currentScript].number == 203 && _string[textSlot].color == 0x0F && enhancementClassActive(kEnhSubtitleFormatChanges)) {
+			   vm.slot[_currentScript].number == 203 && _string[textSlot].color == 0x0F && enhancementClassActive(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: When Mandible speaks with Goodmold, his second
 		// speech line is missing its color parameter.
 		_string[textSlot].color = 0x0A;
 		printString(textSlot, _scriptPointer);
 	} else if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns && _roomResource == 80 &&
-			   vm.slot[_currentScript].number == 201 && enhancementClassActive(kEnhSubtitleFormatChanges)) {
+			   vm.slot[_currentScript].number == 201 && enhancementClassActive(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: When Indy and his father escape the zeppelin
 		// with the biplane in the FM-TOWNS version, they share the
 		// same text color. Indeed, they're not given any explicit
@@ -3369,7 +3369,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 		printString(textSlot, tmpBuf);
 	} else if (_game.id == GID_INDY4 && _language == Common::EN_ANY && _roomResource == 10 &&
 			vm.slot[_currentScript].number == 209 && _actorToPrintStrFor == 4 && len == 81 &&
-			strcmp(_game.variant, "Floppy") != 0 && enhancementClassActive(kEnhSubtitleFormatChanges)) {
+			strcmp(_game.variant, "Floppy") != 0 && enhancementClassActive(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: The English Talkie version of Indy4 changed Kerner's
 		// lines when he uses the phone booth in New York, but the text doesn't
 		// match the voice and it mentions the wrong person, in most releases.
@@ -3420,7 +3420,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 			(_roomResource == 45 && vm.slot[_currentScript].number == 200 &&
 			isValidActor(10) && _actors[10]->isInCurrentRoom())) &&
 			_actorToPrintStrFor == 255 && _string[textSlot].color != 0x0F &&
-			enhancementClassActive(kEnhSubtitleFormatChanges)) {
+			enhancementClassActive(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: When Guybrush goes to the church at the end of Monkey1,
 		// the color for the ghost priest's lines is inconsistent in the v5
 		// releases (except for the SegaCD one with the smaller palette).
@@ -3432,7 +3432,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 			_game.platform != Common::kPlatformSegaCD &&
 			(vm.slot[_currentScript].number == 140 || vm.slot[_currentScript].number == 294) &&
 			_actorToPrintStrFor == 255 && _string[textSlot].color == 0x06 &&
-			enhancementClassActive(kEnhSubtitleFormatChanges)) {
+			enhancementClassActive(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: In MI1 CD, the colors when the navigator head speaks are
 		// not the intended ones (dark purple instead of brown), because the
 		// original `Color(6)` parameter was kept without adjusting it for the


Commit: 8461f2521859e46295fa1080d665ace9cb7616fe
    https://github.com/scummvm/scummvm/commit/8461f2521859e46295fa1080d665ace9cb7616fe
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-08T11:46:06+01:00

Commit Message:
SCUMM: Rename enhancementClassActive to enhancementEnabled

Changed paths:
    engines/scumm/actor.cpp
    engines/scumm/akos.cpp
    engines/scumm/boxes.cpp
    engines/scumm/charset.cpp
    engines/scumm/costume.cpp
    engines/scumm/detection.h
    engines/scumm/dialogs.cpp
    engines/scumm/gfx.cpp
    engines/scumm/gfx_gui.cpp
    engines/scumm/gfx_mac.cpp
    engines/scumm/he/script_v72he.cpp
    engines/scumm/imuse_digi/dimuse_scripts.cpp
    engines/scumm/input.cpp
    engines/scumm/metaengine.cpp
    engines/scumm/object.cpp
    engines/scumm/players/player_towns.cpp
    engines/scumm/resource.cpp
    engines/scumm/resource_v4.cpp
    engines/scumm/script.cpp
    engines/scumm/script_v2.cpp
    engines/scumm/script_v5.cpp
    engines/scumm/script_v6.cpp
    engines/scumm/scumm.cpp
    engines/scumm/scumm.h
    engines/scumm/sound.cpp
    engines/scumm/string.cpp


diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index f60dad42e03..b7111322a71 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -417,7 +417,7 @@ void Actor_v3::setupActorScale() {
 	// in the German release (and then it'd probably be better to restore
 	// that safeguard instead, since the game clearly doesn't expect you
 	// to go back inside the castle), but I don't own this version.  -dwa
-	if (_number == 2 && _costume == 7 && _vm->_game.id == GID_INDY3 && _vm->_currentRoom == 12 && _vm->enhancementClassActive(kEnhMinorBugFixes)) {
+	if (_number == 2 && _costume == 7 && _vm->_game.id == GID_INDY3 && _vm->_currentRoom == 12 && _vm->enhancementEnabled(kEnhMinorBugFixes)) {
 		_scalex = 0x50;
 		_scaley = 0x50;
 	} else {
@@ -1648,7 +1648,7 @@ void Actor::putActor(int dstX, int dstY, int newRoom) {
 	// WORKAROUND: The green transparency of the tank in the Hall of Oddities
 	// is positioned one pixel too far to the left. This appears to be a bug
 	// in the original game as well.
-	if (_vm->_game.id == GID_SAMNMAX && newRoom == 16 && _number == 5 && dstX == 235 && dstY == 236 && _vm->enhancementClassActive(kEnhMinorBugFixes))
+	if (_vm->_game.id == GID_SAMNMAX && newRoom == 16 && _number == 5 && dstX == 235 && dstY == 236 && _vm->enhancementEnabled(kEnhMinorBugFixes))
 		dstX++;
 
 	_pos.x = dstX;
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 2ed04d8e481..7f96be622d3 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -418,7 +418,7 @@ byte AkosRenderer::drawLimb(const Actor *a, int limb) {
 			// WORKAROUND bug #13532: There is a frame (of Freddi's eye) in US release of Freddi 3 accidentaly being big
 			// and an horizontal line at the bottom, causing this line to appear at the bottom of the screen.
 			// We draw the whole frame one pixel down so it does not appear on screen.
-			if (_vm->_game.id == GID_FREDDI3 && _vm->_language == Common::EN_USA && a->_costume == 258 && (code & AKC_CelMask) == 35 && _vm->enhancementClassActive(kEnhVisualChanges))
+			if (_vm->_game.id == GID_FREDDI3 && _vm->_language == Common::EN_USA && a->_costume == 258 && (code & AKC_CelMask) == 35 && _vm->enhancementEnabled(kEnhVisualChanges))
 				yMoveCur += 1;
 
 			if (i == extra - 1) {
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index 5cb08719ba8..2fc8d7ed83b 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -176,7 +176,7 @@ byte ScummEngine::getMaskFromBox(int box) {
 	// stands at a specific place near Nur-Ab-Sal's abode. This is a bug in
 	// the data files, as it also occurs with the original engine. We work
 	// around it here anyway.
-	if (_game.id == GID_INDY4 && _currentRoom == 225 && _roomResource == 94 && box == 8 && enhancementClassActive(kEnhMinorBugFixes))
+	if (_game.id == GID_INDY4 && _currentRoom == 225 && _roomResource == 94 && box == 8 && enhancementEnabled(kEnhMinorBugFixes))
 		return 0;
 
 	if (_game.version == 8)
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 5f34ae4944f..1d0247496f4 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -1558,7 +1558,7 @@ CharsetRendererMac::CharsetRendererMac(ScummEngine *vm, const Common::String &fo
 	// (At the time of writing, there are still cases, at least in Loom,
 	// where text isn't correctly positioned.)
 
-	_useCorrectFontSpacing = _vm->_game.id == GID_LOOM || _vm->enhancementClassActive(kEnhSubFmtCntChanges);
+	_useCorrectFontSpacing = _vm->_game.id == GID_LOOM || _vm->enhancementEnabled(kEnhSubFmtCntChanges);
 	_pad = false;
 	_glyphSurface = nullptr;
 
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 61fced96542..03a08b12e1e 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -765,7 +765,7 @@ void ClassicCostumeLoader::loadCostume(int id) {
 	// WORKAROUND bug #13433: Guybrush can give the stick to two dogs: the one
 	// guarding the jail, and the one in front of the mansion. But the palette
 	// for this costume is invalid in the second case on Amiga, causing a glitch.
-	if (_vm->_game.id == GID_MONKEY2 && _vm->_game.platform == Common::kPlatformAmiga && _vm->_currentRoom == 53 && id == 55 && _numColors == 16 && _vm->enhancementClassActive(kEnhMinorBugFixes)) {
+	if (_vm->_game.id == GID_MONKEY2 && _vm->_game.platform == Common::kPlatformAmiga && _vm->_currentRoom == 53 && id == 55 && _numColors == 16 && _vm->enhancementEnabled(kEnhMinorBugFixes)) {
 		// Note: handmade, trying to match the colors between rooms 53 and 29,
 		// and based on (similar) costume 1.
 		_palette = amigaMonkey2Costume55Room53;
@@ -937,7 +937,7 @@ byte ClassicCostumeRenderer::drawLimb(const Actor *a, int limb) {
 
 			bool mirror = _mirror;
 
-			if (_vm->_game.id == GID_TENTACLE && _vm->_currentRoom == 61 && a->_number == 1 && _loaded._id == 324 && _vm->enhancementClassActive(kEnhMinorBugFixes)) {
+			if (_vm->_game.id == GID_TENTACLE && _vm->_currentRoom == 61 && a->_number == 1 && _loaded._id == 324 && _vm->enhancementEnabled(kEnhMinorBugFixes)) {
 				if (limb == 0) {
 					_mirror = true;
 					xmoveCur--;
diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index aa7e1920354..40f300bd59c 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -45,10 +45,10 @@ namespace Scumm {
 *  if that's the case... congratulations, you've come to the right place! :-)
 *
 *  Marking a piece of code as an enhancement is as simple as guarding it with
-*  a conditional check using the enhancementClassActive(<class>) function.
+*  a conditional check using the enhancementEnabled(<class>) function.
 *  For example:
 *
-*      if (enhancementClassActive(<kMyBeautifulEnhancementClass>)) {
+*      if (enhancementEnabled(<kMyBeautifulEnhancementClass>)) {
 *          // Piece of code which makes Guybrush hair white
 *      }
 *
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 4101db77e5f..14431407b15 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -455,7 +455,7 @@ const char *InfoDialog::getPlainEngineString(int stringno, bool forceHardcodedSt
 		result = (const char *)_vm->getStringAddressVar(string_map_table_v6[stringno - 1].num);
 
 		if (!result) {
-			if (stringno >= 22 && stringno <= 27 && _vm->_game.id == GID_TENTACLE && _vm->enhancementClassActive(kEnhTextLocFixes) && strcmp(_vm->_game.variant, "Floppy")) {
+			if (stringno >= 22 && stringno <= 27 && _vm->_game.id == GID_TENTACLE && _vm->enhancementEnabled(kEnhTextLocFixes) && strcmp(_vm->_game.variant, "Floppy")) {
 				result = getStaticResString(_vm->_language, stringno - 1).string;
 			} else {
 				result = string_map_table_v6[stringno - 1].string;
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index dc81a8c3dda..5e17e3d944c 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -2223,7 +2223,7 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width,
 	// FM-TOWNS release.  We take care not to apply this palette change to the
 	// text or inventory, as they still require the original colors.
 	if (_vm->_game.id == GID_INDY3 && (_vm->_game.features & GF_OLD256) && _vm->_game.platform != Common::kPlatformFMTowns
-		&& _vm->_roomResource == 46 && smapLen == 43159 && vs->number == kMainVirtScreen && _vm->enhancementClassActive(kEnhMinorBugFixes)) {
+		&& _vm->_roomResource == 46 && smapLen == 43159 && vs->number == kMainVirtScreen && _vm->enhancementEnabled(kEnhMinorBugFixes)) {
 		if (_roomPalette[11] == 11 && _roomPalette[86] == 86)
 			_roomPalette[11] = 86;
 		if (_roomPalette[13] == 13 && _roomPalette[80] == 80)
@@ -2246,7 +2246,7 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width,
 			_vm->_currentRoom == 36 &&
 			vs->number == kMainVirtScreen &&
 			y == 8 && x >= 7 && x <= 30 && height == 88 &&
-			_vm->enhancementClassActive(kEnhVisualChanges)) {
+			_vm->enhancementEnabled(kEnhVisualChanges)) {
 		_roomPalette[47] = 15;
 
 		byte result = decompressBitmap(dstPtr, vs->pitch, smap_ptr + offset, height);
@@ -2267,7 +2267,7 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width,
 			_vm->_currentRoom == 11 &&
 			vs->number == kMainVirtScreen &&
 			y == 24 && x >= 28 && x <= 52 && height == 56 &&
-			_vm->enhancementClassActive(kEnhVisualChanges)) {
+			_vm->enhancementEnabled(kEnhVisualChanges)) {
 		_roomPalette[1] = 15;
 
 		byte result = decompressBitmap(dstPtr, vs->pitch, smap_ptr + offset, height);
diff --git a/engines/scumm/gfx_gui.cpp b/engines/scumm/gfx_gui.cpp
index aba6b40f80e..b99e8f1dbaa 100644
--- a/engines/scumm/gfx_gui.cpp
+++ b/engines/scumm/gfx_gui.cpp
@@ -2030,7 +2030,7 @@ void ScummEngine::queryQuit(bool returnToLauncher) {
 		// WORKAROUND: In the german version of LOOM FM-Towns, the string in the game data is stored with a '\r'
 		// character at the end. This means that the string being displayed on screen will end with "(J oder N)J",
 		// and localizedYesKey will be assigned to '\r'. Let's fix this by truncating the relevant string.
-		if (enhancementClassActive(kEnhMinorBugFixes) && _game.id == GID_LOOM &&
+		if (enhancementEnabled(kEnhMinorBugFixes) && _game.id == GID_LOOM &&
 			_game.platform == Common::kPlatformFMTowns &&
 			strstr(msgLabelPtr, "(J oder N)J\r")) {
 			msgLabelPtr[Common::strnlen(msgLabelPtr, sizeof(msgLabelPtr)) - 1] = '\0';
diff --git a/engines/scumm/gfx_mac.cpp b/engines/scumm/gfx_mac.cpp
index 89eabf4412a..5b81d66d722 100644
--- a/engines/scumm/gfx_mac.cpp
+++ b/engines/scumm/gfx_mac.cpp
@@ -82,7 +82,7 @@ void ScummEngine::mac_drawStripToScreen(VirtScreen *vs, int top, int x, int y, i
 	if (_renderMode == Common::kRenderMacintoshBW) {
 		for (int h = 0; h < height; h++) {
 			for (int w = 0; w < width; w++) {
-				int color = enhancementClassActive(kEnhVisualChanges) ? _shadowPalette[pixels[w]] : pixels[w];
+				int color = enhancementEnabled(kEnhVisualChanges) ? _shadowPalette[pixels[w]] : pixels[w];
 				if (ts[2 * w] == CHARSET_MASK_TRANSPARENCY)
 					mac[2 * w] = Graphics::macEGADither[color][0];
 				if (ts[2 * w + 1] == CHARSET_MASK_TRANSPARENCY)
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 142046d17e3..5a12c423c34 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -907,7 +907,7 @@ void ScummEngine_v72he::o72_actorOps() {
 		a->_talkColor = pop();
 		// WORKAROUND bug #13730: defined subtitles color 16 is very dark and hard to read on the dark background.
 		// we change it to brighter color to ease reading.
-		if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && a->_talkColor == 16 && enhancementClassActive(kEnhSubFmtCntChanges))
+		if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && a->_talkColor == 16 && enhancementEnabled(kEnhSubFmtCntChanges))
 			a->_talkColor = 200;
 		break;
 	case SO_ACTOR_NAME:
@@ -2189,7 +2189,7 @@ void ScummEngine_v72he::decodeParseString(int m, int n) {
 			_string[m].color = pop();
 			// WORKAROUND bug #13730: defined subtitles color 16 is very dark and hard to read on the dark background.
 			// we change it to brighter color to ease reading.
-			if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && _string[m].color == 16 && enhancementClassActive(kEnhSubFmtCntChanges))
+			if (_game.id == GID_FREDDI4 && _game.heversion == 98 && _currentRoom == 43 && _string[m].color == 16 && enhancementEnabled(kEnhSubFmtCntChanges))
 				_string[m].color = 200;
 		} else {
 			push(colors);
diff --git a/engines/scumm/imuse_digi/dimuse_scripts.cpp b/engines/scumm/imuse_digi/dimuse_scripts.cpp
index 48b1d716b4d..a2500d9fefd 100644
--- a/engines/scumm/imuse_digi/dimuse_scripts.cpp
+++ b/engines/scumm/imuse_digi/dimuse_scripts.cpp
@@ -483,7 +483,7 @@ void IMuseDigital::playFtMusic(const char *songName, int transitionType, int vol
 					// WORKAROUND for bug in the original: at the beginning of the game, going in
 					// and out of the bar a couple of times breaks and temporarily stops the music
 					// Here, we override the fade out, just like the remastered does
-					if (oldSoundId == soundId && soundId == 622 && _vm->enhancementClassActive(kEnhAudioChanges)) {
+					if (oldSoundId == soundId && soundId == 622 && _vm->enhancementEnabled(kEnhAudioChanges)) {
 						diMUSEFadeParam(soundId, DIMUSE_P_VOLUME, volume, 200);
 					}
 				} else if (diMUSEStartStream(soundId, 126, DIMUSE_BUFFER_MUSIC)) {
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index ec77273d221..64858bbf9d3 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -1135,7 +1135,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
 			return;
 		}
 
-		if (enhancementClassActive(kEnhUIUX) && _game.id == GID_LOOM &&
+		if (enhancementEnabled(kEnhUIUX) && _game.id == GID_LOOM &&
 			mainmenuKeyEnabled && (lastKeyHit.keycode == Common::KEYCODE_d && lastKeyHit.hasFlags(Common::KBD_CTRL))) {
 			// Drafts menu
 			showDraftsInventory();
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index 58b004bb632..4581a635654 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -249,7 +249,7 @@ bool ScummEngine::hasFeature(EngineFeature f) const {
 		(f == kSupportsQuitDialogOverride && (_useOriginalGUI || !ChainedGamesMan.empty()));
 }
 
-bool Scumm::ScummEngine::enhancementClassActive(int32 cls) {
+bool Scumm::ScummEngine::enhancementEnabled(int32 cls) {
 	return _activeEnhancements & cls;
 }
 
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 74f7bfffce2..3a9b61bad9d 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -705,7 +705,7 @@ void ScummEngine::drawObject(int obj, int arg) {
 	// copyright reasons, so we just patch the impacted bytes from a fixed OI
 	// (made with BMRP.EXE).
 	if (_game.id == GID_INDY3 && (_game.features & GF_OLD256) && _currentRoom == 135
-	    && od.obj_nr == 324 && numstrip == od.width / 8 && enhancementClassActive(kEnhVisualChanges)) {
+	    && od.obj_nr == 324 && numstrip == od.width / 8 && enhancementEnabled(kEnhVisualChanges)) {
 		// Extra safety: make sure that the OI has the expected length. Indy3
 		// should always be GF_SMALL_HEADER, but that's implicit, so do an
 		// explicit check, since we're doing some low-level byte tricks.
diff --git a/engines/scumm/players/player_towns.cpp b/engines/scumm/players/player_towns.cpp
index 506e34ea5bf..15c89bb83ee 100644
--- a/engines/scumm/players/player_towns.cpp
+++ b/engines/scumm/players/player_towns.cpp
@@ -245,7 +245,7 @@ void Player_Towns_v1::startSound(int sound) {
 		velocity = velocity ? velocity >> 2 : ptr[14] >> 1;
 		uint16 len = READ_LE_UINT16(ptr) + 2;
 		playPcmTrack(sound, ptr + 6, velocity, 64, note ? note : (len > 50 ? ptr[50] : 60), READ_LE_UINT16(ptr + 10));
-	} else if (type == 1 || (_vm->_game.id == GID_INDY3 && sound == 40 && _vm->enhancementClassActive(kEnhAudioChanges))) {
+	} else if (type == 1 || (_vm->_game.id == GID_INDY3 && sound == 40 && _vm->enhancementEnabled(kEnhAudioChanges))) {
 		// WORKAROUND: Indy 3 FMTOWNS: No/distorted music in Venice
 		// The Venice music does not exist as CD audio and the original doesn't feature music
 		// in this scene. It does, however, exist as Euphony track albeit with an odd sound
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 6df93015e68..fbe08d74d1a 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -1767,7 +1767,7 @@ void ScummEngine::applyWorkaroundIfNeeded(ResType type, int idx) {
 	// immediately overwritten. This probably affects all CD versions, so we
 	// just have to add further patches as they are reported.
 
-	if (_game.id == GID_MONKEY && type == rtRoom && idx == 25 && enhancementClassActive(kEnhRestoredContent)) {
+	if (_game.id == GID_MONKEY && type == rtRoom && idx == 25 && enhancementEnabled(kEnhRestoredContent)) {
 		tryPatchMI1CannibalScript(getResourceAddress(type, idx), size);
 	} else
 
diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp
index 5753721a5a0..259b3fb10ba 100644
--- a/engines/scumm/resource_v4.cpp
+++ b/engines/scumm/resource_v4.cpp
@@ -202,7 +202,7 @@ void ScummEngine_v4::loadCharset(int no) {
 	// does exist, but at the invalid \x86 position.  So we replace \x85 with
 	// \x86 (and then \x86 with \x87 so that the whole charset resource keeps
 	// the same size), but only when detecting the faulty 904.LFL file.
-	if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA) && no == 4 && size == 4857 && _language == Common::FR_FRA && enhancementClassActive(kEnhTextLocFixes)) {
+	if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA) && no == 4 && size == 4857 && _language == Common::FR_FRA && enhancementEnabled(kEnhTextLocFixes)) {
 		Common::MemoryReadStream stream(data, size);
 		Common::String md5 = Common::computeStreamMD5AsString(stream);
 
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index 34f4477ad94..fb8a286810b 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -713,7 +713,7 @@ void ScummEngine::writeVar(uint var, int value) {
 		// Any modifications here depend on knowing if the script will
 		// set the timer value back to something sensible afterwards.
 
-		if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && var == VAR_TIMER_NEXT && enhancementClassActive(kEnhTimingChanges)) {
+		if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && var == VAR_TIMER_NEXT && enhancementEnabled(kEnhTimingChanges)) {
 			// "Wirst Du brutzeln, wie eine grobe Bratwurst!"
 			if (value == 1 && _language == Common::DE_DEU)
 				value = 4;
@@ -733,7 +733,7 @@ void ScummEngine::writeVar(uint var, int value) {
 		// throughout the intro. This does not apply to the VGA talkie
 		// version, because there the fire isn't animated.
 
-		else if (_game.id == GID_LOOM && !(_game.features & GF_DEMO) && _game.version < 4 && vm.slot[_currentScript].number == 44 && var == VAR_TIMER_NEXT && enhancementClassActive(kEnhTimingChanges)) {
+		else if (_game.id == GID_LOOM && !(_game.features & GF_DEMO) && _game.version < 4 && vm.slot[_currentScript].number == 44 && var == VAR_TIMER_NEXT && enhancementEnabled(kEnhTimingChanges)) {
 			Actor *a = derefActorSafe(4, "writeVar");
 			if (a) {
 				a->setAnimSpeed((value == 0) ? 6 : 0);
@@ -993,7 +993,7 @@ void ScummEngine::runExitScript() {
 	//
 	// The same sound effect is also used in the underwater cavern (room
 	// 33), so we do the same fade out as in that room's exit script.
-	if (_game.id == GID_DIG && _currentRoom == 44 && enhancementClassActive(kEnhAudioChanges)) {
+	if (_game.id == GID_DIG && _currentRoom == 44 && enhancementEnabled(kEnhAudioChanges)) {
 		int scriptCmds[] = { 14, 215, 0x600, 0, 30, 0, 0, 0 };
 		_sound->soundKludge(scriptCmds, ARRAYSIZE(scriptCmds));
 	}
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 1d1bfa36168..18520cc5b06 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -420,7 +420,7 @@ void ScummEngine_v2::decodeParseString() {
 	else if (_game.id == GID_MANIAC && _game.version == 1
 		&& _game.platform == Common::kPlatformDOS
 		&& !(_game.features & GF_DEMO) && _language == Common::EN_ANY
-		&& vm.slot[_currentScript].number == 260 && enhancementClassActive(kEnhTextLocFixes)
+		&& vm.slot[_currentScript].number == 260 && enhancementEnabled(kEnhTextLocFixes)
 		&& strncmp((char *)buffer + 26, " tring ", 7) == 0) {
 		for (byte *p = ptr; p >= buffer + 29; p--)
 			*(p + 1) = *p;
@@ -480,7 +480,7 @@ void ScummEngine_v2::writeVar(uint var, int value) {
 			&& _game.platform != Common::kPlatformNES
 			&& vm.slot[_currentScript].number == 4
 			&& VAR(VAR_CLICK_AREA) == kSentenceClickArea
-			&& var == 34 && value == 0 && enhancementClassActive(kEnhRestoredContent)) {
+			&& var == 34 && value == 0 && enhancementEnabled(kEnhRestoredContent)) {
 		value = 1;
 	}
 
@@ -887,7 +887,7 @@ void ScummEngine_v2::o2_verbOps() {
 		// erroneously set one of the verbs' ("Unlock") y coordinate to 1600 instead of
 		// 168 via scripts. We apply the fix and mark it as an enhancement.
 		if (_game.id == GID_MANIAC && _game.version == 2 && _language == Common::IT_ITA &&
-			slot == 15 && y == 1600 && enhancementClassActive(kEnhTextLocFixes)) {
+			slot == 15 && y == 1600 && enhancementEnabled(kEnhTextLocFixes)) {
 			vs->curRect.top = 168;
 		} else {
 			vs->curRect.top = y;
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 8f6bbc59de5..fa0708f3244 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -428,7 +428,7 @@ void ScummEngine_v5::o5_actorOps() {
 	// also observed when doing the QA for the PC version.
 	if (_game.id == GID_MONKEY2 && _game.platform == Common::kPlatformFMTowns &&
 		vm.slot[_currentScript].number == 45 && _currentRoom == 45 &&
-		(_scriptPointer - _scriptOrgPointer == 0xA9) && enhancementClassActive(kEnhRestoredContent)) {
+		(_scriptPointer - _scriptOrgPointer == 0xA9) && enhancementEnabled(kEnhRestoredContent)) {
 		_scriptPointer += 0xCF - 0xA1;
 		writeVar(32811, 0); // clear bit 43
 		return;
@@ -448,7 +448,7 @@ void ScummEngine_v5::o5_actorOps() {
 	// this, but in a different way which doesn't look as portable between releases.
 	if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA || (_game.id == GID_MONKEY && !(_game.features & GF_ULTIMATE_TALKIE))) &&
 		_roomResource == 87 && vm.slot[_currentScript].number == 10002 && act == 9 &&
-		enhancementClassActive(kEnhVisualChanges)) {
+		enhancementEnabled(kEnhVisualChanges)) {
 		const int scriptNr = (_game.version == 5) ? 122 : 119;
 		if (!isScriptRunning(scriptNr)) {
 			a->putActor(0);
@@ -480,7 +480,7 @@ void ScummEngine_v5::o5_actorOps() {
 			// But in the VGA CD version, only costume 0 is used
 			// and the close-up is missing the cigar smoke.
 
-			if (_game.id == GID_MONKEY && _currentRoom == 76 && act == 12 && i == 0 && enhancementClassActive(kEnhVisualChanges)) {
+			if (_game.id == GID_MONKEY && _currentRoom == 76 && act == 12 && i == 0 && enhancementEnabled(kEnhVisualChanges)) {
 				i = 76;
 			}
 
@@ -537,7 +537,7 @@ void ScummEngine_v5::o5_actorOps() {
 
 			if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns &&
 				(a->_costume == 23 || a->_costume == 28 || a->_costume == 29) &&
-				(_currentRoom == 20 || _currentRoom == 28 || _currentRoom == 32) && enhancementClassActive(kEnhVisualChanges)) {
+				(_currentRoom == 20 || _currentRoom == 28 || _currentRoom == 32) && enhancementEnabled(kEnhVisualChanges)) {
 				break;
 			}
 
@@ -650,7 +650,7 @@ void ScummEngine_v5::o5_setClass() {
 		if (_game.id == GID_MONKEY && _game.platform != Common::kPlatformFMTowns &&
 		    _game.platform != Common::kPlatformSegaCD && _roomResource == 59 &&
 		    vm.slot[_currentScript].number == 10002 && obj == 915 && cls == 6 &&
-			_currentPalette[251 * 3] == 0 && enhancementClassActive(kEnhVisualChanges) &&
+			_currentPalette[251 * 3] == 0 && enhancementEnabled(kEnhVisualChanges) &&
 		    !(_game.features & GF_ULTIMATE_TALKIE)) {
 			// True as long as Guybrush isn't done with the voodoo recipe on the
 			// Sea Monkey. The Ultimate Talkie Edition probably does this as a way
@@ -745,7 +745,7 @@ void ScummEngine_v5::o5_add() {
 	// We restore the old behavior by adding 0, not 1, to the second
 	// variable when examining the clock tower.
 
-	if (_game.id == GID_MONKEY && vm.slot[_currentScript].number == 210 && _currentRoom == 35 && _resultVarNumber == 248 && a == 1 && enhancementClassActive(kEnhRestoredContent)) {
+	if (_game.id == GID_MONKEY && vm.slot[_currentScript].number == 210 && _currentRoom == 35 && _resultVarNumber == 248 && a == 1 && enhancementEnabled(kEnhRestoredContent)) {
 		a = 0;
 	}
 
@@ -912,7 +912,7 @@ void ScummEngine_v5::o5_cursorCommand() {
 			// if we even want that "fixed", but it does lead to bug tickets in Monkey 1 FM-TOWNS") and the
 			// "fix" restores the original appearance (which - as per usual - is a matter of personal taste...).
 			// So let people make their own choice with the Enhancement setting.
-			int m = (_game.platform == Common::kPlatformFMTowns && _game.id == GID_MONKEY && !enhancementClassActive(kEnhVisualChanges)) ? 2 : 1;
+			int m = (_game.platform == Common::kPlatformFMTowns && _game.id == GID_MONKEY && !enhancementEnabled(kEnhVisualChanges)) ? 2 : 1;
 			for (i = 0; i < 16; i++)
 				_charsetColorMap[i] = _charsetData[_string[1]._default.charset][i] = (unsigned char)table[i * m];
 		}
@@ -935,7 +935,7 @@ void ScummEngine_v5::o5_cutscene() {
 	// from the zeppelin with the biplane is missing the `[1]` parameter
 	// which disables the verb interface. For some reason, this only causes
 	// a problem on the FM-TOWNS version, though... also happens under UNZ.
-	if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns && _currentRoom == 80 && vm.slot[_currentScript].number == 201 && args[0] == 0 && enhancementClassActive(kEnhVisualChanges)) {
+	if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns && _currentRoom == 80 && vm.slot[_currentScript].number == 201 && args[0] == 0 && enhancementEnabled(kEnhVisualChanges)) {
 		args[0] = 1;
 	}
 
@@ -1076,7 +1076,7 @@ void ScummEngine_v5::o5_drawObject() {
 	// be called if Bit[129] is set in that script, so if it does happen, it means
 	// the check was missing, and so we ignore the next 32 bytes of Dread's reaction.
 	if (_game.id == GID_MONKEY2 && !(_game.features & GF_ULTIMATE_TALKIE) && _currentRoom == 22 && vm.slot[_currentScript].number == 201 && obj == 237 &&
-		state == 1 && readVar(0x8000 + 129) == 1 && enhancementClassActive(kEnhMinorBugFixes)) {
+		state == 1 && readVar(0x8000 + 129) == 1 && enhancementEnabled(kEnhMinorBugFixes)) {
 		_scriptPointer += 32;
 		return;
 	}
@@ -1087,7 +1087,7 @@ void ScummEngine_v5::o5_drawObject() {
 	// picked up the real Grail. This was probably done as a way to unconditionally
 	// reset the animation if it's already been played, but we can just do an
 	// unconditional reset of all previous frames instead, restoring the first one.
-	if (_game.id == GID_INDY3 && _roomResource == 87 && vm.slot[_currentScript].number == 200 && obj == 899 && state == 1 && VAR(VAR_TIMER_NEXT) != 12 && enhancementClassActive(kEnhRestoredContent)) {
+	if (_game.id == GID_INDY3 && _roomResource == 87 && vm.slot[_currentScript].number == 200 && obj == 899 && state == 1 && VAR(VAR_TIMER_NEXT) != 12 && enhancementEnabled(kEnhRestoredContent)) {
 		i = _numLocalObjects - 1;
 		do {
 			if (_objs[i].obj_nr)
@@ -1103,7 +1103,7 @@ void ScummEngine_v5::o5_drawObject() {
 	// all later versions; this smaller workaround appears to be enough.
 	if (_game.id == GID_LOOM && _game.version == 3 && !(_game.features & GF_OLD256) && _roomResource == 32 &&
 		vm.slot[_currentScript].number == 10002 && obj == 540 && state == 1 && xpos == 255 && ypos == 255 &&
-		enhancementClassActive(kEnhMinorBugFixes)) {
+		enhancementEnabled(kEnhMinorBugFixes)) {
 		if (getState(541) == 1) {
 			putState(obj, state);
 			obj = 541;
@@ -1242,7 +1242,7 @@ void ScummEngine_v5::o5_findObject() {
 
 	if (_game.id == GID_LOOM && _game.version == 3 &&
 	    (_game.platform == Common::kPlatformDOS || _game.platform == Common::kPlatformAmiga || _game.platform == Common::kPlatformAtariST) &&
-		_currentRoom == 38 && obj == 623 && enhancementClassActive(kEnhMinorBugFixes)) {
+		_currentRoom == 38 && obj == 623 && enhancementEnabled(kEnhMinorBugFixes)) {
 		obj = 609;
 	}
 
@@ -1251,7 +1251,7 @@ void ScummEngine_v5::o5_findObject() {
 	// script is responsible for actually moving you to the other room and
 	// this script is empty, redirect the action to the cave object's
 	// script instead.
-	if (_game.id == GID_LOOM && _game.version == 4 && _currentRoom == 33 && obj == 482 && enhancementClassActive(kEnhMinorBugFixes)) {
+	if (_game.id == GID_LOOM && _game.version == 4 && _currentRoom == 33 && obj == 482 && enhancementEnabled(kEnhMinorBugFixes)) {
 		obj = 468;
 	}
 
@@ -1636,7 +1636,7 @@ void ScummEngine_v5::o5_isLessEqual() {
 	// together that they look like one. This adjusts the timing of the
 	// second one.
 
-	if (_game.id == GID_LOOM && _game.version >= 4 && _language == Common::EN_ANY && vm.slot[_currentScript].number == 95 && var == VAR_MUSIC_TIMER && b == 1708 && enhancementClassActive(kEnhVisualChanges)) {
+	if (_game.id == GID_LOOM && _game.version >= 4 && _language == Common::EN_ANY && vm.slot[_currentScript].number == 95 && var == VAR_MUSIC_TIMER && b == 1708 && enhancementEnabled(kEnhVisualChanges)) {
 		b = 1815;
 	}
 
@@ -1666,7 +1666,7 @@ void ScummEngine_v5::o5_notEqualZero() {
 	// Library, since Dread's ship is gone.
 	if (_game.id == GID_MONKEY2 && ((_roomResource == 22 && vm.slot[_currentScript].number == 202) ||
 		(_roomResource == 2 && vm.slot[_currentScript].number == 10002) ||
-		vm.slot[_currentScript].number == 97) && enhancementClassActive(kEnhGameBreakingBugFixes)) {
+		vm.slot[_currentScript].number == 97) && enhancementEnabled(kEnhGameBreakingBugFixes)) {
 		int var = fetchScriptWord();
 		a = readVar(var);
 
@@ -1684,7 +1684,7 @@ void ScummEngine_v5::o5_notEqualZero() {
 		//
 		// Note that fixing this unveils the script error causing the possible
 		// dead-end described above.
-		if (!(_game.features & GF_ULTIMATE_TALKIE) && var == 0x8000 + 70 && a == 0 && getOwner(519) == VAR(VAR_EGO) && enhancementClassActive(kEnhRestoredContent)) {
+		if (!(_game.features & GF_ULTIMATE_TALKIE) && var == 0x8000 + 70 && a == 0 && getOwner(519) == VAR(VAR_EGO) && enhancementEnabled(kEnhRestoredContent)) {
 			a = 1;
 		}
 
@@ -1772,7 +1772,7 @@ void ScummEngine_v5::o5_loadRoom() {
 	// the one where Indy enters the office for the first time. If object 23 (National
 	// Archeology) is in possession of Indy (owner == 1) then it's safe to force the
 	// coat (object 24) and broken window (object 25) into the room.
-	if (_game.id == GID_INDY4 && room == 1 && _objectOwnerTable[23] == 1 && enhancementClassActive(kEnhMinorBugFixes)) {
+	if (_game.id == GID_INDY4 && room == 1 && _objectOwnerTable[23] == 1 && enhancementEnabled(kEnhMinorBugFixes)) {
 		putState(24, 1);
 		putState(25, 1);
 	}
@@ -1783,7 +1783,7 @@ void ScummEngine_v5::o5_loadRoom() {
 	// you will always get the close-up where he's wearing his own clothes.
 
 	if (_game.id == GID_LOOM && _game.version == 3 && room == 29 &&
-		vm.slot[_currentScript].number == 112 && enhancementClassActive(kEnhVisualChanges)) {
+		vm.slot[_currentScript].number == 112 && enhancementEnabled(kEnhVisualChanges)) {
 		Actor *a = derefActorSafe(VAR(VAR_EGO), "o5_loadRoom");
 
 		// Bobbin's normal costume is number 1. If he's wearing anything
@@ -1975,14 +1975,14 @@ void ScummEngine_v5::o5_putActor() {
 	// other coordinates. The difference is never more than a single pixel,
 	// so there's not much reason to correct those.
 
-	if (_game.id == GID_MONKEY && _currentRoom == 76 && act == 12 && enhancementClassActive(kEnhVisualChanges)) {
+	if (_game.id == GID_MONKEY && _currentRoom == 76 && act == 12 && enhancementEnabled(kEnhVisualChanges)) {
 		if (x == 176 && y == 80) {
 			x = 174;
 			y = 86;
 		} else if (x == 176 && y == 78) {
 			x = 172;
 		}
-	} else if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && _currentRoom == 42 && vm.slot[_currentScript].number == 201 && act == 6 && x == 136 && y == 0 && enhancementClassActive(kEnhVisualChanges)) {
+	} else if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && _currentRoom == 42 && vm.slot[_currentScript].number == 201 && act == 6 && x == 136 && y == 0 && enhancementEnabled(kEnhVisualChanges)) {
 		// WORKAROUND: bug #2762: When switching back to Zak after using the blue
 		// crystal on the bird in Lima, the bird will disappear, come back and
 		// disappear again. This is really strange and only happens with the
@@ -2254,7 +2254,7 @@ void ScummEngine_v5::o5_roomOps() {
 			// we want the original color 3 for the cigar smoke. It
 			// should be ok since there is no GUI in this scene.
 
-			if (_game.id == GID_MONKEY && _currentRoom == 76 && d == 3 && enhancementClassActive(kEnhVisualChanges)) {
+			if (_game.id == GID_MONKEY && _currentRoom == 76 && d == 3 && enhancementEnabled(kEnhVisualChanges)) {
 				// Do nothing
 			} else {
 				setPalColor(d, a, b, c);	/* index, r, g, b */
@@ -2562,7 +2562,7 @@ void ScummEngine_v5::o5_setState() {
 	// though, since it properly resets the state of the (invisible) laundry claim
 	// ticket part of the door, so we just reuse its setState and setClass calls.
 	if (_game.id == GID_MONKEY2 && _currentRoom == 13 && vm.slot[_currentScript].number == 200 &&
-		obj == 108 && state == 1 && getState(100) != 1 && getState(111) != 2 && enhancementClassActive(kEnhMinorBugFixes)) {
+		obj == 108 && state == 1 && getState(100) != 1 && getState(111) != 2 && enhancementEnabled(kEnhMinorBugFixes)) {
 		putState(111, 2);
 		markObjectRectAsDirty(111);
 		putClass(111, 160, true);
@@ -2669,7 +2669,7 @@ void ScummEngine_v5::o5_stopSound() {
 	// 10001 regardless of which room it is. We figure out which one by
 	// looking at which rooms we're moving between.
 
-	if (_game.id == GID_MONKEY && (_game.features & GF_AUDIOTRACKS) && sound == 126 && vm.slot[_currentScript].number == 10001 && VAR(VAR_ROOM) == 43 && VAR(VAR_NEW_ROOM) == 76 && enhancementClassActive(kEnhAudioChanges)) {
+	if (_game.id == GID_MONKEY && (_game.features & GF_AUDIOTRACKS) && sound == 126 && vm.slot[_currentScript].number == 10001 && VAR(VAR_ROOM) == 43 && VAR(VAR_NEW_ROOM) == 76 && enhancementEnabled(kEnhAudioChanges)) {
 		return;
 	}
 
@@ -2677,7 +2677,7 @@ void ScummEngine_v5::o5_stopSound() {
 	// music status variable when you stop it. Wendy's music would then
 	// resume when leaving some rooms (such as room 3 with the chandelier),
 	// even though her CD player was off.
-	if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformNES && sound == 75 && vm.slot[_currentScript].number == 50 && VAR(VAR_EGO) == 6 && VAR(224) == sound && enhancementClassActive(kEnhAudioChanges)) {
+	if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformNES && sound == 75 && vm.slot[_currentScript].number == 50 && VAR(VAR_EGO) == 6 && VAR(224) == sound && enhancementEnabled(kEnhAudioChanges)) {
 		VAR(224) = 0;
 	}
 
@@ -2728,7 +2728,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) && enhancementClassActive(kEnhVisualChanges))
+	if (_game.id == GID_LOOM && _game.version == 3 && script == 207 && isScriptRunning(98) && enhancementEnabled(kEnhVisualChanges))
 		return;
 
 	// WORKAROUND bug #2198: Script 171 loads a complete room resource,
@@ -2755,7 +2755,7 @@ void ScummEngine_v5::o5_startScript() {
 	// stealth") is missing a Local[0] value for the actor number. This
 	// causes the line to be silently skipped (as in the original).
 	if (_game.id == GID_LOOM && _game.version == 3 && _roomResource == 23 && script == 232 && data[0] == 0 &&
-		vm.slot[_currentScript].number >= 422 && vm.slot[_currentScript].number <= 425 && enhancementClassActive(kEnhRestoredContent)) {
+		vm.slot[_currentScript].number >= 422 && vm.slot[_currentScript].number <= 425 && enhancementEnabled(kEnhRestoredContent)) {
 		// Restore the missing line by attaching it to the shepherd on which the
 		// draft was used.
 		data[0] = vm.slot[_currentScript].number % 10;
@@ -2808,7 +2808,7 @@ void ScummEngine_v5::o5_stopScript() {
 
 	if (_game.id == GID_INDY4 && script == 164 && _roomResource == 50 &&
 		vm.slot[_currentScript].number == 213 && VAR(VAR_HAVE_MSG) &&
-		getOwner(933) == VAR(VAR_EGO) && getClass(933, 146) && enhancementClassActive(kEnhRestoredContent)) {
+		getOwner(933) == VAR(VAR_EGO) && getClass(933, 146) && enhancementEnabled(kEnhRestoredContent)) {
 		// WORKAROUND bug #2215: Due to a script bug, a line of text is skipped
 		// which Indy is supposed to speak when he finds Orichalcum in some old
 		// bones in the caves below Crete, if (and only if) he has already put
@@ -3075,7 +3075,7 @@ void ScummEngine_v5::o5_walkActorTo() {
 	// it, as in the other releases. Another v5 bug fixed on SegaCD, though!
 	if (_game.id == GID_MONKEY && !(_game.features & GF_ULTIMATE_TALKIE) && _game.platform != Common::kPlatformSegaCD &&
 		_currentRoom == 30 && vm.slot[_currentScript].number == 207 && a->_number == 11 &&
-		x == 232 && y == 141 && enhancementClassActive(kEnhVisualChanges)) {
+		x == 232 && y == 141 && enhancementEnabled(kEnhVisualChanges)) {
 		if (whereIsObject(387) == WIO_ROOM && getState(387) == 1 && getState(437) == 1) {
 			int args[NUM_SCRIPT_LOCAL];
 			memset(args, 0, sizeof(args));
@@ -3244,7 +3244,7 @@ void ScummEngine_v5::decodeParseString() {
 					_currentRoom == 36 &&
 					vm.slot[_currentScript].number == 201 &&
 					color == 2 &&
-					 enhancementClassActive(kEnhVisualChanges)) {
+					 enhancementEnabled(kEnhVisualChanges)) {
 				color = findClosestPaletteColor(_currentPalette, 256, 0, 171, 0);
 			}
 
@@ -3325,20 +3325,20 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 	const int len = resStrLen(_scriptPointer);
 
 	if (_game.id == GID_LOOM && _game.version == 4 && _language == Common::EN_ANY &&
-		vm.slot[_currentScript].number == 95 && enhancementClassActive(kEnhTextLocFixes) &&
+		vm.slot[_currentScript].number == 95 && enhancementEnabled(kEnhTextLocFixes) &&
 			strcmp((const char *)_scriptPointer, "I am Choas.") == 0) {
 		// WORKAROUND: This happens when Chaos introduces
 		// herself to bishop Mandible. Of all the places to put
 		// a typo...
 		printString(textSlot, (const byte *)"I am Chaos.");
 	} else if (_game.id == GID_LOOM && _game.version == 4 && _roomResource == 90 &&
-			   vm.slot[_currentScript].number == 203 && _string[textSlot].color == 0x0F && enhancementClassActive(kEnhSubFmtCntChanges)) {
+			   vm.slot[_currentScript].number == 203 && _string[textSlot].color == 0x0F && enhancementEnabled(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: When Mandible speaks with Goodmold, his second
 		// speech line is missing its color parameter.
 		_string[textSlot].color = 0x0A;
 		printString(textSlot, _scriptPointer);
 	} else if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns && _roomResource == 80 &&
-			   vm.slot[_currentScript].number == 201 && enhancementClassActive(kEnhSubFmtCntChanges)) {
+			   vm.slot[_currentScript].number == 201 && enhancementEnabled(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: When Indy and his father escape the zeppelin
 		// with the biplane in the FM-TOWNS version, they share the
 		// same text color. Indeed, they're not given any explicit
@@ -3352,7 +3352,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 			_string[textSlot].color = 0x0E;
 		printString(textSlot, _scriptPointer);
 	} else if (_game.id == GID_INDY4 && _roomResource == 23 && vm.slot[_currentScript].number == 167 &&
-			len == 24 && enhancementClassActive(kEnhTextLocFixes) && memcmp(_scriptPointer+16, "pregod", 6) == 0) {
+			len == 24 && enhancementEnabled(kEnhTextLocFixes) && memcmp(_scriptPointer+16, "pregod", 6) == 0) {
 		// WORKAROUND for bug #2961: At the end of Indy4, if Ubermann is told
 		// to use 20 orichalcum beads, he'll count "pregod8" and "pregod9"
 		// instead of "18" and "19", in some releases.
@@ -3369,7 +3369,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 		printString(textSlot, tmpBuf);
 	} else if (_game.id == GID_INDY4 && _language == Common::EN_ANY && _roomResource == 10 &&
 			vm.slot[_currentScript].number == 209 && _actorToPrintStrFor == 4 && len == 81 &&
-			strcmp(_game.variant, "Floppy") != 0 && enhancementClassActive(kEnhSubFmtCntChanges)) {
+			strcmp(_game.variant, "Floppy") != 0 && enhancementEnabled(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: The English Talkie version of Indy4 changed Kerner's
 		// lines when he uses the phone booth in New York, but the text doesn't
 		// match the voice and it mentions the wrong person, in most releases.
@@ -3387,7 +3387,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 		}
 	} else if (_game.id == GID_INDY4 && vm.slot[_currentScript].number == 161 && _actorToPrintStrFor == 2 &&
 			_game.platform != Common::kPlatformAmiga && strcmp(_game.variant, "Floppy") != 0 &&
-			enhancementClassActive(kEnhAudioChanges)) {
+			enhancementEnabled(kEnhAudioChanges)) {
 		// WORKAROUND: In Indy 4, if one plays as Sophia and looks at Indy, then
 		// her "There's nothing to look at." reaction line will be said with
 		// Indy's voice, because script 68-161 doesn't check for Sophia in this
@@ -3420,7 +3420,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 			(_roomResource == 45 && vm.slot[_currentScript].number == 200 &&
 			isValidActor(10) && _actors[10]->isInCurrentRoom())) &&
 			_actorToPrintStrFor == 255 && _string[textSlot].color != 0x0F &&
-			enhancementClassActive(kEnhSubFmtCntChanges)) {
+			enhancementEnabled(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: When Guybrush goes to the church at the end of Monkey1,
 		// the color for the ghost priest's lines is inconsistent in the v5
 		// releases (except for the SegaCD one with the smaller palette).
@@ -3432,7 +3432,7 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 			_game.platform != Common::kPlatformSegaCD &&
 			(vm.slot[_currentScript].number == 140 || vm.slot[_currentScript].number == 294) &&
 			_actorToPrintStrFor == 255 && _string[textSlot].color == 0x06 &&
-			enhancementClassActive(kEnhSubFmtCntChanges)) {
+			enhancementEnabled(kEnhSubFmtCntChanges)) {
 		// WORKAROUND: In MI1 CD, the colors when the navigator head speaks are
 		// not the intended ones (dark purple instead of brown), because the
 		// original `Color(6)` parameter was kept without adjusting it for the
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index abc1e0f8564..e7e95268b5d 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -887,7 +887,7 @@ void ScummEngine_v6::o6_startScript() {
 	// This also happens with the original interpreters and with the remaster.
 	if (_game.id == GID_TENTACLE && _roomResource == 13 &&
 		vm.slot[_currentScript].number == 21 && script == 106 &&
-		args[0] == 91 && enhancementClassActive(kEnhRestoredContent)) {
+		args[0] == 91 && enhancementEnabled(kEnhRestoredContent)) {
 		return;
 	}
 
@@ -905,7 +905,7 @@ void ScummEngine_v6::o6_startScript() {
 	// This fix checks for this situation happening (and only this one), and makes a call
 	// to a soundKludge operation like script 29 would have done.
 	if (_game.id == GID_CMI && _currentRoom == 19 &&
-		vm.slot[_currentScript].number == 168 && script == 118 && enhancementClassActive(kEnhAudioChanges)) {
+		vm.slot[_currentScript].number == 168 && script == 118 && enhancementEnabled(kEnhAudioChanges)) {
 		int list[16] = { 4096, 1278, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 		_sound->soundKludge(list, 2);
 	}
@@ -915,7 +915,7 @@ void ScummEngine_v6::o6_startScript() {
 	// stopping and starting their speech. This was a script bug in the original
 	// game, which would also block the "That was informative" reaction from Sam.
 	if (_game.id == GID_SAMNMAX && _roomResource == 59 &&
-		vm.slot[_currentScript].number == 201 && script == 48 && enhancementClassActive(kEnhRestoredContent)) {
+		vm.slot[_currentScript].number == 201 && script == 48 && enhancementEnabled(kEnhRestoredContent)) {
 		o6_breakHere();
 	}
 
@@ -1300,7 +1300,7 @@ void ScummEngine_v6::o6_loadRoom() {
 	// WORKAROUND bug #13378: During Sam's reactions to Max beating up the
 	// scientist in the intro, we sometimes have to slow down animations
 	// artificially. This is where we speed them back up again.
-	if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && room == 6 && enhancementClassActive(kEnhTimingChanges)) {
+	if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && room == 6 && enhancementEnabled(kEnhTimingChanges)) {
 		int actors[] = { 2, 3, 10 };
 
 		for (int i = 0; i < ARRAYSIZE(actors); i++) {
@@ -1426,7 +1426,7 @@ void ScummEngine_v6::o6_animateActor() {
 	int act = pop();
 
 	if (_game.id == GID_SAMNMAX && _roomResource == 35 && vm.slot[_currentScript].number == 202 &&
-		act == 4 && anim == 14 && enhancementClassActive(kEnhMinorBugFixes)) {
+		act == 4 && anim == 14 && enhancementEnabled(kEnhMinorBugFixes)) {
 		// WORKAROUND bug #2068 (Animation glitch at World of Fish).
 		// Before starting animation 14 of the fisherman, make sure he isn't
 		// talking anymore, otherwise the fishing line may appear twice when Max
@@ -1438,7 +1438,7 @@ void ScummEngine_v6::o6_animateActor() {
 	}
 
 	if (_game.id == GID_SAMNMAX && _roomResource == 47 && vm.slot[_currentScript].number == 202 &&
-		act == 2 && anim == 249 && enhancementClassActive(kEnhMinorBugFixes)) {
+		act == 2 && anim == 249 && enhancementEnabled(kEnhMinorBugFixes)) {
 		// WORKAROUND for bug #3832: parts of Bruno are left on the screen when he
 		// escapes Bumpusville with Trixie. Bruno (act. 11) and Trixie (act. 12) are
 		// properly removed from the scene by the script, but not the combined actor
@@ -1725,7 +1725,7 @@ void ScummEngine_v6::o6_beginOverride() {
 	//
 	// To amend this, we intercept this exact script override and we force the playback of sound 2277,
 	// which is the iMUSE sequence which would have been played after the dialogue.
-	if (enhancementClassActive(kEnhAudioChanges) && _game.id == GID_CMI && _currentRoom == 37 && vm.slot[_currentScript].number == 251 &&
+	if (enhancementEnabled(kEnhAudioChanges) && _game.id == GID_CMI && _currentRoom == 37 && vm.slot[_currentScript].number == 251 &&
 		_sound->isSoundRunning(2275) != 0 && (_scriptPointer - _scriptOrgPointer) == 0x1A) {
 		int list[16] = {0x1001, 2277, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 		_sound->soundKludge(list, 2);
@@ -2034,7 +2034,7 @@ void ScummEngine_v6::o6_actorOps() {
 		// chattering teeth, but yet when he comes back he's not wearing them
 		// during this cutscene.
 		if (_game.id == GID_TENTACLE && _currentRoom == 13 && vm.slot[_currentScript].number == 211 &&
-			a->_number == 8 && i == 53 && enhancementClassActive(kEnhVisualChanges)) {
+			a->_number == 8 && i == 53 && enhancementEnabled(kEnhVisualChanges)) {
 			i = 69;
 		}
 		a->setActorCostume(i);
@@ -2654,7 +2654,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// will feel off -- so we can't use the _forcedWaitForMessage trick.
 	if (_game.id == GID_SAMNMAX && _roomResource == 11 && vm.slot[_currentScript].number == 67
 		&& getOwner(70) != 2 && !readVar(0x8000 + 67) && !readVar(0x8000 + 39) && readVar(0x8000 + 12) == 1
-		&& !getClass(126, 6) && enhancementClassActive(kEnhRestoredContent)) {
+		&& !getClass(126, 6) && enhancementEnabled(kEnhRestoredContent)) {
 		if (VAR(VAR_HAVE_MSG)) {
 			_scriptPointer--;
 			o6_breakHere();
@@ -2669,7 +2669,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// a talkActor opcode.
 	if (_game.id == GID_TENTACLE && vm.slot[_currentScript].number == 307
 			&& VAR(VAR_EGO) != 2 && _actorToPrintStrFor == 2
-			&& enhancementClassActive(kEnhMinorBugFixes)) {
+			&& enhancementEnabled(kEnhMinorBugFixes)) {
 		_scriptPointer += resStrLen(_scriptPointer) + 1;
 		return;
 	}
@@ -2680,7 +2680,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// hasn't been properly replaced... Fixed in the 2017 remaster, though.
 	if (_game.id == GID_FT && _language == Common::FR_FRA
 		&& _roomResource == 7 && vm.slot[_currentScript].number == 77
-		&& _actorToPrintStrFor == 1 && enhancementClassActive(kEnhTextLocFixes)) {
+		&& _actorToPrintStrFor == 1 && enhancementEnabled(kEnhTextLocFixes)) {
 		const int len = resStrLen(_scriptPointer) + 1;
 		if (len == 93 && memcmp(_scriptPointer + 16 + 18, "piano-low-kick", 14) == 0) {
 			byte *tmpBuf = new byte[len - 14 + 3];
@@ -2706,7 +2706,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// no stable offset for all the floppy, CD and translated versions, and
 	// no easy way to only target the impacted lines.
 	if (_game.id == GID_TENTACLE && vm.slot[_currentScript].number == 9
-		&& vm.localvar[_currentScript][0] == 216 && _actorToPrintStrFor == 4 && enhancementClassActive(kEnhRestoredContent)) {
+		&& vm.localvar[_currentScript][0] == 216 && _actorToPrintStrFor == 4 && enhancementEnabled(kEnhRestoredContent)) {
 		_forcedWaitForMessage = true;
 		_scriptPointer--;
 
@@ -2724,7 +2724,7 @@ void ScummEngine_v6::o6_talkActor() {
 	// [0166] (73)   } else {
 	//
 	// Here we simulate that opcode.
-	if (_game.id == GID_DIG && vm.slot[_currentScript].number == 88 && enhancementClassActive(kEnhRestoredContent)) {
+	if (_game.id == GID_DIG && vm.slot[_currentScript].number == 88 && enhancementEnabled(kEnhRestoredContent)) {
 		if (offset == 0x158 || offset == 0x214 || offset == 0x231 || offset == 0x278) {
 			_forcedWaitForMessage = true;
 			_scriptPointer--;
@@ -2743,7 +2743,7 @@ void ScummEngine_v6::o6_talkActor() {
 	if (_game.id == GID_DIG && _roomResource == 58 && vm.slot[_currentScript].number == 402
 		&& _actorToPrintStrFor == 3 && vm.localvar[_currentScript][0] == 0
 		&& readVar(0x8000 + 94) && readVar(0x8000 + 78) && !readVar(0x8000 + 97)
-		&& _scummVars[269] == 3 && getState(388) == 2 && enhancementClassActive(kEnhRestoredContent)) {
+		&& _scummVars[269] == 3 && getState(388) == 2 && enhancementEnabled(kEnhRestoredContent)) {
 		_forcedWaitForMessage = true;
 		_scriptPointer--;
 
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 3ff80787d08..9f747c920da 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1490,7 +1490,7 @@ void ScummEngine::setupScumm(const Common::String &macResourceFile) {
 	}
 
 	// Skip the sound pre-loading
-	if (_game.id == GID_SAMNMAX && _bootParam == 0 && enhancementClassActive(kEnhUIUX)) {
+	if (_game.id == GID_SAMNMAX && _bootParam == 0 && enhancementEnabled(kEnhUIUX)) {
 		_bootParam = -1;
 	}
 
@@ -2412,7 +2412,7 @@ Common::Error ScummEngine::go() {
 		// custom names for save states. We do this in order to avoid
 		// lag and/or lose keyboard inputs.
 
-		if (enhancementClassActive(kEnhUIUX)) {
+		if (enhancementEnabled(kEnhUIUX)) {
 			// INDY3:
 			if (_game.id == GID_INDY3 && _currentRoom == 14) {
 				delta = 3;
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index f8ef9fb2a52..73fc0d0a533 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -581,7 +581,7 @@ public:
 
 	void errorString(const char *buf_input, char *buf_output, int buf_output_size) override;
 	bool hasFeature(EngineFeature f) const override;
-	bool enhancementClassActive(int32 cls);
+	bool enhancementEnabled(int32 cls);
 	void syncSoundSettings() override;
 
 	Common::Error loadGameState(int slot) override;
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 070873f1df9..d1b153c25f7 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -1442,7 +1442,7 @@ void Sound::startCDTimer() {
 	// LOOM Steam uses a fixed 240Hz rate. This was probably done to get rid of some
 	// audio glitches which are confirmed to be in the original. So let's activate this
 	// fix for the DOS version of LOOM as well, if enhancements are enabled.
-	if (_isLoomSteam || (_vm->_game.id == GID_LOOM && _vm->enhancementClassActive(kEnhMinorBugFixes)))
+	if (_isLoomSteam || (_vm->_game.id == GID_LOOM && _vm->enhancementEnabled(kEnhMinorBugFixes)))
 		interval = 1000000 / LOOM_STEAM_CDDA_RATE;
 
 	_vm->getTimerManager()->removeTimerProc(&cdTimerHandler);
@@ -1676,7 +1676,7 @@ int ScummEngine::readSoundResource(ResId idx) {
 				// Some of the Mac MI2 music only exists as Roland tracks. The
 				// original interpreter doesn't play them. I don't think there
 				// is any similarly missing FoA music.
-				if (_game.id == GID_MONKEY2 && _game.platform == Common::kPlatformMacintosh && !enhancementClassActive(kEnhAudioChanges)) {
+				if (_game.id == GID_MONKEY2 && _game.platform == Common::kPlatformMacintosh && !enhancementEnabled(kEnhAudioChanges)) {
 					pri = -1;
 					break;
 				}
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 72f67c01955..56c11013929 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -70,7 +70,7 @@ void ScummEngine::printString(int m, const byte *msg) {
 			vm.slot[_currentScript].number == 203 &&
 			_actorToPrintStrFor == 255 && strcmp((const char *)msg, " ") == 0 &&
 			getOwner(200) == VAR(VAR_EGO) && VAR(VAR_HAVE_MSG) &&
-			enhancementClassActive(kEnhMinorBugFixes)) {
+			enhancementEnabled(kEnhMinorBugFixes)) {
 			return;
 		}
 
@@ -82,7 +82,7 @@ void ScummEngine::printString(int m, const byte *msg) {
 		// In the italian CD version, the whole scene is sped up to
 		// keep up with Sam's speech. We compensate for this by slowing
 		// down the other animations.
-		if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && enhancementClassActive(kEnhTimingChanges)) {
+		if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && enhancementEnabled(kEnhTimingChanges)) {
 			Actor *a;
 
 			if (_language == Common::DE_DEU && strcmp(_game.variant, "Floppy") != 0) {
@@ -214,7 +214,7 @@ bool ScummEngine::handleNextCharsetCode(Actor *a, int *code) {
 			// one or more embedded "wait" codes. Rather than
 			// relying on the calculated talk delay, hard-code
 			// better ones.
-			if (_game.id == GID_SAMNMAX && enhancementClassActive(kEnhTimingChanges) && isScriptRunning(65)) {
+			if (_game.id == GID_SAMNMAX && enhancementEnabled(kEnhTimingChanges) && isScriptRunning(65)) {
 				typedef struct {
 					const char *str;
 					const int16 talkDelay;
@@ -1479,7 +1479,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
 					// uses `startAnim(7)` for this.
 					if (_game.id == GID_SAMNMAX && _currentRoom == 52 && vm.slot[_currentScript].number == 102 &&
 						chr == 9 && readVar(0x8000 + 95) != 0 && (VAR(171) == 997 || VAR(171) == 998) &&
-						dst[-2] == 8 && enhancementClassActive(kEnhMinorBugFixes)) {
+						dst[-2] == 8 && enhancementEnabled(kEnhMinorBugFixes)) {
 						dst[-2] = 7;
 					}
 
@@ -1510,7 +1510,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
 	// WORKAROUND bug #12249 (occurs also in original): Missing actor animation in German versions of SAMNMAX
 	// Adding the missing startAnim(14) animation escape sequence while copying the text fixes it.
 	if (_game.id == GID_SAMNMAX && _currentRoom == 56 && vm.slot[_currentScript].number == 200 &&
-		_language == Common::DE_DEU && enhancementClassActive(kEnhMinorBugFixes)) {
+		_language == Common::DE_DEU && enhancementEnabled(kEnhMinorBugFixes)) {
 		// 0xE5E6 is the CD version, 0xE373 is for the floppy version
 		if (vm.slot[_currentScript].offs == 0xE5E6 || vm.slot[_currentScript].offs == 0xE373) {
 			*dst++ = 0xFF;




More information about the Scummvm-git-logs mailing list