allow other files to import gfx.py

This commit is contained in:
yenatch 2013-01-02 04:37:45 -05:00
parent 91726b3a53
commit e91f41dd35

View File

@ -594,7 +594,8 @@ class Decompressed:
self.decompress()
debug = False
if debug: print '(' + hex(self.start) + ', ' + hex(self.start + self.address) + ')'
# print tuple containing start and end address
if debug: print '(' + hex(self.start) + ', ' + hex(self.start + self.address+1) + '),'
# only transpose pic
self.pic = []
@ -1155,7 +1156,7 @@ def decompress_title():
to_file(filename, gfx.output)
def decompress_all():
def decompress_all(debug = False):
"""decompress all known compressed data in baserom"""
#mkdir_p('../gfx/')
#mkdir_p('../gfx/frontpics/')
@ -1167,16 +1168,24 @@ def decompress_all():
#mkdir_p('../gfx/intro/')
#mkdir_p('../gfx/title/')
if debug: print 'fronts'
decompress_monsters(front)
if debug: print 'backs'
decompress_monsters(back)
if debug: print 'unown fronts'
decompress_unowns(front)
if debug: print 'unown backs'
decompress_unowns(back)
if debug: print 'trainers'
decompress_trainers()
if debug: print 'fx'
decompress_fx()
if debug: print 'intro'
decompress_intro()
if debug: print 'title'
decompress_title()
return
@ -1228,7 +1237,7 @@ def compress_monster_frontpic(id, fileout):
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('cmd', nargs='?', metavar='cmd', type=str)
parser.add_argument('arg1', nargs='?', metavar='arg1', type=str)