diff options
author | Paul Gilbert | 2014-11-09 18:29:15 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:27:07 -0500 |
commit | 4ce87a51a061c31b0f2db605712ce7e0cab5b5d7 (patch) | |
tree | 24e4cb6ef2b112acdea8148157383bea4897cf10 /engines | |
parent | 4448929812a5b8ca21eebb594e587a582392c9a3 (diff) | |
download | scummvm-rg350-4ce87a51a061c31b0f2db605712ce7e0cab5b5d7.tar.gz scummvm-rg350-4ce87a51a061c31b0f2db605712ce7e0cab5b5d7.tar.bz2 scummvm-rg350-4ce87a51a061c31b0f2db605712ce7e0cab5b5d7.zip |
ACCESS: Fix restoring screen after offering a character an inventory item
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/inventory.cpp | 5 | ||||
-rw-r--r-- | engines/access/room.cpp | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp index 45738462df..f2c87b2604 100644 --- a/engines/access/inventory.cpp +++ b/engines/access/inventory.cpp @@ -113,7 +113,7 @@ int InventoryManager::newDisplayInv() { _invModeFlag = true; _vm->_timers.saveTimers(); - if (room._tile && !_invRefreshFlag) { + if (!room._tile && !_invRefreshFlag) { saveScreens(); } @@ -360,6 +360,9 @@ void InventoryManager::restoreScreens() { _vm->_buffer1.w = _vm->_buffer1.pitch; _savedBuffer1.copyTo(&_vm->_buffer1); _savedScreen.copyTo(_vm->_screen); + + _savedBuffer1.free(); + _savedScreen.free(); } void InventoryManager::outlineIcon(int itemIndex) { diff --git a/engines/access/room.cpp b/engines/access/room.cpp index f1e499d1c9..e3a46159cf 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -163,6 +163,7 @@ void Room::clearRoom() { _vm->_scripts->freeScriptData(); _vm->freeCells(); freePlayField(); + freeTileData(); _vm->freeInactiveData(); _vm->_player->freeSprites(); } |