diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index a83d22fd..f71cf952 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -21,4 +21,4 @@ } ], "version": 4 -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 3492b941..7296b1db 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,9 +7,13 @@ "files.encoding": "utf8", "editor.defaultFormatter": "xaver.clang-format" }, - "[python]":{ + "[python]": { "editor.defaultFormatter": "ms-python.black-formatter" }, + "clangd.fallbackFlags": [ + "-I${workspaceFolder}/include", + "-I${workspaceFolder}/libc" + ], "editor.tabSize": 2, "files.associations": { "source_location": "cpp", diff --git a/tools/project.py b/tools/project.py index 28a8d323..b7ba7cc0 100644 --- a/tools/project.py +++ b/tools/project.py @@ -15,6 +15,7 @@ import json import os import platform import sys +import math from pathlib import Path from . import ninja_syntax @@ -875,8 +876,12 @@ def calculate_progress(config): def __init__(self, name): self.name = name self.code_total = 0 + self.code_fancy_frac = 1499 + self.code_fancy_item = "energy" self.code_progress = 0 self.data_total = 0 + self.data_fancy_frac = 250 + self.data_fancy_item = "missiles" self.data_progress = 0 self.objects_progress = 0 self.objects_total = 0 @@ -947,6 +952,16 @@ def calculate_progress(config): ) print(f" Code: {unit.code_progress} / {unit.code_total} bytes") print(f" Data: {unit.data_progress} / {unit.data_total} bytes") + print( + "\nYou have {} out of {} {} and collected {} out of {} {}.".format( + math.floor(code_frac * unit.code_fancy_frac), + unit.code_fancy_frac, + unit.code_fancy_item, + math.floor(data_frac * unit.data_fancy_frac), + unit.data_fancy_frac, + unit.data_fancy_item, + ) + ) if all_progress: print_category(all_progress) @@ -979,4 +994,4 @@ def calculate_progress(config): for progress in modules_progress: add_category(progress.name, progress) with open(out_path / "progress.json", "w", encoding="utf-8") as w: - json.dump(progress_json, w, indent=4) \ No newline at end of file + json.dump(progress_json, w, indent=4)