[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src/arm blit.cpp,NONE,1.1 blit.h,NONE,1.1 PNOMain.cpp,1.4,1.5 native.h,1.1,1.2

Chris Apers chrilith at users.sourceforge.net
Wed Oct 6 05:07:58 CEST 2004


Update of /cvsroot/scummvm/scummvm/backends/PalmOS/Src/arm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2194

Modified Files:
	PNOMain.cpp native.h 
Added Files:
	blit.cpp blit.h 
Log Message:
FOTAQ ARM optimization

--- NEW FILE: blit.cpp ---
#include "native.h"
#include "endianutils.h"

#define MAIN_TYPE	BlitType
#include "macros.h"

#define memcpy MemMove

void Display_blit(void *userData68KP) {
// import variables
	SETPTR	(uint8 *,		dstBuf		)
	SETPTR	(const uint8 *,	srcBuf		)
	SET16	(uint16,		dstPitch	)
	SET16	(uint16,		srcPitch	)
	SET16	(uint16,	w		)
	SET16	(uint16,	h		)
	SET8	(bool,		xflip	)
	SET8	(bool,		masked	)
// end of import

	if (!masked) { // Unmasked always unflipped
		while (h--) {
			memcpy(dstBuf, srcBuf, w);
			srcBuf += srcPitch;
			dstBuf += dstPitch;
		}
	} else if (!xflip) { // Masked bitmap unflipped
		while (h--) {
			for(int i = 0; i < w; ++i) {
				uint8 b = *(srcBuf + i);
				if(b != 0) {
					*(dstBuf + i) = b;
				}
			}
			srcBuf += srcPitch;
			dstBuf += dstPitch;
		}
	} else { // Masked bitmap flipped
		while (h--) {
			for(int i = 0; i < w; ++i) {
				uint8 b = *(srcBuf + i);
				if(b != 0) {
					*(dstBuf - i) = b;
				}
			}
			srcBuf += srcPitch;
			dstBuf += dstPitch;
		}
	}
}
--- NEW FILE: blit.h ---
#ifndef __BLIT_H__
#define __BLIT_H__

#include <PalmOS.h>

#define COMPILE_BLIT
#define COMPILE_PACE

void Display_blit(void *userData68KP);

#endif
Index: PNOMain.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/arm/PNOMain.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- PNOMain.cpp	12 Sep 2004 12:42:07 -0000	1.4
+++ PNOMain.cpp	6 Oct 2004 09:35:02 -0000	1.5
@@ -43,5 +43,9 @@
 	Gdi_drawStripToScreen(userData68KP);
 #endif
 
+#ifdef COMPILE_BLIT
+	Display_blit(userData68KP);
+#endif
+
 	return ByteSwap32(retVal);
 }

Index: native.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/arm/native.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- native.h	12 Sep 2004 12:44:57 -0000	1.1
+++ native.h	6 Oct 2004 09:35:02 -0000	1.2
@@ -9,6 +9,7 @@
 #ifndef __PALM_OS__
 
 typedef UInt8 byte;
+typedef UInt8 uint8;
 typedef Int32 int32;
 typedef UInt16 uint16;
 typedef unsigned int uint;
@@ -21,7 +22,8 @@
 	RSC_WIDEPORTRAIT,
 	RSC_COPYRECT,
 	RSC_COSTUMEPROC3,
-	RSC_DRAWSTRIP
+	RSC_DRAWSTRIP,
+	RSC_BLIT
 };
 
 enum {
@@ -29,6 +31,7 @@
 	PNO_WIDE,
 	PNO_COSTUMEPROC3,
 	PNO_DRAWSTRIP,
+	PNO_BLIT,
 	PNO_COUNT
 };
 
@@ -109,9 +112,7 @@
 	int _outheight;
 
 	byte *_shadow_table;
-
-	 byte *_vm_proc_special_palette;
-	 byte *_palette;
+	byte *_palette;
 	byte _shadow_mode;
 } CostumeProc3Type;
 
@@ -128,6 +129,18 @@
 	uint16 _textSurface_pitch;
 } DrawStripType;
 
+// Queen
+typedef struct {
+	uint8 *dstBuf;
+	const uint8 *srcBuf;
+	uint16 dstPitch;
+	uint16 srcPitch;
+	uint16 w;
+	uint16 h;
+	byte xflip;
+	byte masked;
+} BlitType;
+
 // calls
 MemPtr	_PceInit(DmResID resID);
 UInt32	_PceCall(void *armP, void *userDataP);





More information about the Scummvm-git-logs mailing list