Merge branch 'BugFix' into DoorDev
This commit is contained in:
@@ -2027,18 +2027,19 @@ default_one_way_connections = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# For crossed
|
# For crossed
|
||||||
compass_data = { # offset from 0x122e17, sram storage, write offset from compass_w_addr, 0 = jmp or # of nops
|
# offset from 0x122e17, sram storage, write offset from compass_w_addr, 0 = jmp or # of nops, dungeon_id
|
||||||
'Hyrule Castle': (0x1, 0xc0, 0x16, 0),
|
compass_data = {
|
||||||
'Eastern Palace': (0x1C, 0xc1, 0x28, 0),
|
'Hyrule Castle': (0x1, 0xc0, 0x16, 0, 0x02),
|
||||||
'Desert Palace': (0x35, 0xc2, 0x4a, 0),
|
'Eastern Palace': (0x1C, 0xc1, 0x28, 0, 0x04),
|
||||||
'Agahnims Tower': (0x51, 0xc3, 0x5c, 0),
|
'Desert Palace': (0x35, 0xc2, 0x4a, 0, 0x06),
|
||||||
'Swamp Palace': (0x6A, 0xc4, 0x7e, 0),
|
'Agahnims Tower': (0x51, 0xc3, 0x5c, 0, 0x08),
|
||||||
'Palace of Darkness': (0x83, 0xc5, 0xa4, 0),
|
'Swamp Palace': (0x6A, 0xc4, 0x7e, 0, 0x0a),
|
||||||
'Misery Mire': (0x9C, 0xc6, 0xca, 0),
|
'Palace of Darkness': (0x83, 0xc5, 0xa4, 0, 0x0c),
|
||||||
'Skull Woods': (0xB5, 0xc7, 0xf0, 0),
|
'Misery Mire': (0x9C, 0xc6, 0xca, 0, 0x0e),
|
||||||
'Ice Palace': (0xD0, 0xc8, 0x102, 0),
|
'Skull Woods': (0xB5, 0xc7, 0xf0, 0, 0x10),
|
||||||
'Tower of Hera': (0xEB, 0xc9, 0x114, 0),
|
'Ice Palace': (0xD0, 0xc8, 0x102, 0, 0x12),
|
||||||
'Thieves Town': (0x106, 0xca, 0x138, 0),
|
'Tower of Hera': (0xEB, 0xc9, 0x114, 0, 0x14),
|
||||||
'Turtle Rock': (0x11F, 0xcb, 0x15e, 0),
|
'Thieves Town': (0x106, 0xca, 0x138, 0, 0x16),
|
||||||
'Ganons Tower': (0x13A, 0xcc, 0x170, 2)
|
'Turtle Rock': (0x11F, 0xcb, 0x15e, 0, 0x18),
|
||||||
|
'Ganons Tower': (0x13A, 0xcc, 0x170, 2, 0x1a)
|
||||||
}
|
}
|
||||||
|
|||||||
15
Rom.py
15
Rom.py
@@ -2096,8 +2096,19 @@ def compass_code_good(rom):
|
|||||||
|
|
||||||
def update_compasses(rom, world, player):
|
def update_compasses(rom, world, player):
|
||||||
layouts = world.dungeon_layouts[player]
|
layouts = world.dungeon_layouts[player]
|
||||||
|
# cmp XX : bne escape
|
||||||
|
# cpy 32 : bne escape
|
||||||
|
# brl .itemCounts
|
||||||
|
# c9 02 d0 eastern
|
||||||
|
# nop #2
|
||||||
|
new_code = [0x07, 0xC0, 0x32, 0xD0, 0x03, 0x82, 0xB9, 0x01, 0xC9, 0x02, 0xD0, 0x10, 0xEA, 0xEA]
|
||||||
|
rom.write_bytes(compass_w_addr + 8, new_code)
|
||||||
|
# 05 06 07 08
|
||||||
|
# C9 00 D0 02 80 04 C9 02 D0 15 C0 32 D0 03 82 B3 01
|
||||||
|
# C9 XX D0 07 C0 32 D0 03 82 B9 01 C9 02 D0 10 EA EA
|
||||||
|
|
||||||
for name, builder in layouts.items():
|
for name, builder in layouts.items():
|
||||||
digit_offset, sram_byte, write_offset, jmp_nop_flag = compass_data[name]
|
digit_offset, sram_byte, write_offset, jmp_nop_flag, dungeon_id = compass_data[name]
|
||||||
digit1 = builder.location_cnt // 10
|
digit1 = builder.location_cnt // 10
|
||||||
digit2 = builder.location_cnt % 10
|
digit2 = builder.location_cnt % 10
|
||||||
rom.write_byte(compass_r_addr+digit_offset, 0x90+digit1)
|
rom.write_byte(compass_r_addr+digit_offset, 0x90+digit1)
|
||||||
@@ -2122,6 +2133,8 @@ def update_compasses(rom, world, player):
|
|||||||
else:
|
else:
|
||||||
for i in range(0, jmp_nop_flag):
|
for i in range(0, jmp_nop_flag):
|
||||||
rom.write_byte(write_address+9+i, 0xea) # nop
|
rom.write_byte(write_address+9+i, 0xea) # nop
|
||||||
|
if builder.bk_provided:
|
||||||
|
rom.write_byte(compass_w_addr+6, dungeon_id)
|
||||||
|
|
||||||
|
|
||||||
InconvenientDungeonEntrances = {'Turtle Rock': 'Turtle Rock Main',
|
InconvenientDungeonEntrances = {'Turtle Rock': 'Turtle Rock Main',
|
||||||
|
|||||||
Reference in New Issue
Block a user