Ticket #2297: saga-cursor.diff

File saga-cursor.diff, 2.6 KB (added by eriktorbjorn, 18 years ago)

Patch against an October 21 CVS snapshot

  • gfx.cpp

    RCS file: /cvsroot/scummvm/scummvm/saga/gfx.cpp,v
    retrieving revision 1.70
    diff -u -r1.70 gfx.cpp
     
    4848        // Set module data
    4949        _init = 1;
    5050
    51         // For now, always show the mouse cursor.
    52         setCursor();
    53         _system->showMouse(true);
     51        // Start with the cursor shown. It will be hidden before the intro, if
     52        // there is an intro. (With boot params, there may not be.)
     53        setCursor(kCursorNormal);
     54        showCursor(true);
    5455}
    5556
    5657Gfx::~Gfx() {
     
    390391}
    391392
    392393void Gfx::showCursor(bool state) {
    393         updateCursor();
    394394        g_system->showMouse(state);
    395395}
    396396
  • gfx.h

    RCS file: /cvsroot/scummvm/scummvm/saga/gfx.h,v
    retrieving revision 1.42
    diff -u -r1.42 gfx.h
     
    145145        void getCurrentPal(PalEntry *src_pal);
    146146        void palToBlack(PalEntry *src_pal, double percent);
    147147        void blackToPal(PalEntry *src_pal, double percent);
    148         void updateCursor() { setCursor(); }
    149148        void showCursor(bool state);
    150149
    151150private:
  • scene.cpp

    RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
    retrieving revision 1.157
    diff -u -r1.157 scene.cpp
     
    843843
    844844                _vm->_events->queue(&event);
    845845
    846                 if (getFlags() & kSceneFlagShowCursor) {
    847                         // Activate user interface
    848                         event.type = kEvTOneshot;
    849                         event.code = kInterfaceEvent;
    850                         event.op = kEventActivate;
    851                         event.time = 0;
    852 
    853                         _vm->_events->queue(&event);
    854                 }
    855 
    856846                // Begin palette cycle animation if present
    857847                event.type = kEvTOneshot;
    858848                event.code = kPalAnimEvent;
     
    861851
    862852                q_event = _vm->_events->queue(&event);
    863853
    864                 // Show cursor
    865                 event.type = kEvTOneshot;
    866                 event.code = kCursorEvent;
    867                 event.op = kEventShow;
    868                 _vm->_events->chain(q_event, &event);
    869 
    870854                // Start the scene main script
    871855                if (_sceneDescription.sceneScriptEntrypointNumber > 0) {
    872856                        event.type = kEvTOneshot;
     
    899883        if (_sceneNumber == ITE_SCENE_PUZZLE)
    900884                _vm->_puzzle->execute();
    901885
    902         if (_sceneDescription.flags & kSceneFlagShowCursor)
    903                 _vm->_interface->activate();
    904 
     886        if (getFlags() & kSceneFlagShowCursor) {
     887                // Activate user interface
     888                event.type = kEvTOneshot;
     889                event.code = kInterfaceEvent;
     890                event.op = kEventActivate;
     891                event.time = 0;
     892                _vm->_events->queue(&event);
     893        }
    905894}
    906895
    907896void Scene::loadSceneDescriptor(uint32 resourceId) {