summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-01-15 16:34:32 -0600
committerBryan Bishop <kanzure@gmail.com>2012-01-15 16:34:32 -0600
commit4b0f1982bfb76743d9fd2d0b6d3e30a391e5e438 (patch)
treec7fde84b33df97fe88e3c8b6909bca32af46ee84
parenta8ef3c70db97e3fc8e5f8764bb9a25c42b3e8628 (diff)
update analyze_incbins for common.asm
hg-commit-id: ea7bf352f66c
-rw-r--r--extras/analyze_incbins.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/extras/analyze_incbins.py b/extras/analyze_incbins.py
index a4ca2b2b..353e5ea6 100644
--- a/extras/analyze_incbins.py
+++ b/extras/analyze_incbins.py
@@ -26,7 +26,7 @@ def offset_to_pointer(offset):
if type(offset) == str: offset = int(offset, base)
return int(offset) % 0x4000 + 0x4000
-def load_asm(filename="../pokered.asm"):
+def load_asm(filename="../common.asm"):
"loads the asm source code into memory"
global asm
asm = open(filename, "r").read().split("\n")
@@ -83,7 +83,7 @@ def process_incbins():
def find_incbin_to_replace_for(address):
"""returns a line number for which incbin to edit
- if you were to insert bytes into pokered.asm"""
+ if you were to insert bytes into common.asm"""
if type(address) == str: address = int(address, 16)
for incbin_key in processed_incbins.keys():
@@ -152,7 +152,7 @@ def generate_diff_insert(line_number, newline):
newfile_fh.close()
try:
- diffcontent = subprocess.check_output("diff -u ../pokered.asm " + newfile_filename, shell=True)
+ diffcontent = subprocess.check_output("diff -u ../common.asm " + newfile_filename, shell=True)
except AttributeError, exc:
raise exc
except Exception, exc:
@@ -192,7 +192,7 @@ def insert_map_header_asm(map_id):
fh.close()
#apply the patch
- os.system("patch ../pokered.asm temp.patch")
+ os.system("patch ../common.asm temp.patch")
#remove the patch
os.system("rm temp.patch")
@@ -227,8 +227,8 @@ def apply_diff(diff, try_fixing=True):
fh.close()
#apply the patch
- os.system("cp ../pokered.asm ../pokered1.asm")
- os.system("patch ../pokered.asm temp.patch")
+ os.system("cp ../common.asm ../common1.asm")
+ os.system("patch ../common.asm temp.patch")
#remove the patch
os.system("rm temp.patch")
@@ -238,7 +238,7 @@ def apply_diff(diff, try_fixing=True):
subprocess.check_call("cd ../; make clean; LC_CTYPE=UTF-8 make", shell=True)
except Exception, exc:
if try_fixing:
- os.system("mv ../pokered1.asm ../pokered.asm")
+ os.system("mv ../common1.asm ../common.asm")
return False
if __name__ == "__main__":