Changed GT/AT swap in Mixed OW to prioritize leaving AT vanilla unless GT is the only one in the starting world

This commit is contained in:
codemann8
2022-02-03 06:13:13 -06:00
parent ddd86a96cf
commit 98949be9bc
5 changed files with 19 additions and 14 deletions

View File

@@ -20,7 +20,7 @@ LockAgahnimDoors:
!BGE .crystalOrUnlock
LDA #$0001 : RTL
.crystalOrUnlock
LDA InvertedMode : AND.w #$00FF : BEQ .unlock
LDA SwapAgaGanonsTower : 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
@@ -42,7 +42,7 @@ LockAgahnimDoors:
RTL
;---------------------------------------------------------------------------------
FlagAgahnimDoor:
LDA.l InvertedMode : BEQ .vanilla
LDA.l SwapAgaGanonsTower : BEQ .vanilla
LDA $7EF2C3 : ORA #$20 : STA $7EF2C3 ; activate GT overlay

View File

@@ -164,6 +164,7 @@ OnNewFile:
LDA.b #$20 : STA $7EF2DB ; pyramid hole already open
+
LDA.l SwapAgaGanonsTower : BNE +
LDA.l PreopenGanonsTower : BEQ +
LDA.b #$20 : STA $7EF2C3 ; Ganons Tower already open
+

View File

@@ -130,7 +130,7 @@ db $02, $02, $02, $00, $08, $02, $02, $00, $00, $00, $00, $01, $00, $00, $20, $0
db $02, $02, $02, $02, $02, $02, $02, $00, $00, $01, $01, $01, $02, $00, $08, $00
Electric_Barrier:
LDA InvertedMode : BEQ .done
LDA SwapAgaGanonsTower : BEQ .done
LDA $7EF280, X : ORA #$40 : STA $7EF280, X ;set barrier dead
.done
LDA $7EF280, X ; what we wrote over
@@ -138,7 +138,7 @@ RTL
GanonTowerAnimation:
LDA InvertedMode : BEQ .done
LDA SwapAgaGanonsTower : BEQ .done
LDA.b #$1B : STA $012F
STZ $04C6
STZ $B0
@@ -162,7 +162,7 @@ RTL
GanonTowerInvertedCheck:
{
LDA InvertedMode : BEQ .done
LDA SwapAgaGanonsTower : BEQ .done
LDA #$01 ; Load a random value so it doesn't BEQ
RTL
.done

View File

@@ -3,14 +3,14 @@ Overworld_LoadNewTiles:
LDA $040A : AND #$00FF : CMP #$0005 : BNE +
; add sign to EDM for OWG people to read
LDA #$0101 : STA $7E2E18 ; #$0101 is the sign tile16 id, $7E2D98 is the position of the tile16 on map
BRA .invertedMods
+ CMP #$005B : BNE .invertedMods
BRA .atgtSwap
+ CMP #$005B : BNE .atgtSwap
; add Goal sign to Pyramid
LDA #$0101 : STA $7E27B6 ; Moved sign near statue
LDA #$05C2 : STA $7E27B4 ; added a pyramid peg on the left of the sign
.invertedMods
LDA InvertedMode : AND #$00FF : BEQ ++ ; forced inverted changes
.atgtSwap
LDA.l SwapAgaGanonsTower : AND #$00FF : BEQ ++ ; forced inverted changes
LDA $040A : AND #$00FF : CMP #$0043 : BNE +
LDA #$08D5 : STA $7E235E ; GT entrance auto-opened
LDA #$08E3 : STA $7E23DE
@@ -24,15 +24,15 @@ Overworld_LoadNewTiles:
STA $7E2560
LDA #$0E94 : STA $7E25DE
LDA #$0E95 : STA $7E25E0
BRA .postInverted
+ CMP #$001B : BNE .postInverted
BRA .postAtGtSwap
+ CMP #$001B : BNE .postAtGtSwap
LDA #$0101 : STA $7E222C ; add sign for Tower Entry at HC
BRA .postInverted
BRA .postAtGtSwap
++ ; forced non-inverted changes
LDA $040A : AND #$00FF : CMP #$0043 : BNE .postInverted
LDA $040A : AND #$00FF : CMP #$0043 : BNE .postAtGtSwap
LDA #$0101 : STA $7E2550 ; GT sign
.postInverted
.postAtGtSwap
SEP #$30
LDX $8A : LDA.l OWTileMapAlt, X : BEQ .notInverted
PHB

View File

@@ -396,6 +396,10 @@ org $30808E ; PC 0x18008E
FakeBoots:
db $00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $30808F ; PC 0x18008F
SwapAgaGanonsTower:
db $00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
; 0x18008F (unused)
;--------------------------------------------------------------------------------
org $308090 ; PC 0x180090 - 0x180097