You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
fix data-handling errors in gfx.py
This commit is contained in:
@@ -189,6 +189,7 @@ class Compressed:
|
|||||||
def __init__(self, image = None, mode = 'horiz', size = None):
|
def __init__(self, image = None, mode = 'horiz', size = None):
|
||||||
|
|
||||||
assert image, 'need something to compress!'
|
assert image, 'need something to compress!'
|
||||||
|
image = list(image)
|
||||||
self.image = image
|
self.image = image
|
||||||
self.pic = []
|
self.pic = []
|
||||||
self.animtiles = []
|
self.animtiles = []
|
||||||
@@ -1503,7 +1504,7 @@ def lz_to_png_by_file(filename):
|
|||||||
"""
|
"""
|
||||||
assert filename[-3:] == ".lz"
|
assert filename[-3:] == ".lz"
|
||||||
lz_data = open(filename, "rb").read()
|
lz_data = open(filename, "rb").read()
|
||||||
bpp = Decompressed(lz).output
|
bpp = Decompressed(lz_data).output
|
||||||
bpp_filename = filename.replace(".lz", ".2bpp")
|
bpp_filename = filename.replace(".lz", ".2bpp")
|
||||||
to_file(bpp_filename, bpp)
|
to_file(bpp_filename, bpp)
|
||||||
to_png(bpp_filename)
|
to_png(bpp_filename)
|
||||||
@@ -1620,4 +1621,3 @@ if __name__ == "__main__":
|
|||||||
mass_decompress()
|
mass_decompress()
|
||||||
if debug: print 'decompressed known gfx to pokecrystal/gfx/!'
|
if debug: print 'decompressed known gfx to pokecrystal/gfx/!'
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user