Fix Castle tower door in inverted

This commit is contained in:
Kevin Cathcart
2019-07-06 10:09:26 -04:00
parent 2a7ba8ae87
commit d7190c797f

View File

@@ -12,18 +12,20 @@ LockAgahnimDoors:
JSR.w LockAgahnimDoorsCore : RTL
+ : CMP.w #$0002 : BNE +
JSR.w LockAgahnimDoorsCore : BEQ .unlock
PHX : PHY
SEP #$30
JSL.l CheckEnoughCrystalsForTower
REP #$30
BEQ .crystalOrUnlock
PLY : PLX
!BGE .crystalOrUnlock
LDA #$0001 : RTL
.crystalOrUnlock
LDA InvertedMode : AND.w #$00FF : BEQ .unlock
LDA $7EF2C3 : AND.w #$0020 : BNE .unlock ; Check if GT overlay is already on or not
LDA $0308 : AND.w #$0080 : BEQ + ;If we are holding an item
LDA $0308 : AND.w #$0080 : BEQ ++ ;If we are holding an item
LDA #$0001 : RTL ;Keep the door locked
+
++
SEP #$30
JSL $099B6F ;Add tower break seal
LDA $7EF2C3 : ORA #$20 : STA $7EF2C3 ; activate GT overlay