Add yar (Yaz0 ARchives) support to build system (#1255)

* extract_archives.py

* autogenerated xmls

* build OK

* cleanup

* Use symbols in gItemIcons

* change how archives are generated

* makeyar in C

* Rename segments

* rename .archive.o to .yar.o

* Explanation at the top of programs

* fix progress calculation

* Ignore archives in progress script

* merge

* Update tools/buildtools/makeyar.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update tools/buildtools/makeyar.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update tools/buildtools/makeyar.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update tools/buildtools/makeyar.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal
2023-06-18 18:13:57 -04:00
committed by GitHub
co-authored by engineer124
parent 0a55ca0b40
commit a5cc630cef
28 changed files with 1196 additions and 280 deletions
+8 -2
View File
@@ -136,7 +136,6 @@ if not args.matching:
# The order of this list should not change to prevent breaking the graph of the website
# New stuff shall be appended at the end of the list
assetsCategories = [
"archives",
"audio",
"interface",
"misc",
@@ -148,6 +147,11 @@ assetsCategories = [
]
assetsTracker = dict()
# Assets that we don't have a proper way of tracking right now
ignoredAssets = {
"archives",
}
# Manual fixer for files that would be counted in wrong categories
# "filename": "correctSection"
fileSectionFixer = {
@@ -203,12 +207,12 @@ for line in map_file:
file_size = int(line_split[2], 16)
obj_file = line_split[3].strip()
objFileSplit = obj_file.split("/")
objFileName = objFileSplit[-1].split(".o")[0]
fileData = {"name": obj_file, "vram": obj_vram, "size": file_size, "section": section, "symbols": []}
mapFileList.append(fileData)
if (section == ".text"):
objFileName = objFileSplit[-1].split(".o")[0]
srcCat = obj_file.split("/")[2]
if srcCat in srcCategoriesFixer:
srcCat = srcCategoriesFixer[srcCat]
@@ -229,6 +233,8 @@ for line in map_file:
assetCat = obj_file.split("/")[2]
if assetCat in assetsTracker:
assetsTracker[assetCat]["currentSize"] += file_size
elif assetCat in ignoredAssets:
pass
else:
eprint(f"Found file '{obj_file}' in unknown asset category '{assetCat}'")
eprint("I'll ignore this for now, but please fix it!")