[Scummvm-cvs-logs] CVS: scummvm/common module.mk,1.20,1.21 scaler.h,1.29,1.30

Max Horn fingolfin at users.sourceforge.net
Sun May 8 15:55:36 CEST 2005


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10247

Modified Files:
	module.mk scaler.h 
Log Message:
Code to grab & downscale the screen content (used for thumbnail creation, part of patch #1163026)

Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/module.mk,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- module.mk	23 Apr 2005 14:30:53 -0000	1.20
+++ module.mk	8 May 2005 22:54:16 -0000	1.21
@@ -22,7 +22,8 @@
 	common/scaler/hq3x.o \
 	common/scaler/scale2x.o \
 	common/scaler/scale3x.o \
-	common/scaler/scalebit.o
+	common/scaler/scalebit.o \
+	common/scaler/thumbnail.o
 
 ifdef HAVE_NASM
 MODULE_OBJS += \

Index: scaler.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- scaler.h	9 Apr 2005 13:31:47 -0000	1.29
+++ scaler.h	8 May 2005 22:54:16 -0000	1.30
@@ -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 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





More information about the Scummvm-git-logs mailing list