Skip to content

Commit

Permalink
Fix Castle tower door in inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinCathcart committed Jul 6, 2019
1 parent 2a7ba8a commit d7190c7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions entrances.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d7190c7

Please sign in to comment.