diff options
| author | Jody Northup | 2009-06-06 08:41:03 +0000 | 
|---|---|---|
| committer | Jody Northup | 2009-06-06 08:41:03 +0000 | 
| commit | 0323638ce933e1dea7dd81b35a6646a9773a01ea (patch) | |
| tree | c930ba663a4c4951c01a6007c00c63524eb95e7e /backends/platform | |
| parent | 4087a3e6e8ebc0b519fc4c178a29696bd64fdd6f (diff) | |
| download | scummvm-rg350-0323638ce933e1dea7dd81b35a6646a9773a01ea.tar.gz scummvm-rg350-0323638ce933e1dea7dd81b35a6646a9773a01ea.tar.bz2 scummvm-rg350-0323638ce933e1dea7dd81b35a6646a9773a01ea.zip | |
Streamlined the cursor blitting changes introduced in revision 41412
svn-id: r41213
Diffstat (limited to 'backends/platform')
| -rw-r--r-- | backends/platform/sdl/graphics.cpp | 26 | ||||
| -rw-r--r-- | backends/platform/sdl/sdl.h | 8 | 
2 files changed, 2 insertions, 32 deletions
| diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 81e137e19c..2872c71f44 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -332,11 +332,7 @@ void OSystem_SDL::setGraphicsModeIntern() {  	// Even if the old and new scale factors are the same, we may have a  	// different scaler for the cursor now. -#ifdef ENABLE_16BIT -	blitCursor(_cursorBitDepth); -#else  	blitCursor(); -#endif  }  int OSystem_SDL::getGraphicsMode() const { @@ -604,11 +600,7 @@ bool OSystem_SDL::hotswapGFXMode() {  	SDL_FreeSurface(old_overlayscreen);  	// Update cursor to new scale -#ifdef ENABLE_16BIT -	blitCursor(_cursorBitDepth); -#else  	blitCursor(); -#endif  	// Blit everything to the screen  	internUpdateScreen(); @@ -1171,11 +1163,7 @@ void OSystem_SDL::setPalette(const byte *colors, uint start, uint num) {  	// Some games blink cursors with palette  	if (_cursorPaletteDisabled) -#ifdef ENABLE_16BIT -		blitCursor(_cursorBitDepth); -#else  		blitCursor(); -#endif  }  void OSystem_SDL::grabPalette(byte *colors, uint start, uint num) { @@ -1204,11 +1192,7 @@ void OSystem_SDL::setCursorPalette(const byte *colors, uint start, uint num) {  	_cursorPaletteDisabled = false; -#ifdef ENABLE_16BIT -	blitCursor(_cursorBitDepth); -#else  	blitCursor(); -#endif  }  void OSystem_SDL::setShakePos(int shake_pos) { @@ -1469,21 +1453,15 @@ void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x,  #ifdef ENABLE_16BIT  	_mouseData = (byte *)malloc(w * h * byteDepth);  	memcpy(_mouseData, buf, w * h * byteDepth); - -	blitCursor(bitDepth);  #else  	_mouseData = (byte *)malloc(w * h);  	memcpy(_mouseData, buf, w * h); +#endif  	blitCursor(); -#endif  } -#ifdef ENABLE_16BIT -void OSystem_SDL::blitCursor(uint8 bitDepth) { -#else  void OSystem_SDL::blitCursor() { -#endif  	byte *dstPtr;  	const byte *srcPtr = _mouseData;  	byte color; @@ -1522,7 +1500,7 @@ void OSystem_SDL::blitCursor() {  		for (j = 0; j < w; j++) {  			color = *srcPtr;  #ifdef ENABLE_16BIT -			if (bitDepth == 16) { +			if (_cursorBitDepth == 16) {  				if (color != _mouseKeyColor) {	// transparent, don't draw  					int8 r = ((*(uint16 *)srcPtr >> 10) & 0x1F) << 3;  					int8 g = ((*(uint16 *)srcPtr >> 5) & 0x1F) << 3; diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index b6b7a8b284..6fe871fa83 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -124,11 +124,7 @@ public:  	// Disables or enables cursor palette  	void disableCursorPalette(bool disable) {  		_cursorPaletteDisabled = disable; -#ifdef ENABLE_16BIT  -		blitCursor(_cursorBitDepth); -#else  		blitCursor(); -#endif  	}  	// Shaking is used in SCUMM. Set current shake position. @@ -420,11 +416,7 @@ protected:  	virtual void drawMouse(); // overloaded by CE backend  	virtual void undrawMouse(); // overloaded by CE backend (FIXME) -#ifdef ENABLE_16BIT -	virtual void blitCursor(uint8 bitDepth = 8); // overloaded by CE backend (FIXME) -#else  	virtual void blitCursor(); // overloaded by CE backend (FIXME) -#endif  	/** Set the position of the virtual mouse cursor. */  	void setMousePos(int x, int y); | 
