Revert bad merge.
"Merge pull request #317 from yenatch/pngs-kind-of" This reverts commit25025d1b6c
, reversing changes made to0d17d4a758
.
This commit is contained in:
17
gfx.py
17
gfx.py
@@ -12,17 +12,12 @@ pics = [
|
||||
'gfx/shrink2',
|
||||
]
|
||||
|
||||
cache = {}
|
||||
def get_cache(filename):
|
||||
global cache
|
||||
cached = cache.get(filename)
|
||||
if cached == None:
|
||||
cached = open(filename).read()
|
||||
cache[filename] = cached
|
||||
return cached
|
||||
|
||||
base_stats = None
|
||||
def get_base_stats():
|
||||
return get_cache('data/base_stats.asm')
|
||||
global base_stats
|
||||
if not base_stats:
|
||||
base_stats = open('data/base_stats.asm').read()
|
||||
return base_stats
|
||||
|
||||
def get_pokemon_dimensions(name):
|
||||
if name == 'egg':
|
||||
@@ -47,7 +42,7 @@ def filepath_rules(filepath):
|
||||
pokemon_name = ''
|
||||
|
||||
if 'gfx/pics/' in filedir:
|
||||
pokemon_name = filedir.split('/')[-1]
|
||||
pokemon_name = filedir.split('/')[3]
|
||||
if pokemon_name.startswith('unown_'):
|
||||
index = filedir.find(pokemon_name)
|
||||
if index != -1:
|
||||
|
Reference in New Issue
Block a user