[Scummvm-cvs-logs] SF.net SVN: scummvm:[40594] scummvm/trunk/engines/cruise/saveload.cpp

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Fri May 15 08:46:56 CEST 2009


Revision: 40594
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40594&view=rev
Author:   dreammaster
Date:     2009-05-15 06:46:56 +0000 (Fri, 15 May 2009)

Log Message:
-----------
Corrected saving/loading of cached background areas

Modified Paths:
--------------
    scummvm/trunk/engines/cruise/saveload.cpp

Modified: scummvm/trunk/engines/cruise/saveload.cpp
===================================================================
--- scummvm/trunk/engines/cruise/saveload.cpp	2009-05-15 06:36:44 UTC (rev 40593)
+++ scummvm/trunk/engines/cruise/saveload.cpp	2009-05-15 06:46:56 UTC (rev 40594)
@@ -474,18 +474,10 @@
 		s.syncAsUint16LE(dummyWord);
 
 		if (t->saveSize) {
-			byte *buffer = (byte *)malloc(t->saveSize);
-			memset(buffer, 0, t->saveSize);
-			s.syncBytes(buffer, t->saveSize);
-			free(buffer);
+			if (s.isLoading())
+				t->ptr = (byte *)malloc(t->saveSize);
 
-			// TODO: convert graphic format here
-			if (s.isLoading()) {
-				int width = t->saveWidth;
-				int height = t->saveHeight;
-				t->ptr = (uint8*)malloc(width * height);
-				memset(t->ptr, 0, width * height);
-			}
+			s.syncBytes(t->ptr, t->saveSize);
 		}
 
 		if (s.isSaving())


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