Improved door landing
Improved door landing
This commit is contained in:
@@ -54,6 +54,8 @@ org $82941a ; <- Bank02.asm : 3748 module 7.12.11 (LDA $0464 : BNE BRANCH_$11513
|
||||
jsl StraightStairsTrapDoor : rts
|
||||
org $828b54 ; <- Bank02.asm : 2200 (JSL UseImplicitRegIndexedLocalJumpTable)
|
||||
jsl InroomStairsTrapDoor
|
||||
org $82c146
|
||||
jsl HandleSpecialDoorLanding
|
||||
|
||||
org $8289a0 ; JSL $0091C4
|
||||
jsl QuadrantLoadOrderBeforeScroll
|
||||
|
||||
@@ -324,7 +324,7 @@ GetTileAttribute:
|
||||
{
|
||||
phk : pea.w .jslrtsreturn-1
|
||||
pea.w $02802c
|
||||
jml $02c11d ; mucks with x/y sets a to Tile Attribute, I think
|
||||
jml CalculateTransitionLanding ; mucks with x/y sets a to Tile Attribute, I think
|
||||
.jslrtsreturn
|
||||
rts
|
||||
}
|
||||
@@ -416,4 +416,28 @@ InroomStairsTrapDoor:
|
||||
pla : pla : pla
|
||||
jsl StraightStairsTrapDoor_reset
|
||||
jml $028b15 ; just some RTS in bank 02
|
||||
}
|
||||
|
||||
HandleSpecialDoorLanding: {
|
||||
LDA.l $7F2000,X ; what we wrote over
|
||||
SEP #$30
|
||||
JSL HandleIncomingDoorState
|
||||
CMP #$34 : bne + ; inroom stairs
|
||||
PHA : LDA #$26 : STA $045E : PLA
|
||||
+
|
||||
}
|
||||
|
||||
; A = tiletype
|
||||
HandleIncomingDoorState:
|
||||
{
|
||||
PHA
|
||||
LDA.l DRMode : BEQ .noDoor
|
||||
PLA : PHA : AND.b #$FA : CMP.b #$80 : bne .noDoor
|
||||
|
||||
.setDoorState
|
||||
LDA.w $0418 : AND.b #$02 : BNE + : INC
|
||||
+ STA.b $6C
|
||||
|
||||
.noDoor
|
||||
PLA : RTL
|
||||
}
|
||||
@@ -207,19 +207,16 @@ InroomStairsWarp: {
|
||||
.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
|
||||
bra ++
|
||||
lda $01 : and #$04 : bne .specialFix
|
||||
lda #$e0 : bra ++
|
||||
.specialFix
|
||||
lda #$c8
|
||||
bra ++
|
||||
lda #$c8 : bra ++
|
||||
+
|
||||
%StonewallCheck($43)
|
||||
lda #$1b
|
||||
++
|
||||
sta $20
|
||||
lda $01 : and #$04 : bne +
|
||||
lda #$1b : bra ++
|
||||
+ lda #$33
|
||||
++ sta $20
|
||||
inc $07 : stz $02 : lda #$78 : sta $22
|
||||
lda $01 : and #$03 : beq ++
|
||||
cmp #$02 : !bge +
|
||||
|
||||
Reference in New Issue
Block a user