[Scummvm-cvs-logs] SF.net SVN: scummvm:[35428] scummvm/trunk/engines/groovie/cursor.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Dec 18 21:36:17 CET 2008


Revision: 35428
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35428&view=rev
Author:   lordhoto
Date:     2008-12-18 20:36:16 +0000 (Thu, 18 Dec 2008)

Log Message:
-----------
Fixed cursor palette when returning from GMM/Debugger. (Thanks to jvprat for testing)

Modified Paths:
--------------
    scummvm/trunk/engines/groovie/cursor.cpp

Modified: scummvm/trunk/engines/groovie/cursor.cpp
===================================================================
--- scummvm/trunk/engines/groovie/cursor.cpp	2008-12-18 20:22:49 UTC (rev 35427)
+++ scummvm/trunk/engines/groovie/cursor.cpp	2008-12-18 20:36:16 UTC (rev 35428)
@@ -26,6 +26,13 @@
 #include "groovie/cursor.h"
 #include "groovie/groovie.h"
 
+#include "graphics/cursorman.h"
+
+// HACK: Since CursorMan is the name of the global
+// cursor manager we just undefine it here
+#define GlobCursorMan (::Graphics::CursorManager::instance())
+#undef CursorMan
+
 namespace Groovie {
 
 // Cursor Manager
@@ -39,6 +46,8 @@
 	for (uint cursor = 0; cursor < _cursors.size(); cursor++) {
 		delete _cursors[cursor];
 	}
+
+	GlobCursorMan.popAllCursors();
 }
 
 uint8 CursorMan::getStyle() {
@@ -104,13 +113,13 @@
 
 void Cursor_t7g::enable() {
 	// Apply the palette
-	_syst->setCursorPalette(_pal, 0, 32);
+	GlobCursorMan.replaceCursorPalette(_pal, 0, 32);
 }
 
 void Cursor_t7g::showFrame(uint16 frame) {
 	// Set the mouse cursor
 	int offset = _width * _height * frame;
-	_syst->setMouseCursor((const byte *)_img + offset, _width, _height, _width >> 1, _height >> 1, 0);
+	GlobCursorMan.replaceCursor((const byte *)_img + offset, _width, _height, _width >> 1, _height >> 1, 0);
 }
 
 


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