From 7f524ee10aaaaf3bbc694f92c77f3e668b9853cb Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sun, 1 Sep 2024 20:20:38 +0900 Subject: [PATCH] Dep update & fix pip install (#1196) --- Jenkinsfile | 2 +- decomp.yaml | 41 +++++++++++++++++++ requirements.txt | 7 ++-- tools/splat_ext/pm_charset.py | 4 +- tools/splat_ext/pm_charset_palettes.py | 4 +- tools/splat_ext/pm_effect_loads.py | 4 +- tools/splat_ext/pm_effect_shims.py | 4 +- tools/splat_ext/pm_icons.py | 4 +- tools/splat_ext/pm_imgfx_data.py | 4 +- tools/splat_ext/pm_map_data.py | 4 +- tools/splat_ext/pm_msg.py | 4 +- tools/splat_ext/pm_sbn.py | 4 +- tools/splat_ext/pm_sprite_shading_profiles.py | 4 +- tools/splat_ext/pm_sprites.py | 4 +- ver/pal/splat.yaml | 3 +- 15 files changed, 69 insertions(+), 28 deletions(-) create mode 100644 decomp.yaml diff --git a/Jenkinsfile b/Jenkinsfile index 391934d3d6..431e0fdf93 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { sh 'curl -L "https://github.com/decompals/mips-binutils-2.6/releases/download/main/binutils-2.6-linux.tar.gz" | tar zx -C tools/build/cc/gcc2.7.2' sh 'curl -L "https://github.com/decompals/mips-binutils-egcs-2.9.5/releases/latest/download/mips-binutils-egcs-2.9.5-linux.tar.gz" | tar zx -C tools/build/cc/egcs' sh 'curl -L "https://github.com/decompals/mips-gcc-egcs-2.91.66/releases/latest/download/mips-gcc-egcs-2.91.66-linux.tar.gz" | tar zx -C tools/build/cc/egcs' - sh 'pip install -U -r requirements.txt' + sh 'pip install -U -r requirements.txt --break-system-packages' sh 'cargo install pigment64' sh 'cargo install crunch64-cli' sh './configure' diff --git a/decomp.yaml b/decomp.yaml new file mode 100644 index 0000000000..bc7ce42dee --- /dev/null +++ b/decomp.yaml @@ -0,0 +1,41 @@ +name: Paper Mario +github: https://github.com/pmret/papermario +platform: n64 +versions: +- name: us + fullname: US + paths: + baserom: "ver/us/baserom.z64" + build: "ver/us/build/papermario.z64" + asm: "ver/us/asm" + nonmatchings: "ver/us/asm/nonmatchings" + map: "ver/us/build/papermario.map" + elf: "ver/us/build/papermario.elf" +- name: pal + fullname: PAL + paths: + baserom: "ver/pal/baserom.z64" + build: "ver/pal/build/papermario.z64" + asm: "ver/pal/asm" + nonmatchings: "ver/pal/asm/nonmatchings" + map: "ver/pal/build/papermario.map" + elf: "ver/pal/build/papermario.elf" +- name: ique + fullname: iQue + paths: + baserom: "ver/ique/baserom.z64" + build: "ver/ique/build/papermario.z64" + asm: "ver/ique/asm" + nonmatchings: "ver/ique/asm/nonmatchings" + map: "ver/ique/build/papermario.map" + elf: "ver/ique/build/papermario.elf" +- name: jp + fullname: JP + paths: + baserom: "ver/jp/baserom.z64" + build: "ver/jp/build/papermario.z64" + asm: "ver/jp/asm" + nonmatchings: "ver/jp/asm/nonmatchings" + map: "ver/jp/build/papermario.map" + elf: "ver/jp/build/papermario.elf" +tools: diff --git a/requirements.txt b/requirements.txt index 7f4826ade8..12dc1fd2cc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,12 +6,11 @@ ninja_syntax msgpack pylibyaml tqdm -spimdisasm pygfxd intervaltree -rabbitizer n64img python-githooks -crunch64>=0.2.0 -splat64>=0.22.0 +crunch64>=0.5.1 +spimdisasm>=1.28.1 +splat64>=0.27.0 requests diff --git a/tools/splat_ext/pm_charset.py b/tools/splat_ext/pm_charset.py index 60de269c5f..61c33bade1 100644 --- a/tools/splat_ext/pm_charset.py +++ b/tools/splat_ext/pm_charset.py @@ -1,4 +1,4 @@ -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment from splat.util import options import png # type: ignore @@ -60,7 +60,7 @@ def get_palette_idx(charset_name, char_id): return pal_id -class N64SegPm_charset(N64Segment): +class N64SegPm_charset(Segment): def scan(self, rom_bytes): data = rom_bytes[self.rom_start : self.rom_end] diff --git a/tools/splat_ext/pm_charset_palettes.py b/tools/splat_ext/pm_charset_palettes.py index 48903c5b00..7e0f569573 100644 --- a/tools/splat_ext/pm_charset_palettes.py +++ b/tools/splat_ext/pm_charset_palettes.py @@ -1,10 +1,10 @@ -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment from splat.segtypes.n64.palette import N64SegPalette from splat.util import options import png # type: ignore -class N64SegPm_charset_palettes(N64Segment): +class N64SegPm_charset_palettes(Segment): require_unique_name = False def scan(self, rom_bytes): diff --git a/tools/splat_ext/pm_effect_loads.py b/tools/splat_ext/pm_effect_loads.py index 811231ef18..9278071af8 100644 --- a/tools/splat_ext/pm_effect_loads.py +++ b/tools/splat_ext/pm_effect_loads.py @@ -1,7 +1,7 @@ from dataclasses import dataclass from pathlib import Path from typing import List -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment from splat.util import options import yaml as yaml_loader @@ -43,7 +43,7 @@ def effects_from_yaml(yaml_path: Path) -> List[Effect]: return effects -class N64SegPm_effect_loads(N64Segment): +class N64SegPm_effect_loads(Segment): effects: List[Effect] = [] @staticmethod diff --git a/tools/splat_ext/pm_effect_shims.py b/tools/splat_ext/pm_effect_shims.py index ae5d35c320..c34571279e 100644 --- a/tools/splat_ext/pm_effect_shims.py +++ b/tools/splat_ext/pm_effect_shims.py @@ -1,11 +1,11 @@ from typing import List from yaml.loader import Loader -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment from splat.util import options import yaml as yaml_loader -class N64SegPm_effect_shims(N64Segment): +class N64SegPm_effect_shims(Segment): shims: List[str] = [] @staticmethod diff --git a/tools/splat_ext/pm_icons.py b/tools/splat_ext/pm_icons.py index c48370b6c8..732de51d8a 100644 --- a/tools/splat_ext/pm_icons.py +++ b/tools/splat_ext/pm_icons.py @@ -1,7 +1,7 @@ import os import re from pathlib import Path -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment import n64img.image from splat.util.color import unpack_color from common import iter_in_groups @@ -46,7 +46,7 @@ def parse_palette(data): return palette -class N64SegPm_icons(N64Segment): +class N64SegPm_icons(Segment): def split(self, rom_bytes): self.out_dir = options.opts.asset_path / "icon" diff --git a/tools/splat_ext/pm_imgfx_data.py b/tools/splat_ext/pm_imgfx_data.py index fa1de6f29b..dba97d7833 100644 --- a/tools/splat_ext/pm_imgfx_data.py +++ b/tools/splat_ext/pm_imgfx_data.py @@ -8,11 +8,11 @@ TOOLS_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(str(Path(TOOLS_DIR) / "build/imgfx")) from imgfx_data import Anim, Triangle, Vertex -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment from splat.util import log, options -class N64SegPm_imgfx_data(N64Segment): +class N64SegPm_imgfx_data(Segment): anims: List[Anim] = [] OUT_DIR: Path = options.opts.asset_path / "imgfx" diff --git a/tools/splat_ext/pm_map_data.py b/tools/splat_ext/pm_map_data.py index e3061feec5..6b25960c6e 100644 --- a/tools/splat_ext/pm_map_data.py +++ b/tools/splat_ext/pm_map_data.py @@ -4,7 +4,7 @@ import struct from pathlib import Path import crunch64 -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment from common import iter_in_groups from splat.util import options import png # type: ignore @@ -66,7 +66,7 @@ def add_file_ext(name: str, linker: bool = False) -> str: return name + ".bin" -class N64SegPm_map_data(N64Segment): +class N64SegPm_map_data(Segment): def __init__( self, rom_start, diff --git a/tools/splat_ext/pm_msg.py b/tools/splat_ext/pm_msg.py index d742158b94..952f960e3e 100644 --- a/tools/splat_ext/pm_msg.py +++ b/tools/splat_ext/pm_msg.py @@ -1,5 +1,5 @@ import shutil -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment from pathlib import Path from splat.util import options import re @@ -3273,7 +3273,7 @@ CHARSET_IQUE = { } -class N64SegPm_msg(N64Segment): +class N64SegPm_msg(Segment): def __init__( self, rom_start, diff --git a/tools/splat_ext/pm_sbn.py b/tools/splat_ext/pm_sbn.py index 9cd7a8f600..a7c8079c10 100644 --- a/tools/splat_ext/pm_sbn.py +++ b/tools/splat_ext/pm_sbn.py @@ -8,7 +8,7 @@ from typing import List # splat imports; will fail if script run directly try: - from splat.segtypes.n64.segment import N64Segment + from splat.segtypes.segment import Segment from splat.segtypes.linker_entry import LinkerEntry from splat.util import options @@ -542,7 +542,7 @@ class InitSongEntry: if splat_loaded: - class N64SegPm_sbn(N64Segment): + class N64SegPm_sbn(Segment): def split(self, rom_bytes): dir = options.opts.asset_path / self.dir / self.name data = rom_bytes[self.rom_start : self.rom_end] diff --git a/tools/splat_ext/pm_sprite_shading_profiles.py b/tools/splat_ext/pm_sprite_shading_profiles.py index 1b0b96b18c..f7c314c9ad 100644 --- a/tools/splat_ext/pm_sprite_shading_profiles.py +++ b/tools/splat_ext/pm_sprite_shading_profiles.py @@ -10,7 +10,7 @@ import json import struct from typing import Literal -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment from splat.util import options GROUPS = [ @@ -194,7 +194,7 @@ def extract(input_data: bytes, endian: Literal["big", "little"] = "big") -> str: ) -class N64SegPm_sprite_shading_profiles(N64Segment): +class N64SegPm_sprite_shading_profiles(Segment): OUT_DIR: Path = options.opts.asset_path / "sprite" def scan(self, rom_bytes): diff --git a/tools/splat_ext/pm_sprites.py b/tools/splat_ext/pm_sprites.py index 5a2184b7c1..007f945e77 100644 --- a/tools/splat_ext/pm_sprites.py +++ b/tools/splat_ext/pm_sprites.py @@ -12,7 +12,7 @@ import crunch64 import png # type: ignore import yaml as yaml_loader from n64img.image import CI4 -from splat.segtypes.n64.segment import N64Segment +from splat.segtypes.segment import Segment from splat.util import options from splat.util.color import unpack_color @@ -713,7 +713,7 @@ class NpcSprite: pretty_print_xml(xml, path / "SpriteSheet.xml") -class N64SegPm_sprites(N64Segment): +class N64SegPm_sprites(Segment): DEFAULT_NPC_SPRITE_NAMES = [f"{i:02X}" for i in range(0xEA)] def __init__(self, rom_start, rom_end, type, name, vram_start, args, yaml) -> None: diff --git a/ver/pal/splat.yaml b/ver/pal/splat.yaml index dcc32e7d27..c384529c86 100644 --- a/ver/pal/splat.yaml +++ b/ver/pal/splat.yaml @@ -507,7 +507,8 @@ segments: - [auto, palette, ui/move_partner_3] - [auto, palette, ui/move_partner_3.disabled] - [0x9B5A0] - - [0x9B5A8, rgba32, ui/stat_heart, 16, 16] + - [0x9B5A8, rgba32, ui/stat_heart, 16, 16, 0x408] + - [0x9B9A8] - [0x9B9B0, rgba32, ui/stat_flower, 16, 16] - [0x9BDB0] - start: 0xA1160