aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie
diff options
context:
space:
mode:
authorJohannes Schickel2008-12-18 20:36:16 +0000
committerJohannes Schickel2008-12-18 20:36:16 +0000
commit28d33e01e97c43c68244ec536b4d4380d5282cc5 (patch)
tree5181c70c08c285990a3b72f9c49d825d84d2f7a6 /engines/groovie
parentdfc08c823d4af39ae61600a7230414c02156282b (diff)
downloadscummvm-rg350-28d33e01e97c43c68244ec536b4d4380d5282cc5.tar.gz
scummvm-rg350-28d33e01e97c43c68244ec536b4d4380d5282cc5.tar.bz2
scummvm-rg350-28d33e01e97c43c68244ec536b4d4380d5282cc5.zip
Fixed cursor palette when returning from GMM/Debugger. (Thanks to jvprat for testing)
svn-id: r35428
Diffstat (limited to 'engines/groovie')
-rw-r--r--engines/groovie/cursor.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp
index 31f1caca3c..de52e77d99 100644
--- a/engines/groovie/cursor.cpp
+++ b/engines/groovie/cursor.cpp
@@ -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 @@ CursorMan::~CursorMan() {
for (uint cursor = 0; cursor < _cursors.size(); cursor++) {
delete _cursors[cursor];
}
+
+ GlobCursorMan.popAllCursors();
}
uint8 CursorMan::getStyle() {
@@ -104,13 +113,13 @@ Cursor_t7g::Cursor_t7g(OSystem *system, uint8 *img, uint8 *pal) :
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);
}