diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-04-25 20:23:10 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-04-25 20:23:10 -0500 |
commit | 165304e3690229e8cfe91a2b9867e18e3abb9869 (patch) | |
tree | ad4310c50260938d5868910fbd56138bf93f03d4 /crystal.py | |
parent | d4f698e64d194c0b58cafb439284ce7d9db4b07d (diff) |
fix dbw error in MapScriptHeader and add ending newline
original-commit-id: 69450ad8b33af1a40ea7ddc6d94c54cb4755c440
Diffstat (limited to 'crystal.py')
-rw-r--r-- | crystal.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -3457,9 +3457,9 @@ class MapScriptHeader: 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 = [] @@ -4742,6 +4742,9 @@ class 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 where f(item) == True.""" |