diff options
author | Strangerke | 2011-08-27 23:54:18 +0200 |
---|---|---|
committer | Strangerke | 2011-08-27 23:54:18 +0200 |
commit | dc9cca5f46c513da929561b7bee2f78909881626 (patch) | |
tree | 8043fd995a2995ac940187c64c9c96cebdcd6e99 /engines/cge | |
parent | 4cb6c739a4cf75a0e072197845a54620db0b10b8 (diff) | |
download | scummvm-rg350-dc9cca5f46c513da929561b7bee2f78909881626.tar.gz scummvm-rg350-dc9cca5f46c513da929561b7bee2f78909881626.tar.bz2 scummvm-rg350-dc9cca5f46c513da929561b7bee2f78909881626.zip |
CGE: Fix level when restoring a game
Diffstat (limited to 'engines/cge')
-rw-r--r-- | engines/cge/cge_main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index a784b10c1d..f09b374b8a 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -224,6 +224,8 @@ Common::Error CGEEngine::loadGameState(int slot) { // Load the game loadGame(slot, NULL); + _lev = _oldLev; + _snail->addCom(kSnLevel, -1, _oldLev, &_cavLight); caveUp(); return Common::kNoError; @@ -331,7 +333,7 @@ void CGEEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteSt sndSetVolume(); } - if (! tiny) { // load sprites & pocket + if (!tiny) { // load sprites & pocket while (readStream->pos() < readStream->size()) { Sprite S(this, NULL); S.sync(s); @@ -350,7 +352,6 @@ void CGEEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteSt } } } - debugC(1, kCGEDebugEngine, "CGEEngine::saveSound()"); } bool CGEEngine::readSavegameHeader(Common::InSaveFile *in, SavegameHeader &header) { @@ -364,7 +365,8 @@ bool CGEEngine::readSavegameHeader(Common::InSaveFile *in, SavegameHeader &heade // Read in the string header.saveName.clear(); char ch; - while ((ch = (char)in->readByte()) != '\0') header.saveName += ch; + while ((ch = (char)in->readByte()) != '\0') + header.saveName += ch; // Get the thumbnail header.thumbnail = Graphics::loadThumbnail(*in); |