[Scummvm-cvs-logs] SF.net SVN: scummvm:[51138] scummvm/trunk/engines/made/database.cpp

Bluddy at users.sourceforge.net Bluddy at users.sourceforge.net
Thu Jul 22 13:20:16 CEST 2010


Revision: 51138
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51138&view=rev
Author:   Bluddy
Date:     2010-07-22 11:20:16 +0000 (Thu, 22 Jul 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/engines/made/database.cpp

Modified: scummvm/trunk/engines/made/database.cpp
===================================================================
--- scummvm/trunk/engines/made/database.cpp	2010-07-22 11:11:31 UTC (rev 51137)
+++ scummvm/trunk/engines/made/database.cpp	2010-07-22 11:20:16 UTC (rev 51138)
@@ -515,6 +515,8 @@
 		_objects[i]->load(*in);
 	}
 	delete in;
+	
+	_objectPropertyCache.clear();	// make sure to clear cache
 	return result;
 }
 
@@ -644,6 +646,8 @@
 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 @@
 	in->skip(64); // skip savegame description
 	in->read(_gameState, _gameStateSize);
 	delete in;
+	
+	_objectPropertyCache.clear();	// make sure to clear cache
+	
 	return 0;
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list