Skip to content

Commit 865f12a

Browse files
committed
PARALLACTION: Use CursorMan to control cursor instead of backend functions.
svn-id: r55611
1 parent d3ae7da commit 865f12a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

engines/parallaction/input.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include "common/events.h"
2727
#include "common/system.h"
28+
#include "graphics/cursorman.h"
2829

2930
#include "parallaction/exec.h"
3031
#include "parallaction/input.h"
@@ -444,11 +445,11 @@ void Input::setMouseState(MouseTriState state) {
444445
switch (_mouseState) {
445446
case MOUSE_ENABLED_HIDE:
446447
case MOUSE_DISABLED:
447-
_vm->_system->showMouse(false);
448+
CursorMan.showMouse(false);
448449
break;
449450

450451
case MOUSE_ENABLED_SHOW:
451-
_vm->_system->showMouse(true);
452+
CursorMan.showMouse(true);
452453
break;
453454
}
454455
}
@@ -519,14 +520,14 @@ void Input::setArrowCursor() {
519520
// this stuff is needed to avoid artifacts with labels and selected items when switching cursors
520521
stopHovering();
521522
_activeItem._id = 0;
522-
_vm->_system->setMouseCursor(_mouseArrow->getData(0), MOUSEARROW_WIDTH_NS, MOUSEARROW_HEIGHT_NS, 0, 0, 0);
523+
CursorMan.replaceCursor(_mouseArrow->getData(0), MOUSEARROW_WIDTH_NS, MOUSEARROW_HEIGHT_NS, 0, 0, 0);
523524
break;
524525

525526
case GType_BRA: {
526527
Common::Rect r;
527528
_mouseArrow->getRect(0, r);
528-
_vm->_system->setMouseCursor(_mouseArrow->getData(0), r.width(), r.height(), 0, 0, 0);
529-
_vm->_system->showMouse(true);
529+
CursorMan.replaceCursor(_mouseArrow->getData(0), r.width(), r.height(), 0, 0, 0);
530+
CursorMan.showMouse(true);
530531
_activeItem._id = 0;
531532
break;
532533
}
@@ -545,7 +546,7 @@ void Input::setInventoryCursor(ItemName name) {
545546
byte *v8 = _comboArrow->getData(0);
546547
// FIXME: destination offseting is not clear
547548
_vm->_inventoryRenderer->drawItem(name, v8 + 7 * MOUSECOMBO_WIDTH_NS + 7, MOUSECOMBO_WIDTH_NS);
548-
_vm->_system->setMouseCursor(v8, MOUSECOMBO_WIDTH_NS, MOUSECOMBO_HEIGHT_NS, 0, 0, 0);
549+
CursorMan.replaceCursor(v8, MOUSECOMBO_WIDTH_NS, MOUSECOMBO_HEIGHT_NS, 0, 0, 0);
549550
break;
550551
}
551552

@@ -555,7 +556,7 @@ void Input::setInventoryCursor(ItemName name) {
555556
memcpy(dst, src, _comboArrow->getSize(0));
556557
// FIXME: destination offseting is not clear
557558
_vm->_inventoryRenderer->drawItem(name, dst + _mouseComboProps_BR._yOffset * _mouseComboProps_BR._width + _mouseComboProps_BR._xOffset, _mouseComboProps_BR._width);
558-
_vm->_system->setMouseCursor(dst, _mouseComboProps_BR._width, _mouseComboProps_BR._height, 0, 0, 0);
559+
CursorMan.replaceCursor(dst, _mouseComboProps_BR._width, _mouseComboProps_BR._height, 0, 0, 0);
559560
break;
560561
}
561562

0 commit comments

Comments
 (0)