Ticket #5678: sci_bitsshow_rounding.patch

File sci_bitsshow_rounding.patch, 813 bytes (added by wjp, 13 years ago)

Suggested patch

  • engines/sci/graphics/paint16.cpp

    commit 3fcfc4e1f82ba9747d879b77d70ddc31bfd05d89
    Author: Willem Jan Palenstijn <wjp@usecode.org>
    Date:   Tue Apr 26 23:48:36 2011 +0200
    
        SCI: Round left/right edges in bitsShow to even coords
        
        This fixes the vertical black line glitch in the QfG3 start menu (#3293351)
    
    diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp
    index ff738fc..216f72f 100644
    a b void GfxPaint16::bitsShow(const Common::Rect &rect) {  
    302302                return;
    303303
    304304        _ports->offsetRect(workerRect);
     305
     306        // We adjust the left/right coordinates to even coordinates
     307        workerRect.left &= 0xFFFE; // round down
     308        workerRect.right = (workerRect.right + 1) & 0xFFFE; // round up
     309
    305310        _screen->copyRectToScreen(workerRect);
    306311}
    307312