[Scummvm-cvs-logs] CVS: scummvm/backends/sdl graphics.cpp,1.27,1.28 sdl-common.h,1.72,1.73 sdl.cpp,1.79,1.80

Eugene Sandulenko sev at users.sourceforge.net
Sat Feb 19 18:05:35 CET 2005


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

Modified Files:
	graphics.cpp sdl-common.h sdl.cpp 
Log Message:
Implement OSystem method disableCursorPalette(bool disable) as mentioned
in patch #1013937 (OSystem layer with bigger resolution).


Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/graphics.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- graphics.cpp	19 Feb 2005 16:04:03 -0000	1.27
+++ graphics.cpp	20 Feb 2005 02:04:44 -0000	1.28
@@ -870,7 +870,7 @@
 		_paletteDirtyEnd = start + num;
 
 	// Some games blink cursors with palette
-	if (!_overlayVisible && !_cursorHasOwnPalette)
+	if (!_overlayVisible && (!_cursorHasOwnPalette || _cursorPaletteDisabled))
 		blitCursor();
 }
 
@@ -886,6 +886,7 @@
 	}
 
 	_cursorHasOwnPalette = true;
+	_cursorPaletteDisabled = false;
 
 	if (!_overlayVisible)
 		blitCursor();
@@ -1126,7 +1127,7 @@
 		for (j = 0; j < w; j++) {
 			color = *srcPtr;
 			if (color != _mouseKeyColor) {	// transparent, don't draw
-				if (_cursorHasOwnPalette && !_overlayVisible)
+				if (_cursorHasOwnPalette && !_overlayVisible && !_cursorPaletteDisabled)
 					*(uint16 *)dstPtr = SDL_MapRGB(_mouseOrigSurface->format, 
 								   _cursorPalette[color].r, _cursorPalette[color].g, 
 															   _cursorPalette[color].b);

Index: sdl-common.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.h,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- sdl-common.h	17 Feb 2005 23:00:56 -0000	1.72
+++ sdl-common.h	20 Feb 2005 02:04:44 -0000	1.73
@@ -87,6 +87,9 @@
 	// Set colors of cursor palette
 	void setCursorPalette(const byte *colors, uint start, uint num);
 
+	// Disables or enables cursor palette
+	void disableCursorPalette(bool disable) { _cursorPaletteDisabled = disable; };
+
 	// Shaking is used in SCUMM. Set current shake position.
 	void setShakePos(int shake_pos);
 
@@ -277,6 +280,7 @@
 	byte _mouseKeyColor;
 	int _cursorTargetScale;
 	bool _cursorHasOwnPalette;
+	bool _cursorPaletteDisabled;
 	SDL_Surface *_mouseOrigSurface;
 	SDL_Surface *_mouseSurface;
 	enum {

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- sdl.cpp	17 Feb 2005 23:00:56 -0000	1.79
+++ sdl.cpp	20 Feb 2005 02:04:44 -0000	1.80
@@ -102,7 +102,7 @@
 	_cdrom(0), _scalerProc(0), _modeChanged(false), _dirtyChecksums(0),
 	_mouseVisible(false), _mouseDrawn(false), _mouseData(0), _mouseSurface(0),
 	_mouseOrigSurface(0), _mouseHotspotX(0), _mouseHotspotY(0), _cursorTargetScale(1),
-	_cursorHasOwnPalette(false),
+	_cursorHasOwnPalette(false), _cursorPaletteDisabled(true),
 	_joystick(0),
 	_currentShakePos(0), _newShakePos(0),
 	_paletteDirtyStart(0), _paletteDirtyEnd(0),





More information about the Scummvm-git-logs mailing list