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