aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kasak2009-07-08 00:40:22 +0000
committerDenis Kasak2009-07-08 00:40:22 +0000
commit32d692aea6f57b41360f433ba65ad1b3459a7e86 (patch)
tree0b303a94ffafae891adcc6332ee7911f7d630d7b
parentd8c33f6836c821287ecb5fd8cfee12fb4dea2ef2 (diff)
downloadscummvm-rg350-32d692aea6f57b41360f433ba65ad1b3459a7e86.tar.gz
scummvm-rg350-32d692aea6f57b41360f433ba65ad1b3459a7e86.tar.bz2
scummvm-rg350-32d692aea6f57b41360f433ba65ad1b3459a7e86.zip
Made the engine clear some more caches when it changes rooms (room, sprites and palette caches). Made the DraciEngine destructor delete the rooms, overlays and animations archives.
svn-id: r42250
-rw-r--r--engines/draci/draci.cpp3
-rw-r--r--engines/draci/game.cpp5
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index cef66c6092..e9df63f9cd 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -176,6 +176,9 @@ DraciEngine::~DraciEngine() {
delete _paletteArchive;
delete _objectsArchive;
delete _spritesArchive;
+ delete _roomsArchive;
+ delete _overlaysArchive;
+ delete _animationsArchive;
// Remove all of our debug levels here
Common::clearAllDebugChannels();
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index cb8385b741..ac26fb5871 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -316,7 +316,10 @@ void Game::loadOverlays() {
}
void Game::changeRoom(uint roomNum) {
- _vm->_roomsArchive->clearCache();
+ _vm->_roomsArchive->clearCache();
+ _vm->_spritesArchive->clearCache();
+ _vm->_paletteArchive->clearCache();
+
_vm->_anims->deleteOverlays();
int oldRoomNum = _currentRoom._roomNum;