diff options
author | Torbjörn Andersson | 2005-10-22 12:47:09 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-10-22 12:47:09 +0000 |
commit | f8981765e924ecd632a99072287af7254eb9c4fc (patch) | |
tree | a5979f060e4802944c5613be746d3395aaa3a95a /saga | |
parent | eeee881514cec76ed3a8f9e47ec2e89c0d408797 (diff) | |
download | scummvm-rg350-f8981765e924ecd632a99072287af7254eb9c4fc.tar.gz scummvm-rg350-f8981765e924ecd632a99072287af7254eb9c4fc.tar.bz2 scummvm-rg350-f8981765e924ecd632a99072287af7254eb9c4fc.zip |
Cleaned up some cursor show/hide handling. This should fix bug #1333391.
svn-id: r19239
Diffstat (limited to 'saga')
-rw-r--r-- | saga/gfx.cpp | 8 | ||||
-rw-r--r-- | saga/gfx.h | 1 | ||||
-rw-r--r-- | saga/scene.cpp | 27 |
3 files changed, 12 insertions, 24 deletions
diff --git a/saga/gfx.cpp b/saga/gfx.cpp index 2ae266c721..9f40c28f31 100644 --- a/saga/gfx.cpp +++ b/saga/gfx.cpp @@ -48,9 +48,10 @@ Gfx::Gfx(SagaEngine *vm, OSystem *system, int width, int height, GameDetector &d // Set module data _init = 1; - // For now, always show the mouse cursor. - setCursor(); - _system->showMouse(true); + // Start with the cursor shown. It will be hidden before the intro, if + // there is an intro. (With boot params, there may not be.) + setCursor(kCursorNormal); + showCursor(true); } Gfx::~Gfx() { @@ -390,7 +391,6 @@ void Gfx::blackToPal(PalEntry *srcPal, double percent) { } void Gfx::showCursor(bool state) { - updateCursor(); g_system->showMouse(state); } diff --git a/saga/gfx.h b/saga/gfx.h index 5f927a0765..d0de5e9e76 100644 --- a/saga/gfx.h +++ b/saga/gfx.h @@ -145,7 +145,6 @@ public: void getCurrentPal(PalEntry *src_pal); void palToBlack(PalEntry *src_pal, double percent); void blackToPal(PalEntry *src_pal, double percent); - void updateCursor() { setCursor(); } void showCursor(bool state); private: diff --git a/saga/scene.cpp b/saga/scene.cpp index be9ed9de4b..c273941f6c 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -843,16 +843,6 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { _vm->_events->queue(&event); - if (getFlags() & kSceneFlagShowCursor) { - // Activate user interface - event.type = kEvTOneshot; - event.code = kInterfaceEvent; - event.op = kEventActivate; - event.time = 0; - - _vm->_events->queue(&event); - } - // Begin palette cycle animation if present event.type = kEvTOneshot; event.code = kPalAnimEvent; @@ -861,12 +851,6 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { q_event = _vm->_events->queue(&event); - // Show cursor - event.type = kEvTOneshot; - event.code = kCursorEvent; - event.op = kEventShow; - _vm->_events->chain(q_event, &event); - // Start the scene main script if (_sceneDescription.sceneScriptEntrypointNumber > 0) { event.type = kEvTOneshot; @@ -899,9 +883,14 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { if (_sceneNumber == ITE_SCENE_PUZZLE) _vm->_puzzle->execute(); - if (_sceneDescription.flags & kSceneFlagShowCursor) - _vm->_interface->activate(); - + if (getFlags() & kSceneFlagShowCursor) { + // Activate user interface + event.type = kEvTOneshot; + event.code = kInterfaceEvent; + event.op = kEventActivate; + event.time = 0; + _vm->_events->queue(&event); + } } void Scene::loadSceneDescriptor(uint32 resourceId) { |