diff options
Diffstat (limited to 'engines/mads/events.cpp')
-rw-r--r-- | engines/mads/events.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/engines/mads/events.cpp b/engines/mads/events.cpp index 89d1560714..23d2e72eeb 100644 --- a/engines/mads/events.cpp +++ b/engines/mads/events.cpp @@ -42,7 +42,7 @@ EventsManager::EventsManager(MADSEngine *vm) { } EventsManager::~EventsManager() { - delete _cursorSprites; + freeCursors(); } void EventsManager::loadCursors(const Common::String &spritesName) { @@ -68,8 +68,22 @@ void EventsManager::hideCursor() { CursorMan.showMouse(false); } +void EventsManager::resetCursor() { + CursorType cursorId = (CursorType)MIN(_cursorSprites->getCount(), (int)CURSOR_WAIT); + _newCursorId = cursorId; + if (_cursorId != _newCursorId) { + changeCursor(); + _cursorId = _newCursorId; + } +} + void EventsManager::changeCursor() { + warning("TODO: changeCursor"); +} +void EventsManager::freeCursors() { + delete _cursorSprites; + _cursorSprites = nullptr; } void EventsManager::pollEvents() { |