Corrected saving/loading of cached background areas
svn-id: r40594
This commit is contained in:
parent
5e5098bb96
commit
464b8cc7f3
1 changed files with 3 additions and 11 deletions
|
@ -474,18 +474,10 @@ static void syncIncrust(Common::Serializer &s) {
|
||||||
s.syncAsUint16LE(dummyWord);
|
s.syncAsUint16LE(dummyWord);
|
||||||
|
|
||||||
if (t->saveSize) {
|
if (t->saveSize) {
|
||||||
byte *buffer = (byte *)malloc(t->saveSize);
|
if (s.isLoading())
|
||||||
memset(buffer, 0, t->saveSize);
|
t->ptr = (byte *)malloc(t->saveSize);
|
||||||
s.syncBytes(buffer, t->saveSize);
|
|
||||||
free(buffer);
|
|
||||||
|
|
||||||
// TODO: convert graphic format here
|
s.syncBytes(t->ptr, t->saveSize);
|
||||||
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.isSaving())
|
if (s.isSaving())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue