From b4a19e09e5595270f07e9caed0df21fb767278fe Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Mon, 2 Nov 2020 16:39:29 +0000 Subject: [PATCH] fix splat issues --- Makefile | 9 ++---- tools/convert_image.py | 2 +- tools/n64splat | 2 +- tools/splat.yaml | 70 +++++++++++++++++++++--------------------- 4 files changed, 40 insertions(+), 43 deletions(-) diff --git a/Makefile b/Makefile index 326fe78c20..1b38d467bd 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ submodules: split: rm -rf bin img - $(SPLAT) --modes ld bin Yay0 PaperMarioMapFS rgba16 rgba32 ia4 ia8 ia16 i4 i8 ci4 ci8 + $(SPLAT) --modes ld bin Yay0 PaperMarioMapFS img split-%: $(SPLAT) --modes ld $* @@ -156,15 +156,12 @@ $(BUILD_DIR)/%.rgba32.png: %.png $(BUILD_DIR)/%.ci8.png: %.png @mkdir -p $(shell dirname $@) $(PYTHON) tools/convert_image.py ci8 $< $@ $(IMG_FLAGS) -$(BUILD_DIR)/%.ci8palette.png: %.png - @mkdir -p $(shell dirname $@) - $(PYTHON) tools/convert_image.py ci8palette $< $@ $(IMG_FLAGS) $(BUILD_DIR)/%.ci4.png: %.png @mkdir -p $(shell dirname $@) $(PYTHON) tools/convert_image.py ci4 $< $@ $(IMG_FLAGS) -$(BUILD_DIR)/%.ci4palette.png: %.png +$(BUILD_DIR)/%.palette.png: %.png @mkdir -p $(shell dirname $@) - $(PYTHON) tools/convert_image.py ci4palette $< $@ $(IMG_FLAGS) + $(PYTHON) tools/convert_image.py palette $< $@ $(IMG_FLAGS) $(BUILD_DIR)/%.ia4.png: %.png @mkdir -p $(shell dirname $@) $(PYTHON) tools/convert_image.py ia4 $< $@ $(IMG_FLAGS) diff --git a/tools/convert_image.py b/tools/convert_image.py index afc92d94bc..d9fc14a4d7 100755 --- a/tools/convert_image.py +++ b/tools/convert_image.py @@ -84,7 +84,7 @@ class Converter(): for a, b in iter_in_groups(row, 2): byte = (a << 4) | b f.write(byte.to_bytes(1, byteorder="big")) - elif self.mode == "ci8palette" or self.mode == "ci4palette": + elif self.mode == "palette": img.preamble(True) palette = img.palette(alpha="force") diff --git a/tools/n64splat b/tools/n64splat index bc9b7e9f0e..23a4ba2652 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit bc9b7e9f0ef0afab6a28e4faa7ab0c43cf045d83 +Subproject commit 23a4ba2652f929a71e5e6b2ff759ae63304b24aa diff --git a/tools/splat.yaml b/tools/splat.yaml index 5c3c04deb6..0d94d576d5 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -212,13 +212,13 @@ segments: - [0x8a860, "c", "code_8a860_len_3f30"] - [0x8e790, "c", "code_8e790_len_2850"] - [0x90fe0, "bin"] - - [0x93CD0, ci4, ui/hammer, 32, 32] - - [0x93ED0, ci4palette, ui/hammer] - - [0x93EF0, ci4palette, ui/hammer.disabled] + - [0x93CD0, ci4, ui/hammer, 32, 32] + - [0x93ED0, palette, ui/hammer] + - [0x93EF0, palette, ui/hammer.disabled] - [0x93FF0, bin] - - [0x9D658, rgba32, ui/stat_heart, 16, 16] + - [0x9D658, rgba32, ui/stat_heart, 16, 16] - [0x9DA58, bin] - - [0x9DA60, rgba32, ui/stat_flower, 16, 16] + - [0x9DA60, rgba32, ui/stat_flower, 16, 16] - [0x9DE60, bin] - type: code start: 0xA5DD0 @@ -276,15 +276,15 @@ segments: - [0x1086a0, "c", "code_1086a0_len_fc0"] - [0x109660, "c", "code_109660_len_1270"] - [0x10A8D0, "c", "code_10A8D0"] - - [0x10A9F0, i4, shadow/square, 16, 16] - - [0x10AA70, i4, shadow/circle, 16, 16] + - [0x10A9F0, i4, shadow/square, 16, 16] + - [0x10AA70, i4, shadow/circle, 16, 16] - [0x10AAF0, bin] - - [0x10AB70, i4, shadow/10AB70, 32, 32] - - [0x10AD70, i4, shadow/10AD70, 32, 32] + - [0x10AB70, i4, shadow/10AB70, 32, 32] + - [0x10AD70, i4, shadow/10AD70, 32, 32] - [0x10AF70, bin] # TODO - - [0x1164B8, ci8, peach_letter, 150, 105] + - [0x1164B8, ci8, peach_letter, 150, 105] - [0x11A23E, bin] - - [0x11A240, ci8palette, peach_letter] + - [0x11A240, palette, peach_letter] - [0x11A440, bin] - [0x131340, bin] - type: code @@ -298,26 +298,26 @@ segments: - [0x1421C0, "c"] - [0x1422A0, "bin"] - [0x1443F0, ci8, pause/world_map, 320, 320] - - [0x15D3F0, ci8palette, pause/world_map] + - [0x15D3F0, palette, pause/world_map] - [0x15D5F0, ci4, pause/spirits_bg, 128, 110] - - [0x15F170, ci4palette, pause/spirits_bg] + - [0x15F170, palette, pause/spirits_bg] - [0x15F270, bin] - [0x15F970, ci4, pause/banner_hp, 64, 16] - - [0x15FB70, ci4palette, pause/banner_hp] + - [0x15FB70, palette, pause/banner_hp] - [0x15FD70, ci4, pause/banner_fp, 64, 16] - - [0x15FF70, ci4palette, pause/banner_fp] + - [0x15FF70, palette, pause/banner_fp] - [0x160170, ci4, pause/banner_bp, 64, 16] - - [0x160370, ci4palette, pause/banner_bp] + - [0x160370, palette, pause/banner_bp] - [0x160570, ci4, pause/banner_boots, 48, 16] - - [0x1606F0, ci4palette, pause/banner_boots] + - [0x1606F0, palette, pause/banner_boots] - [0x1608F0, ci4, pause/banner_hammer, 48, 16] - - [0x160A70, ci4palette, pause/banner_hammer] + - [0x160A70, palette, pause/banner_hammer] - [0x160C70, ci4, pause/banner_star_energy, 48, 16] - - [0x160DF0, ci4palette, pause/banner_star_energy] + - [0x160DF0, palette, pause/banner_star_energy] - [0x160FF0, ci4, pause/available, 64, 16] - - [0x1611F0, ci4palette, pause/available] + - [0x1611F0, palette, pause/available] - [0x1613F0, ci4, pause/prompt_check_abilities, 128, 16] - - [0x1617F0, ci4palette, pause/prompt_check_abilities] + - [0x1617F0, palette, pause/prompt_check_abilities] - [0x1619F0, bin] - type: code start: 0x163400 @@ -352,20 +352,20 @@ segments: - [0x1AF230, "c"] - [0x1AF2D0, "bin"] - [0x1CC310, "bin"] # icon images and palettes, vram unknown - - [0x1FE1B0, rgba16, title/logo_n64, 128, 112] - - [0x2051B0, rgba16, title/logo_is, 256, 122] - - [0x2131B0, rgba16, title/logo_nintendo, 256, 48] - - [0x2191B0, ci8, title/bg_1, 264, 162] - - [0x2238C0, ci8palette, title/bg_1] - - [0x223AC0, ci8, title/bg_2, 264, 162] - - [0x22E1D0, ci8palette, title/bg_2] - - [0x22E3D0, ci8, title/bg_3, 264, 162] - - [0x238AE0, ci8palette, title/bg_3] - - [0x238CE0, ci8, title/bg_4, 264, 162] - - [0x2433F0, ci8palette, title/bg_4] - - [0x2435F0, ia8, title/tape, 128, 128] - - [0x2475F0, ci8, title/bowser_silhouette, 128, 128] - - [0x24B5F0, ci8palette, title/bowser_silhouette] + - [0x1FE1B0, rgba16, title/logo_n64, 128, 112] + - [0x2051B0, rgba16, title/logo_is, 256, 122] + - [0x2131B0, rgba16, title/logo_nintendo, 256, 48] + - [0x2191B0, ci8, title/bg_1, 264, 162] + - [0x2238C0, palette, title/bg_1] + - [0x223AC0, ci8, title/bg_2, 264, 162] + - [0x22E1D0, palette, title/bg_2] + - [0x22E3D0, ci8, title/bg_3, 264, 162] + - [0x238AE0, palette, title/bg_3] + - [0x238CE0, ci8, title/bg_4, 264, 162] + - [0x2433F0, palette, title/bg_4] + - [0x2435F0, ia8, title/tape, 128, 128] + - [0x2475F0, ci8, title/bowser_silhouette, 128, 128] + - [0x24B5F0, palette, title/bowser_silhouette] - [0x24B7F0, bin] - type: code start: 0x3169F0