From be489d88e6f4e17e4c1873f97831237091c899c4 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 14 Feb 2015 18:03:45 -0500 Subject: MADS: Fix palette loading for in-game dialogs --- engines/mads/nebular/dialogs_nebular.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'engines/mads/nebular') diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index be683d0b51..6985455d2a 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -612,9 +612,12 @@ GameDialog::GameDialog(MADSEngine *vm) : FullScreenDialog(vm) { } void GameDialog::display() { + Palette &palette = *_vm->_palette; + palette.initPalette(); + palette.resetGamePalette(18, 10); + FullScreenDialog::display(); - Palette &palette = *_vm->_palette; palette.setEntry(10, 0, 63, 0); palette.setEntry(11, 0, 45, 0); palette.setEntry(12, 63, 63, 0); @@ -1094,7 +1097,7 @@ void OptionsDialog::show() { StoryMode prevStoryMode = game._storyMode; do { - _selectedLine = 0; + _selectedLine = -1; GameDialog::show(); switch (_selectedLine) { @@ -1133,22 +1136,16 @@ void OptionsDialog::show() { clearLines(); setLines(); setClickableLines(); - } while (_selectedLine <= 7); + } while (!_vm->shouldQuit() && _selectedLine != 0 && _selectedLine <= 7); - switch (_selectedLine) { - case 8: // Done - // New options will be applied - break; - case 9: // Cancel + // If Done button not pressed, reset settings + if (_selectedLine != 8) { // Revert all options from the saved ones _vm->_easyMouse = prevEasyMouse; _vm->_invObjectsAnimated = prevInvObjectsAnimated; _vm->_textWindowStill = prevTextWindowStill; _vm->_screenFade = prevScreenFade; game._storyMode = prevStoryMode; - break; - default: - break; } } -- cgit v1.2.3