Ticket #8119: dig-masking.diff

File dig-masking.diff, 1.7 KB (added by eriktorbjorn, 22 years ago)

Patch against an October 5 CVS snapshot

  • scummvm/scumm/gfx.cpp

    diff -ur ScummVM-cvs20021105/scummvm/scumm/gfx.cpp ScummVM-cvs20021105+hack/scummvm/scumm/gfx.cpp
    old new  
    430430        size = itemsize * gdi._numZBuffer;
    431431        memset(createResource(rtBuffer, 9, size), 0, size);
    432432
    433         for (i = 0; i < 4; i++)
    434                 gdi._imgBufOffs[i] = i * itemsize;
     433        for (i = 0; i < (int) ARRAYSIZE(gdi._imgBufOffs); i++) {
     434                if (i < gdi._numZBuffer)
     435                        gdi._imgBufOffs[i] = i * itemsize;
     436                else
     437                        gdi._imgBufOffs[i] = (gdi._numZBuffer - 1) * itemsize;
     438        }
    435439}
    436440
    437441void Scumm::setPaletteFromPtr(byte *ptr)
  • scummvm/scumm/gfx.h

    diff -ur ScummVM-cvs20021105/scummvm/scumm/gfx.h ScummVM-cvs20021105+hack/scummvm/scumm/gfx.h
    old new  
    115115        uint _readOffs;
    116116
    117117        int _numZBuffer;
    118         int _imgBufOffs[4];
     118        int _imgBufOffs[5];
    119119        byte _disable_zbuffer;
    120120        int32 _numStrips;
    121121
  • scummvm/scumm/saveload.cpp

    diff -ur ScummVM-cvs20021105/scummvm/scumm/saveload.cpp ScummVM-cvs20021105+hack/scummvm/scumm/saveload.cpp
    old new  
    421421
    422422                MKLINE(Scumm, _egoPositioned, sleByte),
    423423
     424                // FIXME: Should be 5, not 4
    424425                MKARRAY(Scumm, gdi._imgBufOffs[0], sleUint16, 4),
    425426                MKLINE(Scumm, gdi._numZBuffer, sleByte),
    426427
     
    532533
    533534                MKLINE(Scumm, _egoPositioned, sleByte),
    534535
     536                // FIXME: Should be 5, not 4.
    535537                MKARRAY(Scumm, gdi._imgBufOffs[0], sleUint16, 4),
    536538                MKLINE(Scumm, gdi._numZBuffer, sleByte),
    537539