diff options
author | Treeki <treeki@gmail.com> | 2012-07-23 02:52:35 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-07-23 02:52:35 +0200 |
commit | efafd2246874464c59d27d444ee6b21e91cde3d7 (patch) | |
tree | fb28f6c3e9de28185d7bb63663fca651fbdba38b | |
parent | f1ff8070137eed75ff83a7c1728e9901eaaf2b67 (diff) | |
download | koopatlas-efafd2246874464c59d27d444ee6b21e91cde3d7.tar.gz koopatlas-efafd2246874464c59d27d444ee6b21e91cde3d7.zip |
added EXTRA pointers
-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) |