summaryrefslogtreecommitdiff
path: root/pokemontools/gfx.py
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2013-12-29 04:13:56 -0500
committeryenatch <yenatch@gmail.com>2013-12-29 04:13:56 -0500
commitc234cdd9036f8b6f55b9c26abcc75967e8485144 (patch)
tree85ef1da0a11a9772dfcfa8aef8753e8c0a7878d5 /pokemontools/gfx.py
parent51d6f1edca87b9e6c92d92219d143449b32412e2 (diff)
gfx: touch exported lz files so they don't get remade
Diffstat (limited to 'pokemontools/gfx.py')
-rw-r--r--pokemontools/gfx.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pokemontools/gfx.py b/pokemontools/gfx.py
index 147621b..04ccac5 100644
--- a/pokemontools/gfx.py
+++ b/pokemontools/gfx.py
@@ -1566,11 +1566,16 @@ def export_lz_to_png(filename):
"""
assert filename[-3:] == ".lz"
lz_data = open(filename, "rb").read()
+
bpp = Decompressed(lz_data).output
bpp_filename = filename.replace(".lz", ".2bpp")
to_file(bpp_filename, bpp)
+
export_2bpp_to_png(bpp_filename)
+ # touch the lz file so it doesn't get remade
+ os.utime(filename, None)
+
def dump_tileset_pngs():
"""
Convert .lz format tilesets into .png format tilesets.