diff options
| author | Filippos Karapetis | 2008-05-17 09:06:54 +0000 | 
|---|---|---|
| committer | Filippos Karapetis | 2008-05-17 09:06:54 +0000 | 
| commit | 66ecacc7c388d268d2ecf04c3b6cbf4face5a164 (patch) | |
| tree | f8c52db3f1d3cf0954a56a4f6deab647f8825568 | |
| parent | 5127f1a8f12f409f5ab973fe821981d4fb25b9ab (diff) | |
| download | scummvm-rg350-66ecacc7c388d268d2ecf04c3b6cbf4face5a164.tar.gz scummvm-rg350-66ecacc7c388d268d2ecf04c3b6cbf4face5a164.tar.bz2 scummvm-rg350-66ecacc7c388d268d2ecf04c3b6cbf4face5a164.zip  | |
Screen mask is now only used for V2 games
svn-id: r32147
| -rw-r--r-- | engines/made/screen.cpp | 26 | 
1 files changed, 16 insertions, 10 deletions
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 563e059309..20327c3acf 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -45,11 +45,13 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {  	_workScreenDrawCtx.destSurface = _workScreen;  	_clipArea.destSurface = _workScreen; -	// FIXME: Screen mask is only needed in v2 games -	_screenMask = new Graphics::Surface(); -	_screenMask->create(320, 200, 1); -	_maskDrawCtx.clipRect = Common::Rect(320, 200); -	_maskDrawCtx.destSurface = _screenMask; +	// Screen mask is only needed in v2 games +	if (_vm->getGameID() != GID_RTZ) { +		_screenMask = new Graphics::Surface(); +		_screenMask->create(320, 200, 1); +		_maskDrawCtx.clipRect = Common::Rect(320, 200); +		_maskDrawCtx.destSurface = _screenMask; +	}  	for (int i = 0; i <= 3; i++)  		_excludeClipAreaEnabled[i] = false; @@ -90,14 +92,16 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {  Screen::~Screen() {  	delete _backgroundScreen;  	delete _workScreen; -	delete _screenMask; +	if (_vm->getGameID() != GID_RTZ) +		delete _screenMask;  	delete _fx;  }  void Screen::clearScreen() {  	_backgroundScreen->fillRect(Common::Rect(0, 0, 320, 200), 0);  	_workScreen->fillRect(Common::Rect(0, 0, 320, 200), 0); -	_screenMask->fillRect(Common::Rect(0, 0, 320, 200), 0); +	if (_vm->getGameID() != GID_RTZ) +		_screenMask->fillRect(Common::Rect(0, 0, 320, 200), 0);  	_mask = 0;  	_needPalette = true;  } @@ -167,7 +171,8 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f  	source = (byte*)sourceSurface->getBasePtr(startX, startY);  	dest = (byte*)clipInfo.destSurface->getBasePtr(x, y); -	maskp = (byte*)_maskDrawCtx.destSurface->getBasePtr(x, y); +	if (_vm->getGameID() != GID_RTZ) +		maskp = (byte*)_maskDrawCtx.destSurface->getBasePtr(x, y);  	int32 sourcePitch, linePtrAdd;  	byte *linePtr; @@ -192,7 +197,7 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f  			linePtr = source;  		}  		for (int16 xc = 0; xc < clipWidth; xc++) { -			if (*linePtr && (mask == 0 || maskp[xc] == 0)) { +			if (*linePtr && (_vm->getGameID() == GID_RTZ || (mask == 0 || maskp[xc] == 0))) {  				if (*linePtr)  					dest[xc] = *linePtr;  			} @@ -200,7 +205,8 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f  		}  		source += sourcePitch;  		dest += clipInfo.destSurface->pitch; -		maskp += _maskDrawCtx.destSurface->pitch; +		if (_vm->getGameID() != GID_RTZ) +			maskp += _maskDrawCtx.destSurface->pitch;  	}  }  | 
