From 9b031982cf3931c18d0804f23a3fe6779a6204d1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 22 Jul 2009 19:25:53 +0000 Subject: Fix bug #1745396: "MI: Saved game from the credits sequence fails to load". Now we specifically disallow saves in room 0 for all v4+ games. Original has exactly this check in all versions, and such games are impossible to load. Still the problem is not resolved for v0-v3 and HE games. svn-id: r42664 --- engines/scumm/dialogs.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'engines/scumm/dialogs.cpp') diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 880fab04a5..bef267f6f2 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -439,7 +439,7 @@ ScummMenuDialog::ScummMenuDialog(ScummEngine *scumm) new GUI::ButtonWidget(this, "ScummMain.Resume", "Resume", kPlayCmd, 'P'); new GUI::ButtonWidget(this, "ScummMain.Load", "Load", kLoadCmd, 'L'); - new GUI::ButtonWidget(this, "ScummMain.Save", "Save", kSaveCmd, 'S'); + _saveButton = new GUI::ButtonWidget(this, "ScummMain.Save", "Save", kSaveCmd, 'S'); new GUI::ButtonWidget(this, "ScummMain.Options", "Options", kOptionsCmd, 'O'); #ifndef DISABLE_HELP @@ -471,6 +471,15 @@ ScummMenuDialog::~ScummMenuDialog() { delete _loadDialog; } +void ScummMenuDialog::reflowLayout() { + // For v4+ games do not allow to save in room 0 just as original did. + // It is not possible to load such saves + if ((_vm->_game.version >= 4) && (_vm->_currentRoom == 0)) + _saveButton->setEnabled(false); + + Dialog::reflowLayout(); +} + void ScummMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kSaveCmd: -- cgit v1.2.3