[Scummvm-cvs-logs] scummvm master -> e58ae71bef7c25d20c23e75dc426f0e7321f2390

dreammaster dreammaster at scummvm.org
Sat Oct 11 22:31:25 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e58ae71bef MADS: Fix loading wide-screen backgrounds during intro animation


Commit: e58ae71bef7c25d20c23e75dc426f0e7321f2390
    https://github.com/scummvm/scummvm/commit/e58ae71bef7c25d20c23e75dc426f0e7321f2390
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-10-11T16:27:25-04:00

Commit Message:
MADS: Fix loading wide-screen backgrounds during intro animation

Changed paths:
    engines/mads/scene_data.cpp



diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index aeeb99d..2101a85 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -217,7 +217,7 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
 	int width = _width;
 	int height = _height;
 
-	if (!bgSurface.getPixels()) {
+	if (!bgSurface.getPixels() || (bgSurface.w != width) || (bgSurface.h != height)) {
 		bgSurface.setSize(width, height);
 	}
 
@@ -342,8 +342,8 @@ void SceneInfo::loadMadsV1Background(int sceneId, const Common::String &resName,
 	File artFile(resourceName);
 	MadsPack artResource(&artFile);
 
-	// Read in the background surface data
-	assert(_width == bgSurface.w && _height == bgSurface.h);
+	// Read inhh the background surface data
+	assert(_width  && _height == bgSurface.h);
 	stream = artResource.getItemStream(1);
 	stream->read(bgSurface.getPixels(), bgSurface.w * bgSurface.h);
 	delete stream;
@@ -353,7 +353,9 @@ void SceneInfo::loadMadsV1Background(int sceneId, const Common::String &resName,
 		Common::SeekableReadStream *palStream = artResource.getItemStream(0);
 		Common::Array<RGB6> palette;
 
-		palStream->skip(4);		// Skip width and height
+		_width = palStream->readUint16LE();
+		_height = palStream->readUint16LE();
+
 		int numColors = palStream->readUint16LE();
 		assert(numColors <= 252);
 		palette.resize(numColors);






More information about the Scummvm-git-logs mailing list