diff options
| author | Johannes Schickel | 2013-08-03 01:14:28 +0200 | 
|---|---|---|
| committer | Johannes Schickel | 2013-08-03 02:52:34 +0200 | 
| commit | ae7bc4dcf041c10ea0ce312bb788c402923ebdb0 (patch) | |
| tree | b8034a166b125e4110cf893e7bb35de026f19873 /engines/tsage/graphics.cpp | |
| parent | cbef0de3a4cb74aa7e583209d47332608536f21b (diff) | |
| download | scummvm-rg350-ae7bc4dcf041c10ea0ce312bb788c402923ebdb0.tar.gz scummvm-rg350-ae7bc4dcf041c10ea0ce312bb788c402923ebdb0.tar.bz2 scummvm-rg350-ae7bc4dcf041c10ea0ce312bb788c402923ebdb0.zip  | |
TSAGE: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/tsage/graphics.cpp')
| -rw-r--r-- | engines/tsage/graphics.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index ce19502524..ecacf4bce3 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -316,7 +316,7 @@ void GfxSurface::create(int width, int height) {  	}  	_customSurface = new Graphics::Surface();  	_customSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); -	Common::fill((byte *)_customSurface->pixels, (byte *)_customSurface->pixels + (width * height), 0); +	Common::fill((byte *)_customSurface->getBasePtr(0, 0), (byte *)_customSurface->getBasePtr(0, height), 0);  	_bounds = Rect(0, 0, width, height);  } @@ -363,7 +363,7 @@ void GfxSurface::synchronize(Serializer &s) {  		if (_customSurface) {  			s.syncAsSint16LE(_customSurface->w);  			s.syncAsSint16LE(_customSurface->h); -			s.syncBytes((byte *)_customSurface->pixels, _customSurface->w * _customSurface->h); +			s.syncBytes((byte *)_customSurface->getBasePtr(0, 0), _customSurface->w * _customSurface->h);  		} else {  			int zero = 0;  			s.syncAsSint16LE(zero); @@ -380,7 +380,7 @@ void GfxSurface::synchronize(Serializer &s) {  			_customSurface = NULL;  		} else {  			create(w, h); -			s.syncBytes((byte *)_customSurface->pixels, w * h); +			s.syncBytes((byte *)_customSurface->getBasePtr(0, 0), w * h);  		}  	}  } @@ -581,7 +581,7 @@ void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Regi  		Graphics::Surface destSurface = srcImage.lockSurface();  		const byte *srcP = (const byte *)srcSurface.getBasePtr(srcBounds.left, srcBounds.top); -		byte *destP = (byte *)destSurface.pixels; +		byte *destP = (byte *)destSurface.getBasePtr(0, 0);  		for (int yp = srcBounds.top; yp < srcBounds.bottom; ++yp, srcP += srcSurface.pitch, destP += destSurface.pitch) {  			Common::copy(srcP, srcP + srcBounds.width(), destP);  		}  | 
