diff options
author | Filippos Karapetis | 2015-03-15 04:05:06 +0200 |
---|---|---|
committer | Filippos Karapetis | 2015-03-15 04:05:06 +0200 |
commit | 19a9c068f994d5800a60dff6f14221f03f5d4cc3 (patch) | |
tree | 8a05a9203c6316b7b817bd59b9b1368ae8f08097 /engines/mads/nebular | |
parent | d3afff9bc736175b0275d923788198706adc7d78 (diff) | |
download | scummvm-rg350-19a9c068f994d5800a60dff6f14221f03f5d4cc3.tar.gz scummvm-rg350-19a9c068f994d5800a60dff6f14221f03f5d4cc3.tar.bz2 scummvm-rg350-19a9c068f994d5800a60dff6f14221f03f5d4cc3.zip |
MADS: Hook up all of the remaining options, and add custom game options
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 24 | ||||
-rw-r--r-- | engines/mads/nebular/game_nebular.h | 3 |
2 files changed, 14 insertions, 13 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index 10fa28c013..0b5e921dcc 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -1050,12 +1050,11 @@ OptionsDialog::OptionsDialog(MADSEngine *vm) : GameDialog(vm) { int OptionsDialog::getOptionQuote(int option) { Nebular::GameNebular &game = *(Nebular::GameNebular *)_vm->_game; - // TODO: Hook the rest of the options to the current config switch (option) { case 17: // Music - return 24; // 24: ON, 25: OFF + return _vm->_musicFlag ? 24 : 25; // 24: ON, 25: OFF case 18: // Sound - return 26; // 26: ON, 27: OFF + return _vm->_soundFlag ? 26 : 27; // 26: ON, 27: OFF case 19: // Interface return !_vm->_easyMouse ? 28 : 29; // 28: Standard, 29: Easy case 20: // Inventory @@ -1098,6 +1097,7 @@ void OptionsDialog::show() { Nebular::GameNebular &game = *(Nebular::GameNebular *)_vm->_game; // Previous options, restored when cancel is selected + bool prevMusicFlag = _vm->_musicFlag; bool prevEasyMouse = _vm->_easyMouse; bool prevInvObjectsAnimated = _vm->_invObjectsAnimated; bool prevTextWindowStill = _vm->_textWindowStill; @@ -1110,22 +1110,19 @@ void OptionsDialog::show() { switch (_selectedLine) { case 1: // Music - warning("STUB: Music toggle"); + _vm->_musicFlag = _vm->_soundFlag = !_vm->_musicFlag; break; case 2: // Sound - warning("STUB: Sound toggle"); + _vm->_musicFlag = _vm->_soundFlag = !_vm->_musicFlag; break; case 3: // Interface _vm->_easyMouse = !_vm->_easyMouse; - _vm->saveOptions(); break; case 4: // Inventory _vm->_invObjectsAnimated = !_vm->_invObjectsAnimated; - _vm->saveOptions(); break; case 5: // Text window _vm->_textWindowStill = !_vm->_textWindowStill; - _vm->saveOptions(); break; case 6: // Screen fade if (_vm->_screenFade == SCREEN_FADE_FAST) @@ -1150,16 +1147,17 @@ void OptionsDialog::show() { setLines(); } while (!_vm->shouldQuit() && _selectedLine != 0 && _selectedLine <= 7); - // If Done button not pressed, reset settings - if (_selectedLine != 8) { - // Revert all options from the saved ones + if (_selectedLine == 8) { + // OK button, save settings + _vm->saveOptions(); + } else if (_selectedLine == 9) { + // Cancel button, revert all options from the saved ones + _vm->_musicFlag = prevMusicFlag; _vm->_easyMouse = prevEasyMouse; _vm->_invObjectsAnimated = prevInvObjectsAnimated; _vm->_textWindowStill = prevTextWindowStill; _vm->_screenFade = prevScreenFade; game._storyMode = prevStoryMode; - - _vm->saveOptions(); } } diff --git a/engines/mads/nebular/game_nebular.h b/engines/mads/nebular/game_nebular.h index efa21a2e73..1b89d11412 100644 --- a/engines/mads/nebular/game_nebular.h +++ b/engines/mads/nebular/game_nebular.h @@ -131,6 +131,9 @@ public: virtual void step(); virtual void synchronize(Common::Serializer &s, bool phase1); + + virtual void setNaughtyMode(bool naughtyMode) { _storyMode = naughtyMode ? STORYMODE_NAUGHTY : STORYMODE_NICE; } + virtual bool getNaughtyMode() const { return _storyMode == STORYMODE_NAUGHTY; } }; // Section handlers aren't needed in ScummVM implementation |