aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular
diff options
context:
space:
mode:
authorPaul Gilbert2015-02-14 18:03:45 -0500
committerPaul Gilbert2015-02-14 18:03:45 -0500
commitbe489d88e6f4e17e4c1873f97831237091c899c4 (patch)
treed43dceebcd2c63d8c664c42792273f5d88220230 /engines/mads/nebular
parentd31e602add7e5466754d4b651ce7f947f6effdda (diff)
downloadscummvm-rg350-be489d88e6f4e17e4c1873f97831237091c899c4.tar.gz
scummvm-rg350-be489d88e6f4e17e4c1873f97831237091c899c4.tar.bz2
scummvm-rg350-be489d88e6f4e17e4c1873f97831237091c899c4.zip
MADS: Fix palette loading for in-game dialogs
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r--engines/mads/nebular/dialogs_nebular.cpp19
1 files changed, 8 insertions, 11 deletions
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;
}
}