diff options
| author | Eugene Sandulenko | 2005-03-21 00:27:39 +0000 | 
|---|---|---|
| committer | Eugene Sandulenko | 2005-03-21 00:27:39 +0000 | 
| commit | d1e46a542000e1a73b087a3e5afd15ca55863a70 (patch) | |
| tree | 4fceeb8a4f6057c91cba98c085a01a609e7aeae7 | |
| parent | 7f83c4786045bd438ff76cea2c6189a62774798b (diff) | |
| download | scummvm-rg350-d1e46a542000e1a73b087a3e5afd15ca55863a70.tar.gz scummvm-rg350-d1e46a542000e1a73b087a3e5afd15ca55863a70.tar.bz2 scummvm-rg350-d1e46a542000e1a73b087a3e5afd15ca55863a70.zip | |
Implement proper scene transition mode for MM NES.
svn-id: r17189
| -rw-r--r-- | scumm/gfx.cpp | 25 | ||||
| -rw-r--r-- | scumm/scumm.cpp | 12 | 
2 files changed, 30 insertions, 7 deletions
| diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 953927fa7d..cf140a7d67 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -83,7 +83,7 @@ struct TransitionEffect {  #ifdef __PALM_OS__  static const TransitionEffect *transitionEffects;  #else -static const TransitionEffect transitionEffects[5] = { +static const TransitionEffect transitionEffects[6] = {  	// Iris effect (looks like an opening/closing camera iris)  	{  		13,		// Number of iterations @@ -167,7 +167,25 @@ static const TransitionEffect transitionEffects[5] = {  			 7, 8,  7, 8,  			32, 7, 32, 8  		} +	}, + +	// Horizontal wipe (a box expands from left to right side). For MM NES +	{ +		14,		// Number of iterations +		{ +			  2,  0,  2,  0, +			  2,  0,  2,  0, +			  0,  0,  0,  0, +			  0,  0,  0,  0 +		}, +		{ +			  0, 0,  0,  15, +			  1, 0,  1,  15, +			255, 0,  0,  0, +			255, 0,  0,  0 +		}  	} +	  };  #endif @@ -600,8 +618,7 @@ void Gdi::ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int  		srcptr = src + y1 * srcPitch;  		dstptr = hercbuf + dsty * Common::kHercW + xo * 2; -		if (dstptr >= hercbuf + Common::kHercW * Common::kHercH + widtho * 2) -			debug("Gnaa"); +		assert(dstptr < hercbuf + Common::kHercW * Common::kHercH + widtho * 2);  		idx1 = (dsty % 7) % 2;  		for (int x1 = 0; x1 < widtho; x1++) { @@ -2552,6 +2569,7 @@ void ScummEngine::fadeIn(int effect) {  	case 3:  	case 4:  	case 5: +	case 6:  		// Some of the transition effects won't work properly unless  		// the screen is marked as clean first. At first I thought I  		// could safely do this every time fadeIn() was called, but @@ -2613,6 +2631,7 @@ void ScummEngine::fadeOut(int effect) {  		case 3:  		case 4:  		case 5: +		case 6:  			transitionEffect(effect - 1);  			break;  		case 128: diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 8d4c1bdaa4..75b9e31d2b 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1534,10 +1534,14 @@ void ScummEngine_v2::scummInit() {  	initV2MouseOver(); -	// Seems in V2 there was only a single room effect (iris), -	// so we set that here. -	_switchRoomEffect2 = 1; -	_switchRoomEffect = 5; +	if (_features & GF_NES) { +		_switchRoomEffect2 = _switchRoomEffect = 6; +	} else { +		// Seems in V2 there was only a single room effect (iris), +		// so we set that here. +		_switchRoomEffect2 = 1; +		_switchRoomEffect = 5; +	}  }  void ScummEngine_v6::scummInit() { | 
