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/make_map_size_constants.py | 37 ------------------------------------- 2 files changed, 1 insertion(+), 37 deletions(-) create mode 160000 extras delete mode 100644 extras/make_map_size_constants.py (limited to 'extras/make_map_size_constants.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/make_map_size_constants.py b/extras/make_map_size_constants.py deleted file mode 100644 index 4dfb1bee..00000000 --- a/extras/make_map_size_constants.py +++ /dev/null @@ -1,37 +0,0 @@ -#author: Bryan Bishop -#date: 2012-01-15 -#dump map height/width constants -import extract_maps -from pretty_map_headers import map_name_cleaner, map_constants - -def get_map_size_constants(do_sed=False): - output = "" - sed_lines = "" - for map_id in extract_maps.map_headers.keys(): - if map_id in extract_maps.bad_maps: continue #skip - - map2 = extract_maps.map_headers[map_id] - base_name = map_name_cleaner(map2["name"], None)[:-2] - constant_name = map_constants[map_id] - - height = int(map2["y"], 16) - width = int(map2["x"], 16) - - output += "; " + base_name + "_h map_id=" + str(map_id) + "\n" - output += constant_name + "_HEIGHT EQU $%.2x\n" % (height) - output += constant_name + "_WIDTH EQU $%.2x\n" % (width) - output += "\n" - - sed_lines += "sed -i 's/" + base_name + "Height/" + constant_name + "_HEIGHT" + "/g' main.asm" + "\n" - sed_lines += "sed -i 's/" + base_name + "Width/" + constant_name + "_WIDTH" + "/g' main.asm" + "\n" - - if do_sed: - return sed_lines - else: - return output - -if __name__ == "__main__": - extract_maps.load_rom() - extract_maps.load_map_pointers() - extract_maps.read_all_map_headers() - print get_map_size_constants(do_sed=True) -- 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/make_map_size_constants.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