diff options
author | Marcus Huderle <huderlem@gmail.com> | 2015-10-19 20:35:42 -0700 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2015-10-19 20:35:42 -0700 |
commit | 23fb97bf2638fcab85e90c538033583c40fa32f7 (patch) | |
tree | 1901dc6b132b3a765558251371a1ce8df8d53bf9 /pokemontools/labels.py | |
parent | 2ca31f660bf00a2892b8c07c9c81d456dc9b67e7 (diff) | |
parent | 7a6efcfdf1500b01517c2bebf73313ec1ddee805 (diff) |
Merge pull request #94 from huderlem/master
Read labels from symfile, not mapfile.
Diffstat (limited to 'pokemontools/labels.py')
-rw-r--r-- | pokemontools/labels.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pokemontools/labels.py b/pokemontools/labels.py index 72700a5..59a6160 100644 --- a/pokemontools/labels.py +++ b/pokemontools/labels.py @@ -15,7 +15,7 @@ class Labels(object): Store all labels. """ - def __init__(self, config, filename="pokecrystal.map"): + def __init__(self, config, filename="pokecrystal.sym"): """ Setup the instance. """ @@ -27,18 +27,18 @@ class Labels(object): """ Handle anything requiring file-loading and such. """ - # Look for a mapfile if it's not given + # Look for a symfile if it's not given if not os.path.exists(self.path): - self.filename = find_mapfile_in_dir(self.config.path) + self.filename = find_symfile_in_dir(self.config.path) if self.filename == None: - raise Exception, "Couldn't find any mapfiles. Run rgblink -m to create a mapfile." + raise Exception, "Couldn't find any .sym files. Run rgblink -n to create a .sym file." self.path = os.path.join(self.config.path, self.filename) - self.labels = sym.read_mapfile(self.path) + self.labels = sym.read_symfile(self.path) -def find_mapfile_in_dir(path): +def find_symfile_in_dir(path): for filename in os.listdir(path): - if os.path.splitext(filename)[1] == '.map': + if os.path.splitext(filename)[1] == '.sym': return filename return None |