diff options
Diffstat (limited to 'engines/draci')
-rw-r--r-- | engines/draci/mouse.cpp | 14 | ||||
-rw-r--r-- | engines/draci/mouse.h | 3 |
2 files changed, 14 insertions, 3 deletions
diff --git a/engines/draci/mouse.cpp b/engines/draci/mouse.cpp index 9f34003840..02510e15c5 100644 --- a/engines/draci/mouse.cpp +++ b/engines/draci/mouse.cpp @@ -88,12 +88,22 @@ void Mouse::setPosition(uint16 x, uint16 y) { _vm->_system->warpMouse(x, y); } -// FIXME: Handle hotspots properly void Mouse::setCursorType(CursorType cur) { _cursorType = cur; + + BAFile *f; + f = _vm->_iconsArchive->getFile(_cursorType); + + Sprite sp(f->_data, f->_length, 0, 0, true); + CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColours); + CursorMan.replaceCursor(sp.getBuffer(), sp.getWidth(), sp.getHeight(), + sp.getWidth() / 2, sp.getHeight() / 2); +} + +void Mouse::loadItemCursor(int itemID, bool highlighted) { BAFile *f; - f = _vm->_iconsArchive->getFile(_cursorType); + f = _vm->_itemImagesArchive->getFile(itemID + highlighted); Sprite sp(f->_data, f->_length, 0, 0, true); CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColours); diff --git a/engines/draci/mouse.h b/engines/draci/mouse.h index 07dc53311d..f3e0123f59 100644 --- a/engines/draci/mouse.h +++ b/engines/draci/mouse.h @@ -50,8 +50,9 @@ public: void cursorOff(); bool isCursorOn(); void setPosition(uint16 x, uint16 y); - void setCursorType(CursorType cur); CursorType getCursorType() { return _cursorType; } + void setCursorType(CursorType cur); + void loadItemCursor(int itemID, bool highlighted = false); bool lButtonPressed() { return _lButton; } bool rButtonPressed() { return _rButton; } void lButtonSet(bool state) { _lButton = state; } |