diff options
author | Filippos Karapetis | 2017-06-17 13:27:22 +0300 |
---|---|---|
committer | Filippos Karapetis | 2017-06-17 13:27:48 +0300 |
commit | eab5a1e0eee7e89d47c1dff5279a1b53b34aeea0 (patch) | |
tree | 683ac6e5f438ac4f12a8e0e29ba44df9c4aa3636 /engines/chewy/scene.cpp | |
parent | b9c55494c25a9d064fd20a01322b0b781ceef93b (diff) | |
download | scummvm-rg350-eab5a1e0eee7e89d47c1dff5279a1b53b34aeea0.tar.gz scummvm-rg350-eab5a1e0eee7e89d47c1dff5279a1b53b34aeea0.tar.bz2 scummvm-rg350-eab5a1e0eee7e89d47c1dff5279a1b53b34aeea0.zip |
CHEWY: Fix a bug in loadSceneInfo()
Diffstat (limited to 'engines/chewy/scene.cpp')
-rw-r--r-- | engines/chewy/scene.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/chewy/scene.cpp b/engines/chewy/scene.cpp index df8dd66148..994c86681c 100644 --- a/engines/chewy/scene.cpp +++ b/engines/chewy/scene.cpp @@ -194,6 +194,12 @@ void Scene::mouseClick(Common::Point coords) { } } +/** + * Loads scene information from test.rdi + * Note that the original loads everything with a single read into a structure, + * which is why there are some pointers saved in the resource file - however, + * these are set to zero + */ void Scene::loadSceneInfo() { const uint32 sceneInfoSize = 3784; const uint32 headerRDI = MKTAG('R', 'D', 'I', '\0'); @@ -208,13 +214,13 @@ void Scene::loadSceneInfo() { uint32 header = indexFile.readUint32BE(); if (header != headerRDI) error("Invalid resource - %s", sceneIndexFileName); + indexFile.skip(2); // room count, unused (set to 100) indexFile.seek(sceneInfoSize * _curScene, SEEK_CUR); - // TODO: These can be set to larger numbers than MAX_DETAILS _sceneInfo->staticDetailsCount = indexFile.readUint16LE(); _sceneInfo->animatedDetailsCount = indexFile.readUint16LE(); - indexFile.skip(6); + indexFile.skip(4); // pointer to sprites // Animated details for (int i = 0; i < MAX_DETAILS; i++) { |