Moved OW flag checks to global variable

This commit is contained in:
codemann8
2021-08-19 20:01:48 -05:00
parent 94a987f23f
commit 58bf92ba04
5 changed files with 13 additions and 10 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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