diff options
author | Johannes Schickel | 2006-07-22 16:19:00 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-07-22 16:19:00 +0000 |
commit | d272f6c4835457ac785ebd5495ccbb4abace02bf (patch) | |
tree | e53543a2d248ae5840f86b5136143bd95ddd9f38 /engines/scumm/thumbnail.cpp | |
parent | 16de659f597ae8985ecbca6a01cba18b0132d069 (diff) | |
download | scummvm-rg350-d272f6c4835457ac785ebd5495ccbb4abace02bf.tar.gz scummvm-rg350-d272f6c4835457ac785ebd5495ccbb4abace02bf.tar.bz2 scummvm-rg350-d272f6c4835457ac785ebd5495ccbb4abace02bf.zip |
Hardcoding header size of the Thumbnail and of the Info section of scumm games.
(because packed struct handling changed and gcc seems not to be happy with it)
This should unbreak new save games made after this commit.
svn-id: r23565
Diffstat (limited to 'engines/scumm/thumbnail.cpp')
-rw-r--r-- | engines/scumm/thumbnail.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/engines/scumm/thumbnail.cpp b/engines/scumm/thumbnail.cpp index 155637bb54..1458cec359 100644 --- a/engines/scumm/thumbnail.cpp +++ b/engines/scumm/thumbnail.cpp @@ -43,6 +43,8 @@ struct ThumbnailHeader { byte bpp; }; +#define ThumbnailHeaderSize (4+4+1+2+2+1) + #if defined(END_PACK_STRUCTS) #pragma END_PACK_STRUCTS #endif @@ -111,13 +113,7 @@ void ScummEngine::saveThumbnail(Common::OutSaveFile *file) { ThumbnailHeader header; header.type = MKID_BE('THMB'); -#if defined(PALMOS_ARM) || defined(__GP32__) - // sizeof(header) is hardcoded here, because the compiler add padding to - // have a 4byte aligned struct and there is no easy way to pack it. - header.size = 14 + thumb.w*thumb.h*thumb.bytesPerPixel; -#else - header.size = sizeof(header) + thumb.w*thumb.h*thumb.bytesPerPixel; -#endif + header.size = ThumbnailHeaderSize + thumb.w*thumb.h*thumb.bytesPerPixel; header.version = THMB_VERSION; header.width = thumb.w; header.height = thumb.h; |