aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorMax Horn2003-10-08 21:59:23 +0000
committerMax Horn2003-10-08 21:59:23 +0000
commitd1773647159f9ef1393d7a1d33204de5886edce5 (patch)
treed31f1a3689fa34a525671f21d7a858fe8570762f /simon
parent3c78c0929c553fd67016f87c6cdc38d3f50d7ca2 (diff)
downloadscummvm-rg350-d1773647159f9ef1393d7a1d33204de5886edce5.tar.gz
scummvm-rg350-d1773647159f9ef1393d7a1d33204de5886edce5.tar.bz2
scummvm-rg350-d1773647159f9ef1393d7a1d33204de5886edce5.zip
new config manager. not everything is completed, and some things will still be changed, but it seems to work well enough to put it into CVS
svn-id: r10687
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index bb4b25133d..9692c0ed29 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -24,7 +24,7 @@
#include "base/gameDetector.h"
#include "base/plugins.h"
-#include "common/config-file.h"
+#include "common/config-manager.h"
#include "common/file.h"
#include "simon/simon.h"
@@ -471,26 +471,26 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
if (!_mixer->bindToSystem(syst))
warning("Sound initialization failed. "
"Features of the game that depend on sound synchronization will most likely break");
- set_volume(detector->_sfx_volume);
+ set_volume(ConfMan.getInt("sfx_volume"));
// Setup midi driver
MidiDriver *driver = detector->createMidi();
if (!driver)
driver = MidiDriver_ADLIB_create(_mixer);
- else if (detector->_native_mt32)
- driver->property (MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
+ else if (ConfMan.getBool("native_mt32"))
+ driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
- midi.mapMT32toGM (!(_game & GF_SIMON2) && !detector->_native_mt32);
+ midi.mapMT32toGM (!(_game & GF_SIMON2) && !ConfMan.getBool("native_mt32"));
midi.set_driver(driver);
int ret = midi.open();
if (ret)
warning ("MIDI Player init failed: \"%s\"", midi.getErrorName (ret));
- midi.set_volume(detector->_music_volume);
+ midi.set_volume(ConfMan.getInt("music_volume"));
_debugMode = detector->_debugMode;
- _debugLevel = detector->_debugLevel;
- _language = detector->_language;
- _noSubtitles = detector->_noSubtitles;
+ _debugLevel = ConfMan.getInt("debuglevel");
+ _language = GameDetector::parseLanguage(ConfMan.get("language"));
+ _noSubtitles = ConfMan.getBool("nosubtitles");
_system->init_size(320, 200);