aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/mads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/mads.cpp')
-rw-r--r--engines/mads/mads.cpp35
1 files changed, 26 insertions, 9 deletions
diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp
index 761aef3e66..59d600fbfb 100644
--- a/engines/mads/mads.cpp
+++ b/engines/mads/mads.cpp
@@ -38,7 +38,7 @@ namespace MADS {
MADSEngine::MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc) :
_gameDescription(gameDesc), Engine(syst), _randomSource("MADS") {
- // Initialize fields
+ // Initialize game/engine options
_easyMouse = true;
_invObjectsAnimated = true;
_textWindowStill = false;
@@ -83,8 +83,6 @@ void MADSEngine::initialize() {
MSurface::setVm(this);
MSprite::setVm(this);
- loadOptions();
-
Resources::init(this);
Conversation::init(this);
_debugger = new Debugger(this);
@@ -98,16 +96,14 @@ void MADSEngine::initialize() {
_audio = new AudioPlayer(_mixer, getGameID());
_game = Game::init(this);
+ loadOptions();
+
_screen.empty();
}
void MADSEngine::loadOptions() {
if (ConfMan.hasKey("EasyMouse"))
_easyMouse = ConfMan.getBool("EasyMouse");
- if (ConfMan.hasKey("InvObjectsAnimated"))
- _invObjectsAnimated = ConfMan.getBool("InvObjectsAnimated");
- if (ConfMan.hasKey("TextWindowStill"))
- _textWindowStill = ConfMan.getBool("TextWindowStill");
if (ConfMan.hasKey("mute") && ConfMan.getBool("mute")) {
_soundFlag = false;
@@ -116,16 +112,37 @@ void MADSEngine::loadOptions() {
_soundFlag = !ConfMan.hasKey("sfx_mute") || !ConfMan.getBool("sfx_mute");
_musicFlag = !ConfMan.hasGameDomain("music_mute") || !ConfMan.getBool("music_mute");
}
+
+ if (ConfMan.hasKey("ScreenFade"))
+ _screenFade = (ScreenFade)ConfMan.getInt("ScreenFade");
+ //if (ConfMan.hasKey("GraphicsDithering"))
+ // _dithering = ConfMan.getBool("GraphicsDithering");
+
+ if (getGameID() == GType_RexNebular) {
+ if (ConfMan.hasKey("InvObjectsAnimated"))
+ _invObjectsAnimated = ConfMan.getBool("InvObjectsAnimated");
+ if (ConfMan.hasKey("TextWindowStill"))
+ _textWindowStill = !ConfMan.getBool("TextWindowAnimated");
+ if (ConfMan.hasKey("NaughtyMode"))
+ _game->setNaughtyMode(ConfMan.getBool("NaughtyMode"));
+ }
}
void MADSEngine::saveOptions() {
ConfMan.setBool("EasyMouse", _easyMouse);
- ConfMan.setBool("InvObjectsAnimated", _invObjectsAnimated);
- ConfMan.setBool("TextWindowStill", _textWindowStill);
+ ConfMan.setInt("ScreenFade", (int)_screenFade);
+ //ConfMan.setBool("GraphicsDithering", _dithering);
+
ConfMan.setBool("mute", !_soundFlag && !_musicFlag);
ConfMan.setBool("sfx_mute", !_soundFlag && _musicFlag);
ConfMan.setBool("music_mute", _soundFlag && !_musicFlag);
+ if (getGameID() == GType_RexNebular) {
+ ConfMan.setBool("InvObjectsAnimated", _invObjectsAnimated);
+ ConfMan.setBool("TextWindowAnimated", !_textWindowStill);
+ ConfMan.setBool("NaughtyMode", _game->getNaughtyMode());
+ }
+
ConfMan.flushToDisk();
}