[Scummvm-git-logs] scummvm master -> eab5a1e0eee7e89d47c1dff5279a1b53b34aeea0
bluegr
bluegr at gmail.com
Sat Jun 17 12:28:20 CEST 2017
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:
eab5a1e0ee CHEWY: Fix a bug in loadSceneInfo()
Commit: eab5a1e0eee7e89d47c1dff5279a1b53b34aeea0
https://github.com/scummvm/scummvm/commit/eab5a1e0eee7e89d47c1dff5279a1b53b34aeea0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2017-06-17T13:27:48+03:00
Commit Message:
CHEWY: Fix a bug in loadSceneInfo()
Changed paths:
engines/chewy/scene.cpp
diff --git a/engines/chewy/scene.cpp b/engines/chewy/scene.cpp
index df8dd66..994c866 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++) {
More information about the Scummvm-git-logs
mailing list