Merge remote-tracking branch 'origin/master' into j2/progress

This commit is contained in:
Tyler Wilding
2022-10-08 21:09:35 -04:00
475 changed files with 24842 additions and 5662 deletions
+3 -4
View File
@@ -4,7 +4,7 @@ import argparse
### Script to track decompilation progress.
### Example usage: python3 scripts/decomp_progress.py ~/jak-project/goal_src
### Example usage: python3 scripts/decomp_progress.py ~/jak-project/goal_src/jak2
def get_goal_files(root_dir, ext = "*.gc"):
"""Get all GOAL source files under root_dir."""
@@ -29,7 +29,7 @@ def print_table(stats, total_gc_files):
print("-------------------------------------")
print("| {: <24} | {: >6} |".format("TOTAL", total_lines))
print("-------------------------------------")
estimated_lines = 500000
estimated_lines = 1000000
print("Progress: {}/{} lines ({:.2f}%)".format(total_lines, estimated_lines, 100. * total_lines / estimated_lines))
print("{}/{} files modified from template ({:.2f}%)".format(len(stats), total_gc_files,
100. * len(stats) / total_gc_files))
@@ -41,8 +41,7 @@ def main():
args = parser.parse_args()
all_files = get_goal_files(args.goal_src)
ref_files = get_goal_files(args.goal_src + "/../test/", "*_REF.gc")
ref_files = get_goal_files(args.goal_src + "/../../test/decompiler/reference/jak2", "*_REF.gc")
ref_files_no_ext = [os.path.basename(fn)[:-7] for fn in ref_files]
-1
View File
@@ -186,7 +186,6 @@ if args.preserve:
lines_to_ignore = 0
i = len(final_lines) - 1
while i > 0 and (final_lines[i] == "\n" or final_lines[i] == "0\n"):
print(final_lines[i])
lines_to_ignore = lines_to_ignore + 1
i = i - 1
-1
View File
@@ -1,6 +1,5 @@
# Updates files in gsrc if they are modified in the reference test folder
# Uses git
# TODO - get new untracked files as well
import subprocess
from git import Repo
+1 -1
View File
@@ -48,5 +48,5 @@ def get_ref_path_from_filename(game_name, file_name, ref_folder):
if src_path == "":
print("couldn't determine ref path for {}:{}!".format(game_name, file_name))
exit(1)
path = "{}/{}/{}/{}_REF.gc".format(ref_folder, game_name, src_path, file_name)
path = os.path.join(ref_folder, game_name, src_path, "{}_REF.gc".format(file_name))
return path