ref: 2063814b75029fda768f3318dda0becf60a79bbd
parent: b62d644d93f4c435fab792278cf2754e72cf62a4
parent: 7f7f4612404b6c898d4cb50fb4468580dbd46910
author: Bryan Bishop <[email protected]>
date: Mon Feb 11 19:57:34 EST 2013
Merge pull request #109 from yenatch/master png export fixes
--- a/Makefile
+++ b/Makefile
@@ -38,18 +38,18 @@
cmp baserom.gbc $@
-@lzs: ${VERTGFX} ${HORIZGFX}
+lzs: ${VERTGFX} ${HORIZGFX}
-@pngs:
+pngs:
cd extras; python gfx.py mass-decompress; python gfx.py dump-pngs
[email protected]: tiles.png
+front.png: tiles.png
cd extras; python gfx.py png-to-lz --front $@ $(OBJECT_DIRECTORY)/tiles.2bpp
[email protected]:
+tiles.png:
cd extras; python gfx.py png-to-2bpp $@
[email protected]: ${VERTGFX}
+.png: ${VERTGFX}
cd extras; python gfx.py png-to-lz --vert $@
[email protected]: ${HORIZGFX}
+.png: ${HORIZGFX}
cd extras; python gfx.py png-to-lz $@
--- a/extras/gfx.py
+++ b/extras/gfx.py
@@ -610,7 +610,9 @@
self.tiles = transpose(self.tiles)
self.pic = connect(self.tiles)
+ self.output = self.pic + self.animtiles
+
def decompress(self):
"""replica of crystal's decompression"""
@@ -1428,13 +1430,16 @@
to_png(os.path.join(root, name))
def mass_to_colored_png(debug=False):
- # greyscale
+ # greyscale, unless a palette is detected
for root, dirs, files in os.walk('../gfx/'):
if 'pics' not in root and 'trainers' not in root:
for name in files:
if debug: print os.path.splitext(name), os.path.join(root, name)
if os.path.splitext(name)[1] == '.2bpp':
- to_png(os.path.join(root, name))
+ if name[:5]+'.pal' in files:
+ to_png(os.path.join(root, name), None, os.path.join(root, name[:-5]+'.pal'))
+ else:
+ to_png(os.path.join(root, name))
# only monster and trainer pics for now
for root, dirs, files in os.walk('../gfx/pics/'):
@@ -1449,7 +1454,7 @@
for name in files:
if debug: print os.path.splitext(name), os.path.join(root, name)
if os.path.splitext(name)[1] == '.2bpp':
- to_png(os.path.join(root, name), None, os.path.join(root, name[:-5] + '.pal'))
+ to_png(os.path.join(root, name), None, os.path.join(root, name[:-5]+'.pal'))
def mass_decompress(debug=False):