fix accidental sprite palette overrides

This commit is contained in:
Fabian Dill 2020-10-28 07:53:31 +01:00
parent 7f4978c4b3
commit dbb4acf045
1 changed files with 1 additions and 3 deletions

4
Rom.py
View File

@ -597,9 +597,7 @@ class Sprite(object):
def expand_color(i):
return ((i & 0x1F) * 8, (i >> 5 & 0x1F) * 8, (i >> 10 & 0x1F) * 8)
raw_palette = self.palette
if raw_palette is None:
raw_palette = Sprite.default_palette
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)]