mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-05 00:36:57 +00:00
SCUMM: Clean-up for enhancement groupings
This commit is contained in:
parent
2c474ff163
commit
c6872cdbbf
@ -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)
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -226,10 +226,10 @@ public:
|
||||
}
|
||||
|
||||
enum {
|
||||
kEnhancementGroup0Cmd = 'ENH0',
|
||||
kEnhancementGroup1Cmd = 'ENH1',
|
||||
kEnhancementGroup2Cmd = 'ENH2',
|
||||
kEnhancementGroup3Cmd = 'ENH3'
|
||||
kEnhancementGroup3Cmd = 'ENH3',
|
||||
kEnhancementGroup4Cmd = 'ENH4'
|
||||
};
|
||||
|
||||
void load() override;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user