[Scummvm-cvs-logs] CVS: scummvm/backends/sdl graphics.cpp,1.11,1.12 sdl-common.h,1.62,1.63

Max Horn fingolfin at users.sourceforge.net
Fri Sep 3 18:32:04 CEST 2004


Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10785/backends/sdl

Modified Files:
	graphics.cpp sdl-common.h 
Log Message:
Got rid of OSystem::move_screen

Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/graphics.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- graphics.cpp	16 Jul 2004 09:29:09 -0000	1.11
+++ graphics.cpp	4 Sep 2004 01:31:02 -0000	1.12
@@ -720,77 +720,6 @@
 		_paletteDirtyEnd = start + num;
 }
 
-void OSystem_SDL::move_screen(int dx, int dy, int height) {
-
-	// Short circuit check - do we have to do anything anyway?
-	if ((dx == 0 && dy == 0) || height <= 0)
-		return;
-
-	Common::StackLock lock(_graphicsMutex);	// Lock the mutex until this function ends
-
-	byte *src, *dst;
-	int x, y;
-
-	// We'll have to do a full screen redraw anyway, so set the flag.
-	_forceFull = true;
-
-	// Hide the mouse
-	undraw_mouse();
-
-	// Try to lock the screen surface
-	if (SDL_LockSurface(_screen) == -1)
-		error("SDL_LockSurface failed: %s", SDL_GetError());
-
-	// vertical movement
-	if (dy > 0) {
-		// move down - copy from bottom to top
-		dst = (byte *)_screen->pixels + (height - 1) * _screenWidth;
-		src = dst - dy * _screenWidth;
-		for (y = dy; y < height; y++) {
-			memcpy(dst, src, _screenWidth);
-			src -= _screenWidth;
-			dst -= _screenWidth;
-		}
-	} else if (dy < 0) {
-		// move up - copy from top to bottom
-		dst = (byte *)_screen->pixels;
-		src = dst - dy * _screenWidth;
-		for (y = -dy; y < height; y++) {
-			memcpy(dst, src, _screenWidth);
-			src += _screenWidth;
-			dst += _screenWidth;
-		}
-	}
-
-	// horizontal movement
-	if (dx > 0) {
-		// move right - copy from right to left
-		dst = (byte *)_screen->pixels + (_screenWidth - 1);
-		src = dst - dx;
-		for (y = 0; y < height; y++) {
-			for (x = dx; x < _screenWidth; x++) {
-				*dst-- = *src--;
-			}
-			src += _screenWidth + (_screenWidth - dx);
-			dst += _screenWidth + (_screenWidth - dx);
-		}
-	} else if (dx < 0)  {
-		// move left - copy from left to right
-		dst = (byte *)_screen->pixels;
-		src = dst - dx;
-		for (y = 0; y < height; y++) {
-			for (x = -dx; x < _screenWidth; x++) {
-				*dst++ = *src++;
-			}
-			src += _screenWidth - (_screenWidth + dx);
-			dst += _screenWidth - (_screenWidth + dx);
-		}
-	}
-
-	// Unlock the screen surface
-	SDL_UnlockSurface(_screen);
-}
-
 void OSystem_SDL::set_shake_pos(int shake_pos) {
 	_newShakePos = shake_pos;
 }

Index: sdl-common.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- sdl-common.h	16 Jul 2004 10:24:29 -0000	1.62
+++ sdl-common.h	4 Sep 2004 01:31:03 -0000	1.63
@@ -52,8 +52,6 @@
 	// The screen will not be updated to reflect the new bitmap
 	void copyRectToScreen(const byte *src, 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 updateScreen();
 





More information about the Scummvm-git-logs mailing list