Merge branch 'DRStairFix' into DRMain2

This commit is contained in:
aerinon
2021-02-13 20:45:24 -07:00

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