diff options
author | Torbjörn Andersson | 2006-05-25 22:51:42 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-05-25 22:51:42 +0000 |
commit | 8062eb6ec33e32012da28f0cd06b8f9334c26937 (patch) | |
tree | 088c83206fbb0e4feea93ebeada0a505599572bb /engines/saga | |
parent | d56c65bf4a47007dc874b70eb04be9ed7de27b01 (diff) | |
download | scummvm-rg350-8062eb6ec33e32012da28f0cd06b8f9334c26937.tar.gz scummvm-rg350-8062eb6ec33e32012da28f0cd06b8f9334c26937.tar.bz2 scummvm-rg350-8062eb6ec33e32012da28f0cd06b8f9334c26937.zip |
Set and show/hide mouse cursors through a "cursor manager" (analogous to the
recently added (cursor) palette manager) so that the cursor can be properly
restored after returning from the GUI.
If there's any C++ magic that can keep the backend functions from being called
by anything else than these managing classes, that would probably be a good
idea. Also, since the cursor manager keeps a copy of the cursor image, perhaps
there are at least some backends that will no longer need to?
svn-id: r22639
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/gfx.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp index b70b8c95f0..12b951d485 100644 --- a/engines/saga/gfx.cpp +++ b/engines/saga/gfx.cpp @@ -33,6 +33,7 @@ #include "saga/stream.h" #include "common/system.h" +#include "graphics/cursorman.h" namespace Saga { @@ -392,7 +393,7 @@ void Gfx::blackToPal(PalEntry *srcPal, double percent) { } void Gfx::showCursor(bool state) { - g_system->showMouse(state); + CursorMan.showMouse(state); } void Gfx::setCursor(CursorType cursorType) { @@ -411,7 +412,7 @@ void Gfx::setCursor(CursorType cursorType) { 0, 0, 0, A, 0, 0, 0, }; - _system->setMouseCursor(cursor_img, CURSOR_W, CURSOR_H, 3, 3, 0); + CursorMan.replaceCursor(cursor_img, CURSOR_W, CURSOR_H, 3, 3, 0); } else { uint32 resourceId; @@ -450,7 +451,7 @@ void Gfx::setCursor(CursorType cursorType) { } // Note: Hard-coded hotspot - _system->setMouseCursor(image, width, height, 15, 15, 0); + CursorMan.replaceCursor(image, width, height, 15, 15, 0); free(image); free(resource); |