From e9b752fbed0534ff71826e3f0fab456ee196bfa4 Mon Sep 17 00:00:00 2001 From: LLCoolDave Date: Fri, 14 Jul 2017 16:11:07 +0200 Subject: [PATCH] Add fix for gtower exit point to enable it for dungeon shuffling. --- BaseClasses.py | 1 + Plando.py | 3 +++ Rom.py | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/BaseClasses.py b/BaseClasses.py index 2832be0b..d2ece29c 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -41,6 +41,7 @@ class World(object): self.fix_skullwoods_exit = self.shuffle not in ['vanilla', 'simple', 'restricted', 'dungeonssimple'] self.fix_palaceofdarkness_exit = self.shuffle not in ['vanilla', 'simple', 'restricted', 'dungeonssimple'] self.fix_trock_exit = self.shuffle not in ['vanilla', 'simple', 'restricted', 'dungeonssimple'] + self.fix_gtower_exit = self.goal != 'ganon' def get_region(self, regionname): if isinstance(regionname, Region): diff --git a/Plando.py b/Plando.py index 10c60434..a4ab418b 100644 --- a/Plando.py +++ b/Plando.py @@ -144,6 +144,9 @@ def fill_world(world, plando, text_patches): elif line.startswith('!fix_trock_exit'): _, trfstr = line.split(':', 1) world.fix_trock_exit = trfstr.strip().lower() == 'true' + elif line.startswith('!fix_gtower_exit'): + _, gtfstr = line.split(':', 1) + world.fix_gtower_exit = gtfstr.strip().lower() == 'true' elif line.startswith('!fix_pod_exit'): _, podestr = line.split(':', 1) world.fix_palaceofdarkness_exit = podestr.strip().lower() == 'true' diff --git a/Rom.py b/Rom.py index c59c9654..a8584e96 100644 --- a/Rom.py +++ b/Rom.py @@ -331,6 +331,11 @@ def patch_rom(world, rom, hashtable, quickswap=False, beep='normal', sprite=None if world.fix_trock_exit: rom.write_byte(0x15E1D, 0x34) + # fix ganons tower exit point + if world.fix_gtower_exit: + rom.write_byte(0x15E25, 0xA4) + # todo fix screen scrolling + # enable quick item swapping with L and R (ported by Amazing Ampharos) if quickswap: rom.write_bytes(0x107fb, [0x22, 0x50, 0xFF, 0x1F])