aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/thumbnail.cpp
diff options
context:
space:
mode:
authorMax Horn2006-02-25 02:47:22 +0000
committerMax Horn2006-02-25 02:47:22 +0000
commit142bfeb35622af3c33bb70603a1926e884ad113d (patch)
tree0feee8891f0ad44cb34f59d7490553449ca4e3de /engines/scumm/thumbnail.cpp
parent075dc8a538f2c3ea6efa68c3256a21a1a654ef42 (diff)
downloadscummvm-rg350-142bfeb35622af3c33bb70603a1926e884ad113d.tar.gz
scummvm-rg350-142bfeb35622af3c33bb70603a1926e884ad113d.tar.bz2
scummvm-rg350-142bfeb35622af3c33bb70603a1926e884ad113d.zip
Some more MKID -> MKID_BE changes
svn-id: r20867
Diffstat (limited to 'engines/scumm/thumbnail.cpp')
-rw-r--r--engines/scumm/thumbnail.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/scumm/thumbnail.cpp b/engines/scumm/thumbnail.cpp
index 13e9ef49bf..f1854f71c7 100644
--- a/engines/scumm/thumbnail.cpp
+++ b/engines/scumm/thumbnail.cpp
@@ -56,11 +56,12 @@ inline void colorToRGB(uint16 color, uint8 &r, uint8 &g, uint8 &b) {
Graphics::Surface *ScummEngine::loadThumbnail(Common::InSaveFile *file) {
ThumbnailHeader header;
- file->read(&header.type, 4);
+
+ header.type = file->readUint32BE();
// We also accept the bad 'BMHT' header here, for the sake of compatibility
// with some older savegames which were written incorrectly due to a bug in
// ScummVM which wrote the thumb header type incorrectly on LE systems.
- if (header.type != MKID('THMB') && header.type != MKID('BMHT'))
+ if (header.type != MKID_BE('THMB') && header.type != MKID_BE('BMHT'))
return 0;
header.size = file->readUint32BE();
@@ -109,7 +110,7 @@ void ScummEngine::saveThumbnail(Common::OutSaveFile *file) {
thumb.create(kThumbnailWidth, kThumbnailHeight2, sizeof(uint16));
ThumbnailHeader header;
- header.type = MKID('THMB');
+ 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.
@@ -122,7 +123,7 @@ void ScummEngine::saveThumbnail(Common::OutSaveFile *file) {
header.height = thumb.h;
header.bpp = thumb.bytesPerPixel;
- file->write(&header.type, 4);
+ file->writeUint32BE(header.type);
file->writeUint32BE(header.size);
file->writeByte(header.version);
file->writeUint16BE(header.width);