[Scummvm-cvs-logs] CVS: scummvm/backends/morphos morphos.cpp,1.4,1.5 morphos.h,1.3,1.4

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


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

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


Index: morphos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- morphos.cpp	31 Aug 2002 23:02:14 -0000	1.4
+++ morphos.cpp	9 Sep 2002 05:56:10 -0000	1.5
@@ -927,6 +927,46 @@
 	}
 }
 
+void OSystem_MorphOS::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((byte *)ScummBuffer + ScummBufferWidth * (y - dy), ScummBufferWidth, 0, y, ScummBufferWidth, 1);
+		} else {
+			// move up
+			// copy from top to bottom
+			for (int y = 0; y < height + dx; y++)
+				copy_rect((byte *)ScummBuffer + ScummBufferWidth * (y - dy), ScummBufferWidth, 0, y, ScummBufferWidth, 1);
+		}
+	} else if (dy == 0) {
+		// horizontal movement
+		if (dx > 0) {
+			// move right
+			// copy from right to left
+			for (int x = ScummBufferWidth - 1; x >= dx; x--)
+				copy_rect((byte *)ScummBuffer + x - dx, ScummBufferWidth, x, 0, 1, height);
+		} else {
+			// move left
+			// copy from left to right
+			for (int x = 0; x < ScummBufferWidth; x++)
+				copy_rect((byte *)ScummBuffer + x - dx, ScummBufferWidth, x, 0, 1, height);
+		}
+	} else {
+		// free movement
+		// not neccessary for now
+	}
+
+
+}
+
+
 bool OSystem_MorphOS::AddUpdateRect(WORD x, WORD y, WORD w, WORD h)
 {
 	if (UpdateRects > 25)

Index: morphos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- morphos.h	31 Aug 2002 22:59:26 -0000	1.3
+++ morphos.h	9 Sep 2002 05:56:10 -0000	1.4
@@ -47,6 +47,7 @@
 		// Draw a bitmap to screen.
 		// The screen will not be updated to reflect the new bitmap
 		virtual 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
 		virtual void update_screen();





More information about the Scummvm-git-logs mailing list