From 0157f348cd46fce1bc6ff58a7eaec9f0a482f4be Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Fri, 10 Jul 2020 14:39:32 -0500 Subject: [PATCH] Adjuster can modify from patch files --- AdjusterMain.py | 4 ++++ Gui.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AdjusterMain.py b/AdjusterMain.py index d55d1ae3..6eac8e7c 100644 --- a/AdjusterMain.py +++ b/AdjusterMain.py @@ -11,6 +11,10 @@ def adjust(args): logger = logging.getLogger('Adjuster') logger.info('Patching ROM.') + if os.path.splitext(args.rom)[-1].lower() == '.bmbp': + import Patch + meta, args.rom = Patch.create_rom_file(args.rom) + if os.stat(args.rom).st_size in (0x200000, 0x400000) and os.path.splitext(args.rom)[-1].lower() == '.sfc': rom = LocalRom(args.rom, patch=False) else: diff --git a/Gui.py b/Gui.py index c7f5f91c..5a8f5f37 100755 --- a/Gui.py +++ b/Gui.py @@ -547,7 +547,7 @@ def guiMain(args=None): romEntry2 = Entry(romDialogFrame2, textvariable=romVar2) def RomSelect2(): - rom = filedialog.askopenfilename(filetypes=[("Rom Files", (".sfc", ".smc")), ("All Files", "*")]) + rom = filedialog.askopenfilename(filetypes=[("Rom Files", (".sfc", ".smc", ".bmbp")), ("All Files", "*")]) romVar2.set(rom) romSelectButton2 = Button(romDialogFrame2, text='Select Rom', command=RomSelect2)