aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2007-11-17 11:03:18 +0000
committerPaul Gilbert2007-11-17 11:03:18 +0000
commit9a07589de815ce0e05a5a3398f084a37a3e56c57 (patch)
tree0b90d4384c8983b3c3688f7e9300357f6a5c042f
parent813ca5cf39633851451b9aac779003f9ed5c4c45 (diff)
downloadscummvm-rg350-9a07589de815ce0e05a5a3398f084a37a3e56c57.tar.gz
scummvm-rg350-9a07589de815ce0e05a5a3398f084a37a3e56c57.tar.bz2
scummvm-rg350-9a07589de815ce0e05a5a3398f084a37a3e56c57.zip
Bugfix to properly clear previous room layers and fade in the screen when restoring a game
svn-id: r29537
-rw-r--r--engines/lure/room.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index fa69255ee7..5b7ca082f8 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -112,13 +112,6 @@ Room &Room::getReference() {
void Room::leaveRoom() {
Resources &r = Resources::getReference();
- // Deallocate graphical layers from the room
- for (int layerNum = 0; layerNum < _numLayers; ++layerNum)
- if (_layers[layerNum]) {
- delete _layers[layerNum];
- _layers[layerNum] = NULL;
- }
-
// Scan through the hotspot list and remove any uneeded entries
HotspotList &list = r.activeHotspots();
@@ -545,6 +538,14 @@ void Room::setRoomNumber(uint16 newRoomNumber, bool showOverlay) {
// disk cursor as a room changes
_screen.paletteFadeOut(GAME_COLOURS - 1);
+ // Deallocate graphical layers from the room
+ for (int layerNum = 0; layerNum < _numLayers; ++layerNum) {
+ if (_layers[layerNum]) {
+ delete _layers[layerNum];
+ _layers[layerNum] = NULL;
+ }
+ }
+
if (leaveFlag) {
leaveRoom();
Sound.removeSounds();
@@ -595,7 +596,7 @@ void Room::setRoomNumber(uint16 newRoomNumber, bool showOverlay) {
update();
_screen.update();
- if (leaveFlag)
+ if (fadeFlag)
_screen.paletteFadeIn(&p);
else
_screen.setPalette(&p);