mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
match coconut.png
This commit is contained in:
parent
f35cca8b0b
commit
9b881b8309
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@ -29,10 +29,6 @@
|
||||
"editor.wordSeparators": "`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?", // no $, for scripts
|
||||
},
|
||||
"files.associations": {
|
||||
"*.tcc": "c",
|
||||
"ratio": "c",
|
||||
"vector": "c",
|
||||
"cmath": "c",
|
||||
"common.h": "c"
|
||||
"*.h": "c",
|
||||
},
|
||||
}
|
||||
|
@ -55,12 +55,14 @@ def read_splat(splat_config: str):
|
||||
|
||||
if isinstance(segment, N64SegCode):
|
||||
for split_file in segment.files:
|
||||
if split_file["subtype"] in ["ci4", "palette"]:
|
||||
if split_file["subtype"] in ["i4", "i8", "ia4", "ia8", "ia16", "rgba16", "rgba32", "ci4", "ci8", "palette"]:
|
||||
path = os.path.join(
|
||||
"src",
|
||||
split_file["name"] + "." + segment.get_ext(split_file["subtype"])
|
||||
)
|
||||
|
||||
print(path)
|
||||
|
||||
if path in segments:
|
||||
segments[path] = split_file
|
||||
|
||||
@ -426,7 +428,7 @@ async def main():
|
||||
if isinstance(segment, dict):
|
||||
# image within a code section
|
||||
out = "$builddir/" + f + ".bin"
|
||||
n.build(out, "img", f, implicit="tools/convert_image.py", variables={
|
||||
n.build(out, "img", re.sub(r"\.pal\.png", ".png", f), implicit="tools/convert_image.py", variables={
|
||||
"img_type": segment["subtype"],
|
||||
"img_flags": "",
|
||||
})
|
||||
|
@ -15,7 +15,7 @@ Gfx D_802A1A60_7303C0[] = {
|
||||
gsDPSetTextureFilter(G_TF_AVERAGE),
|
||||
gsDPSetTextureConvert(G_TC_FILT),
|
||||
gsDPSetTextureLUT(G_TT_RGBA16),
|
||||
gsDPLoadTLUT_pal16(0, &battle_item_coconut_coconut_png),
|
||||
gsDPLoadTLUT_pal16(0, &battle_item_coconut_coconut_pal_png),
|
||||
gsDPLoadTextureTile_4b(&battle_item_coconut_coconut_png, G_IM_FMT_CI, 32, 0, 0, 0, 31, 31, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
gsSPClearGeometryMode(G_SHADING_SMOOTH),
|
||||
|
@ -18,7 +18,7 @@ class N64SegCi8(N64SegRgba16):
|
||||
if self.compressed:
|
||||
data = Yay0decompress.decompress_yay0(data)
|
||||
|
||||
self.image = type(self).parse_image(data, self.width, self.height)
|
||||
self.image = self.parse_image(data, self.width, self.height)
|
||||
|
||||
def postsplit(self, segments):
|
||||
palettes = [seg for seg in segments if seg.type ==
|
||||
|
@ -880,8 +880,10 @@ class N64SegCode(N64Segment):
|
||||
return "s"
|
||||
elif subtype == "bin":
|
||||
return "bin"
|
||||
elif subtype in ["i4", "i8", "ia4", "ia8", "ia16", "rgba16", "rgba32", "ci4", "ci8", "palette"]:
|
||||
elif subtype in ["i4", "i8", "ia4", "ia8", "ia16", "rgba16", "rgba32", "ci4", "ci8"]:
|
||||
return "png"
|
||||
elif subtype == "palette":
|
||||
return "pal.png"
|
||||
return subtype
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user