aboutsummaryrefslogtreecommitdiff
path: root/engines/simon
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-05-25 22:51:42 +0000
committerTorbjörn Andersson2006-05-25 22:51:42 +0000
commit8062eb6ec33e32012da28f0cd06b8f9334c26937 (patch)
tree088c83206fbb0e4feea93ebeada0a505599572bb /engines/simon
parentd56c65bf4a47007dc874b70eb04be9ed7de27b01 (diff)
downloadscummvm-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/simon')
-rw-r--r--engines/simon/animation.cpp4
-rw-r--r--engines/simon/cursor.cpp12
2 files changed, 10 insertions, 6 deletions
diff --git a/engines/simon/animation.cpp b/engines/simon/animation.cpp
index 385c20473a..6bc3c813fd 100644
--- a/engines/simon/animation.cpp
+++ b/engines/simon/animation.cpp
@@ -26,6 +26,8 @@
#include "common/endian.h"
#include "common/system.h"
+#include "graphics/cursorman.h"
+
#include "simon/animation.h"
#include "simon/intern.h"
#include "simon/simon.h"
@@ -87,7 +89,7 @@ bool MoviePlayer::load(const char *filename) {
}
debug(0, "Playing video %s", filename2);
- _vm->_system->showMouse(false);
+ CursorMan.showMouse(false);
if ((_vm->getPlatform() == Common::kPlatformAmiga || _vm->getPlatform() == Common::kPlatformMacintosh) &&
_vm->_language != Common::EN_ANY) {
diff --git a/engines/simon/cursor.cpp b/engines/simon/cursor.cpp
index ff331e5390..d2d0df3d30 100644
--- a/engines/simon/cursor.cpp
+++ b/engines/simon/cursor.cpp
@@ -25,6 +25,8 @@
#include "common/system.h"
+#include "graphics/cursorman.h"
+
#include "simon/simon.h"
namespace Simon {
@@ -226,9 +228,9 @@ static const byte _simon2_cursors[10][256] = {
void SimonEngine::drawMousePointer() {
if (getGameType() == GType_SIMON2) {
- _system->setMouseCursor(_simon2_cursors[_mouseCursor], 16, 16, 7, 7);
+ CursorMan.replaceCursor(_simon2_cursors[_mouseCursor], 16, 16, 7, 7);
} else {
- _system->setMouseCursor(_simon1_cursor, 16, 16, 0, 0);
+ CursorMan.replaceCursor(_simon1_cursor, 16, 16, 0, 0);
}
}
@@ -236,11 +238,11 @@ void SimonEngine::handleMouseMoved() {
uint x;
if (_mouseHideCount) {
- _system->showMouse(false);
+ CursorMan.showMouse(false);
return;
}
- _system->showMouse(true);
+ CursorMan.showMouse(true);
pollMouseXY();
if (_mouseX <= 0)
@@ -433,7 +435,7 @@ void SimonEngine::drawMousePointer_FF() {
offs = cursor * 32 + _mouseAnim * 2;
drawMousePart(image, _mouseOffs[offs], _mouseOffs[offs + 1]);
- _system->setMouseCursor(_mouseData, kMaxCursorWidth, kMaxCursorHeight, 19, 19, 0);
+ CursorMan.replaceCursor(_mouseData, kMaxCursorWidth, kMaxCursorHeight, 19, 19, 0);
}
}