[Scummvm-git-logs] scummvm master -> 3b962c9ec4e8a1582fe9841067e4b8352a4b064e

bluegr bluegr at gmail.com
Tue Mar 14 22:07:14 CET 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:
3b962c9ec4 CHEWY: Read automove scene data


Commit: 3b962c9ec4e8a1582fe9841067e4b8352a4b064e
    https://github.com/scummvm/scummvm/commit/3b962c9ec4e8a1582fe9841067e4b8352a4b064e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2017-03-14T23:06:55+02:00

Commit Message:
CHEWY: Read automove scene data

Changed paths:
    engines/chewy/scene.cpp


diff --git a/engines/chewy/scene.cpp b/engines/chewy/scene.cpp
index 22a6c05..7f10b75 100644
--- a/engines/chewy/scene.cpp
+++ b/engines/chewy/scene.cpp
@@ -37,6 +37,7 @@ namespace Chewy {
 
 #define MAX_DETAILS 32
 #define MAX_HOTSPOTS 50
+#define MAX_AUTOMOVE 20
 
 // Animated details - scene animations
 struct AnimatedDetails {
@@ -75,6 +76,13 @@ struct Hotspot {
 	Common::String desc;
 };
 
+struct AutoMove {
+	int16 x;
+	int16 y;
+	byte spriteNum;	// sprite number to draw when the end point is reached
+	// 1 byte dummy
+};
+
 struct SceneInfo {
 	uint16 staticDetailsCount;
 	uint16 animatedDetailsCount;
@@ -89,7 +97,7 @@ struct SceneInfo {
 	Common::String tafName;	// 14 bytes
 	byte zoomFactor;
 	// 1 byte dummy
-	// 6 * 20 = 120 bytes automove coordinates - TODO
+	AutoMove autoMove[MAX_AUTOMOVE];
 	// MAX_DETAILS * 3 * 2 = 192 bytes voc - TODO
 	// MAX_DETAILS * 3 = 96 bytes samples - TODO
 };
@@ -233,7 +241,13 @@ void Scene::loadSceneInfo() {
 	_sceneInfo->zoomFactor = indexFile.readByte();
 	indexFile.readByte();	// padding
 	
-	// 6 * 20 = 120 bytes automove coordinates - TODO: read these
+	for (int i = 0; i < MAX_AUTOMOVE; i++) {
+		_sceneInfo->autoMove[i].x = indexFile.readSint16LE();
+		_sceneInfo->autoMove[i].y = indexFile.readSint16LE();
+		_sceneInfo->autoMove[i].spriteNum = indexFile.readByte();
+		indexFile.readByte();	// padding
+	}
+
 	// MAX_DETAILS * 3 * 2 = 192 bytes voc - TODO: read these
 	// MAX_DETAILS * 3 = 96 bytes samples - TODO: read these
 





More information about the Scummvm-git-logs mailing list