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 !BGE .crystalOrUnlock
LDA #$0001 : RTL LDA #$0001 : RTL
.crystalOrUnlock .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 $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
@@ -42,7 +42,7 @@ LockAgahnimDoors:
RTL RTL
;--------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------
FlagAgahnimDoor: FlagAgahnimDoor:
LDA.l InvertedMode : BEQ .vanilla LDA.l SwapAgaGanonsTower : BEQ .vanilla
LDA $7EF2C3 : ORA #$20 : STA $7EF2C3 ; activate GT overlay 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.b #$20 : STA $7EF2DB ; pyramid hole already open
+ +
LDA.l SwapAgaGanonsTower : BNE +
LDA.l PreopenGanonsTower : BEQ + LDA.l PreopenGanonsTower : BEQ +
LDA.b #$20 : STA $7EF2C3 ; Ganons Tower already open 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 db $02, $02, $02, $02, $02, $02, $02, $00, $00, $01, $01, $01, $02, $00, $08, $00
Electric_Barrier: Electric_Barrier:
LDA InvertedMode : BEQ .done LDA SwapAgaGanonsTower : BEQ .done
LDA $7EF280, X : ORA #$40 : STA $7EF280, X ;set barrier dead LDA $7EF280, X : ORA #$40 : STA $7EF280, X ;set barrier dead
.done .done
LDA $7EF280, X ; what we wrote over LDA $7EF280, X ; what we wrote over
@@ -138,7 +138,7 @@ RTL
GanonTowerAnimation: GanonTowerAnimation:
LDA InvertedMode : BEQ .done LDA SwapAgaGanonsTower : BEQ .done
LDA.b #$1B : STA $012F LDA.b #$1B : STA $012F
STZ $04C6 STZ $04C6
STZ $B0 STZ $B0
@@ -162,7 +162,7 @@ RTL
GanonTowerInvertedCheck: GanonTowerInvertedCheck:
{ {
LDA InvertedMode : BEQ .done LDA SwapAgaGanonsTower : BEQ .done
LDA #$01 ; Load a random value so it doesn't BEQ LDA #$01 ; Load a random value so it doesn't BEQ
RTL RTL
.done .done

View File

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

View File

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