From e93230600f36516139d34bfc3b935c3f1fd6f368 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Tue, 3 Jan 2012 16:09:16 -0600 Subject: remove bank id output in pretty_map_headers, it's wrong anyway hg-commit-id: d6a22efde56f --- extras/pretty_map_headers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extras/pretty_map_headers.py') diff --git a/extras/pretty_map_headers.py b/extras/pretty_map_headers.py index 2c038fd4..867c65a5 100644 --- a/extras/pretty_map_headers.py +++ b/extras/pretty_map_headers.py @@ -159,7 +159,7 @@ 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" -- cgit v1.2.3 From 36fb1f3ce01084ef505da576794c82ff1e72e8d7 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Tue, 3 Jan 2012 16:46:26 -0600 Subject: don't print extra comments about connections for zero connections hg-commit-id: 1e41d5f9c62d --- extras/pretty_map_headers.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'extras/pretty_map_headers.py') diff --git a/extras/pretty_map_headers.py b/extras/pretty_map_headers.py index 867c65a5..819b665a 100644 --- a/extras/pretty_map_headers.py +++ b/extras/pretty_map_headers.py @@ -164,9 +164,12 @@ def map_header_pretty_printer(map_header): 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 -- cgit v1.2.3