diff options
| author | Max Horn | 2004-11-28 02:05:04 +0000 | 
|---|---|---|
| committer | Max Horn | 2004-11-28 02:05:04 +0000 | 
| commit | cc11a1249ac335cb289ed14913df85c8cd7d0036 (patch) | |
| tree | a1cbc8144047e5323d840c6e135a4ca890450b70 | |
| parent | 232ef35298f8105a2d061e8ce2ada0facf6b06e0 (diff) | |
| download | scummvm-rg350-cc11a1249ac335cb289ed14913df85c8cd7d0036.tar.gz scummvm-rg350-cc11a1249ac335cb289ed14913df85c8cd7d0036.tar.bz2 scummvm-rg350-cc11a1249ac335cb289ed14913df85c8cd7d0036.zip | |
Fix AKOS clipping issues at the left/right border of the screen (smooth scrolling regression)
svn-id: r15926
| -rw-r--r-- | scumm/akos.cpp | 11 | ||||
| -rw-r--r-- | scumm/base-costume.cpp | 4 | ||||
| -rw-r--r-- | scumm/bomp.cpp | 4 | 
3 files changed, 11 insertions, 8 deletions
| diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 48b4e09c43..c9b91f165a 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -518,8 +518,8 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) {  	height = _height;  	scaleytab = &v1.scaletable[v1.scaleYindex]; -	maskbit = revBitMask[(v1.x + _vm->virtscr[0].xstart) & 7]; -	mask = _vm->getMaskBuffer(v1.x, v1.y, _zbuf); +	maskbit = revBitMask[v1.x & 7]; +	mask = _vm->getMaskBuffer(v1.x - (_vm->virtscr[0].xstart & 7), v1.y, _zbuf);  	if (len)  		goto StartPos; @@ -573,14 +573,14 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) {  					v1.x += v1.scaleXstep;  					if (v1.x < 0 || v1.x >= _out.w)  						return; -					maskbit = revBitMask[(v1.x + _vm->virtscr[0].xstart) & 7]; +					maskbit = revBitMask[v1.x & 7];  					v1.destptr += v1.scaleXstep;  					skip_column = false;  				} else  					skip_column = true;  				v1.scaleXindex += v1.scaleXstep;  				dst = v1.destptr; -				mask = _vm->getMaskBuffer(v1.x, v1.y, _zbuf); +				mask = _vm->getMaskBuffer(v1.x - (_vm->virtscr[0].xstart & 7), v1.y, _zbuf);  			}  		StartPos:;  		} while (--len); @@ -978,8 +978,7 @@ byte AkosRenderer::codec5(int xmoveCur, int ymoveCur) {  	bdd.srcwidth = _width;  	bdd.srcheight = _height; -	bdd.dst = _vm->virtscr[kMainVirtScreen]; -	bdd.dst.pixels = _out.pixels; +	bdd.dst = _out;  	bdd.dataptr = _srcptr;  	bdd.scale_x = 255;  	bdd.scale_y = 255; diff --git a/scumm/base-costume.cpp b/scumm/base-costume.cpp index 01ffde8e28..3eb89e20c1 100644 --- a/scumm/base-costume.cpp +++ b/scumm/base-costume.cpp @@ -34,6 +34,10 @@ byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, int numStrips, const  		_out.pixels = vs.getBackPixels(0, 0);  	else  		_out.pixels = vs.getPixels(0, 0); +	 +	_actorX += _vm->virtscr[0].xstart & 7; +	_out.w = _out.pitch; +	_out.pixels = (byte *)_out.pixels - (_vm->virtscr[0].xstart & 7);  	_numStrips = numStrips; diff --git a/scumm/bomp.cpp b/scumm/bomp.cpp index ef8b0304e7..406e37c36c 100644 --- a/scumm/bomp.cpp +++ b/scumm/bomp.cpp @@ -235,11 +235,11 @@ void ScummEngine::drawBomp(const BompDrawData &bd, bool mirror) {  	src = bd.dataptr;  	dst = (byte *)bd.dst.pixels + bd.y * bd.dst.pitch + (bd.x + clip.left); -	const byte maskbit = revBitMask[(bd.x + clip.left + virtscr[0].xstart) & 7]; +	const byte maskbit = revBitMask[(bd.x + clip.left) & 7];  	// Mask against any additionally imposed mask  	if (bd.maskPtr) { -		mask = bd.maskPtr + (bd.y * gdi._numStrips) + ((bd.x + clip.left + (virtscr[0].xstart&7)) / 8); +		mask = bd.maskPtr + (bd.y * gdi._numStrips) + ((bd.x + clip.left) / 8);  	}  	// Setup vertical scaling | 
