[Scummvm-cvs-logs] CVS: scummvm/backends/wince pocketpc.cpp,1.1.1.1,1.2

Michael Pearce chuzwuzza at users.sourceforge.net
Sun Sep 8 22:57:03 CEST 2002


Update of /cvsroot/scummvm/scummvm/backends/wince
In directory usw-pr-cvs1:/tmp/cvs-serv24674/backends/wince

Modified Files:
	pocketpc.cpp 
Log Message:
Applied roever's screen effects patch (#602595) and fixed LethalWP's Makefile ;)


Index: pocketpc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/pocketpc.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- pocketpc.cpp	21 Aug 2002 16:07:20 -0000	1.1.1.1
+++ pocketpc.cpp	9 Sep 2002 05:56:10 -0000	1.2
@@ -95,6 +95,8 @@
 	// The screen will not be updated to reflect the new bitmap
 	void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h);
 
+	void move_screen(int dx, int dy, int height);
+
 	// Update the dirty areas of the screen
 	void update_screen();
 
@@ -1214,6 +1216,46 @@
 		buf += pitch;
 	} while (--h);
 }
+
+void OSystem_WINCE3::move_screen(int dx, int dy, int height) {
+
+	if ((dx == 0) && (dy == 0))
+		return;
+
+	if (dx == 0) {
+		// vertical movement
+		if (dy > 0) {
+			// move down
+			// copy from bottom to top
+			for (int y = height - 1; y >= dy; y--)
+				copy_rect(_gfx_buf + SCREEN_WIDTH * (y - dy), SCREEN_WIDTH, 0, y, SCREEN_WIDTH, 1);
+		} else {
+			// move up
+			// copy from top to bottom
+			for (int y = 0; y < height + dx; y++)
+				copy_rect(_gfx_buf + SCREEN_WIDTH * (y - dy), SCREEN_WIDTH, 0, y, SCREEN_WIDTH, 1);
+		}
+	} else if (dy == 0) {
+		// horizontal movement
+		if (dx > 0) {
+			// move right
+			// copy from right to left
+			for (int x = SCREEN_WIDTH - 1; x >= dx; x--)
+				copy_rect(_gfx_buf + x - dx, SCREEN_WIDTH, x, 0, 1, height);
+		} else {
+			// move left
+			// copy from left to right
+			for (int x = 0; x < SCREEN_WIDTH; x++)
+				copy_rect(_gfx_buf + x - dx, SCREEN_WIDTH, x, 0, 1, height);
+		}
+	} else {
+		// free movement
+		// not neccessary for now
+	}
+
+
+}
+
 
 void OSystem_WINCE3::update_screen() {
 





More information about the Scummvm-git-logs mailing list