ref: 69450ad8b33af1a40ea7ddc6d94c54cb4755c440
parent: cb1a372d759a027669d8012160bc2e627ea7372b
author: Bryan Bishop <[email protected]>
date: Wed Apr 25 16:23:10 EDT 2012
fix dbw error in MapScriptHeader and add ending newline
--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -3457,9 +3457,9 @@
output += "\n; callback count\n"
output += "db %d"%self.callback_count
if len(self.callbacks) > 0:
- output += "\n\n; callbacks\n"
+ output += "\n\n; callbacks\n\n"
#not so sure about this next one
- output += "\n".join(["dbw "+str(p["hook"].byte)+", "+p["callback"].to_asm() for p in self.callbacks])
+ output += "\n\n".join(["db "+str(p["hook"].byte)+"\ndw "+p["callback"].to_asm() for p in self.callbacks])
return output
all_map_script_headers = []
@@ -4741,6 +4741,9 @@
fh.write(asm)
written_newlines = 0
last = each
+
+ #make sure the file ends with a newline
+ fh.write("\n")
def index(seq, f):
"""return the index of the first item in seq