diff options
author | Paul Gilbert | 2010-07-16 08:03:26 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-07-16 08:03:26 +0000 |
commit | 3473e8c6da4565d3c0729ba106b5405dc6039d29 (patch) | |
tree | 5dee14fe90c88798920ecce6b9deabe7c1ded93b /engines/m4 | |
parent | 90763f6e24ae1c51f4c8a9d0486a5488ea200f61 (diff) | |
download | scummvm-rg350-3473e8c6da4565d3c0729ba106b5405dc6039d29.tar.gz scummvm-rg350-3473e8c6da4565d3c0729ba106b5405dc6039d29.tar.bz2 scummvm-rg350-3473e8c6da4565d3c0729ba106b5405dc6039d29.zip |
Clarified variable used for scene node loading, and added in extra blank nodes for player movement like the original game does
svn-id: r50932
Diffstat (limited to 'engines/m4')
-rw-r--r-- | engines/m4/mads_scene.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp index c30e8db5da..1972e2d989 100644 --- a/engines/m4/mads_scene.cpp +++ b/engines/m4/mads_scene.cpp @@ -765,7 +765,7 @@ void MadsSceneResources::load(int sceneNumber, const char *resName, int v0, M4Su stream->skip(24); - int objectCount = stream->readUint16LE(); + int nodeCount = stream->readUint16LE(); _yBandsEnd = stream->readUint16LE(); _yBandsStart = stream->readUint16LE(); _maxScale = stream->readSint16LE(); @@ -775,14 +775,20 @@ void MadsSceneResources::load(int sceneNumber, const char *resName, int v0, M4Su stream->skip(2); // Load in any scene objects - for (int i = 0; i < objectCount; ++i) { + for (int i = 0; i < nodeCount; ++i) { SceneNode rec; rec.load(stream); _nodes.push_back(rec); } - for (int i = 0; i < 20 - objectCount; ++i) + for (int i = 0; i < 20 - nodeCount; ++i) stream->skip(48); + // Add two extra nodes in that will be used for player movement + for (int i = 0; i < 2; ++i) { + SceneNode rec; + _nodes.push_back(rec); + } + int setCount = stream->readUint16LE(); stream->readUint16LE(); for (int i = 0; i < setCount; ++i) { |