diff options
author | Alyssa Milburn | 2011-05-23 12:12:26 +0200 |
---|---|---|
committer | Alyssa Milburn | 2011-05-23 12:12:26 +0200 |
commit | f1a7ec711772d5582fc06c7f8209b406e5fb3717 (patch) | |
tree | aadd49fc158ef821fc965751c81d1dcd5b893819 | |
parent | 998323129420ebde730074585d7aab9f093368a8 (diff) | |
download | scummvm-rg350-f1a7ec711772d5582fc06c7f8209b406e5fb3717.tar.gz scummvm-rg350-f1a7ec711772d5582fc06c7f8209b406e5fb3717.tar.bz2 scummvm-rg350-f1a7ec711772d5582fc06c7f8209b406e5fb3717.zip |
SWORD25: Fix screenshot endianism issue
-rw-r--r-- | engines/sword25/gfx/screenshot.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp index 8306d9ce6f..11b79020fd 100644 --- a/engines/sword25/gfx/screenshot.cpp +++ b/engines/sword25/gfx/screenshot.cpp @@ -53,6 +53,8 @@ bool Screenshot::saveToFile(Graphics::Surface *data, Common::WriteStream *stream for (uint y = 0; y < data->h; y++) { for (uint x = 0; x < data->w; x++) { + // This is only called by createThumbnail below, which + // provides a fake 'surface' with LE data in it. uint32 srcPixel = READ_LE_UINT32(pSrc); pSrc += sizeof(uint32); stream->writeByte((srcPixel >> 16) & 0xff); // R @@ -93,7 +95,7 @@ Common::SeekableReadStream *Screenshot::createThumbnail(Graphics::Surface *data) for (int j = 0; j < 4; ++j) { const uint32 *srcP = (const uint32 *)data->getBasePtr(x * 4, y * 4 + j + 50); for (int i = 0; i < 4; ++i) { - uint32 pixel = READ_LE_UINT32(srcP + i); + uint32 pixel = READ_UINT32(srcP + i); alpha += (pixel >> 24); red += (pixel >> 16) & 0xff; green += (pixel >> 8) & 0xff; |