diff options
| author | Johannes Schickel | 2013-08-03 02:40:01 +0200 | 
|---|---|---|
| committer | Johannes Schickel | 2013-08-03 04:02:51 +0200 | 
| commit | bcc4a3d0b839b7d750d7c6dbb022cab165a743e8 (patch) | |
| tree | 4fd4b00c76232bf93948e799c68a5e9642c7b85b | |
| parent | 2578ec6e2f4f71730cd89ed8c88711aa4e377f28 (diff) | |
| download | scummvm-rg350-bcc4a3d0b839b7d750d7c6dbb022cab165a743e8.tar.gz scummvm-rg350-bcc4a3d0b839b7d750d7c6dbb022cab165a743e8.tar.bz2 scummvm-rg350-bcc4a3d0b839b7d750d7c6dbb022cab165a743e8.zip | |
LASTEXRPESS: Take advantage of Surface::getPixels.
| -rw-r--r-- | engines/lastexpress/data/animation.cpp | 2 | ||||
| -rw-r--r-- | engines/lastexpress/data/sequence.cpp | 12 | ||||
| -rw-r--r-- | engines/lastexpress/graphics.cpp | 12 | 
3 files changed, 13 insertions, 13 deletions
| diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp index e9500aec38..832bcc2e26 100644 --- a/engines/lastexpress/data/animation.cpp +++ b/engines/lastexpress/data/animation.cpp @@ -270,7 +270,7 @@ void Animation::play() {  			draw(s);  			// XXX: Update the screen -			g_system->copyRectToScreen(s->getBasePtr(0, 0), s->pitch, 0, 0, s->w, s->h); +			g_system->copyRectToScreen(s->getPixels(), s->pitch, 0, 0, s->w, s->h);  			// Free the temporary surface  			s->free(); diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp index d58ff32047..c7073b560c 100644 --- a/engines/lastexpress/data/sequence.cpp +++ b/engines/lastexpress/data/sequence.cpp @@ -128,8 +128,8 @@ AnimFrame::~AnimFrame() {  }  Common::Rect AnimFrame::draw(Graphics::Surface *s) { -	byte *inp = (byte *)_image.getBasePtr(0, 0); -	uint16 *outp = (uint16 *)s->getBasePtr(0, 0); +	byte *inp = (byte *)_image.getPixels(); +	uint16 *outp = (uint16 *)s->getPixels();  	for (int i = 0; i < 640 * 480; i++, inp++, outp++) {  		if (*inp)  			*outp = _palette[*inp]; @@ -155,7 +155,7 @@ void AnimFrame::decomp4(Common::SeekableReadStream *in, const FrameInfo &f) {  }  void AnimFrame::decomp34(Common::SeekableReadStream *in, const FrameInfo &f, byte mask, byte shift) { -	byte *p = (byte *)_image.getBasePtr(0, 0); +	byte *p = (byte *)_image.getPixels();  	uint32 skip = f.initialSkip / 2;  	uint32 size = f.decompressedEndOffset / 2; @@ -200,7 +200,7 @@ void AnimFrame::decomp34(Common::SeekableReadStream *in, const FrameInfo &f, byt  }  void AnimFrame::decomp5(Common::SeekableReadStream *in, const FrameInfo &f) { -	byte *p = (byte *)_image.getBasePtr(0, 0); +	byte *p = (byte *)_image.getPixels();  	uint32 skip = f.initialSkip / 2;  	uint32 size = f.decompressedEndOffset / 2; @@ -235,7 +235,7 @@ void AnimFrame::decomp5(Common::SeekableReadStream *in, const FrameInfo &f) {  }  void AnimFrame::decomp7(Common::SeekableReadStream *in, const FrameInfo &f) { -	byte *p = (byte *)_image.getBasePtr(0, 0); +	byte *p = (byte *)_image.getPixels();  	uint32 skip = f.initialSkip / 2;  	uint32 size = f.decompressedEndOffset / 2; @@ -288,7 +288,7 @@ void AnimFrame::decomp7(Common::SeekableReadStream *in, const FrameInfo &f) {  }  void AnimFrame::decompFF(Common::SeekableReadStream *in, const FrameInfo &f) { -	byte *p = (byte *)_image.getBasePtr(0, 0); +	byte *p = (byte *)_image.getPixels();  	uint32 skip = f.initialSkip / 2;  	uint32 size = f.decompressedEndOffset / 2; diff --git a/engines/lastexpress/graphics.cpp b/engines/lastexpress/graphics.cpp index 4934c4f519..9ced38a2e1 100644 --- a/engines/lastexpress/graphics.cpp +++ b/engines/lastexpress/graphics.cpp @@ -131,11 +131,11 @@ void GraphicsManager::mergePlanes() {  	// Clear screen surface  	_screen.fillRect(Common::Rect(640, 480), 0); -	uint16 *screen = (uint16 *)_screen.getBasePtr(0, 0); -	uint16 *inventory = (uint16 *)_inventory.getBasePtr(0, 0); -	uint16 *overlay = (uint16 *)_overlay.getBasePtr(0, 0); -	uint16 *backgroundC = (uint16 *)_backgroundC.getBasePtr(0, 0); -	uint16 *backgroundA = (uint16 *)_backgroundA.getBasePtr(0, 0); +	uint16 *screen = (uint16 *)_screen.getPixels(); +	uint16 *inventory = (uint16 *)_inventory.getPixels(); +	uint16 *overlay = (uint16 *)_overlay.getPixels(); +	uint16 *backgroundC = (uint16 *)_backgroundC.getPixels(); +	uint16 *backgroundA = (uint16 *)_backgroundA.getPixels();  	for (int i = 0; i < 640 * 480; i++) { @@ -160,7 +160,7 @@ void GraphicsManager::mergePlanes() {  void GraphicsManager::updateScreen() {  	g_system->fillScreen(0); -	g_system->copyRectToScreen(_screen.getBasePtr(0, 0), 640 * 2, 0, 0, 640, 480); +	g_system->copyRectToScreen(_screen.getPixels(), 640 * 2, 0, 0, 640, 480);  }  } // End of namespace LastExpress | 
