From e84a5b2062ff5e9b010447e3a3c78dd67a653166 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 1 Sep 2013 02:27:44 -0500 Subject: make extras/ a submodule Use pokemontools v1.3.0 and use the same preprocessor as the pokecrystal project. --- extras | 1 + extras/add_map_labels_to_map_headers.py | 41 --------------------------------- 2 files changed, 1 insertion(+), 41 deletions(-) create mode 160000 extras delete mode 100644 extras/add_map_labels_to_map_headers.py (limited to 'extras/add_map_labels_to_map_headers.py') diff --git a/extras b/extras new file mode 160000 index 00000000..795cd58a --- /dev/null +++ b/extras @@ -0,0 +1 @@ +Subproject commit 795cd58a70c80082003e40127241cfaefa0fae8b diff --git a/extras/add_map_labels_to_map_headers.py b/extras/add_map_labels_to_map_headers.py deleted file mode 100644 index 89e6f361..00000000 --- a/extras/add_map_labels_to_map_headers.py +++ /dev/null @@ -1,41 +0,0 @@ -#author: Bryan Bishop -#date: 2011-01-04 -#purpose: insert labels into map headers -import sys - -asm = None -asm_lines = [] -def load_asm(): - global asm, asm_lines - asm = open("../pokered.asm", "r").read() - asm_lines = asm.split("\n") - -def find_with_start_of_line(name): - global asm_lines - for line in asm_lines: - if len(line) > len(name) and ": " in line: - if line[:len(name)] == name: return True - return False - -def process_lines(): - global asm, asm_lines - for line in asm_lines: - if not "_h:" in line: continue #skip - index = asm_lines.index(line) - name = line.split("_h:")[0] - - if "Blocks" in asm_lines[index+3]: continue #skip, already done - #if not (str(name + "Blocks:") in asm): continue #skip, no block label found - if not find_with_start_of_line(name + "Blocks:"): continue #skip - - orig_line = asm_lines[index+3] - fixed_line = orig_line.split(",") - fixed_line[0] = " dw " + name + "Blocks" - fixed_line = ",".join(fixed_line) - - asm_lines[index+3] = fixed_line - -if __name__ == "__main__": - load_asm() - process_lines() - sys.stdout.write("\n".join(asm_lines)) -- cgit v1.2.3 From 423c9ef70b49c2786b9f708b32364800cda45e79 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 1 Sep 2013 16:26:26 -0500 Subject: bump submodule to get a gbz80disasm fix --- extras | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extras/add_map_labels_to_map_headers.py') diff --git a/extras b/extras index 795cd58a..7aa016fb 160000 --- a/extras +++ b/extras @@ -1 +1 @@ -Subproject commit 795cd58a70c80082003e40127241cfaefa0fae8b +Subproject commit 7aa016fb528bcc8dcb30c6a887957851623eccc0 -- cgit v1.2.3