From 69198a5b3d75c1282b3f789fb378b9e50d8addd2 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sat, 29 Aug 2015 10:54:28 -0700 Subject: Fix graphics handling for unown and egg. --- gfx.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gfx.py b/gfx.py index 730c73451..9aed17939 100644 --- a/gfx.py +++ b/gfx.py @@ -20,6 +20,10 @@ def filepath_rules(filepath): name, ext = os.path.splitext(filename) if 'gfx/pics/' in filedir: + if 'unown' in filedir: + index = filedir.find('unown_') + if index != -1: + filedir = filedir[:index + len('unown')] + filedir[index + len('unown_a'):] if name == 'front': args['pal_file'] = os.path.join(filedir, 'normal.pal') args['pic'] = True @@ -35,7 +39,10 @@ def filepath_rules(filepath): args['pic'] = True if args.get('pal_file'): - args['palout'] = args['pal_file'] + if os.path.exists(args['pal_file']): + args['palout'] = args['pal_file'] + else: + del args['pal_file'] if args.get('pic'): if ext == '.png': -- cgit v1.2.3 From f0af75e8d203a731a8652901e7d3d621bd176fb0 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sat, 29 Aug 2015 11:02:56 -0700 Subject: Fix touching in make pngs. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e9a324c9c..e791e3491 100644 --- a/Makefile +++ b/Makefile @@ -76,8 +76,8 @@ pokecrystal.gbc: $(crystal_obj) pngs: find . -iname "*.lz" -exec $(gfx) unlz {} + find . -iname "*.[12]bpp" -exec $(gfx) png {} + - find . -iname "*.[12]bpp" -exec touch {} + - find . -iname "*.lz" -exec touch {} + + find . -iname "*.[12]bpp" -exec touch {} \; + find . -iname "*.lz" -exec touch {} \; %.2bpp: %.png ; $(gfx) 2bpp $< %.1bpp: %.png ; $(gfx) 1bpp $< -- cgit v1.2.3 From aa9fd87a0900a408443bcfe4ab2ddd7bd49c550c Mon Sep 17 00:00:00 2001 From: yenatch Date: Sat, 29 Aug 2015 11:03:09 -0700 Subject: Bump extras to fix invocation of gfx.export_2bpp_to_png. --- extras | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras b/extras index 5ad74a89a..3a6ef54a5 160000 --- a/extras +++ b/extras @@ -1 +1 @@ -Subproject commit 5ad74a89aee5181b30eed0b11ef75c1b01ed41eb +Subproject commit 3a6ef54a5e26644699b98d9b73998df5673f4e72 -- cgit v1.2.3