diff options
author | yenatch <yenatch@gmail.com> | 2013-09-26 02:52:45 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2013-09-26 02:52:45 -0400 |
commit | 001b6bc850b25f6cbd4d7a7cfa540c62cada88f6 (patch) | |
tree | 80d0877458d4a951752cd26015bfe38ae54b8f97 /pokemontools/map_editor.py | |
parent | 92eeee28dd0633655d331e658cdd3a5c6b5c6fab (diff) |
map_editor: create any pngs that don't exist yet
Diffstat (limited to 'pokemontools/map_editor.py')
-rw-r--r-- | pokemontools/map_editor.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 = [] |