[Scummvm-cvs-logs] scummvm master -> f1a7ec711772d5582fc06c7f8209b406e5fb3717
fuzzie
fuzzie at fuzzie.org
Mon May 23 12:14:05 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f1a7ec7117 SWORD25: Fix screenshot endianism issue
Commit: f1a7ec711772d5582fc06c7f8209b406e5fb3717
https://github.com/scummvm/scummvm/commit/f1a7ec711772d5582fc06c7f8209b406e5fb3717
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-05-23T03:12:26-07:00
Commit Message:
SWORD25: Fix screenshot endianism issue
Changed paths:
engines/sword25/gfx/screenshot.cpp
diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp
index 8306d9c..11b7902 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;
More information about the Scummvm-git-logs
mailing list