Fixed a few labeling bugs
11
Makefile
@ -7,7 +7,7 @@ MD5 := md5sum -c --quiet
|
||||
.SECONDEXPANSION:
|
||||
|
||||
poketools := extras/pokemontools
|
||||
gfx := $(PYTHON) $(poketools)/gfx.py
|
||||
gfx := $(PYTHON) gfx.py
|
||||
includes := $(PYTHON) $(poketools)/scan_includes.py
|
||||
|
||||
|
||||
@ -79,12 +79,13 @@ pngs:
|
||||
find . -iname "*.[12]bpp" -exec touch {} +
|
||||
find . -iname "*.lz" -exec touch {} +
|
||||
|
||||
%.2bpp: %.png ; @$(gfx) 2bpp $<
|
||||
%.1bpp: %.png ; @$(gfx) 1bpp $<
|
||||
%.lz: % ; @$(gfx) lz $<
|
||||
%.2bpp: %.png ; $(gfx) 2bpp $<
|
||||
%.1bpp: %.png ; $(gfx) 1bpp $<
|
||||
%.lz: % ; $(gfx) lz $<
|
||||
|
||||
|
||||
%.pal: ;
|
||||
%.pal: %.2bpp ;
|
||||
gfx/pics/%/normal.pal gfx/pics/%/bitmask.asm gfx/pics/%/frames.asm: gfx/pics/%/front.2bpp ;
|
||||
%.bin: ;
|
||||
%.blk: ;
|
||||
%.tilemap: ;
|
||||
|
@ -792,13 +792,13 @@ Function109c1c: ; 109c1c (42:5c1c)
|
||||
; 109c24 (42:5c24)
|
||||
|
||||
|
||||
CreditsBorderGFX: INCBIN "gfx/credits/border.w72.2bpp"
|
||||
CreditsBorderGFX: INCBIN "gfx/credits/border.2bpp"
|
||||
|
||||
CreditsMonsGFX:
|
||||
CreditsPichuGFX: INCBIN "gfx/credits/pichu.w32.2bpp"
|
||||
CreditsSmoochumGFX: INCBIN "gfx/credits/smoochum.w32.2bpp"
|
||||
CreditsDittoGFX: INCBIN "gfx/credits/ditto.w32.2bpp"
|
||||
CreditsIgglybuffGFX: INCBIN "gfx/credits/igglybuff.w32.2bpp"
|
||||
CreditsPichuGFX: INCBIN "gfx/credits/pichu.2bpp"
|
||||
CreditsSmoochumGFX: INCBIN "gfx/credits/smoochum.2bpp"
|
||||
CreditsDittoGFX: INCBIN "gfx/credits/ditto.2bpp"
|
||||
CreditsIgglybuffGFX: INCBIN "gfx/credits/igglybuff.2bpp"
|
||||
|
||||
|
||||
CreditsScript: ; 10acb4
|
||||
|
@ -1690,4 +1690,4 @@ PackMenuGFX:
|
||||
INCBIN "gfx/misc/pack_menu.2bpp"
|
||||
|
||||
PackGFX:
|
||||
INCBIN "gfx/misc/pack.w40.2bpp"
|
||||
INCBIN "gfx/misc/pack.2bpp"
|
||||
|
2
extras
@ -1 +1 @@
|
||||
Subproject commit bf76a6b84a2f57edbcd01d6b2841cb813b2afce4
|
||||
Subproject commit 5ad74a89aee5181b30eed0b11ef75c1b01ed41eb
|
102
gfx.py
Normal file
@ -0,0 +1,102 @@
|
||||
"""Supplementary scripts for graphics conversion."""
|
||||
|
||||
import os
|
||||
import argparse
|
||||
|
||||
from extras.pokemontools import gfx, lz
|
||||
|
||||
|
||||
# Graphics with inverted tilemaps that aren't covered by filepath_rules.
|
||||
pics = [
|
||||
'gfx/shrink1',
|
||||
'gfx/shrink2',
|
||||
]
|
||||
|
||||
def filepath_rules(filepath):
|
||||
"""Infer attributes of certain graphics by their location in the filesystem."""
|
||||
args = {}
|
||||
|
||||
filedir, filename = os.path.split(filepath)
|
||||
name, ext = os.path.splitext(filename)
|
||||
|
||||
if 'gfx/pics/' in filedir:
|
||||
if name == 'front':
|
||||
args['pal_file'] = os.path.join(filedir, 'normal.pal')
|
||||
args['pic'] = True
|
||||
args['animate'] = True
|
||||
elif name == 'back':
|
||||
args['pal_file'] = os.path.join(filedir, 'shiny.pal')
|
||||
args['pic'] = True
|
||||
|
||||
elif 'gfx/trainers' in filedir:
|
||||
args['pic'] = True
|
||||
|
||||
elif os.path.join(filedir, name) in pics:
|
||||
args['pic'] = True
|
||||
|
||||
if args.get('pal_file'):
|
||||
args['palout'] = args['pal_file']
|
||||
|
||||
if args.get('pic'):
|
||||
if ext == '.png':
|
||||
w, h = gfx.png.Reader(filepath).asRGBA8()[:2]
|
||||
w = min(w/8, h/8)
|
||||
args['pic_dimensions'] = w, w
|
||||
return args
|
||||
|
||||
|
||||
def to_1bpp(filename, **kwargs):
|
||||
_, ext = os.path.splitext(filename)
|
||||
if ext == '.1bpp': pass
|
||||
elif ext == '.2bpp': gfx.export_2bpp_to_1bpp(filename, **kwargs)
|
||||
elif ext == '.png': gfx.export_png_to_1bpp(filename, **kwargs)
|
||||
|
||||
def to_2bpp(filename, **kwargs):
|
||||
_, ext = os.path.splitext(filename)
|
||||
if ext == '.1bpp': gfx.export_1bpp_to_2bpp(filename, **kwargs)
|
||||
elif ext == '.2bpp': pass
|
||||
elif ext == '.png': gfx.export_png_to_2bpp(filename, **kwargs)
|
||||
|
||||
def to_png(filename, **kwargs):
|
||||
_, ext = os.path.splitext(filename)
|
||||
if ext == '.1bpp': gfx.export_1bpp_to_png(filename, **kwargs)
|
||||
elif ext == '.2bpp': gfx.export_2bpp_to_png(filename, **kwargs)
|
||||
elif ext == '.png': pass
|
||||
|
||||
def compress(filename, **kwargs):
|
||||
data = open(filename, 'rb').read()
|
||||
lz_data = lz.Compressed(data).output
|
||||
open(filename + '.lz', 'wb').write(bytearray(lz_data))
|
||||
|
||||
def decompress(filename, **kwargs):
|
||||
lz_data = open(filename, 'rb').read()
|
||||
data = lz.Decompressed(lz_data).output
|
||||
name, ext = os.path.splitext(filename)
|
||||
open(name, 'wb').write(bytearray(data))
|
||||
|
||||
|
||||
methods = {
|
||||
'2bpp': to_2bpp,
|
||||
'1bpp': to_1bpp,
|
||||
'png': to_png,
|
||||
'lz': compress,
|
||||
'unlz': decompress,
|
||||
}
|
||||
|
||||
def main(method_name, filenames=None):
|
||||
if filenames is None: filenames = []
|
||||
for filename in filenames:
|
||||
args = filepath_rules(filename)
|
||||
method = methods.get(method_name)
|
||||
if method:
|
||||
method(filename, **args)
|
||||
|
||||
def get_args():
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument('method_name')
|
||||
ap.add_argument('filenames', nargs='*')
|
||||
args = ap.parse_args()
|
||||
return args
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(**get_args().__dict__)
|
BIN
gfx/credits/border.png
Normal file
After Width: | Height: | Size: 139 B |
BIN
gfx/credits/ditto.png
Normal file
After Width: | Height: | Size: 377 B |
BIN
gfx/credits/igglybuff.png
Normal file
After Width: | Height: | Size: 482 B |
BIN
gfx/credits/pichu.png
Normal file
After Width: | Height: | Size: 348 B |
BIN
gfx/credits/smoochum.png
Normal file
After Width: | Height: | Size: 409 B |
BIN
gfx/credits/theend.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
gfx/misc/badges.png
Normal file
After Width: | Height: | Size: 517 B |
BIN
gfx/misc/font.png
Normal file
After Width: | Height: | Size: 770 B |
BIN
gfx/misc/font_battle_extra.png
Normal file
After Width: | Height: | Size: 280 B |
BIN
gfx/misc/font_extra.png
Normal file
After Width: | Height: | Size: 293 B |
BIN
gfx/misc/font_inversed.png
Normal file
After Width: | Height: | Size: 736 B |
@ -1 +0,0 @@
|
||||
ُطط؛<EFBFBD>}}<7D>{{}}<03>أ<EFBFBD><7F>أ<EFBFBD>{}}}{<07><01><7F>أ<EFBFBD>a}<7D>أ<EFBFBD>}}}}}}<7D><>ُُُُُ<D98F><D98F><EFBFBD><EFBFBD><EFBFBD>www<77><77>{woO7{}<7D><01>}9Um}}}<7D>}=]muy}<7D>ا؛}}}؛ا<D89B>}}<7F>ا؛}}u؛إ<D89B>}}w{}<7D><>{<><7F>}<7D><>ُُُُُُ<D98F>}}}}}<7D>ء<EFBFBD>}}؛؛ططُ<D8B7>}}mU99}<7D>9؛طُط؛9<D89B>}؛طُُُُ<D98F><01><>ُ<EFBFBD>؟<01><>ُ<EFBFBD><D98F><EFBFBD>ُ<EFBFBD><D98F><EFBFBD>ُ<EFBFBD><D98F><EFBFBD>ُ<EFBFBD><D98F><EFBFBD>هه<D987><D987>هه<D987><D987>هه<D987>هه<D987>ُكُُُُُك<D98F><D983>ُُُُُ<D98F><D98F><EFBFBD><EFBFBD>ا<EFBFBD>أ؛ء<D89B>؟؟؟<D89F><D89F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ء؟؟؟ء<D89F><D8A1><EFBFBD><EFBFBD>ء<EFBFBD><D8A1>ء<EFBFBD><D8A1><EFBFBD>أ<EFBFBD><D8A3>؟ء<D89F><D8A1>ٍُ<D98D>ُُُ<D98F><D98F><EFBFBD>ء<EFBFBD>ء<EFBFBD><D8A1><EFBFBD>؟؟؟<D89F>؛؛؛<D89B><D89B>ُ<EFBFBD>ُُُُ<D98F><D98F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>د<EFBFBD>؟؟<D89F><D89F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ُُُُُُُ<D98F><D98F><EFBFBD>mmmm<6D><6D><EFBFBD>أ<EFBFBD><D8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD><D8A3><EFBFBD>أ<EFBFBD><D8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>؟؟؟<D89F><D89F>ء<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>؟؟<D89F><D89F><EFBFBD>أ؟أ<D89F><D8A3><EFBFBD><EFBFBD>ُ<EFBFBD>ُُُ<D98F><D98F><EFBFBD><EFBFBD>؛؛؛؛أ<D89B><D8A3><EFBFBD>؛؛؛طُ<D8B7><D98F><EFBFBD>}mmU؛<55><D89B><EFBFBD>;طُط<D98F><D8B7><EFBFBD><EFBFBD>؛؛أ<D89B><D8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ه<EFBFBD><D987><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>طُط؛<D8B7>}}<7D>طا؛}}؛ا<D89B>ط}}}}<7D>ء<EFBFBD>ط<EFBFBD>ا<EFBFBD>أ؛ء<D89B>ط<EFBFBD>أ<EFBFBD><D8A3><EFBFBD>أ<EFBFBD>ط<EFBFBD>؛؛؛؛أ<D89B><D8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D>}ء<><D8A1>ء<EFBFBD>7<EFBFBD>w<EFBFBD><77><EFBFBD><EFBFBD><EFBFBD>?؟iضضضض<D8B6>?؟lًهُُ<D98F>?؟a<D89F>ف<EFBFBD>ء<EFBFBD>?<3F>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>?؟]<5D><>ً<EFBFBD><D98B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>هه<D987>ُ<EFBFBD><D98F><EFBFBD><EFBFBD>ouu<75><75><EFBFBD>'Wwwٍمىٍ<D989><D98D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1ه<31>هه<D987>هأأهه<D987>ه<EFBFBD><D987><EFBFBD><EFBFBD><EFBFBD><EFBFBD>دد<D8AF>د<EFBFBD><D8AF>ح<EFBFBD>3<EFBFBD><33>د?أ<><D8A3>؟ء<D89F><D8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>؛<EFBFBD><D89B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01>اُ<D8A7><D98F>ُا<D98F>mا؛؛اأ<D8A7>أ<EFBFBD><D8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>؛طُط؛<D8B7><D89B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>دد<D8AF><D8AF><EFBFBD><EFBFBD>ُ<EFBFBD>؟<D89F><7F><EFBFBD><EFBFBD><EFBFBD>ددُ<D8AF>ا؛؛اُ<D8A7>ُُ<D98F>ا<EFBFBD>99<39>ا<EFBFBD><D8A7>هاههه<D987><D987><EFBFBD><EFBFBD>9ّ<39><01><><EFBFBD><EFBFBD>ا<EFBFBD>9<EFBFBD><39><EFBFBD>كأ<D983>3<01><><EFBFBD><03>9<EFBFBD><39><EFBFBD><EFBFBD>?99<39><39><EFBFBD>9<>هدد<D8AF><D8AF><EFBFBD>9<EFBFBD>99<39><39><EFBFBD><EFBFBD>99<39><39><EFBFBD><EFBFBD>
|
BIN
gfx/misc/footprints.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
gfx/misc/pack.png
Normal file
After Width: | Height: | Size: 282 B |
BIN
gfx/misc/pack_f.png
Normal file
After Width: | Height: | Size: 356 B |