papermario/tools/build/mapfs/tex.py
HailSanta 6bb14ff8be
tex archives (#1072)
* extraction

* hmm

* eth cleanup

* tex skeleton

* building

* OK

* pal OK

* cleaned texture names

* moved tex code to separate file

* additional error checking

* proposed splits

* split a5dd0

* additional cleanup

* myoop

* wahoo

* lru

* fixules

* fixin agin

---------

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2023-06-29 21:06:23 +09:00

20 lines
737 B
Python

#!/usr/bin/env python3
import argparse
from pathlib import Path
from sys import argv, path
path.append(str(Path(__file__).parent.parent.parent / "splat"))
path.append(str(Path(__file__).parent.parent.parent / "splat_ext"))
from tex_archives import TexArchive
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Texture archives")
parser.add_argument("bin_out", type=Path, help="Output binary file path")
parser.add_argument("tex_dir", type=Path, help="File path to input tex subdirectory")
parser.add_argument(
"--endian", choices=["big", "little"], default="big", help="Output endianness"
)
args = parser.parse_args()
TexArchive.build(args.bin_out, args.tex_dir, args.endian)