[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl_gl.cpp,1.9,1.10

Travis Howell kirben at users.sourceforge.net
Thu Oct 24 04:02:05 CEST 2002


Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory usw-pr-cvs1:/tmp/cvs-serv5139/backends/sdl

Modified Files:
	sdl_gl.cpp 
Log Message:

Add more OpenGL updates, patch #627510


Index: sdl_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl_gl.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- sdl_gl.cpp	23 Oct 2002 08:52:20 -0000	1.9
+++ sdl_gl.cpp	24 Oct 2002 11:01:19 -0000	1.10
@@ -31,7 +31,7 @@
 #endif
 
 #include "fb2opengl.h"
-int _screenStart = 30;
+int _screenStart = 20;
 
 class OSystem_SDL_Normal : public OSystem_SDL_Common {
 public:
@@ -237,7 +237,7 @@
 	int gl_flags =  FB2GL_320 | FB2GL_RGBA | FB2GL_EXPAND;
         if (_full_screen) gl_flags |= (FB2GL_FS);
 	// 640x480 screen resolution
-	fb2gl.init(640,480,0,_screenStart? 0: 70,gl_flags);
+	fb2gl.init(640,480,0,_screenStart? 15: 70,gl_flags);
 
 	SDL_SetGamma(1.25,1.25,1.25);
 
@@ -286,6 +286,7 @@
 }
 
 void OSystem_SDL_Normal::update_screen() {
+	SDL_Rect blackrect2 = {0, _screenStart, _screenWidth, 15};
 	
 	// If the shake position changed, fill the dirty area with blackness
 	if (_currentShakePos != _newShakePos) {
@@ -335,8 +336,8 @@
 			SDL_Rect dst;
 			for(r = _dirty_rect_list; r != last_rect; ++r) {
 				dst = *r;
-				dst.x++;	// Shift rect by one since 2xSai needs to acces the data around
-				dst.y++;	// any pixel to scale it, and we want to avoid mem access crashes.
+//				dst.x++;	// Shift rect by one since 2xSai needs to acces the data around
+//				dst.y++;	// any pixel to scale it, and we want to avoid mem access crashes.
 				if (SDL_BlitSurface(_screen, r, sdl_tmpscreen, &dst) != 0)
 					error("SDL_BlitSurface failed: %s", SDL_GetError());
 			}
@@ -345,6 +346,11 @@
 		// Almost the same thing as SDL_UpdateRects
 		fb2gl.blit16(sdl_tmpscreen,_num_dirty_rects,_dirty_rect_list,0,
 		    _currentShakePos+_screenStart);
+
+
+		SDL_FillRect(sdl_tmpscreen, &blackrect2, 0);
+		fb2gl.blit16(sdl_tmpscreen,1,&blackrect2,0,_screenHeight);
+
 		fb2gl.display();
 	}
 
@@ -426,7 +432,8 @@
 	// Clear the overlay by making the game screen "look through" everywhere.
 	SDL_Rect src, dst;
 	src.x = src.y = 0;
-	dst.x = dst.y = 1;
+//	dst.x = dst.y = 1;
+	dst.x = dst.y = 0;
 	src.w = dst.w = _screenWidth;
 	src.h = dst.h = _screenHeight;
 	if (SDL_BlitSurface(_screen, &src, sdl_tmpscreen, &dst) != 0)





More information about the Scummvm-git-logs mailing list