aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-10-11 16:27:25 -0400
committerPaul Gilbert2014-10-11 16:27:25 -0400
commite58ae71bef7c25d20c23e75dc426f0e7321f2390 (patch)
treec3b9184220e3faa2b9996cfd5a4d11a38baf3bc7 /engines
parent4b0995738667e05a425ecbda5c9ab37e814ebe95 (diff)
downloadscummvm-rg350-e58ae71bef7c25d20c23e75dc426f0e7321f2390.tar.gz
scummvm-rg350-e58ae71bef7c25d20c23e75dc426f0e7321f2390.tar.bz2
scummvm-rg350-e58ae71bef7c25d20c23e75dc426f0e7321f2390.zip
MADS: Fix loading wide-screen backgrounds during intro animation
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/scene_data.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index aeeb99d5b3..2101a85bd0 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);