Ticket #1790: 1035739.diff

File 1035739.diff, 2.8 KB (added by cyxx, 14 years ago)

Possible fix for TheDig (SVN Jun 2nd, 2006)

  • scumm/scumm.cpp

     
    364364        _bgNeedsRedraw = false;
    365365        _screenEffectFlag = false;
    366366        _completeScreenRedraw = false;
     367        _disableFadeInEffect = false;
    367368        memset(&_cursor, 0, sizeof(_cursor));
    368369        memset(_grabbedCursor, 0, sizeof(_grabbedCursor));
    369370        _currentCursor = 0;
  • scumm/smush/smush_player.cpp

     
    345345
    346346        _vm->_fullRedraw = true;
    347347
    348         // WORKAROUND bug #1035739: This is hack to workaround some ugly palette
    349         // issues, see the mentioned bug report for details.
    350         _vm->_doEffect = false;
    351 
    352 
    353348        // HACK HACK HACK: This is an *evil* trick, beware! See above for
    354349        // some explanation.
    355350        _vm->virtscr[0].pitch = _origPitch;
    356351        _vm->gdi._numStrips = _origNumStrips;
    357352
    358 
    359353        _initDone = false;
    360354}
    361355
  • scumm/gfx.cpp

     
    29522952#pragma mark -
    29532953
    29542954void ScummEngine::fadeIn(int effect) {
     2955        if (_disableFadeInEffect) {
     2956                // fadeIn() calls can be disabled in TheDig after a SMUSH movie
     2957                // has been played. Like the original interpreter, we introduce
     2958                // an extra flag to handle this.
     2959                _disableFadeInEffect = false;
     2960                _doEffect = false;
     2961                return;
     2962        }
     2963
    29552964        updatePalette();
    29562965
    29572966        switch (effect) {
     
    30123021                memcpy(_scrollBuffer, vs->getPixels(0, 0), vs->h * vs->pitch);
    30133022        }
    30143023
    3015 
    3016         if (_screenEffectFlag && effect != 0) {
     3024        // TheDig can disable fadeIn(), and may call fadeOut() several times.
     3025        // Disabling the _screenEffectFlag check forces the screen to get cleared.
     3026        // This fixes glitches, at least, in the first cutscene when bypassed.
     3027        if ((_game.id == GID_DIG || _screenEffectFlag) && effect != 0) {
    30173028       
    30183029                // Fill screen 0 with black
    30193030                memset(vs->getPixels(0, 0), 0, vs->pitch * vs->h);
  • scumm/scumm.h

     
    976976        //ender: fullscreen
    977977        bool _fullRedraw, _bgNeedsRedraw;
    978978        bool _screenEffectFlag, _completeScreenRedraw;
     979        bool _disableFadeInEffect;
    979980
    980981        struct {
    981982                int hotspotX, hotspotY, width, height;
  • scumm/script_v6.cpp

     
    25442544                                        _insane->runScene(insaneVarNum);
    25452545                                        _insaneRunning = false;
    25462546                                }
     2547                                if (_game.id == GID_DIG) {
     2548                                        _disableFadeInEffect = true;
     2549                                }
    25472550                        }
    25482551                        break;
    25492552#endif