aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/draci/game.cpp')
-rw-r--r--engines/draci/game.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 8539751c87..7516da3c03 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -1381,8 +1381,22 @@ bool Game::enterNewRoom() {
_persons[kDragonObject]._y = 0;
}
- // Set the appropriate loop statu before loading the room
+ // Set the appropriate loop status before loading the room
setLoopStatus(kStatusGate);
+
+ // Make sure the possible walking path from the previous room is
+ // cleaned up. Some rooms (e.g., the map) don't support walking.
+ _walkingState.stopWalking();
+
+ // Clean the mouse and animation title. It gets first updated in
+ // loop(), hence if the hero walks during the initialization scripts,
+ // the old values would remain otherwise.
+ _vm->_mouse->setCursorType(kNormalCursor);
+ Animation *titleAnim = _vm->_anims->getAnimation(kTitleText);
+ titleAnim->markDirtyRect(_vm->_screen->getSurface());
+ Text *title = reinterpret_cast<Text *>(titleAnim->getCurrentFrame());
+ title->setText("");
+
// Reset the flag allowing to run the scripts. It may have been turned
// on by pressing Escape in the intro or in the map room.
_vm->_script->endCurrentProgram(false);
@@ -1406,8 +1420,6 @@ bool Game::enterNewRoom() {
// Reset the loop status.
setLoopStatus(kStatusOrdinary);
- _vm->_mouse->setCursorType(kNormalCursor);
-
setIsReloaded(false);
if (_vm->_script->shouldEndProgram()) {
// Escape pressed during the intro or map animations run in the