From 1e480648b97fe4fb9184de0222cda6dd99207ec5 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 28 Oct 2020 07:55:29 +0100 Subject: [PATCH] use individual palette for sprite if it exists --- Rom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Rom.py b/Rom.py index 748e9040..7ac7fb78 100644 --- a/Rom.py +++ b/Rom.py @@ -597,9 +597,8 @@ class Sprite(object): def expand_color(i): return ((i & 0x1F) * 8, (i >> 5 & 0x1F) * 8, (i >> 10 & 0x1F) * 8) - raw_palette = Sprite.palette[:] # copy # turn palette data into a list of RGB tuples with 8 bit values - palette_as_colors = [expand_color(make_int16(chnk)) for chnk in array_chunk(raw_palette, 2)] + palette_as_colors = [expand_color(make_int16(chnk)) for chnk in array_chunk(self.palette, 2)] # split into palettes of 15 colors return array_chunk(palette_as_colors, 15)