summaryrefslogtreecommitdiff
path: root/src/exporter.py
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-21 23:03:56 +0200
committerTreeki <treeki@gmail.com>2012-09-21 23:03:56 +0200
commit077a8de3a18e051f818d04ef6621842901cd1614 (patch)
tree4af8230f4bd1b0e66ae4906db7126054f046809a /src/exporter.py
parent4ac70319733723154537be430c50c2197a271c75 (diff)
downloadkoopatlas-077a8de3a18e051f818d04ef6621842901cd1614.tar.gz
koopatlas-077a8de3a18e051f818d04ef6621842901cd1614.zip
updated kpbin header
Diffstat (limited to '')
-rw-r--r--src/exporter.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/exporter.py b/src/exporter.py
index f1afd4b..aad9559 100644
--- a/src/exporter.py
+++ b/src/exporter.py
@@ -192,8 +192,12 @@ class KPMapExporter:
sectorData = self._packSectorData(sectors)
# now that we've got that, we can pack the first part of the file
- data = bytearray(struct.pack('>IIIII', len(self.layers), 20 + len(sectorData), 0, 0, 0))
- requiredFixUps.append((16, 'UnlockBytecode'))
+ version = 1
+ headerSize = 0x24
+ data = bytearray(struct.pack('>4sIIIIII', 'KP_m', version, len(self.layers), 20 + len(sectorData), 0, 0, 0, headerSize, 0))
+ requiredFixUps.append((24, 'UnlockBytecode'))
+ requiredFixUps.append((32, self.map.bgName))
+ stringsToAdd.add(self.map.bgName)
# list of layer pointers goes here.. or will, later
data += sectorData