[Scummvm-cvs-logs] CVS: scummvm/backends/gp32 gp32.cpp,1.10,1.11

Max Horn fingolfin at users.sourceforge.net
Fri Aug 1 17:37:11 CEST 2003


Update of /cvsroot/scummvm/scummvm/backends/gp32
In directory sc8-pr-cvs1:/tmp/cvs-serv16859/backends/gp32

Modified Files:
	gp32.cpp 
Log Message:
removed OSystem::set_mouse_pos (I hope I didn't break any backends, but if I did it should be trivial to get them working again)

Index: gp32.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/gp32/gp32.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- gp32.cpp	22 Jul 2003 20:36:43 -0000	1.10
+++ gp32.cpp	2 Aug 2003 00:36:37 -0000	1.11
@@ -873,107 +873,107 @@
 	int key;	
 
 	key=GpKeyGet();	
-		if (key == GPC_VK_NONE) {
-			if (lastevent==EVENT_LBUTTONDOWN) {
-				lastevent=0;
-				event->event_code = EVENT_LBUTTONUP;
-				return true;
-			}
-			return false;
-		}	
-
-		if (key == oldkey) {
-			eventcount--;
-			if (eventcount) return false;
+	if (key == GPC_VK_NONE) {
+		if (lastevent==EVENT_LBUTTONDOWN) {
+			lastevent=0;
+			event->event_code = EVENT_LBUTTONUP;
+			return true;
 		}
-		oldkey=key;
-		eventcount=EVENT_COUNT;
-
-		event->event_code = EVENT_KEYDOWN;
+		return false;
+	}	
 
-		if (key & GPC_VK_FL && key & GPC_VK_FR) { // L+R = save state
-			printf("Saving game, please wait...");
+	if (key == oldkey) {
+		eventcount--;
+		if (eventcount) return false;
+	}
+	oldkey=key;
+	eventcount=EVENT_COUNT;
 
-			//extern void autosave(void * engine); 
-			//autosave(NULL); //FIXME?
-			do key=GpKeyGet(); while (key != GPC_VK_NONE) ;
-			return false;
-		} else
+	event->event_code = EVENT_KEYDOWN;
 
-		if(key & GPC_VK_FL) { // L = debug console
-			//GpGraphicModeSet(8, NULL); //FIXME: if 16bit?
-			currsurface=DEBUG_SURFACE;
-			GpSurfaceFlip(&gpDraw[currsurface]);
-			GpSetPaletteEntry ( 0, 0,0,0 );
-			GpSetPaletteEntry ( 1, 255,0,0 );
-			GpSetPaletteEntry ( 2, 255,255,255 );
-			return false;
-		} else
+	if (key & GPC_VK_FL && key & GPC_VK_FR) { // L+R = save state
+		printf("Saving game, please wait...");
 
-		if (key & GPC_VK_FR) {  // R = game screen
-			//if (_overlay_visible) GpGraphicModeSet(16, NULL); 
-			//	else GpGraphicModeSet(8, NULL);
-			currsurface=GAME_SURFACE;
-			GpSurfaceFlip(&gpDraw[currsurface]);
+		//extern void autosave(void * engine); 
+		//autosave(NULL); //FIXME?
+		do key=GpKeyGet(); while (key != GPC_VK_NONE) ;
+		return false;
+	}
+	
+	if (key & GPC_VK_FL) { // L = debug console
+		//GpGraphicModeSet(8, NULL); //FIXME: if 16bit?
+		currsurface=DEBUG_SURFACE;
+		GpSurfaceFlip(&gpDraw[currsurface]);
+		GpSetPaletteEntry ( 0, 0,0,0 );
+		GpSetPaletteEntry ( 1, 255,0,0 );
+		GpSetPaletteEntry ( 2, 255,255,255 );
+		return false;
+	}
+	
+	if (key & GPC_VK_FR) {  // R = game screen
+		//if (_overlay_visible) GpGraphicModeSet(16, NULL); 
+		//	else GpGraphicModeSet(8, NULL);
+		currsurface=GAME_SURFACE;
+		GpSurfaceFlip(&gpDraw[currsurface]);
 
-			_paletteDirtyStart=0;
-			_paletteDirtyEnd=255; //fixme?			
-			return false;
-		}
+		_paletteDirtyStart=0;
+		_paletteDirtyEnd=255; //fixme?			
+		return false;
+	}
 
-		if(key & GPC_VK_START) { // START = menu
-			event->kbd.keycode = 319;
-			event->kbd.ascii = 319;
-			return true;			
-		}
+	if (key & GPC_VK_START) { // START = menu
+		event->kbd.keycode = 319;
+		event->kbd.ascii = 319;
+		return true;			
+	}
 
-		if(key & GPC_VK_SELECT) { // SELECT == escape/skip
-			if (_overlay_visible) 
-				do key=GpKeyGet(); while (key != GPC_VK_NONE) ; // prevent 2xESC
-			event->kbd.keycode = 27;
-			event->kbd.ascii = 27;		
-			return true;
-		}		
+	if (key & GPC_VK_SELECT) { // SELECT == escape/skip
+		if (_overlay_visible) 
+			do key=GpKeyGet(); while (key != GPC_VK_NONE) ; // prevent 2xESC
+		event->kbd.keycode = 27;
+		event->kbd.ascii = 27;		
+		return true;
+	}		
 
-		if (key & GPC_VK_FA) {
-			lastevent=EVENT_LBUTTONDOWN;
-			event->event_code = EVENT_LBUTTONDOWN;
-			return true;
-		}
-		if (key & GPC_VK_FB) {
-			lastevent=EVENT_RBUTTONDOWN;
-			event->event_code = EVENT_RBUTTONDOWN;
-			return true;
-		}
+	if (key & GPC_VK_FA) {
+		lastevent=EVENT_LBUTTONDOWN;
+		event->event_code = EVENT_LBUTTONDOWN;
+		return true;
+	}
+	if (key & GPC_VK_FB) {
+		lastevent=EVENT_RBUTTONDOWN;
+		event->event_code = EVENT_RBUTTONDOWN;
+		return true;
+	}
 
-		event->event_code = EVENT_MOUSEMOVE;
+	if(key & GPC_VK_LEFT) {
+		mx-=MOUSE_MIPS;
+		if (mx<1) mx=1; // wrong if 0?
+	}
 
-		if(key & GPC_VK_LEFT) {
-			mx-=MOUSE_MIPS;
-			if (mx<1) mx=1; // wrong if 0?
-		}
+	if(key & GPC_VK_RIGHT) {
+		mx+=MOUSE_MIPS;
+		if (mx>319) mx=319;
+	}
 
-		if(key & GPC_VK_RIGHT) {
-			mx+=MOUSE_MIPS;
-			if (mx>319) mx=319;
-		}
+	if(key & GPC_VK_UP) {
+		my-=MOUSE_MIPS;
+		if (my<1) my=1; // wrong if 0?
+	}
 
-		if(key & GPC_VK_UP) {
-			my-=MOUSE_MIPS;
-			if (my<1) my=1; // wrong if 0?
-		}
+	if(key & GPC_VK_DOWN) {
+		my+=MOUSE_MIPS;
+		if (my>199) my=199;
+	}
 
-		if(key & GPC_VK_DOWN) {
-			my+=MOUSE_MIPS;
-			if (my>199) my=199;
-		}
+	event->event_code = EVENT_MOUSEMOVE;
+	km.x = event->mouse.x = mx;
+	km.y = event->mouse.y = my;
 
-		event->event_code = EVENT_MOUSEMOVE;
-		km.x = event->mouse.x = mx;
-		km.y = event->mouse.y = my;
+	event->mouse.x /= _scaleFactor;
+	event->mouse.y /= _scaleFactor;	
 
-		event->mouse.x /= _scaleFactor;
-		event->mouse.y /= _scaleFactor;	
+	set_mouse_pos(event->mouse.x, event->mouse.y);
 }
 
 // Set the function to be invoked whenever samples need to be generated





More information about the Scummvm-git-logs mailing list