Add config option for Kyra1 16 color, it'll only use dithering when "16_color" is set to true.

svn-id: r41847
This commit is contained in:
Johannes Schickel 2009-06-25 01:29:55 +00:00
parent 0ec0b1d498
commit 049c9b0c86
3 changed files with 7 additions and 3 deletions

View File

@ -157,7 +157,7 @@ KyraEngine_LoK::~KyraEngine_LoK() {
}
Common::Error KyraEngine_LoK::init() {
if (_flags.platform == Common::kPlatformPC98 && _flags.useHiResOverlay)
if (_flags.platform == Common::kPlatformPC98 && _flags.useHiResOverlay && ConfMan.getBool("16_color"))
_screen = new Screen_LoK_16(this, _system);
else
_screen = new Screen_LoK(this, _system);
@ -909,6 +909,9 @@ void KyraEngine_LoK::registerDefaultSettings() {
// Most settings already have sensible defaults. This one, however, is
// specific to the Kyra engine.
ConfMan.registerDefault("walkspeed", 2);
if (_flags.platform == Common::kPlatformPC98 && _flags.useHiResOverlay)
ConfMan.registerDefault("16_color", false);
}
void KyraEngine_LoK::readSettings() {

View File

@ -94,8 +94,6 @@ void KyraEngine_v1::pauseEngineIntern(bool pause) {
}
Common::Error KyraEngine_v1::init() {
registerDefaultSettings();
// Setup mixer
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));

View File

@ -181,13 +181,16 @@ protected:
// Engine APIs
virtual Common::Error init();
virtual Common::Error go() = 0;
virtual Common::Error run() {
Common::Error err;
registerDefaultSettings();
err = init();
if (err != Common::kNoError)
return err;
return go();
}
virtual ::GUI::Debugger *getDebugger();
virtual bool hasFeature(EngineFeature f) const;
virtual void pauseEngineIntern(bool pause);