Ticket #4575: 20120625-scumm-smush-flag.patch

File 20120625-scumm-smush-flag.patch, 1.4 KB (added by digitall, 12 years ago)

Proposed Patch to deal with duplicate wraparound flag

  • engines/scumm/smush/smush_player.cpp

    diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
    index a53b808..40ac803 100644
    a b void SmushPlayer::handleTextResource(uint32 subType, int32 subSize, Common::Seek  
    613613                str = string2;
    614614        }
    615615
     616        debugC(DEBUG_SMUSH, "SmushPlayer::handleTextResource(..) flags:%d str:\"%s\"", flags, str);
    616617        // flags:
    617618        // bit 0 - center       1
    618619        // bit 1 - not used     2
    619         // bit 2 - ???          4
     620        // bit 2 - wrap around  4
    620621        // bit 3 - wrap around  8
    621         switch (flags & 9) {
     622        switch (flags & 13) {
    622623        case 0:
    623624                sf->drawString(str, _dst, _width, _height, pos_x, pos_y, false);
    624625                break;
    625626        case 1:
    626627                sf->drawString(str, _dst, _width, _height, pos_x, MAX(pos_y, top), true);
    627628                break;
     629        case 4:
    628630        case 8:
     631        case 12:
    629632                // FIXME: Is 'right' the maximum line width here, just
    630633                // as it is in the next case? It's used several times
    631634                // in The Dig's intro, where 'left' and 'right' are
    void SmushPlayer::handleTextResource(uint32 subType, int32 subSize, Common::Seek  
    633636                // handle that correctly.
    634637                sf->drawStringWrap(str, _dst, _width, _height, pos_x, MAX(pos_y, top), left, right, false);
    635638                break;
     639        case 5:
    636640        case 9:
     641        case 13:
    637642                // In this case, the 'right' parameter is actually the
    638643                // maximum line width. This explains why it's sometimes
    639644                // smaller than 'left'.