mirror of https://github.com/pret/pokecrystal.git
more docstring/indent fixes in gfx.py
This commit is contained in:
parent
3ee5295ee3
commit
a60bf16901
|
@ -743,12 +743,16 @@ class Decompressed:
|
||||||
self.output.append(flipped)
|
self.output.append(flipped)
|
||||||
|
|
||||||
def doReverse(self):
|
def doReverse(self):
|
||||||
"""Repeat reversed bytes from 2bpp output."""
|
"""
|
||||||
|
Repeat reversed bytes from 2bpp output.
|
||||||
|
"""
|
||||||
for byte in range(self.length):
|
for byte in range(self.length):
|
||||||
self.output.append(self.output[self.displacement-byte])
|
self.output.append(self.output[self.displacement-byte])
|
||||||
|
|
||||||
def doRepeat(self):
|
def doRepeat(self):
|
||||||
"""Repeat bytes from 2bpp output."""
|
"""
|
||||||
|
Repeat bytes from 2bpp output.
|
||||||
|
"""
|
||||||
for byte in range(self.length):
|
for byte in range(self.length):
|
||||||
self.output.append(self.output[self.displacement+byte])
|
self.output.append(self.output[self.displacement+byte])
|
||||||
|
|
||||||
|
@ -1337,7 +1341,7 @@ def to_png(filein, fileout=None, pal_file=None, height=None, width=None):
|
||||||
|
|
||||||
def to_2bpp(filein, fileout=None, palout=None):
|
def to_2bpp(filein, fileout=None, palout=None):
|
||||||
"""
|
"""
|
||||||
Takes a png and converts it to planar 2bpp.
|
Take a png and converts it to planar 2bpp.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if fileout == None: fileout = '.'.join(filein.split('.')[:-1]) + '.2bpp'
|
if fileout == None: fileout = '.'.join(filein.split('.')[:-1]) + '.2bpp'
|
||||||
|
@ -1541,7 +1545,7 @@ def append_terminator_to_lzs(directory):
|
||||||
|
|
||||||
def lz_to_png_by_file(filename):
|
def lz_to_png_by_file(filename):
|
||||||
"""
|
"""
|
||||||
Converts a lz file to png. Dumps a 2bpp file too.
|
Convert a lz file to png. Dump a 2bpp file too.
|
||||||
"""
|
"""
|
||||||
assert filename[-3:] == ".lz"
|
assert filename[-3:] == ".lz"
|
||||||
lz_data = open(filename, "rb").read()
|
lz_data = open(filename, "rb").read()
|
||||||
|
@ -1552,7 +1556,7 @@ def lz_to_png_by_file(filename):
|
||||||
|
|
||||||
def dump_tileset_pngs():
|
def dump_tileset_pngs():
|
||||||
"""
|
"""
|
||||||
Converts .lz format tilesets into .png format tilesets.
|
Convert .lz format tilesets into .png format tilesets.
|
||||||
|
|
||||||
Also, leaves a bunch of wonderful .2bpp files everywhere for
|
Also, leaves a bunch of wonderful .2bpp files everywhere for
|
||||||
your amusement.
|
your amusement.
|
||||||
|
|
Loading…
Reference in New Issue