[Scummvm-cvs-logs] CVS: scummvm/saga gfx.cpp,1.70,1.71 gfx.h,1.42,1.43 scene.cpp,1.157,1.158
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Sat Oct 22 05:49:35 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5227
Modified Files:
gfx.cpp gfx.h scene.cpp
Log Message:
Cleaned up some cursor show/hide handling. This should fix bug #1333391.
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- gfx.cpp 18 Oct 2005 01:30:19 -0000 1.70
+++ gfx.cpp 22 Oct 2005 12:47:09 -0000 1.71
@@ -48,9 +48,10 @@
// 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::showCursor(bool state) {
- updateCursor();
g_system->showMouse(state);
}
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- gfx.h 18 Oct 2005 01:30:19 -0000 1.42
+++ gfx.h 22 Oct 2005 12:47:09 -0000 1.43
@@ -145,7 +145,6 @@
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:
Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- scene.cpp 18 Oct 2005 01:30:19 -0000 1.157
+++ scene.cpp 22 Oct 2005 12:47:09 -0000 1.158
@@ -843,16 +843,6 @@
_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 @@
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 @@
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) {
More information about the Scummvm-git-logs
mailing list