diff options
author | Yotam Barnoy | 2010-07-22 11:20:16 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-07-22 11:20:16 +0000 |
commit | 68783fa01cb144e676137444126e3c9d6caf0fa9 (patch) | |
tree | f3111ec504ed41b36470dad4090e55bf3b9844eb /engines/made | |
parent | ed1ae39e4685e000cac0810ffeea01356fa55146 (diff) | |
download | scummvm-rg350-68783fa01cb144e676137444126e3c9d6caf0fa9.tar.gz scummvm-rg350-68783fa01cb144e676137444126e3c9d6caf0fa9.tar.bz2 scummvm-rg350-68783fa01cb144e676137444126e3c9d6caf0fa9.zip |
MADE: fixed bug 3029750 caused by caching from commit 46102.
Cache needed to be cleared every time we load a game. Otherwise, those platforms that happen to use the exact same addresses (PC) were ok, but those platforms that had different addresses (PSP for example) would get messed up.
svn-id: r51138
Diffstat (limited to 'engines/made')
-rw-r--r-- | engines/made/database.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/made/database.cpp b/engines/made/database.cpp index ae1a08e1b5..51308cb7e5 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -515,6 +515,8 @@ int16 GameDatabaseV2::loadgame(const char *filename, int16 version) { _objects[i]->load(*in); } delete in; + + _objectPropertyCache.clear(); // make sure to clear cache return result; } @@ -644,6 +646,8 @@ void GameDatabaseV3::load(Common::SeekableReadStream &sourceS) { void GameDatabaseV3::reloadFromStream(Common::SeekableReadStream &sourceS) { sourceS.seek(_gameStateOffs); sourceS.read(_gameState, _gameStateSize); + + _objectPropertyCache.clear(); // make sure to clear cache } bool GameDatabaseV3::getSavegameDescription(const char *filename, Common::String &description, int16 version) { @@ -734,6 +738,9 @@ int16 GameDatabaseV3::loadgame(const char *filename, int16 version) { in->skip(64); // skip savegame description in->read(_gameState, _gameStateSize); delete in; + + _objectPropertyCache.clear(); // make sure to clear cache + return 0; } |