[Scummvm-cvs-logs] CVS: scummvm/backends/sdl events.cpp,1.20,1.21 graphics.cpp,1.52,1.53 sdl-common.h,1.83,1.84 sdl.cpp,1.85,1.86

Eugene Sandulenko sev at users.sourceforge.net
Sat Jul 30 14:14:58 CEST 2005


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

Modified Files:
	events.cpp graphics.cpp sdl-common.h sdl.cpp 
Log Message:
Remove trailing whitespaces.


Index: events.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/events.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- events.cpp	11 Jul 2005 10:54:53 -0000	1.20
+++ events.cpp	30 Jul 2005 21:10:55 -0000	1.21
@@ -66,7 +66,7 @@
 void OSystem_SDL::fillMouseEvent(Event &event, int x, int y) {
 	event.mouse.x = x;
 	event.mouse.y = y;
-	
+
 	// Update the "keyboard mouse" coords
 	_km.x = x;
 	_km.y = y;
@@ -157,7 +157,7 @@
 static byte SDLModToOSystemKeyFlags(SDLMod mod) {
 	byte b = 0;
 #ifdef LINUPY
-	// Yopy has no ALT key, steal the SHIFT key 
+	// Yopy has no ALT key, steal the SHIFT key
 	// (which isn't used much anyway)
 	if (mod & KMOD_SHIFT)
 		b |= OSystem::KBD_ALT;
@@ -177,9 +177,9 @@
 	SDL_Event ev;
 	int axis;
 	byte b = 0;
-	
+
 	handleKbdMouse();
-	
+
 	// If the screen mode changed, send an EVENT_SCREEN_CHANGED
 	if (_modeChanged) {
 		_modeChanged = false;
@@ -192,7 +192,7 @@
 		case SDL_KEYDOWN:{
 			b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());
 
-			// Alt-Return and Alt-Enter toggle full screen mode				
+			// Alt-Return and Alt-Enter toggle full screen mode
 			if (b == KBD_ALT && (ev.key.keysym.sym == SDLK_RETURN
 			                  || ev.key.keysym.sym == SDLK_KP_ENTER)) {
 				setFullscreenMode(!_fullscreen);
@@ -254,12 +254,12 @@
 
 			// Ctrl-Alt-<key> will change the GFX mode
 			if ((b & (KBD_CTRL|KBD_ALT)) == (KBD_CTRL|KBD_ALT)) {
-				
+
 				handleScalerHotkeys(ev.key);
 				break;
 			}
 			const bool event_complete = remapKey(ev,event);
-			
+
 			if (event_complete)
 				return true;
 
@@ -272,7 +272,7 @@
 		case SDL_KEYUP:
 			{
 			const bool event_complete = remapKey(ev,event);
-			
+
 			if (event_complete)
 				return true;
 
@@ -292,7 +292,7 @@
 		case SDL_MOUSEMOTION:
 			event.type = EVENT_MOUSEMOVE;
 			fillMouseEvent(event, ev.motion.x, ev.motion.y);
-			
+
 			setMousePos(event.mouse.x, event.mouse.y);
 			return true;
 
@@ -350,7 +350,7 @@
 					case JOY_BUT_F5:
 						event.kbd.keycode = SDLK_F5;
 						event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
-						break; 
+						break;
 				}
 			}
 			return true;
@@ -381,7 +381,7 @@
 						event.kbd.keycode = SDLK_F5;
 						event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
 						break;
-				} 
+				}
 			}
 			return true;
 
@@ -396,7 +396,7 @@
 			} else
 				axis = 0;
 
-			if ( ev.jaxis.axis == JOY_XAXIS) { 
+			if ( ev.jaxis.axis == JOY_XAXIS) {
 #ifdef JOY_ANALOG
 				_km.x_vel = axis/2000;
 				_km.x_down_count = 0;
@@ -410,7 +410,7 @@
 				}
 #endif
 
-			} else if (ev.jaxis.axis == JOY_YAXIS) { 
+			} else if (ev.jaxis.axis == JOY_YAXIS) {
 #ifndef JOY_INVERT_Y
 				axis = -axis;
 #endif
@@ -427,7 +427,7 @@
 				}
 #endif
 			}
