summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/analyze_incbins.py6
-rw-r--r--extras/insert_texts.py6
2 files changed, 8 insertions, 4 deletions
diff --git a/extras/analyze_incbins.py b/extras/analyze_incbins.py
index f7dbad0e..4ffd5ec6 100644
--- a/extras/analyze_incbins.py
+++ b/extras/analyze_incbins.py
@@ -223,13 +223,17 @@ def apply_diff(diff):
fh.close()
#apply the patch
+ os.system("cp ../pokered.asm ../pokered1.asm")
os.system("patch ../pokered.asm temp.patch")
#remove the patch
os.system("rm temp.patch")
#confirm it's working
- subprocess.check_call("cd ../; make clean; LC_CTYPE=UTF-8 make", shell=True)
+ try:
+ subprocess.check_call("cd ../; make clean; LC_CTYPE=UTF-8 make", shell=True)
+ except Exception, exc:
+ os.system("mv ../pokered1.asm ../pokered.asm")
if __name__ == "__main__":
#load map headers
diff --git a/extras/insert_texts.py b/extras/insert_texts.py
index 361c2757..0ac4ab8d 100644
--- a/extras/insert_texts.py
+++ b/extras/insert_texts.py
@@ -174,7 +174,7 @@ def insert_texts_label(map_id):
diff = generate_diff_insert(line_number, newlines)
print "working on map_id=" + str(map_id) + " texts_pointer=" + hex(texts_pointer)
print diff
- #apply_diff(diff)
+ apply_diff(diff)
#untested as of 2012-01-07
def insert_all_texts_labels():
@@ -305,7 +305,7 @@ if __name__ == "__main__":
# texts_label_pretty_printer(map_id)
#insert_texts_label(240)
- #insert_all_texts_label()
+ insert_all_texts_labels()
#insert_text_label_tx_far(240, 1)
- insert_all_text_labels()
+ #insert_all_text_labels()