From 8c9420a8349b0cdb93dcace36c2bd5f93e03476f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 23 Feb 2014 19:33:26 -0500 Subject: MADS: Added game initialisation code --- engines/mads/events.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'engines/mads/events.cpp') 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() { -- cgit v1.2.3