From e74f9833a13efb4bc476684beed0c2cb6b2bc077 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Wed, 11 Sep 2013 10:53:49 -0500 Subject: [PATCH 1/3] update pokered_dir.py to use cwd for path This will be fixed when redtools is merged into the rest of the junk, but for now the path will just be the cwd. This is necessary for pokered gbz80disasm. --- redtools/pokered_dir.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/redtools/pokered_dir.py b/redtools/pokered_dir.py index 6913783..7d7056d 100644 --- a/redtools/pokered_dir.py +++ b/redtools/pokered_dir.py @@ -1,4 +1,6 @@ import os -#main dir of repo (simply one level up than here) -pokered_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +# TODO: use actual configuration +# Assume that the main pokered project dir is the current working directory +# (cwd). +pokered_dir = os.getcwd() From 435180a2cd2b12f515b44b21ce18e68f8863e2d0 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Wed, 11 Sep 2013 10:56:31 -0500 Subject: [PATCH 2/3] fix rom path in another redtool --- redtools/extract_maps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redtools/extract_maps.py b/redtools/extract_maps.py index bc0a193..1b22fd3 100644 --- a/redtools/extract_maps.py +++ b/redtools/extract_maps.py @@ -6,8 +6,8 @@ import json #parse hex values as base 16 (see calculate_pointer) base = 16 -#where to load the rom from -rom_filename = "../baserom.gbc" +# TODO: load the rom based on config.rom_path +rom_filename = os.path.join(os.getcwd(), "baserom.gbc") rom = None #load the rom later #map header pointers start at 0x1AE From ef77506d94991b5909473eb8c8902ee1415d727c Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Wed, 11 Sep 2013 10:57:05 -0500 Subject: [PATCH 3/3] also import os --- redtools/extract_maps.py | 1 + 1 file changed, 1 insertion(+) diff --git a/redtools/extract_maps.py b/redtools/extract_maps.py index 1b22fd3..d1f6b71 100644 --- a/redtools/extract_maps.py +++ b/redtools/extract_maps.py @@ -2,6 +2,7 @@ #date: 2012-01-02 #url: http://hax.iimarck.us/files/rbheaders.txt import json +import os #parse hex values as base 16 (see calculate_pointer) base = 16