diff options
Diffstat (limited to 'src/exporter.py')
-rw-r--r-- | src/exporter.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/exporter.py b/src/exporter.py index e6ba38a..2396633 100644 --- a/src/exporter.py +++ b/src/exporter.py @@ -343,21 +343,25 @@ class KPMapExporter: if node.isStop(): if node.level: level1, level2 = node.level - data += struct.pack('>ibbibb', 2, level1, level2, 0, 0, 0) + # i i b b b b: node type, Extra pointer, world, level, padding (hasSecret?), padding + data += struct.pack('>iibbbb', 2, 0, level1, level2, 0, 0) elif node.mapChange: - data += u32.pack(3) + data += u32.pack(3) # node type destMap = node.mapChange - requiredFixUps.append((len(data), destMap)) + requiredFixUps.append((len(data)+4, destMap)) stringsToAdd.add(destMap) - data += struct.pack('>ibbbb', 0, node.mapID, node.foreignID, node.transition, 0) + # i i b b b b: Extra pointer, dest map, map ID, foreign ID, transition, padding + data += struct.pack('>iibbbb', 0, 0, node.mapID, node.foreignID, node.transition, 0) else: - data += u32.pack(1) + data += u32.pack(1) # node type + data += u32.pack(0) # Extra pointer else: - data += u32.pack(0) + data += u32.pack(0) # node type + data += u32.pack(0) # Extra pointer for path in layer.paths: offsets[path] = len(data) |