Ticket #8447: scumm_v6_cursor.diff

File scumm_v6_cursor.diff, 4.2 KB (added by SF/albeu, 15 years ago)
  • scumm/cursor.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/cursor.cpp,v
    retrieving revision 2.45
    diff -u -r2.45 cursor.cpp
     
    7575        0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
    7676};
    7777
     78static const byte default_v6_cursor[] = {
     79        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     80        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     81        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     82        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     83        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     84        0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x0F,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
     85        0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, 0x0F,0x0F,0x0F, 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0xFF,
     86        0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x0F,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
     87        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     88        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     89        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     90        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     91        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     92        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     93        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     94        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
     95};
     96
    7897ScummEngine_v5::ScummEngine_v5(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex)
    7998 : ScummEngine(detector, syst, gs, md5sum, substResFileNameIndex) {
    8099
     
    133152        setCursorFromBuffer((byte *)vs->pixels + (y - vs->topline) * vs->pitch + x, w, h, vs->pitch);
    134153}
    135154
    136 void ScummEngine::setCursorFromBuffer(byte *ptr, int width, int height, int pitch) {
     155void ScummEngine_v6::setDefaultCursor() {
     156        setCursorHotspot(7,6);
     157        setCursorFromBuffer(default_v6_cursor,16,16,16);
     158}
     159
     160void ScummEngine::setCursorFromBuffer(const byte *ptr, int width, int height, int pitch) {
    137161        uint size;
    138162        byte *dst;
    139163
  • scumm/intern.h

    RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
    retrieving revision 2.511
    diff -u -r2.511 intern.h
     
    537537        virtual void writeArray(int array, int index, int base, int value);
    538538        void shuffleArray(int num, int minIdx, int maxIdx);
    539539
     540        void setDefaultCursor();
    540541        void setCursorTransparency(int a);
    541542        void setCursorHotspot(int x, int y);
    542543
  • scumm/scumm.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
    retrieving revision 1.549
    diff -u -r1.549 scumm.cpp
     
    18351835
    18361836void ScummEngine_v6::scummInit() {
    18371837        ScummEngine::scummInit();
    1838 
    1839         if (_gameId == GID_TENTACLE && res.roomno[rtRoom][60]) {
    1840                 // HACK: For DOTT we manually set the default cursor. See also bug #786994
    1841                 setCursorFromImg(697, 60, 1);
    1842                 setCursorTransparency(1);
    1843         }
     1838        setDefaultCursor();
    18441839}
    18451840
    18461841void ScummEngine_v60he::scummInit() {
  • scumm/scumm.h

    RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
    retrieving revision 1.635
    diff -u -r1.635 scumm.h
     
    983983
    984984        void setupCursor();
    985985
    986         void setCursorFromBuffer(byte *ptr, int width, int height, int pitch);
     986        void setCursorFromBuffer(const byte *ptr, int width, int height, int pitch);
    987987
    988988public:
    989989        void markRectAsDirty(VirtScreenNumber virt, int left, int right, int top, int bottom, int dirtybit = 0);