Skip to content

Commit

Permalink
Update splat to 0.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ethteck committed Feb 20, 2024
1 parent 562ccb6 commit c3cf156
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ rabbitizer
n64img
python-githooks
crunch64>=0.2.0
splat64>=0.21.5
splat64>=0.22.0
requests
14 changes: 2 additions & 12 deletions tools/splat_ext/pm_charset_palettes.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
from splat.segtypes.n64.segment import N64Segment
from splat.segtypes.n64.palette import iter_in_groups
from splat.util.color import unpack_color
from splat.segtypes.n64.palette import N64SegPalette
from splat.util import options
import png # type: ignore


def parse_palette(data):
palette = []

for a, b in iter_in_groups(data, 2):
palette.append(unpack_color([a, b]))

return palette


class N64SegPm_charset_palettes(N64Segment):
require_unique_name = False

Expand All @@ -34,7 +24,7 @@ def scan(self, rom_bytes):
self.palettes = []

for i in range(0, self.size, 0x10):
palette = parse_palette(data[i : i + 0x10])
palette = N64SegPalette.parse_palette_bytes(data[i : i + 0x10])
self.palettes.append(palette)

def split(self, rom_bytes):
Expand Down

0 comments on commit c3cf156

Please sign in to comment.