diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-04-21 10:24:44 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-04-21 10:24:44 -0500 |
commit | 55280b7f9e6e862834d95868245154472b40cdb8 (patch) | |
tree | 222f69f8181ced4d5efced67cb2f2b182d7556e4 | |
parent | 5f379579f12b9a513ee46eb30ed5acff22c9b92a (diff) |
improve to_asm output (newlines)
original-commit-id: 9b4ce897d4976edcfabcbce9258b27ed85759208
-rw-r--r-- | crystal.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1870,7 +1870,7 @@ stop_points = [0x1aafa2, 0x9f58f, #battle tower 0x9f62f, #battle tower ] -class Script(): +class Script: def __init__(self, *args, **kwargs): self.address = None self.commands = None @@ -1987,6 +1987,8 @@ class Script(): def to_asm(self): asm_output = "".join([command.to_asm()+"\n" for command in self.commands]) + if asm_output[-1] == "\n": + asm_output = asm_output[:-1] return asm_output def old_parse(self, *args, **kwargs): @@ -3239,7 +3241,9 @@ class MapEventHeader: output += xspacing output += people_event.to_asm() output += "\n" - + + if output[-1] == "\n": + output = output[:-1] return output all_map_event_headers = [] |