From b4cedffe6562aecc3b7afe6c480427e05b8fa277 Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 16 Jan 2012 23:35:17 +0100 Subject: mapfile_tool handles the two projects now --- tools/mapfile_tool.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/mapfile_tool.py b/tools/mapfile_tool.py index 4ebd288..540d3e0 100755 --- a/tools/mapfile_tool.py +++ b/tools/mapfile_tool.py @@ -252,11 +252,13 @@ def do_module(src, dest): open(dest, 'w').write(yaml.dump(m)) -def do_project(f): +def do_project(f, already_done): proj = yaml.safe_load(open(f, 'r').read()) for m in proj['modules']: - do_module(m.replace('processed/', ''), m) + if m not in already_done: + already_done.add(m) + do_module(m.replace('processed/', ''), m) def main(): @@ -264,7 +266,9 @@ def main(): do_mapfile('kamek_pal.x', 'kamek_ntsc.x', fix_offs_ntsc_v1) do_mapfile('kamek_pal.x', 'kamek_ntsc2.x', fix_offs_ntsc_v2) - do_project('NewerProject.yaml') + already_done = set() + do_project('NewerProject.yaml', already_done) + do_project('NewerProjectKP.yaml', already_done) do_module('anotherhax.yaml', 'processed/anotherhax.yaml') -- cgit v1.2.3