Improved door landing
This commit is contained in:
@@ -56,11 +56,6 @@ org $828b54 ; <- Bank02.asm : 2200 (JSL UseImplicitRegIndexedLocalJumpTable)
|
||||
jsl InroomStairsTrapDoor
|
||||
org $82c146
|
||||
jsl HandleSpecialDoorLanding
|
||||
org $82c23a
|
||||
HandleIncomingDoorStateLocal:
|
||||
jsl HandleIncomingDoorState : rts
|
||||
org $82c172
|
||||
jsr HandleIncomingDoorStateLocal
|
||||
|
||||
org $8289a0 ; JSL $0091C4
|
||||
jsl QuadrantLoadOrderBeforeScroll
|
||||
|
||||
@@ -296,7 +296,6 @@ StraightStairsAdj:
|
||||
stz $046d
|
||||
.noScroll
|
||||
jsr GetTileAttribute : tax
|
||||
jsl HandleIncomingDoorState
|
||||
lda $11 : cmp #$12 : beq .goingNorth
|
||||
lda $a2 : cmp #$51 : bne ++
|
||||
rep #$20 : lda #$0018 : !add $20 : sta $20 : sep #$20 ; special fix for throne room
|
||||
@@ -422,20 +421,23 @@ InroomStairsTrapDoor:
|
||||
HandleSpecialDoorLanding: {
|
||||
LDA.l $7F2000,X ; what we wrote over
|
||||
SEP #$30
|
||||
JSL HandleIncomingDoorState
|
||||
CMP #$34 : bne + ; inroom stairs
|
||||
PHA : LDA #$26 : STA $045E : PLA
|
||||
+
|
||||
}
|
||||
|
||||
; Y = tiletype, also written to $4E
|
||||
; A = tiletype
|
||||
HandleIncomingDoorState:
|
||||
{
|
||||
PHA
|
||||
LDA.l DRMode : BEQ .noDoor
|
||||
CPY.b #$01 : !bge .noDoor
|
||||
LDA.w $0418 : AND.b #$02 : BNE + : INC
|
||||
+ STA.b $6C
|
||||
PLA : PHA : AND.b #$FA : CMP.b #$80 : bne .noDoor
|
||||
|
||||
.setDoorState
|
||||
LDA.w $0418 : AND.b #$02 : BNE + : INC
|
||||
+ STA.b $6C
|
||||
|
||||
.noDoor
|
||||
STY.b $4E : TYA ; what we wrote over
|
||||
PLY : RTL
|
||||
PLA : RTL
|
||||
}
|
||||
Reference in New Issue
Block a user