diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/saga/events.cpp | 6 | ||||
-rw-r--r-- | engines/saga/events.h | 2 | ||||
-rw-r--r-- | engines/saga/gfx.h | 2 | ||||
-rw-r--r-- | engines/saga/scene.cpp | 20 |
4 files changed, 27 insertions, 3 deletions
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp index b3e2230c5b..7452f69b39 100644 --- a/engines/saga/events.cpp +++ b/engines/saga/events.cpp @@ -437,6 +437,12 @@ int Events::handleOneShot(Event *event) { case kEventHide: _vm->_gfx->showCursor(false); break; + case kEventSetNormalCursor: + _vm->_gfx->setCursor(kCursorNormal); + break; + case kEventSetBusyCursor: + _vm->_gfx->setCursor(kCursorBusy); + break; default: break; } diff --git a/engines/saga/events.h b/engines/saga/events.h index d89b3d89f5..2e4d9cf987 100644 --- a/engines/saga/events.h +++ b/engines/saga/events.h @@ -97,6 +97,8 @@ enum EventOps { // CURSOR events kEventShow = 1, // kEventHide = 2, // reused + kEventSetNormalCursor = 3, + kEventSetBusyCursor = 4, // GRAPHICS events kEventFillRect = 1, // kEventSetFlag = 4, // reused diff --git a/engines/saga/gfx.h b/engines/saga/gfx.h index 0ffd0ea434..ab161a9420 100644 --- a/engines/saga/gfx.h +++ b/engines/saga/gfx.h @@ -148,9 +148,9 @@ public: void palToBlack(PalEntry *src_pal, double percent); void blackToPal(PalEntry *src_pal, double percent); void showCursor(bool state); + void setCursor(CursorType cursorType = kCursorNormal); private: - void setCursor(CursorType cursorType = kCursorNormal); int _init; Surface _backBuffer; byte _currentPal[PAL_ENTRIES * 4]; diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 20dab8023f..94f81c8ba3 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -595,6 +595,15 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { Event *q_event; static PalEntry current_pal[PAL_ENTRIES]; + // Change the cursor to an hourglass in IHNM + if (_vm->getGameType() == GType_IHNM) { + event.type = kEvTOneshot; + event.code = kCursorEvent; + event.op = kEventSetBusyCursor; + event.time = 0; + _vm->_events->queue(&event); + } + if ((_vm->getGameType() == GType_IHNM) && (loadSceneParams->chapter != NO_CHAPTER_CHANGE)) { if (loadSceneParams->loadFlag != kLoadBySceneNumber) { error("loadScene wrong usage"); @@ -874,8 +883,6 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { loadSceneParams->sceneProc(SCENE_BEGIN, this); } - - // We probably don't want "followers" to go into scene -1 , 0. At the very // least we don't want garbage to be drawn that early in the ITE intro. if (_sceneNumber > 0 && _sceneNumber != ITE_SCENE_PUZZLE) @@ -892,6 +899,15 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { event.time = 0; _vm->_events->queue(&event); } + + // Change the cursor back to a crosshair in IHNM + if (_vm->getGameType() == GType_IHNM) { + event.type = kEvTOneshot; + event.code = kCursorEvent; + event.op = kEventSetNormalCursor; + event.time = 0; + _vm->_events->queue(&event); + } } void Scene::loadSceneDescriptor(uint32 resourceId) { |