mirror of
https://github.com/pmret/papermario.git
synced 2024-09-08 02:29:49 +02:00
Update splat to 0.22.0
This commit is contained in:
parent
562ccb68ad
commit
c3cf1565fa
@ -13,5 +13,5 @@ rabbitizer
|
||||
n64img
|
||||
python-githooks
|
||||
crunch64>=0.2.0
|
||||
splat64>=0.21.5
|
||||
splat64>=0.22.0
|
||||
requests
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user