[Scummvm-cvs-logs] scummvm master -> be489d88e6f4e17e4c1873f97831237091c899c4

dreammaster dreammaster at scummvm.org
Sun Feb 15 00:05:40 CET 2015


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

Summary:
be489d88e6 MADS: Fix palette loading for in-game dialogs


Commit: be489d88e6f4e17e4c1873f97831237091c899c4
    https://github.com/scummvm/scummvm/commit/be489d88e6f4e17e4c1873f97831237091c899c4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-02-14T18:03:45-05:00

Commit Message:
MADS: Fix palette loading for in-game dialogs

Changed paths:
    engines/mads/nebular/dialogs_nebular.cpp



diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index be683d0..6985455 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;
 	}
 }
 






More information about the Scummvm-git-logs mailing list