From 75bbe04280d1a919d6113097e21636265ff412d2 Mon Sep 17 00:00:00 2001 From: Robert Špalek Date: Sun, 8 Nov 2009 06:56:30 +0000 Subject: Fix enabling mouse cursor when entering a room. It used to have a wrong palette. svn-id: r45749 --- engines/draci/game.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index daad892b6c..f8b86a7d7a 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -1356,6 +1356,7 @@ bool Game::enterNewRoom() { return true; } debugC(1, kDraciLogicDebugLevel, "Entering room %d using gate %d", _newRoom, _newGate); + _vm->_mouse->cursorOff(); // TODO: maybe wait till all sounds end instead of stopping them. // In any case, make sure all sounds are stopped before we deallocate @@ -1411,6 +1412,13 @@ bool Game::enterNewRoom() { // cleaned up. Some rooms (e.g., the map) don't support walking. _walkingState.stopWalking(); + // 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); + + loadRoom(_newRoom); + loadOverlays(); + // 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. @@ -1420,13 +1428,6 @@ bool Game::enterNewRoom() { Text *title = reinterpret_cast(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); - - loadRoom(_newRoom); - loadOverlays(); - // Run the program for the gate the dragon came through runGateProgram(_newGate); -- cgit v1.2.3