aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control/star_control_sub9.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/star_control/star_control_sub9.cpp')
-rw-r--r--engines/titanic/star_control/star_control_sub9.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/titanic/star_control/star_control_sub9.cpp b/engines/titanic/star_control/star_control_sub9.cpp
index 92ce8f6a85..be06e46f45 100644
--- a/engines/titanic/star_control/star_control_sub9.cpp
+++ b/engines/titanic/star_control/star_control_sub9.cpp
@@ -21,8 +21,33 @@
*/
#include "titanic/star_control/star_control_sub9.h"
+#include "titanic/titanic.h"
namespace Titanic {
+#define ARRAY_COUNT 80
+
+void CStarControlSub9::initialize() {
+ // Get a reference to the starfield points resource
+ Common::SeekableReadStream *stream = g_vm->_filesManager->getResource("STARFIELD/POINTS2");
+
+ _data.resize(ARRAY_COUNT);
+ for (int rootCtr = 0; rootCtr < ARRAY_COUNT; ++rootCtr) {
+ // Get the number of sub-entries for this entry
+ int count = stream->readUint32LE();
+
+ // Read in the sub-entries
+ RootEntry &rootEntry = _data[rootCtr];
+ rootEntry.resize(count);
+ for (int idx = 0; idx < count; ++idx) {
+ int v1 = stream->readSint32LE();
+ int v2 = stream->readSint32LE();
+ int v3 = stream->readSint32LE();
+ int v4 = stream->readSint32LE();
+
+ // TODO: Processing here
+ }
+ }
+}
} // End of namespace Titanic