diff --git a/DoorShuffle.py b/DoorShuffle.py index 97e7d234..58d84688 100644 --- a/DoorShuffle.py +++ b/DoorShuffle.py @@ -89,7 +89,7 @@ def link_doors_main(world, player): world.get_portal('Desert East', player).destination = True if world.mode[player] == 'inverted': world.get_portal('Desert West', player).destination = True - if world.mode[player] == 'open': + else: world.get_portal('Skull 2 West', player).destination = True world.get_portal('Turtle Rock Lazy Eyes', player).destination = True world.get_portal('Turtle Rock Eye Bridge', player).destination = True diff --git a/Rom.py b/Rom.py index 4b97fc4e..4b9680da 100644 --- a/Rom.py +++ b/Rom.py @@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'bffd4e834049ca5f5295601436fc6009' +RANDOMIZERBASEHASH = '3a77558175cf8b2233f87c60329baa5d' class JsonRom(object): diff --git a/asm/asm_investigations.txt b/asm/asm_investigations.txt index feb5e09b..9d0cce24 100644 --- a/asm/asm_investigations.txt +++ b/asm/asm_investigations.txt @@ -200,3 +200,14 @@ $bc - TT 188 idx 1 ; called by 10CE2, (Dungeon_SpiralStaircase_3) ;122f0 + +Link's position after screen transition and auto-walk (from $02C034): + +0C 20 30 38 48 ; down +D4 D8 C0 C0 A8 ; up +0C 18 28 30 40 ; right +E4 D8 C8 C0 B0 ; left + +Effectively indexed by $0418*#$05+$4E. +Row ($0418) is the direction and column ($4E) determines how far to auto-walk (depends on tile attribute at edge of screen). +From left to right: edge, inside high door, outside high door, inside low door and outside low door. diff --git a/asm/spiral.asm b/asm/spiral.asm index 0d13c4e7..2dd2ab8b 100644 --- a/asm/spiral.asm +++ b/asm/spiral.asm @@ -170,10 +170,10 @@ InroomStairsWarp: { ; should be the same as lda $0462 : and #$04 : lsr #2 : eor #$01 : sta $07 lda $01 : and #$80 : beq .notEdge lda $07 : sta $03 : beq + - lda $01 : jsr LoadSouthMidpoint : sta $22 : lda #$e0 + lda $01 : jsr LoadSouthMidpoint : sta $22 : lda #$f4 bra ++ + - lda $01 : jsr LoadNorthMidpoint : sta $22 : lda #$1b + lda $01 : jsr LoadNorthMidpoint : sta $22 : dec $21 : lda #$f7 ++ sta $20 lda $01 : and #$20 : beq + @@ -185,26 +185,36 @@ InroomStairsWarp: { brl .layer .notEdge lda $01 : and #$03 : cmp #$03 : bne .normal + txa : and #$06 : sta $07 lda $01 : and #$30 : lsr #3 : tay - lda.w InroomStairsX,y : sta $22 lda.w InroomStairsX+1,y : sta $02 lda.w InroomStairsY+1,y : sta $03 - lda.w InroomStairsY,y - ldy $07 : beq + - !add #$07 - + - sta $20 + cpy $07 : beq .vanillaTransition + lda.w InroomStairsX,y : sta $22 + lda.w InroomStairsY,y + ldy $07 : beq + + !add #$07 + + + sta $20 + inc $07 + bra ++ + .vanillaTransition + lda #$c0 : sta $07 ; leave camera + ++ %StonewallCheck($1b) - inc $07 lda $01 : and #$04 : lsr #2 bra .layer .normal lda $01 : sta $fe ; trap door lda $07 : sta $03 : beq + + ldy $a0 : cpy #$51 : beq .specialFix ; throne room + cpy #$02 : beq .specialFix ; sewers pull switch + cpy #$71 : beq .specialFix ; castle armory lda #$e0 - ldy $a0 : cpy #$51 : bne ++ ; special fix for throne room - !sub #$18 - bra ++ + bra ++ + .specialFix + lda #$c8 + bra ++ + %StonewallCheck($43) lda #$1b @@ -235,12 +245,15 @@ InroomStairsWarp: { ldy #$01 : jsr ShiftQuadSimple .skipYQuad + lda $07 : bmi .skipCamera ldy #$00 : jsr SetCamera ; horizontal camera ldy #$01 : sty $07 : jsr SetCamera ; vertical camera lda $20 : cmp #$e0 : bcc + lda $e8 : bne + lda #$10 : sta $e8 ; adjust vertical camera at bottom + + .skipCamera + jsr StairCleanup ply : plx : plb ; pull the stuff we pushed rts diff --git a/data/base2current.bps b/data/base2current.bps index 71800df8..970df14e 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