diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index abb444e..7ef0e13 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -114,6 +114,9 @@ function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<< !MULTIWORLD_HUD_DELAY = "#120" !Dungeon_ChestData = "$01E96C" +!FLAG_OW_MIXED = $04 +!FLAG_OW_CROSSED = $02 + incsrc hooks.asm incsrc treekid.asm incsrc spriteswap.asm diff --git a/entrances.asm b/entrances.asm index 33afb05..78d77a8 100644 --- a/entrances.asm +++ b/entrances.asm @@ -204,12 +204,12 @@ RTL AnimatedEntranceFix: ;when an entrance animation tries to start PHA : PHX LDA.l InvertedMode : BEQ + ;If we are in inverted mode - LDA.l OWMode+1 : CMP #$04 : BEQ + ;If we are in Mixed OW shuffle mode - LDA $8A : AND #$40 : BNE + ;and in the light world - PLX : PLA - STZ $04C6 ; skip it. - LDA #$00 - RTL + LDA.l OWMode+1 : AND.b #!FLAG_OW_MIXED : BEQ + ;If we are in Mixed OW shuffle mode + LDA $8A : AND #$40 : BNE + ;and in the light world + PLX : PLA + STZ $04C6 ; skip it. + LDA #$00 + RTL + PLX : PLA STA $02E4 ;what we wrote over diff --git a/flute.asm b/flute.asm index 79f2a2f..325d2bd 100644 --- a/flute.asm +++ b/flute.asm @@ -61,8 +61,8 @@ FluteBoy: JML.l FluteBoy_Continue ;-------------------------------------------------------------------------------- FreeDuckCheck: - LDA.l OWMode+1 : CMP.b #$04 : BEQ .skipInvertedCheck - LDA.l InvertedMode : BEQ .done + LDA.l OWMode+1 : AND.b #!FLAG_OW_MIXED : BEQ .skipInvertedCheck + LDA.l InvertedMode : BEQ .done .skipInvertedCheck LDA $7EF34C : CMP.b #$03 : BEQ .done ; flute is already active diff --git a/hudadditions.asm b/hudadditions.asm index 3927130..b21fa78 100644 --- a/hudadditions.asm +++ b/hudadditions.asm @@ -26,7 +26,7 @@ HudAdditions: ++ LDX $1B : BNE + ; if outdoors - lda.l OWMode : and #$06ff : bne ++ : rts ; Skip if vanilla ow rando + lda.l OWMode : and.w #((!FLAG_OW_CROSSED+!FLAG_OW_MIXED)<<8)+$ff : bne ++ : rts ; Skip if vanilla ow rando ++ lda $7ef36d : and #$00ff : beq ++ lda $7ef3ca : and #$00ff : beq +++ lda #$2d60 : bra .owdisplay diff --git a/owrando.asm b/owrando.asm index 1b4f133..33699c6 100644 --- a/owrando.asm +++ b/owrando.asm @@ -338,7 +338,7 @@ OWNewDestination: sep #$30 : lda OWOppSlotOffset,y : !add $04 : asl : and #$7f : sta $700 ; crossed OW shuffle - lda.l OWMode+1 : and.b #$02 : beq .return + LDA.l OWMode+1 : AND.b #!FLAG_OW_CROSSED : beq .return ldx $05 : lda.l OWTileWorldAssoc,x : sta.l $7ef3ca ; change world ; toggle bunny mode