diff options
author | md5 | 2011-05-13 19:19:58 +0300 |
---|---|---|
committer | md5 | 2011-05-13 19:19:58 +0300 |
commit | b3bc35c62abb3a3b707409e2eac61ac2d2978d91 (patch) | |
tree | ff7abbf14fee43cd5867735acccf31396dec934d /engines | |
parent | 7543c3ba5fcc914a4031fc8328aacd3d28c7055d (diff) | |
download | scummvm-rg350-b3bc35c62abb3a3b707409e2eac61ac2d2978d91.tar.gz scummvm-rg350-b3bc35c62abb3a3b707409e2eac61ac2d2978d91.tar.bz2 scummvm-rg350-b3bc35c62abb3a3b707409e2eac61ac2d2978d91.zip |
SWORD25: Added a version field for savegame thumbnails
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sword25/gfx/image/renderedimage.cpp | 1 | ||||
-rw-r--r-- | engines/sword25/gfx/screenshot.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp index 44d32f03f7..23bf2623ad 100644 --- a/engines/sword25/gfx/image/renderedimage.cpp +++ b/engines/sword25/gfx/image/renderedimage.cpp @@ -105,6 +105,7 @@ static bool decodeThumbnail(const byte *pFileData, uint fileSize, byte *&pUncomp const byte *src = pFileData + 4; // skip header width = READ_LE_UINT16(src); src += 2; height = READ_LE_UINT16(src); src += 2; + src++; // version, ignored for now pitch = width * 4; uint32 totalSize = pitch * height; diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp index bfe732a596..8306d9ce6f 100644 --- a/engines/sword25/gfx/screenshot.cpp +++ b/engines/sword25/gfx/screenshot.cpp @@ -39,6 +39,8 @@ namespace Sword25 { +#define THUMBNAIL_VERSION 1 + bool Screenshot::saveToFile(Graphics::Surface *data, Common::WriteStream *stream) { // Convert the RGBA data to RGB const byte *pSrc = (const byte *)data->getBasePtr(0, 0); @@ -47,6 +49,7 @@ bool Screenshot::saveToFile(Graphics::Surface *data, Common::WriteStream *stream stream->writeUint32BE(MKTAG('S','C','R','N')); // SCRN, short for "Screenshot" stream->writeUint16LE(data->w); stream->writeUint16LE(data->h); + stream->writeByte(THUMBNAIL_VERSION); for (uint y = 0; y < data->h; y++) { for (uint x = 0; x < data->w; x++) { |