From c9dfbbdd2b84410a59e161487ed704f711128976 Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 1 Sep 2024 20:02:08 +0900 Subject: [PATCH] Dep update & venv in Jenkins --- 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, 70 insertions(+), 27 deletions(-) create mode 100644 decomp.yaml diff --git a/Jenkinsfile b/Jenkinsfile index 391934d3d65..f9539d44c1e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,6 +17,8 @@ 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 'python3 -m venv jenkins_venv' + sh 'source jenkins_venv/bin/activate' sh 'pip install -U -r requirements.txt' sh 'cargo install pigment64' sh 'cargo install crunch64-cli' diff --git a/decomp.yaml b/decomp.yaml new file mode 100644 index 00000000000..bc7ce42dee1 --- /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 7f4826ade80..12dc1fd2ccc 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 60de269c5f4..61c33bade17 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 48903c5b003..7e0f569573d 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 811231ef181..9278071af8c 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 ae5d35c320d..c34571279e9 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 c48370b6c81..732de51d8ae 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 fa1de6f29b7..dba97d78334 100644 --- a/tools/splat_ext/pm_imgfx_data.py +++ b/tools/splat_ext/pm_imgfx_data.py @@ -8,11 +8,11 @@ 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 e3061feec53..6b25960c6e7 100644 --- a/tools/splat_ext/pm_map_data.py +++ b/tools/splat_ext/pm_map_data.py @@ -4,7 +4,7 @@ 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 d742158b944..952f960e3e8 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 @@ } -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 9cd7a8f6007..a7c8079c10a 100644 --- a/tools/splat_ext/pm_sbn.py +++ b/tools/splat_ext/pm_sbn.py @@ -8,7 +8,7 @@ # 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 @@ def __iter__(self): 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 1b0b96b18c5..f7c314c9add 100644 --- a/tools/splat_ext/pm_sprite_shading_profiles.py +++ b/tools/splat_ext/pm_sprite_shading_profiles.py @@ -10,7 +10,7 @@ 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 5a2184b7c1d..007f945e77a 100644 --- a/tools/splat_ext/pm_sprites.py +++ b/tools/splat_ext/pm_sprites.py @@ -12,7 +12,7 @@ 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 @@ def write_to_dir(self, path): 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 dcc32e7d27b..c384529c86b 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