diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-11-22 21:41:11 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-11-22 21:41:11 -0600 |
commit | a38a86806b6a72402d07482f7c259c8a4e522762 (patch) | |
tree | ec621da84db32e37b83e079b232635945fd3a576 | |
parent | bbebec611dbcfe0ea8e3f71188f6c7821878260b (diff) |
use default config in WRAMProcessor if available
Don't override the given configuration.
-rw-r--r-- | pokemontools/wram.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/pokemontools/wram.py b/pokemontools/wram.py index e1b9212..1f61ff5 100644 --- a/pokemontools/wram.py +++ b/pokemontools/wram.py @@ -99,9 +99,21 @@ class WRAMProcessor(object): self.config = config self.paths = {} - self.paths["wram"] = os.path.join(self.config.path, "wram.asm") - self.paths["hram"] = os.path.join(self.config.path, "hram.asm") - self.paths["gbhw"] = os.path.join(self.config.path, "gbhw.asm") + + if hasattr(self.config, "wram"): + self.paths["wram"] = self.config.wram + else: + self.paths["wram"] = os.path.join(self.config.path, "wram.asm") + + if hasattr(self.config, "hram"): + self.paths["hram"] = self.config.hram + else: + self.paths["hram"] = os.path.join(self.config.path, "hram.asm") + + if hasattr(self.config, "gbhw"): + self.paths["gbhw"] = self.config.gbhw + else: + self.paths["gbhw"] = os.path.join(self.config.path, "gbhw.asm") def initialize(self): """ |