[Scummvm-cvs-logs] SF.net SVN: scummvm:[50600] scummvm/trunk/graphics/scaler/thumbnail_intern. cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Jul 2 18:52:09 CEST 2010
Revision: 50600
http://scummvm.svn.sourceforge.net/scummvm/?rev=50600&view=rev
Author: thebluegr
Date: 2010-07-02 16:52:09 +0000 (Fri, 02 Jul 2010)
Log Message:
-----------
Added a special case for KQ6 hires in the thumbnail creation code, which runs at a resolution of 640x440
Modified Paths:
--------------
scummvm/trunk/graphics/scaler/thumbnail_intern.cpp
Modified: scummvm/trunk/graphics/scaler/thumbnail_intern.cpp
===================================================================
--- scummvm/trunk/graphics/scaler/thumbnail_intern.cpp 2010-07-02 15:58:09 UTC (rev 50599)
+++ scummvm/trunk/graphics/scaler/thumbnail_intern.cpp 2010-07-02 16:52:09 UTC (rev 50600)
@@ -71,6 +71,17 @@
dstPtr += (dstPitch - 2 * width / 4);
src += 4 * srcPitch;
}
+
+ // Special case for KQ6 Windows, which runs at 640x440: fill the bottom
+ // with zeroes (a black bar)
+ if (width == 640 && height == 440) {
+ for (int y = 440; y < 480; y += 4) {
+ for (int x = 0; x < width; x += 4, dstPtr += 2)
+ *((uint16*)dstPtr) = 0;
+
+ dstPtr += (dstPitch - 2 * width / 4);
+ }
+ }
}
static void createThumbnail(const uint8 *src, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
@@ -188,6 +199,11 @@
uint16 newHeight = !(inHeight % 240) ? kThumbnailHeight2 : kThumbnailHeight1;
+ // Special case for KQ6 Windows, which runs at 640x440: expand the
+ // thumbnail so that it fits
+ if (width == 640 && inHeight == 440)
+ newHeight = kThumbnailHeight2;
+
out.create(kThumbnailWidth, newHeight, sizeof(uint16));
createThumbnail((const uint8 *)in.pixels, width * sizeof(uint16), (uint8 *)out.pixels, out.pitch, width, inHeight);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list