-			
+
 			fillMouseEvent(event, _km.x, _km.y);
 
 			return true;

Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/graphics.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- graphics.cpp	11 Jul 2005 10:54:53 -0000	1.52
+++ graphics.cpp	30 Jul 2005 21:10:55 -0000	1.53
@@ -115,7 +115,7 @@
 		setGraphicsMode(_transactionDetails.mode);
 
 	if (_transactionDetails.sizeChanged)
-		initSize(_transactionDetails.w, _transactionDetails.h, 
+		initSize(_transactionDetails.w, _transactionDetails.h,
 				 _transactionDetails.overlayScale);
 
 	if (_transactionDetails.arChanged)
@@ -271,7 +271,7 @@
 
 	if (_transactionMode != kTransactionCommit)
 		internUpdateScreen();
-	
+
 	// Make sure that an EVENT_SCREEN_CHANGED gets sent later
 	_modeChanged = true;
 
@@ -346,7 +346,7 @@
 	// Create the surface that contains the scaled graphics in 16 bit mode
 	//
 
-	_hwscreen = SDL_SetVideoMode(_screenWidth * _scaleFactor, effectiveScreenHeight(), 16, 
+	_hwscreen = SDL_SetVideoMode(_screenWidth * _scaleFactor, effectiveScreenHeight(), 16,
 		_fullscreen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE
 	);
 	if (_hwscreen == NULL) {
@@ -379,7 +379,7 @@
 		InitScalers(555);
 	else
 		InitScalers(565);
-	
+
 	// Need some extra bytes around when using 2xSaI
 	_tmpscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _screenWidth + 3, _screenHeight + 3,
 						16,
@@ -435,11 +435,11 @@
 void OSystem_SDL::unloadGFXMode() {
 	if (_screen) {
 		SDL_FreeSurface(_screen);
-		_screen = NULL; 
+		_screen = NULL;
 	}
 
 	if (_hwscreen) {
-		SDL_FreeSurface(_hwscreen); 
+		SDL_FreeSurface(_hwscreen);
 		_hwscreen = NULL;
 	}
 
@@ -476,14 +476,14 @@
 	SDL_Surface *old_overlayscreen = _overlayscreen;
 
 	// Release the HW screen surface
-	SDL_FreeSurface(_hwscreen); 
+	SDL_FreeSurface(_hwscreen);
 
-	SDL_FreeSurface(_tmpscreen); 
-	SDL_FreeSurface(_tmpscreen2); 
+	SDL_FreeSurface(_tmpscreen);
+	SDL_FreeSurface(_tmpscreen2);
 
 #ifdef USE_OSD
 	// Release the OSD surface
-	SDL_FreeSurface(_osdSurface); 
+	SDL_FreeSurface(_osdSurface);
 #endif
 
 	// Setup the new GFX mode
@@ -505,7 +505,7 @@
 
 	// Blit everything to the screen
 	internUpdateScreen();
-	
+
 	// Make sure that an EVENT_SCREEN_CHANGED gets sent later
 	_modeChanged = true;
 }
@@ -544,12 +544,12 @@
 	}
 
 	// Check whether the palette was changed in the meantime and update the
-	// screen surface accordingly. 
+	// screen surface accordingly.
 	if (_paletteDirtyEnd != 0) {
-		SDL_SetColors(_screen, _currentPalette + _paletteDirtyStart, 
+		SDL_SetColors(_screen, _currentPalette + _paletteDirtyStart,
 			_paletteDirtyStart,
 			_paletteDirtyEnd - _paletteDirtyStart);
-		
+
 		_paletteDirtyEnd = 0;
 
 		_forceFull = true;
@@ -607,7 +607,7 @@
 	// Only draw anything if necessary
 	if (_numDirtyRects > 0) {
 
-		SDL_Rect *r; 
+		SDL_Rect *r;
 		SDL_Rect dst;
 		uint32 srcPitch, dstPitch;
 		SDL_Rect *lastRect = _dirtyRectList + _numDirtyRects;
@@ -615,7 +615,7 @@
 		if (scalerProc == Normal1x && !_adjustAspectRatio && 0) {
 			for (r = _dirtyRectList; r != lastRect; ++r) {
 				dst = *r;
-				
+
 				dst.y += _currentShakePos;
 				if (SDL_BlitSurface(origSurf, r, _hwscreen, &dst) != 0)
 					error("SDL_BlitSurface failed: %s", SDL_GetError());
@@ -663,7 +663,7 @@
 					scalerProc((byte *)srcSurf->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
 							   (byte *)_hwscreen->pixels + rx1 * 2 + dst_y * dstPitch, dstPitch, r->w, dst_h);
 				}
-				
+
 				r->x = rx1;
 				r->y = dst_y;
 				r->w = r->w * scale1 / scale2;
@@ -726,7 +726,7 @@
 
 			return;
 		}
-		
+
 #if defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 6)
 		// On OS X, SDL_WM_ToggleFullScreen is currently not implemented. Worse,
 		// before SDL 1.2.6 it always returned -1 (which would indicate a
@@ -740,7 +740,7 @@
 		} else {
 			// Blit everything to the screen
 			internUpdateScreen();
-			
+
 			// Make sure that an EVENT_SCREEN_CHANGED gets sent later
 			_modeChanged = true;
 		}
@@ -749,7 +749,7 @@
 }
 
 void OSystem_SDL::setAspectRatioCorrection(bool enable) {
-	if ((_screenHeight == 200 && _adjustAspectRatio != enable) || 
+	if ((_screenHeight == 200 && _adjustAspectRatio != enable) ||
 		_transactionMode == kTransactionCommit) {
 		Common::StackLock lock(_graphicsMutex);
 
@@ -767,7 +767,7 @@
 			if (_transactionMode != kTransactionCommit)
 				hotswapGFXMode();
 		}
-			
+
 		// Make sure that an EVENT_SCREEN_CHANGED gets sent later
 		_modeChanged = true;
 	}
@@ -797,7 +797,7 @@
 		return;
 
 	Common::StackLock lock(_graphicsMutex);	// Lock the mutex until this function ends
-	
+
 	if (((long)src & 3) == 0 && pitch == _screenWidth && x == 0 && y == 0 &&
 			w == _screenWidth && h == _screenHeight && _modeFlags & DF_WANT_RECT_OPTIM) {
 		/* Special, optimized case for full screen updates.
@@ -856,20 +856,20 @@
 bool OSystem_SDL::grabRawScreen(Graphics::Surface *surf) {
 	assert(_screen);
 	assert(surf);
-	
+
 	Common::StackLock lock(_graphicsMutex);	// Lock the mutex until this function ends
-	
+
 	surf->create(_screenWidth, _screenHeight, _screen->format->BytesPerPixel);
-	
+
 	// Try to lock the screen surface
 	if (SDL_LockSurface(_screen) == -1)
 		error("SDL_LockSurface failed: %s", SDL_GetError());
-	
+
 	memcpy(surf->pixels, _screen->pixels, _screenWidth * _screenHeight * _screen->format->BytesPerPixel);
-	
+
 	// Unlock the screen surface
 	SDL_UnlockSurface(_screen);
-	
+
 	return true;
 }
 
@@ -939,7 +939,7 @@
 		}
 	}
 #endif
-	
+
 	r->x = x;
 	r->y = y;
 	r->w = w;
@@ -1061,9 +1061,9 @@
 }
 
 void OSystem_SDL::grabPalette(byte *colors, uint start, uint num) {
-	assert(colors);	
+	assert(colors);
 	const SDL_Color *base = _currentPalette + start;
-	
+
 	for (uint i = 0; i < num; ++i) {
 		colors[i * 4] = base[i].r;
 		colors[i * 4 + 1] = base[i].g;
@@ -1121,7 +1121,7 @@
 	//assert (_transactionMode == kTransactionNone);
 
 	Common::StackLock lock(_graphicsMutex);	// Lock the mutex until this function ends
-	
+
 	if (!_overlayVisible)
 		return;
 
@@ -1137,12 +1137,12 @@
 	SDL_LockSurface(_tmpscreen);
 	SDL_LockSurface(_overlayscreen);
 	if (_overlayScale == _scaleFactor) {
-		_scalerProc((byte *)(_tmpscreen->pixels) + _tmpscreen->pitch + 2, 
+		_scalerProc((byte *)(_tmpscreen->pixels) + _tmpscreen->pitch + 2,
 					_tmpscreen->pitch, (byte *)_overlayscreen->pixels, _overlayscreen->pitch, _screenWidth, _screenHeight);
 	} else {
 		// Quality is degraded here. It is possible to run one-less scaler here, but is it
 		// really needed? Quality will anyway be degraded because of 1.5x scaler.
-		(scalersMagn[0][_overlayScale - 1])((byte *)(_tmpscreen->pixels) + _tmpscreen->pitch + 2, 
+		(scalersMagn[0][_overlayScale - 1])((byte *)(_tmpscreen->pixels) + _tmpscreen->pitch + 2,
 					  _tmpscreen->pitch, (byte *)_overlayscreen->pixels, _overlayscreen->pitch, _screenWidth, _screenHeight);
 	}
 	SDL_UnlockSurface(_tmpscreen);
@@ -1233,7 +1233,7 @@
 bool OSystem_SDL::showMouse(bool visible) {
 	if (_mouseVisible == visible)
 		return visible;
-	
+
 	bool last = _mouseVisible;
 	_mouseVisible = visible;
 
@@ -1267,11 +1267,11 @@
 		setMousePos(x, y);
 	}
 }
-	
+
 void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale) {
 	if (w == 0 || h == 0)
 		return;
- 
+
 	_mouseHotspotX = hotspot_x;
 	_mouseHotspotY = hotspot_y;
 
@@ -1282,10 +1282,10 @@
  	if (_mouseCurState.w != (int)w || _mouseCurState.h != (int)h) {
  		_mouseCurState.w = w;
  		_mouseCurState.h = h;
- 
+
  		if (_mouseOrigSurface)
- 			SDL_FreeSurface(_mouseOrigSurface); 
- 
+ 			SDL_FreeSurface(_mouseOrigSurface);
+
 		// Allocate bigger surface because AdvMame2x adds black pixel at [0,0]
  		_mouseOrigSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
  						_mouseCurState.w + 2,
@@ -1295,12 +1295,12 @@
  						_hwscreen->format->Gmask,
  						_hwscreen->format->Bmask,
  						_hwscreen->format->Amask);
- 
+
  		if (_mouseOrigSurface == NULL)
  			error("allocating _mouseOrigSurface failed");
  		SDL_SetColorKey(_mouseOrigSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kMouseColorKey);
  	}
- 
+
 	free(_mouseData);
 
 	_mouseData = (byte *)malloc(w * h);
@@ -1313,13 +1313,13 @@
 	const byte *srcPtr = _mouseData;
 	byte color;
 	int w, h, i, j;
-  
+
 	if (!_mouseOrigSurface || !_mouseData)
  		return;
-  
+
 	w = _mouseCurState.w;
 	h = _mouseCurState.h;
-  
+
 	SDL_LockSurface(_mouseOrigSurface);
 
 	// Make whole surface transparent
@@ -1339,11 +1339,11 @@
 			color = *srcPtr;
 			if (color != _mouseKeyColor) {	// transparent, don't draw
 				if (_cursorHasOwnPalette && !_overlayVisible && !_cursorPaletteDisabled)
-					*(uint16 *)dstPtr = SDL_MapRGB(_mouseOrigSurface->format, 
-								   _cursorPalette[color].r, _cursorPalette[color].g, 
+					*(uint16 *)dstPtr = SDL_MapRGB(_mouseOrigSurface->format,
+								   _cursorPalette[color].r, _cursorPalette[color].g,
 															   _cursorPalette[color].b);
 				else
-					*(uint16 *)dstPtr = SDL_MapRGB(_mouseOrigSurface->format, 
+					*(uint16 *)dstPtr = SDL_MapRGB(_mouseOrigSurface->format,
 								   _currentPalette[color].r, _currentPalette[color].g,
 												   				_currentPalette[color].b);
 			}
@@ -1362,18 +1362,18 @@
 		hW = w * _scaleFactor / _cursorTargetScale;
 		hH = hH1 = h * _scaleFactor / _cursorTargetScale;
   	}
-  
+
 	if (_adjustAspectRatio) {
 		hH = real2Aspect(hH - 1) + 1;
 	}
-  
+
 	if (_mouseCurState.hW != hW || _mouseCurState.hH != hH) {
 		_mouseCurState.hW = hW;
 		_mouseCurState.hH = hH;
-  
+
 		if (_mouseSurface)
-			SDL_FreeSurface(_mouseSurface); 
-  
+			SDL_FreeSurface(_mouseSurface);
+
 		_mouseSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
 						_mouseCurState.hW,
 						_mouseCurState.hH,
@@ -1382,13 +1382,13 @@
 						_hwscreen->format->Gmask,
 						_hwscreen->format->Bmask,
 						_hwscreen->format->Amask);
-  
+
 		if (_mouseSurface == NULL)
 			error("allocating _mouseSurface failed");
 
 		SDL_SetColorKey(_mouseSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, kMouseColorKey);
   	}
-  
+
 	SDL_LockSurface(_mouseSurface);
 
 	ScalerProc *scalerProc;
@@ -1408,12 +1408,12 @@
 
 	if (_adjustAspectRatio)
 		cursorStretch200To240((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, hW, hH1, 0, 0, 0);
-  
+
 	SDL_UnlockSurface(_mouseSurface);
 	SDL_UnlockSurface(_mouseOrigSurface);
 }
 
-// Basically it is kVeryFastAndUglyAspectMode of stretch200To240 from 
+// Basically it is kVeryFastAndUglyAspectMode of stretch200To240 from
 // common/scale/aspect.cpp
 static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY) {
 	int maxDstY = real2Aspect(origSrcY + height - 1);
@@ -1443,13 +1443,13 @@
 void OSystem_SDL::undrawMouse() {
 	const int x = _mouseBackup.x;
 	const int y = _adjustAspectRatio ? aspect2Real(_mouseBackup.y) : _mouseBackup.y;
-	
+
 	// When we switch bigger overlay off mouse jumps. Argh!
 	// This is intended to prevent undrawing offscreen mouse
 	if (!_overlayVisible && (x >= _screenWidth || y >= _screenHeight)) {
 		return;
 	}
-	
+
 	if (_mouseBackup.w != 0 && _mouseBackup.h != 0) {
 		addDirtyRect(x, y, _mouseBackup.w, _mouseBackup.h);
 	}
@@ -1519,10 +1519,10 @@
   	// Quick check to see if anything has to be drawn at all
 	if (dst.w <= 0 || dst.h <= 0 || dst.x >= width || dst.y >= height)
   		return;
-  
+
 	src.w = dst.w;
 	src.h = dst.h;
-  
+
 	if (_adjustAspectRatio)
 		dst.y = real2Aspect(dst.y);
 
@@ -1555,7 +1555,7 @@
 	assert(msg);
 
 	uint i;
-	
+
 	// Lock the OSD surface for drawing
 	if (SDL_LockSurface(_osdSurface))
 		error("displayMessageOnOSD: SDL_LockSurface failed: %s", SDL_GetError());
@@ -1566,13 +1566,13 @@
 	dst.h = _osdSurface->h;
 	dst.pitch = _osdSurface->pitch;
 	dst.bytesPerPixel = _osdSurface->format->BytesPerPixel;
-	
+
 	// The font we are going to use:
 	const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kOSDFont);
-	
+
 	// Clear everything with the "transparent" color, i.e. the colorkey
 	SDL_FillRect(_osdSurface, 0, kOSDColorKey);
-	
+
 	// Split the message into separate lines.
 	Common::StringList lines;
 	const char *ptr;
@@ -1594,7 +1594,7 @@
 	for (i = 0; i < lines.size(); i++) {
 		width = MAX(width, font->getStringWidth(lines[i]) + 14);
 	}
-	
+
 	// Clip the rect
 	if (width > dst.w)
 		width = dst.w;
@@ -1625,7 +1625,7 @@
 	_osdAlpha = SDL_ALPHA_TRANSPARENT +  kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100;
 	_osdFadeStartTime = SDL_GetTicks() + kOSDFadeOutDelay;
 	SDL_SetAlpha(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdAlpha);
-	
+
 	// Ensure a full redraw takes place next time the screen is updated
 	_forceFull = true;
 }
@@ -1660,7 +1660,7 @@
 
 	int newMode = -1;
 	int factor = _scaleFactor - 1;
-	
+
 	// Increase/decrease the scale factor
 	if (key.keysym.sym == SDLK_EQUALS || key.keysym.sym == SDLK_PLUS || key.keysym.sym == SDLK_MINUS ||
 		key.keysym.sym == SDLK_KP_PLUS || key.keysym.sym == SDLK_KP_MINUS) {
@@ -1669,21 +1669,21 @@
 			newMode = s_gfxModeSwitchTable[_scalerType][factor];
 		}
 	}
-	
+
 	const bool isNormalNumber = (SDLK_1 <= key.keysym.sym && key.keysym.sym <= SDLK_9);
 	const bool isKeypadNumber = (SDLK_KP1 <= key.keysym.sym && key.keysym.sym <= SDLK_KP9);
 	if (isNormalNumber || isKeypadNumber) {
 		_scalerType = key.keysym.sym - (isNormalNumber ? SDLK_1 : SDLK_KP1);
 		if (_scalerType >= ARRAYSIZE(s_gfxModeSwitchTable))
 			return;
-		
+
 		while (s_gfxModeSwitchTable[_scalerType][factor] < 0) {
 			assert(factor > 0);
 			factor--;
 		}
 		newMode = s_gfxModeSwitchTable[_scalerType][factor];
 	}
-	
+
 	if (newMode >= 0) {
 		setGraphicsMode(newMode);
 #ifdef USE_OSD

Index: sdl-common.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.h,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- sdl-common.h	11 Jul 2005 10:54:53 -0000	1.83
+++ sdl-common.h	30 Jul 2005 21:10:55 -0000	1.84
@@ -69,7 +69,7 @@
 
 	// Set colors of the palette
 	void setPalette(const byte *colors, uint start, uint num);
-	
+
 	// Get colors of the palette
 	void grabPalette(byte *colors, uint start, uint num);
 
@@ -88,7 +88,7 @@
 
 	// Either show or hide the mouse cursor
 	bool showMouse(bool visible);
-	
+
 	// Warp the mouse cursor. Where set_mouse_pos() only informs the
 	// backend of the mouse cursor's current position, this function
 	// actually moves the cursor to the specified position.
@@ -113,12 +113,12 @@
 	void delayMillis(uint msecs);
 
 	// Get the next event.
-	// Returns true if an event was retrieved.	
+	// Returns true if an event was retrieved.
 	virtual bool pollEvent(Event &event); // overloaded by CE backend
 
-	// Set function that generates samples 
+	// Set function that generates samples
 	virtual bool setSoundCallback(SoundProc proc, void *param); // overloaded by CE backend
-	
+
 	void clearSoundCallback();
 
 	// Poll CD status
@@ -171,7 +171,7 @@
 	virtual int getDefaultGraphicsMode() const;
 	virtual bool setGraphicsMode(int mode);
 	virtual int getGraphicsMode() const;
-	
+
 	virtual void setWindowCaption(const char *caption);
 	virtual bool openCD(int drive);
 	virtual int getOutputSampleRate() const;
@@ -257,12 +257,12 @@
 	/** Force full redraw on next updateScreen */
 	bool _forceFull;
 	ScalerProc *_scalerProc;
-	int _scalerType;	
+	int _scalerType;
 	int _scaleFactor;
 	int _mode;
 	int _transactionMode;
 	bool _fullscreen;
-	
+
 	/** Current video mode flags (see DF_* constants) */
 	uint32 _modeFlags;
 	bool _modeChanged;
@@ -288,7 +288,7 @@
 	// Keyboard mouse emulation.  Disabled by fingolfin 2004-12-18.
 	// I am keeping the rest of the code in for now, since the joystick
 	// code (or rather, "hack") uses it, too.
-	struct KbdMouse {	
+	struct KbdMouse {
 		int16 x, y, x_vel, y_vel, x_max, y_max, x_down_count, y_down_count;
 		uint32 last_time, delay_time, x_down_time, y_down_time;
 	};
@@ -327,10 +327,10 @@
 	// Palette data
 	SDL_Color *_currentPalette;
 	uint _paletteDirtyStart, _paletteDirtyEnd;
-	
+
 	// Cursor palette data
 	SDL_Color *_cursorPalette;
-	
+
 	/**
 	 * Mutex which prevents multiple threads from interfering with each other
 	 * when accessing the screen.
@@ -340,13 +340,13 @@
 
 	void addDirtyRgnAuto(const byte *buf);
 	void makeChecksums(const byte *buf);
-	
+
 	virtual void addDirtyRect(int x, int y, int w, int h, bool mouseRect = false); // overloaded by CE backend
 
 	virtual void drawMouse(); // overloaded by CE backend
 	virtual void undrawMouse(); // overloaded by CE backend
 	void blitCursor();
-	
+
 	/** Set the position of the virtual mouse cursor. */
 	void setMousePos(int x, int y);
 	virtual void fillMouseEvent(Event &event, int x, int y); // overloaded by CE backend
@@ -357,12 +357,12 @@
 	virtual void loadGFXMode(); // overloaded by CE backend
 	virtual void unloadGFXMode(); // overloaded by CE backend
 	virtual void hotswapGFXMode(); // overloaded by CE backend
-	
+
 	void setFullscreenMode(bool enable);
 	void setAspectRatioCorrection(bool enable);
 
 	virtual bool saveScreenshot(const char *filename); // overloaded by CE backend
-	
+
 	int effectiveScreenHeight() const { return (_adjustAspectRatio ? 240 : _screenHeight) * _scaleFactor; }
 
 	void setupIcon();

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- sdl.cpp	21 Jun 2005 20:39:09 -0000	1.85
+++ sdl.cpp	30 Jul 2005 21:10:55 -0000	1.86
@@ -58,9 +58,9 @@
 	_graphicsMutex = createMutex();
 
 	SDL_ShowCursor(SDL_DISABLE);
-	
+
 	// Enable unicode support if possible
-	SDL_EnableUNICODE(1); 
+	SDL_EnableUNICODE(1);
 
 	_cksumValid = false;
 #if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
@@ -88,7 +88,7 @@
 		printf("Using joystick: %s\n", SDL_JoystickName(0));
 		_joystick = SDL_JoystickOpen(joystick_num);
 	}
-	
+
 	_inited = true;
 }
 
@@ -120,7 +120,7 @@
 	// reset mouse state
 	memset(&_km, 0, sizeof(_km));
 	memset(&_mouseCurState, 0, sizeof(_mouseCurState));
-	
+
 	_inited = false;
 }
 
@@ -132,7 +132,7 @@
 }
 
 uint32 OSystem_SDL::getMillis() {
-	return SDL_GetTicks();	
+	return SDL_GetTicks();
 }
 
 void OSystem_SDL::delayMillis(uint msecs) {
@@ -165,9 +165,9 @@
 		break;
 	case kFeatureAutoComputeDirtyRects:
 		if (enable)
-			_modeFlags |= DF_WANT_RECT_OPTIM;		
+			_modeFlags |= DF_WANT_RECT_OPTIM;
 		else
-			_modeFlags &= ~DF_WANT_RECT_OPTIM;		
+			_modeFlags &= ~DF_WANT_RECT_OPTIM;
 		break;
 	default:
 		break;
@@ -231,7 +231,7 @@
 			warning("Could not load the icon (%d %s - %s) ", code, color, scummvm_icon[1 + i]);
 			return;
 		}
-		
+
 		rgba[code] = col;
 	}
 	memset(mask, 0, sizeof(mask));
@@ -340,7 +340,7 @@
 			_cdEndTime = 0;
 		}
 	}
-	
+
 	return (_cdrom != NULL);
 }
 
@@ -355,7 +355,7 @@
 
 	if (!_cdrom)
 		return;
-	
+
 	if (duration > 0)
 		duration += 5;
 





More information about the Scummvm-git-logs mailing list