Update splat to 0.22.0

This commit is contained in:
Ethan 2024-02-20 16:37:02 +09:00
parent 562ccb68ad
commit c3cf1565fa
No known key found for this signature in database
GPG Key ID: 9BCC97FDA5482E7A
2 changed files with 3 additions and 13 deletions

View File

@ -13,5 +13,5 @@ rabbitizer
n64img
python-githooks
crunch64>=0.2.0
splat64>=0.21.5
splat64>=0.22.0
requests

View File

@ -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
@ -34,7 +24,7 @@ class N64SegPm_charset_palettes(N64Segment):
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):