diff options
| author | Max Horn | 2005-05-08 22:54:16 +0000 |
|---|---|---|
| committer | Max Horn | 2005-05-08 22:54:16 +0000 |
| commit | 9b8d88a1136ba5c86498cc9367f0d4b942610c68 (patch) | |
| tree | 3a9ee81370cff78f0d1623a386c9f19f9defd500 /common/scaler.h | |
| parent | 3279513b6490226d39b1f2eee03ddf7b48c4f5be (diff) | |
| download | scummvm-rg350-9b8d88a1136ba5c86498cc9367f0d4b942610c68.tar.gz scummvm-rg350-9b8d88a1136ba5c86498cc9367f0d4b942610c68.tar.bz2 scummvm-rg350-9b8d88a1136ba5c86498cc9367f0d4b942610c68.zip | |
Code to grab & downscale the screen content (used for thumbnail creation, part of patch #1163026)
svn-id: r17978
Diffstat (limited to 'common/scaler.h')
| -rw-r--r-- | common/scaler.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/common/scaler.h b/common/scaler.h index 8460760bf6..37f7be99ff 100644 --- a/common/scaler.h +++ b/common/scaler.h @@ -23,6 +23,7 @@ #include "common/stdafx.h" #include "common/scummsys.h" +#include "graphics/surface.h" extern void InitScalers(uint32 BitFormat); @@ -59,5 +60,21 @@ extern void makeRectStretchable(int &x, int &y, int &w, int &h); extern int stretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY); +// creates a 160x100 thumbnail for 320x200 games +// and 160x120 thumbnail for 320x240 and 640x480 games +// only 565 mode +enum { + kThumbnailWidth = 160, + kThumbnailHeight1 = 100, + kThumbnailHeight2 = 120 +}; +extern void createThumbnail(const uint8* src, uint32 srcPitch, uint8* dstPtr, uint32 dstPitch, int width, int height); + +/** + * creates a thumbnail from the current screen (without overlay) + * @param surf a surface (will always have 16 bpp after this for now) + * @return false if a error occured + */ +extern bool createThumbnailFromScreen(Graphics::Surface* surf); #endif |
