[Scummvm-cvs-logs] scummvm master -> 4ee29ef3a84186b79e00e3f50d3fb15e4c13d213

dreammaster dreammaster at scummvm.org
Sat Jan 17 22:48:08 CET 2015


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:
4ee29ef3a8 MADS: Add loading of SpriteInfo frame numbers for scene background sprites


Commit: 4ee29ef3a84186b79e00e3f50d3fb15e4c13d213
    https://github.com/scummvm/scummvm/commit/4ee29ef3a84186b79e00e3f50d3fb15e4c13d213
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-01-17T16:46:57-05:00

Commit Message:
MADS: Add loading of SpriteInfo frame numbers for scene background sprites

Changed paths:
    engines/mads/scene_data.cpp
    engines/mads/scene_data.h



diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index b5e219e..7233e42 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -86,7 +86,8 @@ void ARTHeader::load(Common::SeekableReadStream *f, bool isV2) {
 void SceneInfo::SpriteInfo::load(Common::SeekableReadStream *f) {
 	f->skip(3);
 	_spriteSetIndex = f->readByte();
-	f->skip(2);
+	_frameNumber = f->readSByte();
+	f->skip(1);
 	_position.x = f->readSint16LE();
 	_position.y = f->readSint16LE();
 	_depth = f->readByte();
@@ -263,7 +264,7 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
 		SpriteAsset *asset = spriteSets[si._spriteSetIndex];
 		assert(asset && _depthStyle != 2);
 
-		MSprite *spr = asset->getFrame(asset->getCount() - 1);
+		MSprite *spr = asset->getFrame(si._frameNumber);
 		bgSurface.copyFrom(spr, si._position, si._depth, &depthSurface,
 			si._scale, spr->getTransparencyIndex());
 	}
diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h
index 41e094b..41a08f7 100644
--- a/engines/mads/scene_data.h
+++ b/engines/mads/scene_data.h
@@ -144,6 +144,7 @@ class SceneInfo {
 	public:
 		int _spriteSetIndex;
 		Common::Point _position;
+		int _frameNumber;
 		int _depth;
 		int _scale;
 






More information about the Scummvm-git-logs mailing list