summaryrefslogtreecommitdiff
path: root/extras/pretty_map_headers.py
diff options
context:
space:
mode:
authorIIMarckus <iimarckus@gmail.com>2012-01-03 17:16:00 -0700
committerIIMarckus <iimarckus@gmail.com>2012-01-03 17:16:00 -0700
commit7c1662a12833365090dca8dd8023089eeeea55af (patch)
treeb83d1c8fc75a5af30666247275bb95cdc67bbee0 /extras/pretty_map_headers.py
parent10218a9428cffb96260ff24fdf889dd8ca2d553c (diff)
parent638cf29252b912d47b0c4b90179723dda97a2127 (diff)
Merge.
hg-commit-id: 0284b4cb83de
Diffstat (limited to 'extras/pretty_map_headers.py')
-rw-r--r--extras/pretty_map_headers.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/extras/pretty_map_headers.py b/extras/pretty_map_headers.py
index 2c038fd4..819b665a 100644
--- a/extras/pretty_map_headers.py
+++ b/extras/pretty_map_headers.py
@@ -159,14 +159,17 @@ def map_header_pretty_printer(map_header):
#formatting: hex(y)[2:].zill(2) or "%02x" % (y,)
- output = asm_name + ": ; " + address + " to " + hex(int(address, base) + byte_size) + " (" + str(byte_size) + " bytes) (bank=" + str(int(bank, base)) + ") (id=" + str(id) + ")\n"
+ output = asm_name + ": ; " + address + " to " + hex(int(address, base) + byte_size) + " (" + str(byte_size) + " bytes) (id=" + str(id) + ")\n"
output += spacing + "db $" + str(tileset).zfill(2) + " ; tileset\n"
output += spacing + "db $" + hex(y)[2:].zfill(2) + ", $" + hex(x)[2:].zfill(2) + " ; dimensions (y, x)\n"
output += spacing + "dw $" + map_pointer + ", $" + texts_pointer + ", $" + script_pointer + " ; blocks, texts, scripts\n"
output += spacing + "db " + connection_line(connection_byte) + " ; connections\n\n"
- output += spacing + "; connections data\n\n"
- output += connection_pretty_printer(connections)
- output += spacing + "; end connection data\n\n"
+
+ if len(connections) > 0:
+ output += spacing + "; connections data\n\n"
+ output += connection_pretty_printer(connections)
+ output += spacing + "; end connection data\n\n"
+
output += spacing + "dw $" + object_data_pointer + " ; objects\n"
return output