mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 15:34:41 +00:00
Cleanup: Pass all paths to tools rather than tools constructing them (#2017)
* Pass all paths to tools rather than tools constructing them * fix: make --baserom-segments required * sync with mm reviews * --version everywhere
This commit is contained in:
parent
907e440f3a
commit
e833011ccd
14 changed files with 96 additions and 64 deletions
|
@ -18,21 +18,22 @@ def main():
|
|||
description="Extract incbin pieces from an uncompressed ROM."
|
||||
)
|
||||
parser.add_argument(
|
||||
"baserom_dir", metavar="BASEROM_DIR", type=Path, help="Directory of uncompressed ROM segments"
|
||||
"baserom_segments_dir",
|
||||
type=Path,
|
||||
help="Directory of uncompressed ROM segments",
|
||||
)
|
||||
parser.add_argument(
|
||||
"output_dir",
|
||||
type=Path,
|
||||
help="Output directory for incbin pieces",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-v",
|
||||
"--oot-version",
|
||||
"--version",
|
||||
dest="oot_version",
|
||||
required=True,
|
||||
help="OOT version",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-o",
|
||||
"--output-dir",
|
||||
type=Path,
|
||||
required=True,
|
||||
help="Output directory for incbin pieces",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -41,7 +42,7 @@ def main():
|
|||
args.output_dir.mkdir(parents=True, exist_ok=True)
|
||||
for incbin in config.incbins:
|
||||
incbin_path = args.output_dir / incbin.name
|
||||
with open(args.baserom_dir / incbin.segment, "rb") as f:
|
||||
with open(args.baserom_segments_dir / incbin.segment, "rb") as f:
|
||||
offset = incbin.vram - config.dmadata_segments[incbin.segment].vram
|
||||
f.seek(offset)
|
||||
incbin_data = f.read(incbin.size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue