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/sword2/mouse.cpp | |
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/sword2/mouse.cpp')
-rw-r--r-- | engines/sword2/mouse.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/sword2/mouse.cpp b/engines/sword2/mouse.cpp index 2aba77b15c..d17b98624e 100644 --- a/engines/sword2/mouse.cpp +++ b/engines/sword2/mouse.cpp @@ -22,6 +22,8 @@ #include "common/stdafx.h" #include "common/system.h" +#include "graphics/cursorman.h" + #include "sword2/sword2.h" #include "sword2/console.h" #include "sword2/controls.h" @@ -1525,7 +1527,7 @@ void Mouse::drawMouse() { decompressMouse(mouseData, _mouseAnim.data, _mouseFrame, _mouseAnim.mousew, _mouseAnim.mouseh, mouse_width); - _vm->_system->setMouseCursor(mouseData, mouse_width, mouse_height, hotspot_x, hotspot_y, 0); + CursorMan.replaceCursor(mouseData, mouse_width, mouse_height, hotspot_x, hotspot_y, 0); free(mouseData); } @@ -1585,12 +1587,12 @@ int32 Mouse::setMouseAnim(byte *ma, int32 size, int32 mouseFlash) { animateMouse(); drawMouse(); - _vm->_system->showMouse(true); + CursorMan.showMouse(true); } else { if (_luggageAnim.data) drawMouse(); else - _vm->_system->showMouse(false); + CursorMan.showMouse(false); } return RD_OK; @@ -1626,12 +1628,12 @@ int32 Mouse::setLuggageAnim(byte *ma, int32 size) { animateMouse(); drawMouse(); - _vm->_system->showMouse(true); + CursorMan.showMouse(true); } else { if (_mouseAnim.data) drawMouse(); else - _vm->_system->showMouse(false); + CursorMan.showMouse(false); } return RD_OK; |