diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2023-01-15 11:10:23 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-15 12:10:23 -0700 |
| commit | 5e05ae38f8541fddd79341bdcf75488b07ca9122 (patch) | |
| tree | 57e2806b6e48586e0d9bbde6d221236888137d04 /tools | |
| parent | c90f9dfde9a3ee5dfa13475e2199ee491671507b (diff) | |
d_a_b_oh2 / d_a_obj_web0 / d_a_obj_web1 (#243)
* d_a_obj_web0 / d_a_obj_web1
* remove asm
* d_a_set_bgobj
* d_cc_s work
* remove asm
* build fix
* fix tp.py progress check and rel sha1 check
* clean up some bg files
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/tp.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/tp.py b/tools/tp.py index a62a7ae68c..89466bb4f5 100644 --- a/tools/tp.py +++ b/tools/tp.py @@ -419,7 +419,7 @@ def calculate_rel_progress(build_path: Path, matching: bool, format: str, asm_fi str_file = str(file) if not str_file.startswith("asm/rel/"): continue - rel = str_file.split("/")[-2] + rel = str_file.split("/")[-3] range_dict[rel].append(range[1] - range[0]) end = time.time() @@ -890,7 +890,7 @@ def find_all_asm_files() -> Tuple[Set[Path], Set[Path]]: if path.is_dir(): recursive(path) else: - if path.suffix == ".s" or path.suffix == ".inc": + if path.suffix == ".s": files.add(path) else: errors.add(path) @@ -988,7 +988,7 @@ def find_all_files() -> Set[Path]: return files -def find_includes(lines: List[str], non_matching: bool, ext: Tuple[str, str] = (".s",".inc")) -> Set[Path]: +def find_includes(lines: List[str], non_matching: bool, ext: str = ".s") -> Set[Path]: includes = set() for line in lines: key = '#include "' @@ -1003,8 +1003,6 @@ def find_includes(lines: List[str], non_matching: bool, ext: Tuple[str, str] = ( include_path = line[start:end] if include_path.endswith(ext): - if include_path.endswith(".inc"): - include_path = "src/"+include_path includes.add(Path(include_path)) return includes @@ -1116,6 +1114,7 @@ def check_sha1(game_path: Path, build_path: Path, include_rels: bool): "", "4997D93B9692620C40E90374A0F1DBF0E4889395", ) + if include_rels: with open('sha1sums.json') as f: rel_shas = json.load(f) @@ -1143,7 +1142,7 @@ def check_sha1(game_path: Path, build_path: Path, include_rels: bool): ) if include_rels: - build_rels_path = get_files_with_ext(build_path, ".rel") + build_rels_path = get_files_with_ext(build_path/"rel", ".rel") for rel_filepath in build_rels_path: with rel_filepath.open("rb") as file: data = bytearray(file.read()) |
