[Scummvm-cvs-logs] SF.net SVN: scummvm:[41212] scummvm/branches/gsoc2009-16bit/backends/ platform/sdl
upthorn at users.sourceforge.net
upthorn at users.sourceforge.net
Sat Jun 6 10:02:45 CEST 2009
Revision: 41212
http://scummvm.svn.sourceforge.net/scummvm/?rev=41212&view=rev
Author: upthorn
Date: 2009-06-06 08:02:45 +0000 (Sat, 06 Jun 2009)
Log Message:
-----------
Corrected 16-bit cursor blit errors on GFX mode change.
Modified Paths:
--------------
scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp 2009-06-06 07:22:19 UTC (rev 41211)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp 2009-06-06 08:02:45 UTC (rev 41212)
@@ -332,7 +332,11 @@
// 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 {
@@ -600,7 +604,11 @@
SDL_FreeSurface(old_overlayscreen);
// Update cursor to new scale
+#ifdef ENABLE_16BIT
+ blitCursor(_cursorBitDepth);
+#else
blitCursor();
+#endif
// Blit everything to the screen
internUpdateScreen();
@@ -1163,7 +1171,11 @@
// 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) {
@@ -1192,7 +1204,11 @@
_cursorPaletteDisabled = false;
+#ifdef ENABLE_16BIT
+ blitCursor(_cursorBitDepth);
+#else
blitCursor();
+#endif
}
void OSystem_SDL::setShakePos(int shake_pos) {
@@ -1412,7 +1428,7 @@
colmask |= 0xFF;
}
keycolor &= colmask;
-
+ _cursorBitDepth = bitDepth;
#else
void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale) {
#endif
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp 2009-06-06 07:22:19 UTC (rev 41211)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp 2009-06-06 08:02:45 UTC (rev 41212)
@@ -197,7 +197,7 @@
#endif
_hwscreen(0), _screen(0), _tmpscreen(0),
#ifdef ENABLE_16BIT
- _screen16(0),
+ _screen16(0), _cursorBitDepth(8),
#endif
_overlayVisible(false),
_overlayscreen(0), _tmpscreen2(0),
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h 2009-06-06 07:22:19 UTC (rev 41211)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h 2009-06-06 08:02:45 UTC (rev 41212)
@@ -124,7 +124,11 @@
// 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.
@@ -354,6 +358,9 @@
MousePos _mouseCurState;
byte _mouseKeyColor;
int _cursorTargetScale;
+#ifdef ENABLE_16BIT
+ uint8 _cursorBitDepth;
+#endif
bool _cursorPaletteDisabled;
SDL_Surface *_mouseOrigSurface;
SDL_Surface *_mouseSurface;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list