mirror of https://github.com/pret/pokecrystal.git
Assume pokemon pics are 7x7 if not in base stats.
This commit is contained in:
parent
dd77706524
commit
f6fc07d1c9
5
gfx.py
5
gfx.py
|
@ -32,8 +32,11 @@ def get_base_stats():
|
|||
return base_stats
|
||||
|
||||
def get_pokemon_dimensions(name):
|
||||
try:
|
||||
if name == 'egg':
|
||||
return 5, 5
|
||||
if name == 'questionmark':
|
||||
return 7, 7
|
||||
if name.startswith('unown_'):
|
||||
name = 'unown'
|
||||
base_stats = get_base_stats()
|
||||
|
@ -43,6 +46,8 @@ def get_pokemon_dimensions(name):
|
|||
line = base_stats[start:end].replace(',', ' ')
|
||||
w, h = map(int, line.split()[1:3])
|
||||
return w, h
|
||||
except:
|
||||
return 7, 7
|
||||
|
||||
def filepath_rules(filepath):
|
||||
"""Infer attributes of certain graphics by their location in the filesystem."""
|
||||
|
|
Loading…
Reference in New Issue