From b2cf91c8ca061877cb19a1e644f0151e1bd541da Mon Sep 17 00:00:00 2001 From: AltoXorg <56553686+Alto1772@users.noreply.github.com> Date: Thu, 11 Jan 2024 19:41:11 +0800 Subject: [PATCH] yaml-ify map metadata & iQue pm_map (#1145) * map (draft) * put to mapfs.yaml and other ver. * ique map finished * alisin ang type --- tools/build/configure.py | 5 +- tools/build/mapfs/combine.py | 32 +- tools/build/mapfs/pack_title_data.py | 60 +- tools/splat_ext/{map_data.yaml => mapfs.yaml} | 9 +- tools/splat_ext/mapfs_ique.yaml | 1040 +++++++++++++++++ tools/splat_ext/mapfs_jp.yaml | 1039 ++++++++++++++++ tools/splat_ext/pm_map_data.py | 124 +- ver/ique/splat.yaml | 2 +- 8 files changed, 2218 insertions(+), 93 deletions(-) rename tools/splat_ext/{map_data.yaml => mapfs.yaml} (98%) create mode 100644 tools/splat_ext/mapfs_ique.yaml create mode 100644 tools/splat_ext/mapfs_jp.yaml diff --git a/tools/build/configure.py b/tools/build/configure.py index 2f85bd1629..e62d2522af 100755 --- a/tools/build/configure.py +++ b/tools/build/configure.py @@ -301,7 +301,7 @@ def write_ninja_rules( ninja.rule( "pack_title_data", description="pack_title_data $out", - command=f"$python {BUILD_TOOLS}/mapfs/pack_title_data.py $out $in", + command=f"$python {BUILD_TOOLS}/mapfs/pack_title_data.py $version $out $in", ) ninja.rule("map_header", command=f"$python {BUILD_TOOLS}/mapfs/map_header.py $in > $out") @@ -947,6 +947,9 @@ class Configure: "img_flags": "", }, ) + elif path.suffixes[-2:] == [".raw", ".dat"]: + compress = False + bin_path = path elif name == "title_data": compress = True diff --git a/tools/build/mapfs/combine.py b/tools/build/mapfs/combine.py index 0050c54e30..05687a2da0 100755 --- a/tools/build/mapfs/combine.py +++ b/tools/build/mapfs/combine.py @@ -16,11 +16,13 @@ def get_version_date(version): return "Map Ver.00/07/05 19:13" elif version == "pal": return "Map Ver.01/03/23 16:30" + elif version == "ique": + return "Map Ver.04/05/18 13:41" else: return "Map Ver.??/??/?? ??:??" -def build_mapfs(out_bin, assets, version): +def build_mapfs(out_bin, assets, version, pre_write_assets): # every TOC entry's name field has data after the null terminator made up from all the previous name fields. # we probably don't have to do this for the game to read the data properly (it doesn't read past the null terminator # of `string`), but the original devs' equivalent of this script had this bug so we need to replicate it to match. @@ -41,6 +43,9 @@ def build_mapfs(out_bin, assets, version): decompressed_size = decompressed.stat().st_size size = next_multiple(compressed.stat().st_size, 2) if compressed.exists() else decompressed_size + if version == "ique" and decompressed.stem == "title_data": + size = compressed.stat().st_size + # print(f"{name} {offset:08X} {size:08X} {decompressed_size:08X}") # write all previously-written names; required to match @@ -52,10 +57,18 @@ def build_mapfs(out_bin, assets, version): f.seek(toc_entry_pos + 0x10) f.write(struct.pack(">III", offset, size, decompressed_size)) + # initial data to be overwritten back, provided by .raw.dat files + pre_write_bytes = b"" + if pre_write_assets.get(decompressed.stem): + with open(pre_write_assets[decompressed.stem], "rb") as pwf: + pre_write_bytes = pwf.read() + f.seek(0x20 + next_data_pos) + f.write(pre_write_bytes) + # write data. f.seek(0x20 + next_data_pos) f.write(compressed.read_bytes() if compressed.exists() else decompressed.read_bytes()) - next_data_pos += size + next_data_pos += max(len(pre_write_bytes), size) asset_idx += 1 @@ -77,9 +90,16 @@ if __name__ == "__main__": out = argv.pop(0) assets = [] + pre_write_assets = {} - # pairs - for i in range(0, len(argv), 2): - assets.append((Path(argv[i]), Path(argv[i + 1]))) + for path in argv: + path = Path(path) + if path.suffixes[-2:] == [".raw", ".dat"]: + pre_write_assets[path.with_suffix("").stem] = path + else: + assets.append(path) - build_mapfs(out, assets, version) + # turn them into pairs + assets = list(zip(assets[::2], assets[1::2])) + + build_mapfs(out, assets, version, pre_write_assets) diff --git a/tools/build/mapfs/pack_title_data.py b/tools/build/mapfs/pack_title_data.py index 84e7978243..a57c777e8e 100755 --- a/tools/build/mapfs/pack_title_data.py +++ b/tools/build/mapfs/pack_title_data.py @@ -4,51 +4,37 @@ from sys import argv if __name__ == "__main__": argv.pop(0) # python3 + version = argv.pop(0) + out = argv.pop(0) + imgs = argv - if len(argv) > 4: - out, img1, img2, img3, img2_pal = argv + imgs_bytes = [] + for img in imgs: + with open(img, "rb") as f: + imgs_bytes.append(f.read()) + + if version == "jp": + # copyright, copyright pal, press start, logo + write_order = (1, 3, 2, 0) + elif version == "ique": + # press start, copyright, logo + write_order = (2, 1, 0) else: - out, img1, img2, img3 = argv - img2_pal = None - - with open(img1, "rb") as f: - img1 = f.read() - - with open(img2, "rb") as f: - img2 = f.read() - - with open(img3, "rb") as f: - img3 = f.read() - - if img2_pal: - with open(img2_pal, "rb") as f: - img2_pal = f.read() + # copyright, press start, logo + write_order = (1, 2, 0) with open(out, "wb") as f: f.seek(0x10) - pos2 = f.tell() - f.write(img2) + imgs_pos = [0] * len(imgs) + for i in write_order: + imgs_pos[i] = f.tell() + f.write(imgs_bytes[i]) - if img2_pal: - pos2_pal = f.tell() - f.write(img2_pal) - else: - pos2_pal = None - - pos3 = f.tell() - f.write(img3) - - pos1 = f.tell() - f.write(img1) - - if img2_pal: + if version == "jp": # jp padding? f.write(b"\x00" * 0x10) f.seek(0) - f.write(pos1.to_bytes(4, byteorder="big")) - f.write(pos2.to_bytes(4, byteorder="big")) - f.write(pos3.to_bytes(4, byteorder="big")) - if pos2_pal: - f.write(pos2_pal.to_bytes(4, byteorder="big")) + for pos in imgs_pos: + f.write(pos.to_bytes(4, byteorder="big")) diff --git a/tools/splat_ext/map_data.yaml b/tools/splat_ext/mapfs.yaml similarity index 98% rename from tools/splat_ext/map_data.yaml rename to tools/splat_ext/mapfs.yaml index 274ea5c568..9101d15b8f 100644 --- a/tools/splat_ext/map_data.yaml +++ b/tools/splat_ext/mapfs.yaml @@ -1006,7 +1006,8 @@ - gv__tex - kmr_bg - nok_bg -- sbk_bg +- name: sbk_bg + pal_count: 2 # sbk_bg has an alternative palette - sbk3_bg - iwa_bg - hos_bg @@ -1022,7 +1023,11 @@ - sam_bg - kpa_bg - title_bg -- title_data +- name: title_data + textures: + - [0x10, ia8, copyright, 144, 32] + - [0x1210, ia8, press_start, 128, 32] + - [0x2210, rgba32, logotype, 200, 112] - party_kurio - party_kameki - party_pinki diff --git a/tools/splat_ext/mapfs_ique.yaml b/tools/splat_ext/mapfs_ique.yaml new file mode 100644 index 0000000000..823706d12c --- /dev/null +++ b/tools/splat_ext/mapfs_ique.yaml @@ -0,0 +1,1040 @@ +- dro_01_shape +- dro_01_hit +- dro_02_shape +- dro_02_hit +- hos_00_shape +- hos_00_hit +- hos_01_shape +- hos_01_hit +- hos_02_shape +- hos_02_hit +- hos_03_shape +- hos_03_hit +- hos_04_shape +- hos_04_hit +- hos_05_shape +- hos_05_hit +- hos_06_shape +- hos_06_hit +- hos_10_shape +- hos_10_hit +- hos_20_shape +- hos_20_hit +- isk_01_shape +- isk_01_hit +- isk_02_shape +- isk_02_hit +- isk_03_shape +- isk_03_hit +- isk_04_shape +- isk_04_hit +- isk_05_shape +- isk_05_hit +- isk_06_shape +- isk_06_hit +- isk_07_shape +- isk_07_hit +- isk_08_shape +- isk_08_hit +- isk_09_shape +- isk_09_hit +- isk_10_shape +- isk_10_hit +- isk_11_shape +- isk_11_hit +- isk_12_shape +- isk_12_hit +- isk_13_shape +- isk_13_hit +- isk_14_shape +- isk_14_hit +- isk_16_shape +- isk_16_hit +- isk_18_shape +- isk_18_hit +- isk_19_shape +- isk_19_hit +- iwa_00_shape +- iwa_00_hit +- iwa_01_shape +- iwa_01_hit +- iwa_02_shape +- iwa_02_hit +- iwa_03_shape +- iwa_03_hit +- iwa_04_shape +- iwa_04_hit +- iwa_10_shape +- iwa_10_hit +- iwa_11_shape +- iwa_11_hit +- osr_00_shape +- osr_00_hit +- osr_01_shape +- osr_01_hit +- osr_02_shape +- osr_02_hit +- osr_03_shape +- osr_03_hit +- kkj_00_shape +- kkj_00_hit +- kkj_01_shape +- kkj_01_hit +- kkj_02_shape +- kkj_02_hit +- kkj_03_shape +- kkj_03_hit +- kkj_10_shape +- kkj_10_hit +- kkj_11_shape +- kkj_11_hit +- kkj_12_shape +- kkj_12_hit +- kkj_13_shape +- kkj_13_hit +- kkj_14_shape +- kkj_14_hit +- kkj_15_shape +- kkj_15_hit +- kkj_16_shape +- kkj_16_hit +- kkj_17_shape +- kkj_17_hit +- kkj_18_shape +- kkj_18_hit +- kkj_19_shape +- kkj_19_hit +- kkj_20_shape +- kkj_20_hit +- kkj_21_shape +- kkj_21_hit +- kkj_22_shape +- kkj_22_hit +- kkj_23_shape +- kkj_23_hit +- kkj_24_shape +- kkj_24_hit +- kkj_25_shape +- kkj_25_hit +- kkj_26_shape +- kkj_26_hit +- kkj_27_shape +- kkj_27_hit +- kkj_28_shape +- kkj_28_hit +- kkj_29_shape +- kkj_29_hit +- kmr_00_shape +- kmr_00_hit +- kmr_02_shape +- kmr_02_hit +- kmr_03_shape +- kmr_03_hit +- kmr_04_shape +- kmr_04_hit +- kmr_05_shape +- kmr_05_hit +- kmr_06_shape +- kmr_06_hit +- kmr_07_shape +- kmr_07_hit +- kmr_09_shape +- kmr_09_hit +- kmr_10_shape +- kmr_10_hit +- kmr_11_shape +- kmr_11_hit +- kmr_12_shape +- kmr_12_hit +- kmr_20_shape +- kmr_20_hit +- kmr_30_shape +- kmr_30_hit +- kpa_01_shape +- kpa_01_hit +- kpa_03_shape +- kpa_03_hit +- kpa_04_shape +- kpa_04_hit +- kpa_08_shape +- kpa_08_hit +- kpa_09_shape +- kpa_09_hit +- kpa_10_shape +- kpa_10_hit +- kpa_11_shape +- kpa_11_hit +- kpa_12_shape +- kpa_12_hit +- kpa_13_shape +- kpa_13_hit +- kpa_14_shape +- kpa_14_hit +- kpa_15_shape +- kpa_15_hit +- kpa_16_shape +- kpa_16_hit +- kpa_17_shape +- kpa_17_hit +- kpa_32_shape +- kpa_32_hit +- kpa_33_shape +- kpa_33_hit +- kpa_40_shape +- kpa_40_hit +- kpa_41_shape +- kpa_41_hit +- kpa_50_shape +- kpa_50_hit +- kpa_52_shape +- kpa_52_hit +- kpa_60_shape +- kpa_60_hit +- kpa_61_shape +- kpa_61_hit +- kpa_62_shape +- kpa_62_hit +- kpa_63_shape +- kpa_63_hit +- kpa_70_shape +- kpa_70_hit +- kpa_80_shape +- kpa_80_hit +- kpa_90_shape +- kpa_90_hit +- kpa_91_shape +- kpa_91_hit +- kpa_94_shape +- kpa_94_hit +- kpa_95_shape +- kpa_95_hit +- kpa_96_shape +- kpa_96_hit +- kpa_102_shape +- kpa_102_hit +- kpa_111_shape +- kpa_111_hit +- kpa_112_shape +- kpa_112_hit +- kpa_113_shape +- kpa_113_hit +- kpa_115_shape +- kpa_115_hit +- kpa_116_shape +- kpa_116_hit +- kpa_117_shape +- kpa_117_hit +- kpa_118_shape +- kpa_118_hit +- kpa_119_shape +- kpa_119_hit +- kpa_121_shape +- kpa_121_hit +- kpa_130_shape +- kpa_130_hit +- kpa_133_shape +- kpa_133_hit +- kpa_134_shape +- kpa_134_hit +- machi_shape +- machi_hit +- mac_00_shape +- mac_00_hit +- mac_01_shape +- mac_01_hit +- mac_02_shape +- mac_02_hit +- mac_03_shape +- mac_03_hit +- mac_04_shape +- mac_04_hit +- mac_05_shape +- mac_05_hit +- mac_06_shape +- mac_06_hit +- tik_01_shape +- tik_01_hit +- tik_02_shape +- tik_02_hit +- tik_03_shape +- tik_03_hit +- tik_04_shape +- tik_04_hit +- tik_05_shape +- tik_05_hit +- tik_06_shape +- tik_06_hit +- tik_07_shape +- tik_07_hit +- tik_08_shape +- tik_08_hit +- tik_09_shape +- tik_09_hit +- tik_10_shape +- tik_10_hit +- tik_12_shape +- tik_12_hit +- tik_14_shape +- tik_14_hit +- tik_15_shape +- tik_15_hit +- tik_17_shape +- tik_17_hit +- tik_18_shape +- tik_18_hit +- tik_19_shape +- tik_19_hit +- tik_20_shape +- tik_20_hit +- tik_21_shape +- tik_21_hit +- tik_22_shape +- tik_22_hit +- tik_23_shape +- tik_23_hit +- tik_25_shape +- tik_25_hit +- kgr_01_shape +- kgr_01_hit +- kgr_02_shape +- kgr_02_hit +- nok_01_shape +- nok_01_hit +- nok_02_shape +- nok_02_hit +- nok_03_shape +- nok_03_hit +- nok_04_shape +- nok_04_hit +- nok_11_shape +- nok_11_hit +- nok_12_shape +- nok_12_hit +- nok_13_shape +- nok_13_hit +- nok_14_shape +- nok_14_hit +- nok_15_shape +- nok_15_hit +- sbk_00_shape +- sbk_00_hit +- sbk_01_shape +- sbk_01_hit +- sbk_02_shape +- sbk_02_hit +- sbk_03_shape +- sbk_03_hit +- sbk_04_shape +- sbk_04_hit +- sbk_05_shape +- sbk_05_hit +- sbk_06_shape +- sbk_06_hit +- sbk_10_shape +- sbk_10_hit +- sbk_11_shape +- sbk_11_hit +- sbk_12_shape +- sbk_12_hit +- sbk_13_shape +- sbk_13_hit +- sbk_14_shape +- sbk_14_hit +- sbk_15_shape +- sbk_15_hit +- sbk_16_shape +- sbk_16_hit +- sbk_20_shape +- sbk_20_hit +- sbk_21_shape +- sbk_21_hit +- sbk_22_shape +- sbk_22_hit +- sbk_23_shape +- sbk_23_hit +- sbk_24_shape +- sbk_24_hit +- sbk_25_shape +- sbk_25_hit +- sbk_26_shape +- sbk_26_hit +- sbk_30_shape +- sbk_30_hit +- sbk_31_shape +- sbk_31_hit +- sbk_32_shape +- sbk_32_hit +- sbk_33_shape +- sbk_33_hit +- sbk_34_shape +- sbk_34_hit +- sbk_35_shape +- sbk_35_hit +- sbk_36_shape +- sbk_36_hit +- sbk_40_shape +- sbk_40_hit +- sbk_41_shape +- sbk_41_hit +- sbk_42_shape +- sbk_42_hit +- sbk_43_shape +- sbk_43_hit +- sbk_44_shape +- sbk_44_hit +- sbk_45_shape +- sbk_45_hit +- sbk_46_shape +- sbk_46_hit +- sbk_50_shape +- sbk_50_hit +- sbk_51_shape +- sbk_51_hit +- sbk_52_shape +- sbk_52_hit +- sbk_53_shape +- sbk_53_hit +- sbk_54_shape +- sbk_54_hit +- sbk_55_shape +- sbk_55_hit +- sbk_56_shape +- sbk_56_hit +- sbk_60_shape +- sbk_60_hit +- sbk_61_shape +- sbk_61_hit +- sbk_62_shape +- sbk_62_hit +- sbk_63_shape +- sbk_63_hit +- sbk_64_shape +- sbk_64_hit +- sbk_65_shape +- sbk_65_hit +- sbk_66_shape +- sbk_66_hit +- sbk_99_shape +- sbk_99_hit +- trd_00_shape +- trd_00_hit +- trd_01_shape +- trd_01_hit +- trd_02_shape +- trd_02_hit +- trd_03_shape +- trd_03_hit +- trd_04_shape +- trd_04_hit +- trd_05_shape +- trd_05_hit +- trd_06_shape +- trd_06_hit +- trd_07_shape +- trd_07_hit +- trd_08_shape +- trd_08_hit +- trd_09_shape +- trd_09_hit +- trd_10_shape +- trd_10_hit +- tst_01_shape +- tst_01_hit +- tst_02_shape +- tst_02_hit +- tst_03_shape +- tst_03_hit +- tst_04_shape +- tst_04_hit +- tst_10_shape +- tst_10_hit +- tst_11_shape +- tst_11_hit +- tst_12_shape +- tst_12_hit +- tst_13_shape +- tst_13_hit +- tst_20_shape +- tst_20_hit +- jan_00_shape +- jan_00_hit +- jan_01_shape +- jan_01_hit +- jan_02_shape +- jan_02_hit +- jan_03_shape +- jan_03_hit +- jan_04_shape +- jan_04_hit +- jan_05_shape +- jan_05_hit +- jan_06_shape +- jan_06_hit +- jan_07_shape +- jan_07_hit +- jan_08_shape +- jan_08_hit +- jan_09_shape +- jan_09_hit +- jan_10_shape +- jan_10_hit +- jan_11_shape +- jan_11_hit +- jan_12_shape +- jan_12_hit +- jan_13_shape +- jan_13_hit +- jan_14_shape +- jan_14_hit +- jan_15_shape +- jan_15_hit +- jan_16_shape +- jan_16_hit +- jan_17_shape +- jan_17_hit +- jan_18_shape +- jan_18_hit +- jan_19_shape +- jan_19_hit +- jan_22_shape +- jan_22_hit +- jan_23_shape +- jan_23_hit +- mim_01_shape +- mim_01_hit +- mim_02_shape +- mim_02_hit +- mim_03_shape +- mim_03_hit +- mim_04_shape +- mim_04_hit +- mim_05_shape +- mim_05_hit +- mim_06_shape +- mim_06_hit +- mim_07_shape +- mim_07_hit +- mim_08_shape +- mim_08_hit +- mim_09_shape +- mim_09_hit +- mim_10_shape +- mim_10_hit +- mim_11_shape +- mim_11_hit +- mim_12_shape +- mim_12_hit +- obk_01_shape +- obk_01_hit +- obk_02_shape +- obk_02_hit +- obk_03_shape +- obk_03_hit +- obk_04_shape +- obk_04_hit +- obk_05_shape +- obk_05_hit +- obk_06_shape +- obk_06_hit +- obk_07_shape +- obk_07_hit +- obk_08_shape +- obk_08_hit +- obk_09_shape +- obk_09_hit +- arn_02_shape +- arn_02_hit +- arn_03_shape +- arn_03_hit +- arn_04_shape +- arn_04_hit +- arn_05_shape +- arn_05_hit +- arn_07_shape +- arn_07_hit +- arn_08_shape +- arn_08_hit +- arn_09_shape +- arn_09_hit +- arn_10_shape +- arn_10_hit +- arn_11_shape +- arn_11_hit +- arn_12_shape +- arn_12_hit +- arn_13_shape +- arn_13_hit +- arn_20_shape +- arn_20_hit +- dgb_01_shape +- dgb_01_hit +- dgb_02_shape +- dgb_02_hit +- dgb_03_shape +- dgb_03_hit +- dgb_04_shape +- dgb_04_hit +- dgb_05_shape +- dgb_05_hit +- dgb_06_shape +- dgb_06_hit +- dgb_07_shape +- dgb_07_hit +- dgb_08_shape +- dgb_08_hit +- dgb_09_shape +- dgb_09_hit +- dgb_10_shape +- dgb_10_hit +- dgb_11_shape +- dgb_11_hit +- dgb_12_shape +- dgb_12_hit +- dgb_13_shape +- dgb_13_hit +- dgb_14_shape +- dgb_14_hit +- dgb_15_shape +- dgb_15_hit +- dgb_16_shape +- dgb_16_hit +- dgb_17_shape +- dgb_17_hit +- dgb_18_shape +- dgb_18_hit +- kzn_01_shape +- kzn_01_hit +- kzn_02_shape +- kzn_02_hit +- kzn_03_shape +- kzn_03_hit +- kzn_04_shape +- kzn_04_hit +- kzn_05_shape +- kzn_05_hit +- kzn_06_shape +- kzn_06_hit +- kzn_07_shape +- kzn_07_hit +- kzn_08_shape +- kzn_08_hit +- kzn_09_shape +- kzn_09_hit +- kzn_10_shape +- kzn_10_hit +- kzn_11_shape +- kzn_11_hit +- kzn_17_shape +- kzn_17_hit +- kzn_18_shape +- kzn_18_hit +- kzn_19_shape +- kzn_19_hit +- kzn_20_shape +- kzn_20_hit +- kzn_22_shape +- kzn_22_hit +- kzn_23_shape +- kzn_23_hit +- flo_00_shape +- flo_00_hit +- flo_03_shape +- flo_03_hit +- flo_07_shape +- flo_07_hit +- flo_08_shape +- flo_08_hit +- flo_09_shape +- flo_09_hit +- flo_10_shape +- flo_10_hit +- flo_11_shape +- flo_11_hit +- flo_12_shape +- flo_12_hit +- flo_13_shape +- flo_13_hit +- flo_14_shape +- flo_14_hit +- flo_15_shape +- flo_15_hit +- flo_16_shape +- flo_16_hit +- flo_17_shape +- flo_17_hit +- flo_18_shape +- flo_18_hit +- flo_19_shape +- flo_19_hit +- flo_21_shape +- flo_21_hit +- flo_22_shape +- flo_22_hit +- flo_23_shape +- flo_23_hit +- flo_24_shape +- flo_24_hit +- flo_25_shape +- flo_25_hit +- sam_01_shape +- sam_01_hit +- sam_02_shape +- sam_02_hit +- sam_03_shape +- sam_03_hit +- sam_04_shape +- sam_04_hit +- sam_05_shape +- sam_05_hit +- sam_06_shape +- sam_06_hit +- sam_07_shape +- sam_07_hit +- sam_08_shape +- sam_08_hit +- sam_09_shape +- sam_09_hit +- sam_10_shape +- sam_10_hit +- sam_11_shape +- sam_11_hit +- sam_12_shape +- sam_12_hit +- pra_01_shape +- pra_01_hit +- pra_02_shape +- pra_02_hit +- pra_03_shape +- pra_03_hit +- pra_04_shape +- pra_04_hit +- pra_05_shape +- pra_05_hit +- pra_09_shape +- pra_09_hit +- pra_10_shape +- pra_10_hit +- pra_11_shape +- pra_11_hit +- pra_13_shape +- pra_13_hit +- pra_14_shape +- pra_14_hit +- pra_15_shape +- pra_15_hit +- pra_16_shape +- pra_16_hit +- pra_18_shape +- pra_18_hit +- pra_19_shape +- pra_19_hit +- pra_20_shape +- pra_20_hit +- pra_21_shape +- pra_21_hit +- pra_22_shape +- pra_22_hit +- pra_29_shape +- pra_29_hit +- pra_31_shape +- pra_31_hit +- pra_32_shape +- pra_32_hit +- pra_33_shape +- pra_33_hit +- pra_34_shape +- pra_34_hit +- pra_35_shape +- pra_35_hit +- pra_40_shape +- pra_40_hit +- omo_01_shape +- omo_01_hit +- omo_02_shape +- omo_02_hit +- omo_03_shape +- omo_03_hit +- omo_04_shape +- omo_04_hit +- omo_05_shape +- omo_05_hit +- omo_06_shape +- omo_06_hit +- omo_07_shape +- omo_07_hit +- omo_08_shape +- omo_08_hit +- omo_09_shape +- omo_09_hit +- omo_10_shape +- omo_10_hit +- omo_11_shape +- omo_11_hit +- omo_12_shape +- omo_12_hit +- omo_13_shape +- omo_13_hit +- omo_14_shape +- omo_14_hit +- omo_15_shape +- omo_15_hit +- omo_16_shape +- omo_16_hit +- omo_17_shape +- omo_17_hit +- end_00_shape +- end_00_hit +- end_01_shape +- end_01_hit +- mgm_00_shape +- mgm_00_hit +- mgm_01_shape +- mgm_01_hit +- mgm_02_shape +- mgm_02_hit +- mgm_03_shape +- mgm_03_hit +- gv_01_shape +- gv_01_hit +- kmr_bt03_shape +- kmr_bt03_hit +- kmr_bt04_shape +- kmr_bt04_hit +- kmr_bt05_shape +- kmr_bt05_hit +- kmr_bt06_shape +- kmr_bt06_hit +- nok_bt01_shape +- nok_bt01_hit +- nok_bt02_shape +- nok_bt02_hit +- nok_bt03_shape +- nok_bt03_hit +- nok_bt04_shape +- nok_bt04_hit +- trd_bt00_shape +- trd_bt00_hit +- trd_bt01_shape +- trd_bt01_hit +- trd_bt02_shape +- trd_bt02_hit +- trd_bt03_shape +- trd_bt03_hit +- trd_bt04_shape +- trd_bt04_hit +- trd_bt05_shape +- trd_bt05_hit +- iwa_bt01_shape +- iwa_bt01_hit +- iwa_bt02_shape +- iwa_bt02_hit +- sbk_bt02_shape +- sbk_bt02_hit +- isk_bt01_shape +- isk_bt01_hit +- isk_bt02_shape +- isk_bt02_hit +- isk_bt03_shape +- isk_bt03_hit +- isk_bt04_shape +- isk_bt04_hit +- isk_bt05_shape +- isk_bt05_hit +- isk_bt06_shape +- isk_bt06_hit +- isk_bt07_shape +- isk_bt07_hit +- isk_bt08_shape +- isk_bt08_hit +- arn_bt01_shape +- arn_bt01_hit +- arn_bt02_shape +- arn_bt02_hit +- arn_bt03_shape +- arn_bt03_hit +- arn_bt04_shape +- arn_bt04_hit +- arn_bt05_shape +- arn_bt05_hit +- arn_bt06_shape +- arn_bt06_hit +- dgb_bt01_shape +- dgb_bt01_hit +- dgb_bt02_shape +- dgb_bt02_hit +- dgb_bt03_shape +- dgb_bt03_hit +- dgb_bt04_shape +- dgb_bt04_hit +- dgb_bt05_shape +- dgb_bt05_hit +- mim_bt01_shape +- mim_bt01_hit +- omo_bt01_shape +- omo_bt01_hit +- omo_bt02_shape +- omo_bt02_hit +- omo_bt03_shape +- omo_bt03_hit +- omo_bt04_shape +- omo_bt04_hit +- omo_bt05_shape +- omo_bt05_hit +- omo_bt06_shape +- omo_bt06_hit +- omo_bt07_shape +- omo_bt07_hit +- kgr_bt01_shape +- kgr_bt01_hit +- flo_bt01_shape +- flo_bt01_hit +- flo_bt02_shape +- flo_bt02_hit +- flo_bt03_shape +- flo_bt03_hit +- flo_bt04_shape +- flo_bt04_hit +- flo_bt05_shape +- flo_bt05_hit +- flo_bt06_shape +- flo_bt06_hit +- jan_bt00_shape +- jan_bt00_hit +- jan_bt01_shape +- jan_bt01_hit +- jan_bt02_shape +- jan_bt02_hit +- jan_bt03_shape +- jan_bt03_hit +- jan_bt04_shape +- jan_bt04_hit +- kzn_bt01_shape +- kzn_bt01_hit +- kzn_bt02_shape +- kzn_bt02_hit +- kzn_bt04_shape +- kzn_bt04_hit +- kzn_bt05_shape +- kzn_bt05_hit +- sam_bt01_shape +- sam_bt01_hit +- sam_bt02_shape +- sam_bt02_hit +- sam_bt03_shape +- sam_bt03_hit +- sam_bt04_shape +- sam_bt04_hit +- tik_bt01_shape +- tik_bt01_hit +- tik_bt02_shape +- tik_bt02_hit +- tik_bt03_shape +- tik_bt03_hit +- tik_bt04_shape +- tik_bt04_hit +- tik_bt05_shape +- tik_bt05_hit +- pra_bt01_shape +- pra_bt01_hit +- pra_bt02_shape +- pra_bt02_hit +- pra_bt03_shape +- pra_bt03_hit +- pra_bt04_shape +- pra_bt04_hit +- mac_bt01_shape +- mac_bt01_hit +- mac_bt02_shape +- mac_bt02_hit +- kpa_bt01_shape +- kpa_bt01_hit +- kpa_bt02_shape +- kpa_bt02_hit +- kpa_bt03_shape +- kpa_bt03_hit +- kpa_bt04_shape +- kpa_bt04_hit +- kpa_bt05_shape +- kpa_bt05_hit +- kpa_bt07_shape +- kpa_bt07_hit +- kpa_bt08_shape +- kpa_bt08_hit +- kpa_bt09_shape +- kpa_bt09_hit +- kpa_bt11_shape +- kpa_bt11_hit +- kpa_bt13_shape +- kpa_bt13_hit +- kpa_bt14_shape +- kpa_bt14_hit +- hos_bt01_shape +- hos_bt01_hit +- hos_bt02_shape +- hos_bt02_hit +- kkj_bt01_shape +- kkj_bt01_hit +- kkj_bt02_shape +- kkj_bt02_hit +- mac_tex +- tik_tex +- kgr_tex +- kmr_tex +- iwa_tex +- sbk_tex +- dro_tex +- isk_tex +- trd_tex +- nok_tex +- hos_tex +- kpa_tex +- osr_tex +- kkj_tex +- tst_tex +- jan_tex +- mim_tex +- obk_tex +- arn_tex +- dgb_tex +- kzn_tex +- flo_tex +- sam_tex +- pra_tex +- omo_tex +- end_tex +- mgm_tex +- gv__tex +- kmr_bg +- nok_bg +- name: sbk_bg + pal_count: 2 # sbk_bg has an alternative palette +- sbk3_bg +- iwa_bg +- hos_bg +- arn_bg +- obk_bg +- omo_bg +- yos_bg +- jan_bg +- fla_bg +- flb_bg +- sra_bg +- yki_bg +- sam_bg +- kpa_bg +- title_bg +- name: title_data + dump_raw: true + dump_raw_size: 0xCA26 + textures: + - [0x10, ia8, press_start, 128, 20] + - [0xA10, ia8, copyright, 144, 40] + - [0x2090, rgba32, logotype, 200, 112] +- party_kurio +- party_kameki +- party_pinki +- party_pareta +- party_resa +- party_akari +- party_opuku +- party_pokopi diff --git a/tools/splat_ext/mapfs_jp.yaml b/tools/splat_ext/mapfs_jp.yaml new file mode 100644 index 0000000000..bb2b1d201d --- /dev/null +++ b/tools/splat_ext/mapfs_jp.yaml @@ -0,0 +1,1039 @@ +- dro_01_shape +- dro_01_hit +- dro_02_shape +- dro_02_hit +- hos_00_shape +- hos_00_hit +- hos_01_shape +- hos_01_hit +- hos_02_shape +- hos_02_hit +- hos_03_shape +- hos_03_hit +- hos_04_shape +- hos_04_hit +- hos_05_shape +- hos_05_hit +- hos_06_shape +- hos_06_hit +- hos_10_shape +- hos_10_hit +- hos_20_shape +- hos_20_hit +- isk_01_shape +- isk_01_hit +- isk_02_shape +- isk_02_hit +- isk_03_shape +- isk_03_hit +- isk_04_shape +- isk_04_hit +- isk_05_shape +- isk_05_hit +- isk_06_shape +- isk_06_hit +- isk_07_shape +- isk_07_hit +- isk_08_shape +- isk_08_hit +- isk_09_shape +- isk_09_hit +- isk_10_shape +- isk_10_hit +- isk_11_shape +- isk_11_hit +- isk_12_shape +- isk_12_hit +- isk_13_shape +- isk_13_hit +- isk_14_shape +- isk_14_hit +- isk_16_shape +- isk_16_hit +- isk_18_shape +- isk_18_hit +- isk_19_shape +- isk_19_hit +- iwa_00_shape +- iwa_00_hit +- iwa_01_shape +- iwa_01_hit +- iwa_02_shape +- iwa_02_hit +- iwa_03_shape +- iwa_03_hit +- iwa_04_shape +- iwa_04_hit +- iwa_10_shape +- iwa_10_hit +- iwa_11_shape +- iwa_11_hit +- osr_00_shape +- osr_00_hit +- osr_01_shape +- osr_01_hit +- osr_02_shape +- osr_02_hit +- osr_03_shape +- osr_03_hit +- kkj_00_shape +- kkj_00_hit +- kkj_01_shape +- kkj_01_hit +- kkj_02_shape +- kkj_02_hit +- kkj_03_shape +- kkj_03_hit +- kkj_10_shape +- kkj_10_hit +- kkj_11_shape +- kkj_11_hit +- kkj_12_shape +- kkj_12_hit +- kkj_13_shape +- kkj_13_hit +- kkj_14_shape +- kkj_14_hit +- kkj_15_shape +- kkj_15_hit +- kkj_16_shape +- kkj_16_hit +- kkj_17_shape +- kkj_17_hit +- kkj_18_shape +- kkj_18_hit +- kkj_19_shape +- kkj_19_hit +- kkj_20_shape +- kkj_20_hit +- kkj_21_shape +- kkj_21_hit +- kkj_22_shape +- kkj_22_hit +- kkj_23_shape +- kkj_23_hit +- kkj_24_shape +- kkj_24_hit +- kkj_25_shape +- kkj_25_hit +- kkj_26_shape +- kkj_26_hit +- kkj_27_shape +- kkj_27_hit +- kkj_28_shape +- kkj_28_hit +- kkj_29_shape +- kkj_29_hit +- kmr_00_shape +- kmr_00_hit +- kmr_02_shape +- kmr_02_hit +- kmr_03_shape +- kmr_03_hit +- kmr_04_shape +- kmr_04_hit +- kmr_05_shape +- kmr_05_hit +- kmr_06_shape +- kmr_06_hit +- kmr_07_shape +- kmr_07_hit +- kmr_09_shape +- kmr_09_hit +- kmr_10_shape +- kmr_10_hit +- kmr_11_shape +- kmr_11_hit +- kmr_12_shape +- kmr_12_hit +- kmr_20_shape +- kmr_20_hit +- kmr_30_shape +- kmr_30_hit +- kpa_01_shape +- kpa_01_hit +- kpa_03_shape +- kpa_03_hit +- kpa_04_shape +- kpa_04_hit +- kpa_08_shape +- kpa_08_hit +- kpa_09_shape +- kpa_09_hit +- kpa_10_shape +- kpa_10_hit +- kpa_11_shape +- kpa_11_hit +- kpa_12_shape +- kpa_12_hit +- kpa_13_shape +- kpa_13_hit +- kpa_14_shape +- kpa_14_hit +- kpa_15_shape +- kpa_15_hit +- kpa_16_shape +- kpa_16_hit +- kpa_17_shape +- kpa_17_hit +- kpa_32_shape +- kpa_32_hit +- kpa_33_shape +- kpa_33_hit +- kpa_40_shape +- kpa_40_hit +- kpa_41_shape +- kpa_41_hit +- kpa_50_shape +- kpa_50_hit +- kpa_52_shape +- kpa_52_hit +- kpa_60_shape +- kpa_60_hit +- kpa_61_shape +- kpa_61_hit +- kpa_62_shape +- kpa_62_hit +- kpa_63_shape +- kpa_63_hit +- kpa_70_shape +- kpa_70_hit +- kpa_80_shape +- kpa_80_hit +- kpa_90_shape +- kpa_90_hit +- kpa_91_shape +- kpa_91_hit +- kpa_94_shape +- kpa_94_hit +- kpa_95_shape +- kpa_95_hit +- kpa_96_shape +- kpa_96_hit +- kpa_102_shape +- kpa_102_hit +- kpa_111_shape +- kpa_111_hit +- kpa_112_shape +- kpa_112_hit +- kpa_113_shape +- kpa_113_hit +- kpa_115_shape +- kpa_115_hit +- kpa_116_shape +- kpa_116_hit +- kpa_117_shape +- kpa_117_hit +- kpa_118_shape +- kpa_118_hit +- kpa_119_shape +- kpa_119_hit +- kpa_121_shape +- kpa_121_hit +- kpa_130_shape +- kpa_130_hit +- kpa_133_shape +- kpa_133_hit +- kpa_134_shape +- kpa_134_hit +- machi_shape +- machi_hit +- mac_00_shape +- mac_00_hit +- mac_01_shape +- mac_01_hit +- mac_02_shape +- mac_02_hit +- mac_03_shape +- mac_03_hit +- mac_04_shape +- mac_04_hit +- mac_05_shape +- mac_05_hit +- mac_06_shape +- mac_06_hit +- tik_01_shape +- tik_01_hit +- tik_02_shape +- tik_02_hit +- tik_03_shape +- tik_03_hit +- tik_04_shape +- tik_04_hit +- tik_05_shape +- tik_05_hit +- tik_06_shape +- tik_06_hit +- tik_07_shape +- tik_07_hit +- tik_08_shape +- tik_08_hit +- tik_09_shape +- tik_09_hit +- tik_10_shape +- tik_10_hit +- tik_12_shape +- tik_12_hit +- tik_14_shape +- tik_14_hit +- tik_15_shape +- tik_15_hit +- tik_17_shape +- tik_17_hit +- tik_18_shape +- tik_18_hit +- tik_19_shape +- tik_19_hit +- tik_20_shape +- tik_20_hit +- tik_21_shape +- tik_21_hit +- tik_22_shape +- tik_22_hit +- tik_23_shape +- tik_23_hit +- tik_25_shape +- tik_25_hit +- kgr_01_shape +- kgr_01_hit +- kgr_02_shape +- kgr_02_hit +- nok_01_shape +- nok_01_hit +- nok_02_shape +- nok_02_hit +- nok_03_shape +- nok_03_hit +- nok_04_shape +- nok_04_hit +- nok_11_shape +- nok_11_hit +- nok_12_shape +- nok_12_hit +- nok_13_shape +- nok_13_hit +- nok_14_shape +- nok_14_hit +- nok_15_shape +- nok_15_hit +- sbk_00_shape +- sbk_00_hit +- sbk_01_shape +- sbk_01_hit +- sbk_02_shape +- sbk_02_hit +- sbk_03_shape +- sbk_03_hit +- sbk_04_shape +- sbk_04_hit +- sbk_05_shape +- sbk_05_hit +- sbk_06_shape +- sbk_06_hit +- sbk_10_shape +- sbk_10_hit +- sbk_11_shape +- sbk_11_hit +- sbk_12_shape +- sbk_12_hit +- sbk_13_shape +- sbk_13_hit +- sbk_14_shape +- sbk_14_hit +- sbk_15_shape +- sbk_15_hit +- sbk_16_shape +- sbk_16_hit +- sbk_20_shape +- sbk_20_hit +- sbk_21_shape +- sbk_21_hit +- sbk_22_shape +- sbk_22_hit +- sbk_23_shape +- sbk_23_hit +- sbk_24_shape +- sbk_24_hit +- sbk_25_shape +- sbk_25_hit +- sbk_26_shape +- sbk_26_hit +- sbk_30_shape +- sbk_30_hit +- sbk_31_shape +- sbk_31_hit +- sbk_32_shape +- sbk_32_hit +- sbk_33_shape +- sbk_33_hit +- sbk_34_shape +- sbk_34_hit +- sbk_35_shape +- sbk_35_hit +- sbk_36_shape +- sbk_36_hit +- sbk_40_shape +- sbk_40_hit +- sbk_41_shape +- sbk_41_hit +- sbk_42_shape +- sbk_42_hit +- sbk_43_shape +- sbk_43_hit +- sbk_44_shape +- sbk_44_hit +- sbk_45_shape +- sbk_45_hit +- sbk_46_shape +- sbk_46_hit +- sbk_50_shape +- sbk_50_hit +- sbk_51_shape +- sbk_51_hit +- sbk_52_shape +- sbk_52_hit +- sbk_53_shape +- sbk_53_hit +- sbk_54_shape +- sbk_54_hit +- sbk_55_shape +- sbk_55_hit +- sbk_56_shape +- sbk_56_hit +- sbk_60_shape +- sbk_60_hit +- sbk_61_shape +- sbk_61_hit +- sbk_62_shape +- sbk_62_hit +- sbk_63_shape +- sbk_63_hit +- sbk_64_shape +- sbk_64_hit +- sbk_65_shape +- sbk_65_hit +- sbk_66_shape +- sbk_66_hit +- sbk_99_shape +- sbk_99_hit +- trd_00_shape +- trd_00_hit +- trd_01_shape +- trd_01_hit +- trd_02_shape +- trd_02_hit +- trd_03_shape +- trd_03_hit +- trd_04_shape +- trd_04_hit +- trd_05_shape +- trd_05_hit +- trd_06_shape +- trd_06_hit +- trd_07_shape +- trd_07_hit +- trd_08_shape +- trd_08_hit +- trd_09_shape +- trd_09_hit +- trd_10_shape +- trd_10_hit +- tst_01_shape +- tst_01_hit +- tst_02_shape +- tst_02_hit +- tst_03_shape +- tst_03_hit +- tst_04_shape +- tst_04_hit +- tst_10_shape +- tst_10_hit +- tst_11_shape +- tst_11_hit +- tst_12_shape +- tst_12_hit +- tst_13_shape +- tst_13_hit +- tst_20_shape +- tst_20_hit +- jan_00_shape +- jan_00_hit +- jan_01_shape +- jan_01_hit +- jan_02_shape +- jan_02_hit +- jan_03_shape +- jan_03_hit +- jan_04_shape +- jan_04_hit +- jan_05_shape +- jan_05_hit +- jan_06_shape +- jan_06_hit +- jan_07_shape +- jan_07_hit +- jan_08_shape +- jan_08_hit +- jan_09_shape +- jan_09_hit +- jan_10_shape +- jan_10_hit +- jan_11_shape +- jan_11_hit +- jan_12_shape +- jan_12_hit +- jan_13_shape +- jan_13_hit +- jan_14_shape +- jan_14_hit +- jan_15_shape +- jan_15_hit +- jan_16_shape +- jan_16_hit +- jan_17_shape +- jan_17_hit +- jan_18_shape +- jan_18_hit +- jan_19_shape +- jan_19_hit +- jan_22_shape +- jan_22_hit +- jan_23_shape +- jan_23_hit +- mim_01_shape +- mim_01_hit +- mim_02_shape +- mim_02_hit +- mim_03_shape +- mim_03_hit +- mim_04_shape +- mim_04_hit +- mim_05_shape +- mim_05_hit +- mim_06_shape +- mim_06_hit +- mim_07_shape +- mim_07_hit +- mim_08_shape +- mim_08_hit +- mim_09_shape +- mim_09_hit +- mim_10_shape +- mim_10_hit +- mim_11_shape +- mim_11_hit +- mim_12_shape +- mim_12_hit +- obk_01_shape +- obk_01_hit +- obk_02_shape +- obk_02_hit +- obk_03_shape +- obk_03_hit +- obk_04_shape +- obk_04_hit +- obk_05_shape +- obk_05_hit +- obk_06_shape +- obk_06_hit +- obk_07_shape +- obk_07_hit +- obk_08_shape +- obk_08_hit +- obk_09_shape +- obk_09_hit +- arn_02_shape +- arn_02_hit +- arn_03_shape +- arn_03_hit +- arn_04_shape +- arn_04_hit +- arn_05_shape +- arn_05_hit +- arn_07_shape +- arn_07_hit +- arn_08_shape +- arn_08_hit +- arn_09_shape +- arn_09_hit +- arn_10_shape +- arn_10_hit +- arn_11_shape +- arn_11_hit +- arn_12_shape +- arn_12_hit +- arn_13_shape +- arn_13_hit +- arn_20_shape +- arn_20_hit +- dgb_01_shape +- dgb_01_hit +- dgb_02_shape +- dgb_02_hit +- dgb_03_shape +- dgb_03_hit +- dgb_04_shape +- dgb_04_hit +- dgb_05_shape +- dgb_05_hit +- dgb_06_shape +- dgb_06_hit +- dgb_07_shape +- dgb_07_hit +- dgb_08_shape +- dgb_08_hit +- dgb_09_shape +- dgb_09_hit +- dgb_10_shape +- dgb_10_hit +- dgb_11_shape +- dgb_11_hit +- dgb_12_shape +- dgb_12_hit +- dgb_13_shape +- dgb_13_hit +- dgb_14_shape +- dgb_14_hit +- dgb_15_shape +- dgb_15_hit +- dgb_16_shape +- dgb_16_hit +- dgb_17_shape +- dgb_17_hit +- dgb_18_shape +- dgb_18_hit +- kzn_01_shape +- kzn_01_hit +- kzn_02_shape +- kzn_02_hit +- kzn_03_shape +- kzn_03_hit +- kzn_04_shape +- kzn_04_hit +- kzn_05_shape +- kzn_05_hit +- kzn_06_shape +- kzn_06_hit +- kzn_07_shape +- kzn_07_hit +- kzn_08_shape +- kzn_08_hit +- kzn_09_shape +- kzn_09_hit +- kzn_10_shape +- kzn_10_hit +- kzn_11_shape +- kzn_11_hit +- kzn_17_shape +- kzn_17_hit +- kzn_18_shape +- kzn_18_hit +- kzn_19_shape +- kzn_19_hit +- kzn_20_shape +- kzn_20_hit +- kzn_22_shape +- kzn_22_hit +- kzn_23_shape +- kzn_23_hit +- flo_00_shape +- flo_00_hit +- flo_03_shape +- flo_03_hit +- flo_07_shape +- flo_07_hit +- flo_08_shape +- flo_08_hit +- flo_09_shape +- flo_09_hit +- flo_10_shape +- flo_10_hit +- flo_11_shape +- flo_11_hit +- flo_12_shape +- flo_12_hit +- flo_13_shape +- flo_13_hit +- flo_14_shape +- flo_14_hit +- flo_15_shape +- flo_15_hit +- flo_16_shape +- flo_16_hit +- flo_17_shape +- flo_17_hit +- flo_18_shape +- flo_18_hit +- flo_19_shape +- flo_19_hit +- flo_21_shape +- flo_21_hit +- flo_22_shape +- flo_22_hit +- flo_23_shape +- flo_23_hit +- flo_24_shape +- flo_24_hit +- flo_25_shape +- flo_25_hit +- sam_01_shape +- sam_01_hit +- sam_02_shape +- sam_02_hit +- sam_03_shape +- sam_03_hit +- sam_04_shape +- sam_04_hit +- sam_05_shape +- sam_05_hit +- sam_06_shape +- sam_06_hit +- sam_07_shape +- sam_07_hit +- sam_08_shape +- sam_08_hit +- sam_09_shape +- sam_09_hit +- sam_10_shape +- sam_10_hit +- sam_11_shape +- sam_11_hit +- sam_12_shape +- sam_12_hit +- pra_01_shape +- pra_01_hit +- pra_02_shape +- pra_02_hit +- pra_03_shape +- pra_03_hit +- pra_04_shape +- pra_04_hit +- pra_05_shape +- pra_05_hit +- pra_09_shape +- pra_09_hit +- pra_10_shape +- pra_10_hit +- pra_11_shape +- pra_11_hit +- pra_13_shape +- pra_13_hit +- pra_14_shape +- pra_14_hit +- pra_15_shape +- pra_15_hit +- pra_16_shape +- pra_16_hit +- pra_18_shape +- pra_18_hit +- pra_19_shape +- pra_19_hit +- pra_20_shape +- pra_20_hit +- pra_21_shape +- pra_21_hit +- pra_22_shape +- pra_22_hit +- pra_29_shape +- pra_29_hit +- pra_31_shape +- pra_31_hit +- pra_32_shape +- pra_32_hit +- pra_33_shape +- pra_33_hit +- pra_34_shape +- pra_34_hit +- pra_35_shape +- pra_35_hit +- pra_40_shape +- pra_40_hit +- omo_01_shape +- omo_01_hit +- omo_02_shape +- omo_02_hit +- omo_03_shape +- omo_03_hit +- omo_04_shape +- omo_04_hit +- omo_05_shape +- omo_05_hit +- omo_06_shape +- omo_06_hit +- omo_07_shape +- omo_07_hit +- omo_08_shape +- omo_08_hit +- omo_09_shape +- omo_09_hit +- omo_10_shape +- omo_10_hit +- omo_11_shape +- omo_11_hit +- omo_12_shape +- omo_12_hit +- omo_13_shape +- omo_13_hit +- omo_14_shape +- omo_14_hit +- omo_15_shape +- omo_15_hit +- omo_16_shape +- omo_16_hit +- omo_17_shape +- omo_17_hit +- end_00_shape +- end_00_hit +- end_01_shape +- end_01_hit +- mgm_00_shape +- mgm_00_hit +- mgm_01_shape +- mgm_01_hit +- mgm_02_shape +- mgm_02_hit +- mgm_03_shape +- mgm_03_hit +- gv_01_shape +- gv_01_hit +- kmr_bt03_shape +- kmr_bt03_hit +- kmr_bt04_shape +- kmr_bt04_hit +- kmr_bt05_shape +- kmr_bt05_hit +- kmr_bt06_shape +- kmr_bt06_hit +- nok_bt01_shape +- nok_bt01_hit +- nok_bt02_shape +- nok_bt02_hit +- nok_bt03_shape +- nok_bt03_hit +- nok_bt04_shape +- nok_bt04_hit +- trd_bt00_shape +- trd_bt00_hit +- trd_bt01_shape +- trd_bt01_hit +- trd_bt02_shape +- trd_bt02_hit +- trd_bt03_shape +- trd_bt03_hit +- trd_bt04_shape +- trd_bt04_hit +- trd_bt05_shape +- trd_bt05_hit +- iwa_bt01_shape +- iwa_bt01_hit +- iwa_bt02_shape +- iwa_bt02_hit +- sbk_bt02_shape +- sbk_bt02_hit +- isk_bt01_shape +- isk_bt01_hit +- isk_bt02_shape +- isk_bt02_hit +- isk_bt03_shape +- isk_bt03_hit +- isk_bt04_shape +- isk_bt04_hit +- isk_bt05_shape +- isk_bt05_hit +- isk_bt06_shape +- isk_bt06_hit +- isk_bt07_shape +- isk_bt07_hit +- isk_bt08_shape +- isk_bt08_hit +- arn_bt01_shape +- arn_bt01_hit +- arn_bt02_shape +- arn_bt02_hit +- arn_bt03_shape +- arn_bt03_hit +- arn_bt04_shape +- arn_bt04_hit +- arn_bt05_shape +- arn_bt05_hit +- arn_bt06_shape +- arn_bt06_hit +- dgb_bt01_shape +- dgb_bt01_hit +- dgb_bt02_shape +- dgb_bt02_hit +- dgb_bt03_shape +- dgb_bt03_hit +- dgb_bt04_shape +- dgb_bt04_hit +- dgb_bt05_shape +- dgb_bt05_hit +- mim_bt01_shape +- mim_bt01_hit +- omo_bt01_shape +- omo_bt01_hit +- omo_bt02_shape +- omo_bt02_hit +- omo_bt03_shape +- omo_bt03_hit +- omo_bt04_shape +- omo_bt04_hit +- omo_bt05_shape +- omo_bt05_hit +- omo_bt06_shape +- omo_bt06_hit +- omo_bt07_shape +- omo_bt07_hit +- kgr_bt01_shape +- kgr_bt01_hit +- flo_bt01_shape +- flo_bt01_hit +- flo_bt02_shape +- flo_bt02_hit +- flo_bt03_shape +- flo_bt03_hit +- flo_bt04_shape +- flo_bt04_hit +- flo_bt05_shape +- flo_bt05_hit +- flo_bt06_shape +- flo_bt06_hit +- jan_bt00_shape +- jan_bt00_hit +- jan_bt01_shape +- jan_bt01_hit +- jan_bt02_shape +- jan_bt02_hit +- jan_bt03_shape +- jan_bt03_hit +- jan_bt04_shape +- jan_bt04_hit +- kzn_bt01_shape +- kzn_bt01_hit +- kzn_bt02_shape +- kzn_bt02_hit +- kzn_bt04_shape +- kzn_bt04_hit +- kzn_bt05_shape +- kzn_bt05_hit +- sam_bt01_shape +- sam_bt01_hit +- sam_bt02_shape +- sam_bt02_hit +- sam_bt03_shape +- sam_bt03_hit +- sam_bt04_shape +- sam_bt04_hit +- tik_bt01_shape +- tik_bt01_hit +- tik_bt02_shape +- tik_bt02_hit +- tik_bt03_shape +- tik_bt03_hit +- tik_bt04_shape +- tik_bt04_hit +- tik_bt05_shape +- tik_bt05_hit +- pra_bt01_shape +- pra_bt01_hit +- pra_bt02_shape +- pra_bt02_hit +- pra_bt03_shape +- pra_bt03_hit +- pra_bt04_shape +- pra_bt04_hit +- mac_bt01_shape +- mac_bt01_hit +- mac_bt02_shape +- mac_bt02_hit +- kpa_bt01_shape +- kpa_bt01_hit +- kpa_bt02_shape +- kpa_bt02_hit +- kpa_bt03_shape +- kpa_bt03_hit +- kpa_bt04_shape +- kpa_bt04_hit +- kpa_bt05_shape +- kpa_bt05_hit +- kpa_bt07_shape +- kpa_bt07_hit +- kpa_bt08_shape +- kpa_bt08_hit +- kpa_bt09_shape +- kpa_bt09_hit +- kpa_bt11_shape +- kpa_bt11_hit +- kpa_bt13_shape +- kpa_bt13_hit +- kpa_bt14_shape +- kpa_bt14_hit +- hos_bt01_shape +- hos_bt01_hit +- hos_bt02_shape +- hos_bt02_hit +- kkj_bt01_shape +- kkj_bt01_hit +- kkj_bt02_shape +- kkj_bt02_hit +- mac_tex +- tik_tex +- kgr_tex +- kmr_tex +- iwa_tex +- sbk_tex +- dro_tex +- isk_tex +- trd_tex +- nok_tex +- hos_tex +- kpa_tex +- osr_tex +- kkj_tex +- tst_tex +- jan_tex +- mim_tex +- obk_tex +- arn_tex +- dgb_tex +- kzn_tex +- flo_tex +- sam_tex +- pra_tex +- omo_tex +- end_tex +- mgm_tex +- gv__tex +- kmr_bg +- nok_bg +- name: sbk_bg + pal_count: 2 # sbk_bg has an alternative palette +- sbk3_bg +- iwa_bg +- hos_bg +- arn_bg +- obk_bg +- omo_bg +- yos_bg +- jan_bg +- fla_bg +- flb_bg +- sra_bg +- yki_bg +- sam_bg +- kpa_bg +- title_bg +- name: title_data + textures: + - [0x10, ci4, copyright, 128, 32] + - [0x810, pal, copyright] + - [0x830, ia8, press_start, 128, 32] + - [0x1830, rgba32, logotype, 272, 88] +- party_kurio +- party_kameki +- party_pinki +- party_pareta +- party_resa +- party_akari +- party_opuku +- party_pokopi diff --git a/tools/splat_ext/pm_map_data.py b/tools/splat_ext/pm_map_data.py index 3174e1a006..3d5e0908cc 100644 --- a/tools/splat_ext/pm_map_data.py +++ b/tools/splat_ext/pm_map_data.py @@ -1,5 +1,6 @@ from math import ceil import os, sys +import struct from pathlib import Path import crunch64 @@ -86,8 +87,22 @@ class N64SegPm_map_data(N64Segment): yaml=yaml, ) - with open(script_dir / "map_data.yaml") as f: - self.files = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader) + if "ver/ique" in str(options.opts.target_path): + cfg_name = "mapfs_ique.yaml" + elif "ver/jp" in str(options.opts.target_path): + cfg_name = "mapfs_jp.yaml" + else: + cfg_name = "mapfs.yaml" + + self.files = {} + with open(script_dir / cfg_name) as f: + mapfs_cfg = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader) + for file in mapfs_cfg: + if isinstance(file, dict): + self.files[file["name"]] = file.copy() + else: + name = file + self.files[name] = {"name": name} def split(self, rom_bytes): assert isinstance(self.rom_start, int) @@ -112,14 +127,16 @@ class N64SegPm_map_data(N64Segment): is_compressed = size != decompressed_size + if name == "end_data": + break + + assert self.files.get(name) is not None + if offset == 0: path = None else: path = fs_dir / add_file_ext(name) - if name == "end_data": - break - bytes_start = self.rom_start + 0x20 + offset bytes = rom_bytes[bytes_start : bytes_start + size] @@ -133,49 +150,59 @@ class N64SegPm_map_data(N64Segment): w = png.Writer(150, 105, palette=parse_palette(bytes[:0x200])) w.write_array(f, bytes[0x200:]) elif name == "title_data": - if "ver/us" in str(options.opts.target_path) or "ver/pal" in str(options.opts.target_path): - w = 200 - h = 112 - img = n64img.image.RGBA32(data=bytes[0x2210 : 0x2210 + w * h * 4], width=w, height=h) - img.write(fs_dir / "title/logotype.png") + textures = self.files[name]["textures"] + for tex in textures: + pos = tex[0] + imgtype = tex[1] + outname = tex[2] - w = 144 - h = 32 - img = n64img.image.IA8(data=bytes[0x10 : 0x10 + w * h], width=w, height=h) - img.write(fs_dir / "title/copyright.png") + if imgtype == "pal": + continue - w = 128 - h = 32 - img = n64img.image.IA8(data=bytes[0x1210 : 0x1210 + w * h], width=w, height=h) - img.write(fs_dir / "title/press_start.png") - else: - w = 272 - h = 88 - img = n64img.image.RGBA32(data=bytes[0x1830 : 0x1830 + w * h * 4], width=w, height=h) - img.write(fs_dir / "title/logotype.png") + w = tex[3] + h = tex[4] - w = 128 - h = 32 - img = n64img.image.CI4(data=bytes[0x10 : 0x10 + (w * h // 2)], width=w, height=h) - img.palette = parse_palette(bytes[0x810:0x830]) - img.write(fs_dir / "title/copyright.png") + if imgtype == "ia4": + img = n64img.image.IA4(data=bytes[pos : pos + w * h // 2], width=w, height=h) + elif imgtype == "ia8": + img = n64img.image.IA8(data=bytes[pos : pos + w * h], width=w, height=h) + elif imgtype == "ia16": + img = n64img.image.IA16(data=bytes[pos : pos + w * h * 2], width=w, height=h) + elif imgtype == "rgba16": + img = n64img.image.RGBA16(data=bytes[pos : pos + w * h * 2], width=w, height=h) + elif imgtype == "rgba32": + img = n64img.image.RGBA32(data=bytes[pos : pos + w * h * 4], width=w, height=h) + elif imgtype in ("ci4", "ci8"): + palette = next(filter(lambda x: x[1] == "pal" and x[2] == outname, textures)) + pal_pos = palette[0] + + if imgtype == "ci4": + img = n64img.image.CI4(data=bytes[pos : pos + w * h // 2], width=w, height=h) + img.palette = parse_palette(bytes[pal_pos : pal_pos + 0x20]) + elif imgtype == "ci8": + img = n64img.image.CI8(data=bytes[pos : pos + w * h], width=w, height=h) + img.palette = parse_palette(bytes[pal_pos : pal_pos + 0x200]) + else: + raise Exception(f"Invalid image type {imgtype}") + + img.write(fs_dir / "title" / f"{outname}.png") - w = 128 - h = 32 - img = n64img.image.IA8(data=bytes[0x830 : 0x830 + w * h], width=w, height=h) - img.write(fs_dir / "title/press_start.png") elif name.endswith("_bg"): + for i in range(self.files[name].get("pal_count", 1)): + header_offset = i * 0x10 + raster_offset, palette_offset, draw_pos, width, height = struct.unpack( + ">IIIHH", bytes[header_offset : header_offset + 0x10] + ) - def write_bg_png(bytes, path, header_offset=0): - header = bytes[header_offset : header_offset + 0x10] + raster_offset -= 0x80200000 + palette_offset -= 0x80200000 + assert draw_pos == 0x000C0014 - raster_offset = int.from_bytes(header[0:4], byteorder="big") - 0x80200000 - palette_offset = int.from_bytes(header[4:8], byteorder="big") - 0x80200000 - assert int.from_bytes(header[8:12], byteorder="big") == 0x000C0014 # draw pos - width = int.from_bytes(header[12:14], byteorder="big") - height = int.from_bytes(header[14:16], byteorder="big") + outname = name + if i >= 1: + outname += f".{i}" - with open(path, "wb") as f: + with open(fs_dir / "bg" / f"{outname}.png", "wb") as f: # CI-8 w = png.Writer( width, @@ -184,11 +211,6 @@ class N64SegPm_map_data(N64Segment): ) w.write_array(f, bytes[raster_offset:]) - write_bg_png(bytes, fs_dir / "bg" / f"{name}.png") - - # sbk_bg has an alternative palette - if name == "sbk_bg": - write_bg_png(bytes, fs_dir / "bg" / f"{name}.alt.png", header_offset=0x10) elif name.endswith("_tex"): TexArchive.extract(bytes, fs_dir / "tex" / name) else: @@ -196,6 +218,10 @@ class N64SegPm_map_data(N64Segment): with open(path, "wb") as f: f.write(bytes) + if self.files[name].get("dump_raw", False): + with open(fs_dir / f"{name}.raw.dat", "wb") as f: + f.write(rom_bytes[bytes_start : bytes_start + self.files[name]["dump_raw_size"]]) + asset_idx += 1 def get_linker_entries(self): @@ -203,10 +229,16 @@ class N64SegPm_map_data(N64Segment): fs_dir = options.opts.asset_path / self.dir / self.name + src_paths = [] + for name, file in self.files.items(): + src_paths.append(fs_dir / add_file_ext(name, linker=True)) + if file.get("dump_raw", False): + src_paths.append(fs_dir / f"{name}.raw.dat") + return [ LinkerEntry( self, - [fs_dir / add_file_ext(name, linker=True) for name in self.files], + src_paths, fs_dir.with_suffix(".dat"), ".data", ".data", diff --git a/ver/ique/splat.yaml b/ver/ique/splat.yaml index 974c8207e9..2a84fe628a 100644 --- a/ver/ique/splat.yaml +++ b/ver/ique/splat.yaml @@ -14655,7 +14655,7 @@ segments: - { start: 0x1943000, align: 8, type: pm_sprites, name: sprites } - [0x1B82208, bin] # still zero fill - [0x1B83000, bin, msg] # pm_msg (todo) - - [0x1E40000, bin, mapfs] # pm_map_data (todo) + - [0x1E40000, pm_map_data, mapfs] - { type: bin, start: 0x27FEE1E, subalign: 2 } # zero fill - [0x27FFFC0, bin] # ? - [0x2800000]