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/agi | |
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/agi')
-rw-r--r-- | engines/agi/agi.cpp | 4 | ||||
-rw-r--r-- | engines/agi/graphics.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index f03c403e0f..16aa3fa975 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -31,6 +31,8 @@ #include "backends/fs/fs.h" +#include "graphics/cursorman.h" + #include "sound/mididrv.h" #include "sound/mixer.h" @@ -547,7 +549,7 @@ int AgiEngine::init() { } int AgiEngine::go() { - _system->showMouse(true); + CursorMan.showMouse(true); report(" \nAGI engine " VERSION " is ready.\n"); if (game.state < STATE_LOADED) { diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp index c9fca743fd..3b9c754d97 100644 --- a/engines/agi/graphics.cpp +++ b/engines/agi/graphics.cpp @@ -24,6 +24,8 @@ #include "common/stdafx.h" +#include "graphics/cursorman.h" + #include "agi/agi.h" #include "agi/graphics.h" @@ -428,7 +430,7 @@ int init_video() { } ++src; } - g_system->setMouseCursor(mouseCursor, 16, 16, 1, 1); + CursorMan.replaceCursor(mouseCursor, 16, 16, 1, 1); return err_OK; } |