diff options
author | Treeki <treeki@gmail.com> | 2012-09-27 00:50:44 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-27 00:50:44 +0200 |
commit | 2b5684ece946c0567db5b4431449f90883919800 (patch) | |
tree | dc1e78c5e4a25aac9e613a48a627ee39bcc1cff6 /src | |
parent | 64df3b0e7503b2da43d5448f788bb560e5a6881c (diff) | |
download | koopatlas-2b5684ece946c0567db5b4431449f90883919800.tar.gz koopatlas-2b5684ece946c0567db5b4431449f90883919800.zip |
exporting for world change nodes, forgot this before :x
Diffstat (limited to 'src')
-rw-r--r-- | src/exporter.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/exporter.py b/src/exporter.py index eeca252..e2ee9ae 100644 --- a/src/exporter.py +++ b/src/exporter.py @@ -192,7 +192,7 @@ class KPMapExporter: sectorData = self._packSectorData(sectors) # now that we've got that, we can pack the first part of the file - version = 1 + version = 2 headerSize = 0x2C tsInfoOffsetInHeader = 0x10 data = bytearray(struct.pack('>4sIIIIIIIIII', 'KP_m', version, len(self.layers), headerSize + len(sectorData), 0, 0, 0, headerSize, 0, 0, len(self.map.worlds))) @@ -362,6 +362,12 @@ class KPMapExporter: # i i i b b b b: isNew, Extra pointer, dest map, map ID, foreign ID, transition, padding data += struct.pack('>iiibbbb', 0, 0, 0, node.mapID, node.foreignID, node.transition, 0) + elif node.worldDefID: + data += u32.pack(4) # node type + + # b b b b: world def ID, padding + data += struct.pack('>bbbb', node.worldDefID, 0, 0, 0) + else: data += u32.pack(1) # node type data += zero32 # isNew |