mirror of https://github.com/pmret/papermario.git
update splat
This commit is contained in:
parent
67ee8c754d
commit
ffe1f285a1
11
configure.py
11
configure.py
|
@ -12,6 +12,7 @@ import hashlib
|
||||||
|
|
||||||
sys.path.append(os.path.dirname(__file__) + "/tools/splat")
|
sys.path.append(os.path.dirname(__file__) + "/tools/splat")
|
||||||
import split
|
import split
|
||||||
|
from segtypes.n64.code import Subsegment
|
||||||
|
|
||||||
INCLUDE_ASM_RE = re.compile(r"___INCLUDE_ASM\([^,]+, ([^,]+), ([^,)]+)") # note _ prefix
|
INCLUDE_ASM_RE = re.compile(r"___INCLUDE_ASM\([^,]+, ([^,]+), ([^,)]+)") # note _ prefix
|
||||||
|
|
||||||
|
@ -60,11 +61,11 @@ def read_splat(splat_config: str):
|
||||||
segments[path] = segment
|
segments[path] = segment
|
||||||
|
|
||||||
if isinstance(segment, N64SegCode):
|
if isinstance(segment, N64SegCode):
|
||||||
for split_file in segment.files:
|
for split_file in segment.subsegments:
|
||||||
if split_file["subtype"] in ["i4", "i8", "ia4", "ia8", "ia16", "rgba16", "rgba32", "ci4", "ci8", "palette"]:
|
if split_file.type in ["i4", "i8", "ia4", "ia8", "ia16", "rgba16", "rgba32", "ci4", "ci8", "palette"]:
|
||||||
path = os.path.join(
|
path = os.path.join(
|
||||||
#segment.get_subdir(split_file["subtype"]),
|
#segment.get_subdir(split_file["subtype"]),
|
||||||
split_file["name"] + "." + segment.get_ext(split_file["subtype"])
|
split_file.name + "." + split_file.get_ext()
|
||||||
)
|
)
|
||||||
|
|
||||||
if path in segments:
|
if path in segments:
|
||||||
|
@ -448,13 +449,13 @@ async def main():
|
||||||
elif f.endswith(".s"):
|
elif f.endswith(".s"):
|
||||||
n.build(obj(f), "as", f)
|
n.build(obj(f), "as", f)
|
||||||
elif f.endswith(".png"):
|
elif f.endswith(".png"):
|
||||||
if isinstance(segment, dict):
|
if isinstance(segment, Subsegment):
|
||||||
# image within a code section
|
# image within a code section
|
||||||
out = "$builddir/" + f + ".bin"
|
out = "$builddir/" + f + ".bin"
|
||||||
infile = find_asset(re.sub(r"\.pal\.png", ".png", f))
|
infile = find_asset(re.sub(r"\.pal\.png", ".png", f))
|
||||||
|
|
||||||
n.build(out, "img", infile, implicit="tools/img/build.py", variables={
|
n.build(out, "img", infile, implicit="tools/img/build.py", variables={
|
||||||
"img_type": segment["subtype"],
|
"img_type": segment.type,
|
||||||
"img_flags": "",
|
"img_flags": "",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
1556
tools/splat.yaml
1556
tools/splat.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue