Skip to content

Commit

Permalink
splat 0.27.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bates64 committed Aug 25, 2024
1 parent 8fdf1db commit 00438a1
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 29 deletions.
4 changes: 2 additions & 2 deletions tools/splat_ext/a.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
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


class N64SegA(N64Segment):
class N64SegA(Segment):
def get_linker_entries(self):
path = options.opts.asset_path / self.dir / (self.name + ".a")

Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_charset.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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]

Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_charset_palettes.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_effect_loads.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_effect_shims.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_icons.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_imgfx_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_map_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_msg.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -3273,7 +3273,7 @@
}


class N64SegPm_msg(N64Segment):
class N64SegPm_msg(Segment):
def __init__(
self,
rom_start,
Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_sbn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_sprite_shading_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tools/splat_ext/pm_sprites.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down
5 changes: 0 additions & 5 deletions ver/us/splat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6411,7 +6411,6 @@ segments:
- start: 0x59F530
type: .data
name: anim/unused_gfx
subalign: 8
subsegments:
- [0x59F530, vtx, vtx1]
- [0x59F6B0, vtx, vtx2]
Expand Down Expand Up @@ -6446,7 +6445,6 @@ segments:
- start: 0x5A2E80
type: .data
name: actor/lava_piranha
subalign: 8
subsegments:
- [0x5A2E80]
- [0x5A3020, ci4, lava_piranha_vine, 64, 32]
Expand Down Expand Up @@ -6592,7 +6590,6 @@ segments:
- start: 0x63F040
type: .data
name: actor/monstar
subalign: 8
subsegments:
- [0x63F040]
- [0x63F278, ci4, actor/img, 32, 32]
Expand All @@ -6601,7 +6598,6 @@ segments:
- start: 0x648860
type: .data
name: vtx
subalign: 8
subsegments:
- [0x648860, vtx, monstar_bubbles]
- [0x648C80]
Expand Down Expand Up @@ -8436,7 +8432,6 @@ segments:
- start: 0x8CC4F0
type: .data
name: kmr_04_5_foliage
subalign: 8
subsegments:
- [0x8CC4F0, ci4, hammer_block_message, 48, 48]
- [0x8CC970, palette, hammer_block_message]
Expand Down

0 comments on commit 00438a1

Please sign in to comment.