aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parallaction_ns.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2008-08-30 10:27:20 +0000
committerNicola Mettifogo2008-08-30 10:27:20 +0000
commit0a387bca12797b63432aeecedd262a5433389b83 (patch)
tree2bd04fc59133c42234a0dd906d17685cb2fdbc26 /engines/parallaction/parallaction_ns.cpp
parent4e7205af360e3325871f1e27547ea92a3bad4cee (diff)
downloadscummvm-rg350-0a387bca12797b63432aeecedd262a5433389b83.tar.gz
scummvm-rg350-0a387bca12797b63432aeecedd262a5433389b83.tar.bz2
scummvm-rg350-0a387bca12797b63432aeecedd262a5433389b83.zip
Moved mouse cursor loading/handling to Input class.
svn-id: r34206
Diffstat (limited to 'engines/parallaction/parallaction_ns.cpp')
-rw-r--r--engines/parallaction/parallaction_ns.cpp35
1 files changed, 1 insertions, 34 deletions
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index 61f2859e8a..7c3dcc7222 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -35,12 +35,6 @@
namespace Parallaction {
-#define MOUSEARROW_WIDTH 16
-#define MOUSEARROW_HEIGHT 16
-
-#define MOUSECOMBO_WIDTH 32 // sizes for cursor + selected inventory item
-#define MOUSECOMBO_HEIGHT 32
-
LocationName::LocationName() {
_buf = 0;
_hasSlide = false;
@@ -135,7 +129,6 @@ int Parallaction_ns::init() {
initResources();
initFonts();
- initCursors();
_locationParser = new LocationParser_ns(this);
_locationParser->init();
_programParser = new ProgramParser_ns(this);
@@ -181,32 +174,6 @@ void Parallaction_ns::freeFonts() {
}
-void Parallaction_ns::initCursors() {
- _comboArrow = _disk->loadPointer("pointer");
- _mouseArrow = _resMouseArrow;
-}
-
-void Parallaction_ns::setArrowCursor() {
-
- debugC(1, kDebugInput, "setting mouse cursor to arrow");
-
- // this stuff is needed to avoid artifacts with labels and selected items when switching cursors
- _input->stopHovering();
- _input->_activeItem._id = 0;
-
- _system->setMouseCursor(_mouseArrow, MOUSEARROW_WIDTH, MOUSEARROW_HEIGHT, 0, 0, 0);
-}
-
-void Parallaction_ns::setInventoryCursor(ItemName name) {
- assert(name > 0);
-
- byte *v8 = _comboArrow->getData(0);
-
- // FIXME: destination offseting is not clear
- _inventoryRenderer->drawItem(name, v8 + 7 * MOUSECOMBO_WIDTH + 7, MOUSECOMBO_WIDTH);
- _system->setMouseCursor(v8, MOUSECOMBO_WIDTH, MOUSECOMBO_HEIGHT, 0, 0, 0);
-}
-
void Parallaction_ns::callFunction(uint index, void* parm) {
assert(index < 25); // magic value 25 is maximum # of callables for Nippon Safes
@@ -287,7 +254,7 @@ void Parallaction_ns::changeLocation(char *location) {
_zoneTrap = nullZonePtr;
- setArrowCursor();
+ _input->setArrowCursor();
_gfx->showGfxObj(_char._ani->gfxobj, false);
_location._animations.remove(_char._ani);