From 001b6bc850b25f6cbd4d7a7cfa540c62cada88f6 Mon Sep 17 00:00:00 2001 From: yenatch Date: Thu, 26 Sep 2013 02:52:45 -0400 Subject: map_editor: create any pngs that don't exist yet --- pokemontools/map_editor.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pokemontools/map_editor.py') diff --git a/pokemontools/map_editor.py b/pokemontools/map_editor.py index efd9678..4970d9e 100644 --- a/pokemontools/map_editor.py +++ b/pokemontools/map_editor.py @@ -372,6 +372,9 @@ class Tileset: def get_tiles(self): filename = self.get_tileset_gfx_filename() + if not os.path.exists(filename): + import gfx + gfx.to_png(filename.replace('.png','.2bpp'), filename) self.img = Image.open(filename) self.img.width, self.img.height = self.img.size self.tiles = [] -- cgit v1.2.3