Minor fixes for in-room stairs

This commit is contained in:
Catobat
2021-02-12 23:01:50 +01:00
parent f21687bd32
commit 74a8ec6486
5 changed files with 38 additions and 14 deletions

View File

@@ -89,7 +89,7 @@ def link_doors_main(world, player):
world.get_portal('Desert East', player).destination = True world.get_portal('Desert East', player).destination = True
if world.mode[player] == 'inverted': if world.mode[player] == 'inverted':
world.get_portal('Desert West', player).destination = True 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('Skull 2 West', player).destination = True
world.get_portal('Turtle Rock Lazy Eyes', player).destination = True world.get_portal('Turtle Rock Lazy Eyes', player).destination = True
world.get_portal('Turtle Rock Eye Bridge', player).destination = True world.get_portal('Turtle Rock Eye Bridge', player).destination = True

2
Rom.py
View File

@@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids
JAP10HASH = '03a63945398191337e896e5771f77173' JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = 'bffd4e834049ca5f5295601436fc6009' RANDOMIZERBASEHASH = '3a77558175cf8b2233f87c60329baa5d'
class JsonRom(object): class JsonRom(object):

View File

@@ -200,3 +200,14 @@ $bc - TT 188 idx 1
; called by 10CE2, (Dungeon_SpiralStaircase_3) ; called by 10CE2, (Dungeon_SpiralStaircase_3)
;122f0 ;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.

View File

@@ -170,10 +170,10 @@ InroomStairsWarp: {
; should be the same as lda $0462 : and #$04 : lsr #2 : eor #$01 : sta $07 ; should be the same as lda $0462 : and #$04 : lsr #2 : eor #$01 : sta $07
lda $01 : and #$80 : beq .notEdge lda $01 : and #$80 : beq .notEdge
lda $07 : sta $03 : beq + lda $07 : sta $03 : beq +
lda $01 : jsr LoadSouthMidpoint : sta $22 : lda #$e0 lda $01 : jsr LoadSouthMidpoint : sta $22 : lda #$f4
bra ++ bra ++
+ +
lda $01 : jsr LoadNorthMidpoint : sta $22 : lda #$1b lda $01 : jsr LoadNorthMidpoint : sta $22 : dec $21 : lda #$f7
++ ++
sta $20 sta $20
lda $01 : and #$20 : beq + lda $01 : and #$20 : beq +
@@ -185,26 +185,36 @@ InroomStairsWarp: {
brl .layer brl .layer
.notEdge .notEdge
lda $01 : and #$03 : cmp #$03 : bne .normal lda $01 : and #$03 : cmp #$03 : bne .normal
txa : and #$06 : sta $07
lda $01 : and #$30 : lsr #3 : tay lda $01 : and #$30 : lsr #3 : tay
lda.w InroomStairsX,y : sta $22
lda.w InroomStairsX+1,y : sta $02 lda.w InroomStairsX+1,y : sta $02
lda.w InroomStairsY+1,y : sta $03 lda.w InroomStairsY+1,y : sta $03
lda.w InroomStairsY,y cpy $07 : beq .vanillaTransition
ldy $07 : beq + lda.w InroomStairsX,y : sta $22
!add #$07 lda.w InroomStairsY,y
+ ldy $07 : beq +
sta $20 !add #$07
+
sta $20
inc $07
bra ++
.vanillaTransition
lda #$c0 : sta $07 ; leave camera
++
%StonewallCheck($1b) %StonewallCheck($1b)
inc $07
lda $01 : and #$04 : lsr #2 lda $01 : and #$04 : lsr #2
bra .layer bra .layer
.normal .normal
lda $01 : sta $fe ; trap door lda $01 : sta $fe ; trap door
lda $07 : sta $03 : beq + 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 lda #$e0
ldy $a0 : cpy #$51 : bne ++ ; special fix for throne room bra ++
!sub #$18 .specialFix
bra ++ lda #$c8
bra ++
+ +
%StonewallCheck($43) %StonewallCheck($43)
lda #$1b lda #$1b
@@ -235,12 +245,15 @@ InroomStairsWarp: {
ldy #$01 : jsr ShiftQuadSimple ldy #$01 : jsr ShiftQuadSimple
.skipYQuad .skipYQuad
lda $07 : bmi .skipCamera
ldy #$00 : jsr SetCamera ; horizontal camera ldy #$00 : jsr SetCamera ; horizontal camera
ldy #$01 : sty $07 : jsr SetCamera ; vertical camera ldy #$01 : sty $07 : jsr SetCamera ; vertical camera
lda $20 : cmp #$e0 : bcc + lda $20 : cmp #$e0 : bcc +
lda $e8 : bne + lda $e8 : bne +
lda #$10 : sta $e8 ; adjust vertical camera at bottom lda #$10 : sta $e8 ; adjust vertical camera at bottom
+ +
.skipCamera
jsr StairCleanup jsr StairCleanup
ply : plx : plb ; pull the stuff we pushed ply : plx : plb ; pull the stuff we pushed
rts rts

Binary file not shown.