aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_titanic
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/create_titanic')
-rw-r--r--devtools/create_titanic/create_titanic_dat.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/devtools/create_titanic/create_titanic_dat.cpp b/devtools/create_titanic/create_titanic_dat.cpp
index be58deb68d..2ea8f2a676 100644
--- a/devtools/create_titanic/create_titanic_dat.cpp
+++ b/devtools/create_titanic/create_titanic_dat.cpp
@@ -422,7 +422,6 @@ void writeSentenceMappings(const char *name, uint offset, int numValues) {
dataOffset += size;
}
-
void writeStarfieldPoints() {
outputFile.seek(dataOffset);
@@ -434,6 +433,25 @@ void writeStarfieldPoints() {
dataOffset += size;
}
+void writeStarfieldPoints2() {
+ outputFile.seek(dataOffset);
+
+ for (int rootCtr = 0; rootCtr < 80; ++rootCtr) {
+ inputFile.seek(0x5A2F28 - FILE_DIFF + rootCtr * 8);
+ uint offset = inputFile.readUint32LE();
+ uint count = inputFile.readUint32LE();
+
+ outputFile.writeLong(count);
+ inputFile.seek(offset - FILE_DIFF);
+ outputFile.write(inputFile, count * 4 * 4);
+ }
+
+ uint size = outputFile.size() - dataOffset;
+ outputFile.write(inputFile, size);
+ writeEntryHeader("STARFIELD/POINTS2", dataOffset, size);
+ dataOffset += size;
+}
+
void writeHeader() {
// Write out magic string
const char *MAGIC_STR = "SVTN";
@@ -464,6 +482,7 @@ void writeData() {
writeResource("STARFIELD", 132);
writeStarfieldPoints();
+ writeStarfieldPoints2();
writeResource("TEXT", "STVOCAB.TXT");
writeResource("TEXT", "JRQUOTES.TXT");