mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-27 15:00:36 +00:00
Logging to diagnose function_finder_psx
This commit is contained in:
parent
f91e4c4517
commit
3b97fc50c2
@ -3,6 +3,7 @@
|
||||
# tool to list functions by difficulty and decomp.me WIP links
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
import sys
|
||||
from tabulate import tabulate
|
||||
import os
|
||||
import concurrent.futures
|
||||
@ -105,6 +106,8 @@ def find_wip(o):
|
||||
name = o[0]
|
||||
# look for a WIP on decomp.me
|
||||
function_name = os.path.basename(name).split(".")[0]
|
||||
|
||||
print(f"scraping decompme for {function_name}", file=sys.stderr)
|
||||
result = find_scratches(function_name, "ps1")
|
||||
|
||||
if result:
|
||||
@ -114,9 +117,14 @@ def find_wip(o):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Start function_finder_psx", file=sys.stderr)
|
||||
args = parser.parse_args()
|
||||
|
||||
asm_files = get_asm_files("asm/us")
|
||||
print(f"Got {len(asm_files)} asm files", file=sys.stderr)
|
||||
|
||||
c_files = get_c_files("src")
|
||||
print(f"Got {len(c_files)} asm files", file=sys.stderr)
|
||||
|
||||
# sort by name, then number of branches, then length
|
||||
asm_files = sorted(asm_files, key=lambda x: (x["name"]))
|
||||
|
@ -19,6 +19,7 @@ def find_scratches(name, platform):
|
||||
best_result = None
|
||||
best_percent = 0
|
||||
|
||||
print(f"Got {len(scratches['results'])} results for {name} in {platform}")
|
||||
for result in scratches["results"]:
|
||||
if not "name" in result:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user