summaryrefslogtreecommitdiff
path: root/wram.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-08-03 12:23:59 -0500
committerBryan Bishop <kanzure@gmail.com>2013-08-03 12:23:59 -0500
commitbc3502dc1fdb8a0f42ca0765e8f0d04b7d24f85f (patch)
treea4b87b9067ae009479de8efaa8131e33e299b023 /wram.py
parent21113e1852a7fcd84c256e9d29fcc8e02264e7b0 (diff)
fix path handling in wram.py
Otherwise pokecrystal doesn't compile anymore. This is because of how wram.asm, hram.asm and other files are parsed.
Diffstat (limited to 'wram.py')
-rw-r--r--wram.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wram.py b/wram.py
index 85057be..97f0604 100644
--- a/wram.py
+++ b/wram.py
@@ -53,7 +53,7 @@ def read_bss_sections(bss):
sections.append(section)
return sections
-wram_sections = read_bss_sections(open(os.path.join(path, '../wram.asm'), 'r').readlines())
+wram_sections = read_bss_sections(open(os.path.join(os.path.dirname(path), 'wram.asm'), 'r').readlines())
def make_wram_labels():
@@ -76,6 +76,6 @@ def scrape_constants(text):
text = text.split('\n')
return constants_to_dict([line for line in text if 'EQU' in line[:line.find(';')]])
-hram_constants = scrape_constants(open(os.path.join(path, '../hram.asm'),'r').readlines())
-gbhw_constants = scrape_constants(open(os.path.join(path, '../gbhw.asm'),'r').readlines())
+hram_constants = scrape_constants(open(os.path.join(os.path.dirname(path), 'hram.asm'),'r').readlines())
+gbhw_constants = scrape_constants(open(os.path.join(os.path.dirname(path), 'gbhw.asm'),'r').readlines())