Skip to content

Commit

Permalink
Fixed a few spiral bugs
Browse files Browse the repository at this point in the history
Fixed a problem with door pairing system
  • Loading branch information
aerinon committed Oct 6, 2019
1 parent 92ad60b commit 19a78f2
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
*_Spoiler.txt
*.pyc
*.sfc
*.srm
*.bst
*.wixobj
build
bundle/components.wxs
Expand All @@ -12,4 +14,6 @@ README.html
*multidata
*multisave
EnemizerCLI/
.mypy_cache/
.mypy_cache/
venv
test
2 changes: 1 addition & 1 deletion DoorShuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ def reassign_key_doors(current_doors, proposal, world, player):
while len(queue) > 0:
d = queue.pop()
if d.type is DoorType.SpiralStairs and d not in proposal:
world.get_room(d.roomIndex, player).change(d.doorListPos, DoorKind.Normal)
world.get_room(d.roomIndex, player).change(d.doorListPos, DoorKind.IncognitoEntrance)
d.smallKey = False
elif d.type is DoorType.Interior and d not in flat_proposal and d.dest not in flat_proposal:
world.get_room(d.roomIndex, player).change(d.doorListPos, DoorKind.Normal)
Expand Down
16 changes: 8 additions & 8 deletions Doors.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,28 +220,28 @@ def create_doors(world, player):
create_dir_door(player, 'Tower Gold Knights SW', DoorType.Interior, Direction.South, 0xe0, Left, High).pos(1),
create_dir_door(player, 'Tower Gold Knights EN', DoorType.Interior, Direction.East, 0xe0, Top, High).pos(0),
create_dir_door(player, 'Tower Room 03 WN', DoorType.Interior, Direction.West, 0xe0, Bot, High).pos(0),
create_spiral_stairs(player, 'Tower Room 03 Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xe0, 0, HTH, S, 0x1a, 0x6c).small_key().pos(2),
create_spiral_stairs(player, 'Tower Lone Statue Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xd0, 0, HTH, S, 0x11, 0x80),
create_spiral_stairs(player, 'Tower Room 03 Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xe0, 0, HTH, S, 0x1a, 0x6c, True, True).small_key().pos(2),
create_spiral_stairs(player, 'Tower Lone Statue Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xd0, 0, HTH, S, 0x11, 0x80, True, True),
create_dir_door(player, 'Tower Lone Statue WN', DoorType.Interior, Direction.West, 0xd0, Top, High).pos(1),
create_dir_door(player, 'Tower Dark Maze EN', DoorType.Interior, Direction.East, 0xd0, Top, High).pos(1),
create_dir_door(player, 'Tower Dark Maze ES', DoorType.Interior, Direction.East, 0xd0, Bot, High).small_key().pos(0),
create_dir_door(player, 'Tower Dark Chargers WS', DoorType.Interior, Direction.West, 0xd0, Bot, High).small_key().pos(0),
create_spiral_stairs(player, 'Tower Dark Chargers Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xd0, 2, HTH, X, 0x1b, 0x8c),
create_spiral_stairs(player, 'Tower Dual Statues Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xc0, 2, HTH, X, 0x12, 0xa0),
create_spiral_stairs(player, 'Tower Dark Chargers Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xd0, 2, HTH, X, 0x1b, 0x8c, True, True),
create_spiral_stairs(player, 'Tower Dual Statues Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xc0, 2, HTH, X, 0x12, 0xa0, True, True),
create_dir_door(player, 'Tower Dual Statues WS', DoorType.Interior, Direction.West, 0xc0, Bot, High).pos(1),
create_dir_door(player, 'Tower Dark Pits ES', DoorType.Interior, Direction.East, 0xc0, Bot, High).pos(1),
create_dir_door(player, 'Tower Dark Pits EN', DoorType.Interior, Direction.East, 0xc0, Top, High).pos(0),
create_dir_door(player, 'Tower Dark Archers WN', DoorType.Interior, Direction.West, 0xc0, Top, High).pos(0),
create_spiral_stairs(player, 'Tower Dark Archers Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xc0, 0, HTH, S, 0x1b, 0x6c).small_key().pos(2),
create_spiral_stairs(player, 'Tower Red Spears Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xb0, 0, HTH, S, 0x12, 0x80),
create_spiral_stairs(player, 'Tower Dark Archers Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xc0, 0, HTH, S, 0x1b, 0x6c, True, True).small_key().pos(2),
create_spiral_stairs(player, 'Tower Red Spears Down Stairs', DoorType.SpiralStairs, Direction.Down, 0xb0, 0, HTH, S, 0x12, 0x80, True, True),
create_dir_door(player, 'Tower Red Spears WN', DoorType.Interior, Direction.West, 0xb0, Top, High).pos(1),
create_dir_door(player, 'Tower Red Guards EN', DoorType.Interior, Direction.East, 0xb0, Top, High).pos(1),
create_dir_door(player, 'Tower Red Guards SW', DoorType.Interior, Direction.South, 0xb0, Left, High).pos(0),
create_dir_door(player, 'Tower Circle of Pots NW', DoorType.Interior, Direction.North, 0xb0, Left, High).pos(0),
create_dir_door(player, 'Tower Circle of Pots WS', DoorType.Interior, Direction.West, 0xb0, Bot, High).small_key().pos(2),
create_dir_door(player, 'Tower Pacifist Run ES', DoorType.Interior, Direction.East, 0xb0, Bot, High).small_key().pos(2),
create_spiral_stairs(player, 'Tower Pacifist Run Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xb0, 2, LTH, X, 0x33, 0x8c),
create_spiral_stairs(player, 'Tower Push Statue Down Stairs', DoorType.SpiralStairs, Direction.Down, 0x40, 0, HTL, X, 0x12, 0xa0),
create_spiral_stairs(player, 'Tower Pacifist Run Up Stairs', DoorType.SpiralStairs, Direction.Up, 0xb0, 2, LTH, X, 0x33, 0x8c, True, True),
create_spiral_stairs(player, 'Tower Push Statue Down Stairs', DoorType.SpiralStairs, Direction.Down, 0x40, 0, HTL, X, 0x12, 0xa0, True, True),
create_dir_door(player, 'Tower Push Statue WS', DoorType.Interior, Direction.West, 0x40, Bot, Low).pos(0),
create_dir_door(player, 'Tower Catwalk ES', DoorType.Interior, Direction.East, 0x40, Bot, Low).pos(0),
create_dir_door(player, 'Tower Catwalk North Stairs', DoorType.StraightStairs, Direction.North, 0x40, Left, High),
Expand Down
2 changes: 1 addition & 1 deletion Rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '6f23a17f80179af941518585f2b27d52'
RANDOMIZERBASEHASH = 'fdf74815ca2ad15186daa9de3e68cecb'


class JsonRom(object):
Expand Down
4 changes: 2 additions & 2 deletions RoomData.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ def __init__(self, door_a, door_b):

def address_a(self, world, player):
d = world.check_for_door(self.door_a, player)
return 0x13C000 + door_pair_offset_table[d.roomIndex]*2
return 0x13C000 + (door_pair_offset_table[d.roomIndex]+d.doorListPos)*2

def address_b(self, world, player):
d = world.check_for_door(self.door_b, player)
return 0x13C000 + door_pair_offset_table[d.roomIndex]*2
return 0x13C000 + (door_pair_offset_table[d.roomIndex]+d.doorListPos)*2

def rom_data_a(self, world, player):
if not self.pair:
Expand Down
3 changes: 2 additions & 1 deletion asm/spiral.asm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ SpiralWarp: {
lda $01 : and #$80 : beq .set53
; if target is also up adjust by (-6, 14)
lda #$fa : !add $20 : sta $20 : lda #$14 : !add $22 : sta $22
bne .set53 : inc $23
.set53
txa : !add $22 : sta $53

Expand Down Expand Up @@ -96,8 +97,8 @@ LookupSpiralOffset: {
.q1diff lda $22 : cmp #$98 : bcc .done ;swamp/pod dual stairs
inc $01 : bra .done
.quad2 ;ice room
lda $040c : cmp $12 : bne .done
lda #$03 : sta $01
lda $040c : cmp $12 : bne .done
lda $22 : cmp #$78 : bcc .done
inc $01 : bra .done
.quad3 lda #$02 : sta $01 ; always 2
Expand Down
2 changes: 1 addition & 1 deletion data/base2current.json

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions notes.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
Notes:

Zero camera out skips quad logic

(Fixed?) HD Staircase up to HC Main Map Room was wrong location
(Fixed?) Key door between Hyrule Castle East Hall S <=> Sewers Key Rat Key Door N not paired
(Testing) Camera spots in Aga Tower: Push Statue, Lone Statue maybe?
(Fixed?) Spiral stairs without keys look funny - change to Incognito instead of Normal

The armory guard room and the room above have fake layers. Shutter doors
Key door on Layer 1 not working (Aga Tower)
Key door in HC Lobby E door not passable - look into it?

Zero camera out skips quad logic

The armory guard room and the room above have fake layers. Trap doors

Notes 2:
(Fixed) this is 0060 but looks like should be 0460 layer again
Expand Down

0 comments on commit 19a78f2

Please sign in to comment.