Skip to content

Commit

Permalink
DRASCULA: Improve loading savegames in Pendulum scene
Browse files Browse the repository at this point in the history
The previous fix only fixed the incomplete state when loading from
the launcher. Now this is fixed when loading from the game as well.
It also fixes loading a savegame from the first stage of the pendulum
scene (when the protagonist is not visible) to any other scene in
chapter 6. The protagonist was not made visible again when loading
the savegame.
  • Loading branch information
criezy committed Apr 11, 2016
1 parent 24d3e46 commit 57a0b08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
4 changes: 0 additions & 4 deletions engines/drascula/drascula.cpp
Expand Up @@ -536,10 +536,6 @@ bool DrasculaEngine::runCurrentChapter() {
if (!loadGame(_currentSaveSlot)) {
return true;
}
// When loading room 102 while being attached below the pendulum we
// need to call activatePendulum() to properly initialized the scene.
if (_roomNumber == 102 && flags[1] == 2)
activatePendulum();
loadPic("auxdr.alg", drawSurface2);
}
}
Expand Down
18 changes: 18 additions & 0 deletions engines/drascula/saveload.cpp
Expand Up @@ -255,6 +255,19 @@ bool DrasculaEngine::loadGame(int slot) {
if (!(in = _saveFileMan->openForLoading(saveFileName))) {
error("missing savegame file %s", saveFileName.c_str());
}

// If we currently are in room 102 while being attached below the pendulum
// the character is invisible and some surface are temporarily used for other
// things. Reset those before loading the savegame otherwise we may have some
// issues such as the protagonist being invisible after reloading a savegame.
if (_roomNumber == 102 && flags[1] == 2) {
hare_se_ve = 1;
loadPic(96, frontSurface);
loadPic(97, frontSurface);
loadPic(97, extraSurface);
loadPic(99, backSurface);
}


loadMetaData(in, slot, true);
Graphics::skipThumbnail(*in);
Expand Down Expand Up @@ -289,6 +302,11 @@ bool DrasculaEngine::loadGame(int slot) {
}
enterRoom(roomNum);
selectVerb(kVerbNone);

// When loading room 102 while being attached below the pendulum we
// need to call activatePendulum() to properly initialized the scene.
if (_roomNumber == 102 && flags[1] == 2)
activatePendulum();

return true;
}
Expand Down

0 comments on commit 57a0b08

Please sign in to comment.