diff --git a/.vscode/settings.json b/.vscode/settings.json index 6fffab7aa0..6da0928b2d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -29,10 +29,6 @@ "editor.wordSeparators": "`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?", // no $, for scripts }, "files.associations": { - "*.tcc": "c", - "ratio": "c", - "vector": "c", - "cmath": "c", - "common.h": "c" + "*.h": "c", }, } diff --git a/configure.py b/configure.py index 6ce0dabb5f..e88db25984 100755 --- a/configure.py +++ b/configure.py @@ -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": "", }) diff --git a/src/battle/item/coconut/coconut.c b/src/battle/item/coconut/coconut.c index b77d05b80c..9a11ea12b9 100644 --- a/src/battle/item/coconut/coconut.c +++ b/src/battle/item/coconut/coconut.c @@ -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), diff --git a/tools/splat/segtypes/n64/ci8.py b/tools/splat/segtypes/n64/ci8.py index 626d259b19..ef290f6647 100644 --- a/tools/splat/segtypes/n64/ci8.py +++ b/tools/splat/segtypes/n64/ci8.py @@ -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 == diff --git a/tools/splat/segtypes/n64/code.py b/tools/splat/segtypes/n64/code.py index bc0d4db0cc..a71188055a 100644 --- a/tools/splat/segtypes/n64/code.py +++ b/tools/splat/segtypes/n64/code.py @@ -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