Merge branch 'main' into kara

This commit is contained in:
2021-07-22 12:05:40 -07:00
3 changed files with 17 additions and 2 deletions

View File

@@ -24,11 +24,12 @@ LockAgahnimDoors:
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
.locked
LDA #$0001 : RTL ;Keep the door locked
++
SEP #$30
JSL $099B6F ;Add tower break seal
LDA $7EF2C3 : ORA #$20 : STA $7EF2C3 ; activate GT overlay
REP #$30
LDA #$0001 ;Prevent door from opening that frame otherwise it glitchy
RTL
@@ -39,6 +40,17 @@ LockAgahnimDoors:
LDA.w #$0000 ; fallback to never locked
RTL
;---------------------------------------------------------------------------------
FlagAgahnimDoor:
LDA.l InvertedMode : BEQ .vanilla
LDA $7EF2C3 : ORA #$20 : STA $7EF2C3 ; activate GT overlay
.vanilla
LDA.b #$28 : STA.b $72
RTL
;--------------------------------------------------------------------------------
LockAgahnimDoorsCore:
LDA $22 : CMP.w #1992 : !BLT + ; door too far left, skip

View File

@@ -1065,6 +1065,9 @@ JSL.l InitializeBottles
;================================================================================
; Agahnim Doors Fix
;--------------------------------------------------------------------------------
org $099BBA
JSL FlagAgahnimDoor
org $1BBC94 ; <- DBC94 - Bank1B.asm : 201 (LDA $7EF3C5 : AND.w #$000F : CMP.w #$0003 : BCS BRANCH_EPSILON)
JSL.l LockAgahnimDoors : BNE Overworld_Entrance_BRANCH_EPSILON : NOP #6

View File

@@ -848,7 +848,7 @@ db #$08 ; #$08 = 1 Heart (default) - #$02 = 1/4 Heart
;================================================================================
org $308169 ; PC 0x180169
AgahnimDoorStyle:
db #$02 ; #00 = Never Locked - #$01 = Locked During Escape (default) - #$02 = Locked Without 7 Crystals
db #$01 ; #00 = Never Locked - #$01 = Locked During Escape (default) - #$02 = Locked Without 7 Crystals
;================================================================================
org $30816A ; PC 0x18016A
FreeItemText: