aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorPaul Gilbert2009-05-15 06:46:56 +0000
committerPaul Gilbert2009-05-15 06:46:56 +0000
commit464b8cc7f3cf1f6f80a562ea8eedf4dd47a54f4c (patch)
tree5e3bd526833f55f91c33d3b79f006c1bf0645946 /engines/cruise
parent5e5098bb966505e51bcc28fd42250678c0954a14 (diff)
downloadscummvm-rg350-464b8cc7f3cf1f6f80a562ea8eedf4dd47a54f4c.tar.gz
scummvm-rg350-464b8cc7f3cf1f6f80a562ea8eedf4dd47a54f4c.tar.bz2
scummvm-rg350-464b8cc7f3cf1f6f80a562ea8eedf4dd47a54f4c.zip
Corrected saving/loading of cached background areas
svn-id: r40594
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/saveload.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index da25e353b8..dba4041727 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -474,18 +474,10 @@ static void syncIncrust(Common::Serializer &s) {
s.syncAsUint16LE(dummyWord);
if (t->saveSize) {
- byte *buffer = (byte *)malloc(t->saveSize);
- memset(buffer, 0, t->saveSize);
- s.syncBytes(buffer, t->saveSize);
- free(buffer);
-
- // 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);
- }
+ if (s.isLoading())
+ t->ptr = (byte *)malloc(t->saveSize);
+
+ s.syncBytes(t->ptr, t->saveSize);
}
if (s.isSaving())