Adjust offsets for new rom

This commit is contained in:
pepperpow 2021-02-22 22:45:52 -06:00
parent 222784dbb6
commit 66c36ade04
1 changed files with 4 additions and 4 deletions

8
Rom.py
View File

@ -1149,8 +1149,8 @@ def patch_rom(world, rom, player, team, enemized):
rom.write_int32(0x18020C, 0) # starting time (in frames, sint32)
# set up goals for treasure hunt
rom.write_bytes(0x180163, [0x0E, 0x28] if world.treasure_hunt_icon[player] == 'Triforce Piece' else [0x0D, 0x28])
rom.write_int16(0x180166, world.treasure_hunt_count[player])
rom.write_int16(0x180163, world.treasure_hunt_count[player])
rom.write_bytes(0x180165, [0x0E, 0x28] if world.treasure_hunt_icon[player] == 'Triforce Piece' else [0x0D, 0x28])
rom.write_byte(0x180194, 1) # Must turn in triforced pieces (instant win not enabled)
rom.write_bytes(0x180213, [0x00, 0x01]) # Not a Tournament Seed
@ -1746,8 +1746,8 @@ def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, tri
rom.write_byte(0x65561, {'red': 0x05, 'blue': 0x0D, 'green': 0x19, 'yellow': 0x09}[color])
# set triforcehud
triforce_flag = (rom.read_byte(0x180165) & 0x80) | {'normal': 0x00, 'hide_goal': 0x01, 'hide_required': 0x02, 'hide_both': 0x03}[triforcehud]
rom.write_byte(0x180165, triforce_flag)
triforce_flag = (rom.read_byte(0x180167) & 0x80) | {'normal': 0x00, 'hide_goal': 0x01, 'hide_required': 0x02, 'hide_both': 0x03}[triforcehud]
rom.write_byte(0x180167, triforce_flag)
if z3pr:
def buildAndRandomize(option_name, mode):