aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
diff options
context:
space:
mode:
authorRobert Špalek2009-11-12 23:33:22 +0000
committerRobert Špalek2009-11-12 23:33:22 +0000
commitde6dc9a78456e77dc10bda74b91d5f59f4c0fbd3 (patch)
tree4ac376de2fd8c1eb4545fa77426af1105db07c0e /engines/draci
parent5db47f54c3cf85fcc7f48e12029ac1032cc43031 (diff)
downloadscummvm-rg350-de6dc9a78456e77dc10bda74b91d5f59f4c0fbd3.tar.gz
scummvm-rg350-de6dc9a78456e77dc10bda74b91d5f59f4c0fbd3.tar.bz2
scummvm-rg350-de6dc9a78456e77dc10bda74b91d5f59f4c0fbd3.zip
Handled loading/saving from the map location
svn-id: r45876
Diffstat (limited to 'engines/draci')
-rw-r--r--engines/draci/draci.cpp10
-rw-r--r--engines/draci/game.cpp3
-rw-r--r--engines/draci/saveload.cpp1
3 files changed, 9 insertions, 5 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 566d3056da..fa0cf495a2 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -246,7 +246,13 @@ void DraciEngine::handleEvents() {
if (escRoom >= 0) {
// Schedule room change
- // TODO: gate 0 is not always the best one for returning from the map
+ // TODO: gate 0 (always present) is not
+ // always best for returning from the
+ // map, e.g. in the starting location.
+ // also, after loading the game, we
+ // shouldn't run any gate program, but
+ // rather restore the state of all
+ // objects.
_game->scheduleEnteringRoomUsingGate(escRoom, 0);
// Immediately cancel any running animation or dubbing.
@@ -394,8 +400,6 @@ Common::Error DraciEngine::loadGameState(int slot) {
// here are now, without waiting for any other code to finish, thanks
// to our constraint in canLoadGameStateCurrently() and to having
// enterNewRoom() called right after we exit from here.
- //
- // TODO: Handle saving in the map room
return loadSavegameData(slot, this);
}
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index ea6e0aa9c6..5e124892df 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -1162,9 +1162,10 @@ void Game::deleteObjectAnimations() {
bool Game::enterNewRoom() {
if (_newRoom == getRoomNum() && !isReloaded()) {
- // If the game has been reloaded, force reloading all animations.
+ _vm->_script->endCurrentProgram(false);
return true;
}
+ // If the game has been reloaded, force reloading all animations.
setIsReloaded(false);
debugC(1, kDraciLogicDebugLevel, "Entering room %d using gate %d", _newRoom, _newGate);
_vm->_mouse->cursorOff();
diff --git a/engines/draci/saveload.cpp b/engines/draci/saveload.cpp
index 57cfe5a8ad..b0c5dd1f78 100644
--- a/engines/draci/saveload.cpp
+++ b/engines/draci/saveload.cpp
@@ -151,7 +151,6 @@ Common::Error loadSavegameData(int saveGameIdx, DraciEngine *vm) {
// Post-processing
vm->_game->scheduleEnteringRoomUsingGate(vm->_game->getRoomNum(), 0);
- vm->_game->setRoomNum(vm->_game->getPreviousRoomNum());
vm->_game->setExitLoop(true);
vm->_game->setIsReloaded(true);