diff options
author | Torbjörn Andersson | 2006-05-28 09:21:32 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-05-28 09:21:32 +0000 |
commit | b17f0e8b6d2073fa91bbd6096bad367531d18baa (patch) | |
tree | 86a2486745237af72b639529f6673c7adb91df6c /engines/kyra/saveload.cpp | |
parent | e06ee0c4902ce0627b9461da6a39ff331379943a (diff) | |
download | scummvm-rg350-b17f0e8b6d2073fa91bbd6096bad367531d18baa.tar.gz scummvm-rg350-b17f0e8b6d2073fa91bbd6096bad367531d18baa.tar.bz2 scummvm-rg350-b17f0e8b6d2073fa91bbd6096bad367531d18baa.zip |
The Kyra settings are now stored in the config file instead of the savegames.
The settings in older savegames are ignored.
svn-id: r22705
Diffstat (limited to 'engines/kyra/saveload.cpp')
-rw-r--r-- | engines/kyra/saveload.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index cb34bd957d..d7deab6e77 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -30,7 +30,7 @@ #include "kyra/screen.h" #include "kyra/resource.h" -#define CURRENT_VERSION 4 +#define CURRENT_VERSION 5 namespace Kyra { void KyraEngine::loadGame(const char *fileName) { @@ -179,13 +179,16 @@ void KyraEngine::loadGame(const char *fileName) { if (_lastMusicCommand != -1) snd_playWanderScoreViaMap(_lastMusicCommand, 1); } + + // Version 4 stored settings in the savegame. As of version 5, they are + // handled by the config manager. - if (version >= 4) { - _configTextspeed = in->readByte(); - _configWalkspeed = in->readByte(); - _configMusic = in->readByte() != 0; - _configSounds = in->readByte() != 0; - _configVoice = in->readByte(); + if (version == 4) { + in->readByte(); // Text speed + in->readByte(); // Walk speed + in->readByte(); // Music + in->readByte(); // Sound + in->readByte(); // Voice } loadMainScreen(8); @@ -317,12 +320,6 @@ void KyraEngine::saveGame(const char *fileName, const char *saveName) { out->writeSint16BE(_lastMusicCommand); - out->writeByte(_configTextspeed); - out->writeByte(_configWalkspeed); - out->writeByte(_configMusic); - out->writeByte(_configSounds); - out->writeByte(_configVoice); - out->flush(); // check for errors |