aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorFilippos Karapetis2010-07-02 16:52:09 +0000
committerFilippos Karapetis2010-07-02 16:52:09 +0000
commit1beff1a599064d90fd0f1a2accd627e7e780fd68 (patch)
tree529c0e8fd226edf77f43c50f60672e7345404079 /graphics
parentc1aecd0b9b32efb3a90f653eb36102f18543b49e (diff)
downloadscummvm-rg350-1beff1a599064d90fd0f1a2accd627e7e780fd68.tar.gz
scummvm-rg350-1beff1a599064d90fd0f1a2accd627e7e780fd68.tar.bz2
scummvm-rg350-1beff1a599064d90fd0f1a2accd627e7e780fd68.zip
Added a special case for KQ6 hires in the thumbnail creation code, which runs at a resolution of 640x440
svn-id: r50600
Diffstat (limited to 'graphics')
-rw-r--r--graphics/scaler/thumbnail_intern.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp
index 12048249f0..a27b77ccbb 100644
--- a/graphics/scaler/thumbnail_intern.cpp
+++ b/graphics/scaler/thumbnail_intern.cpp
@@ -71,6 +71,17 @@ void createThumbnail_4(const uint8 *src, uint32 srcPitch, uint8 *dstPtr, uint32
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 @@ static bool createThumbnail(Graphics::Surface &out, Graphics::Surface &in) {
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);