Merge pull request #8 from Catobat/Terrain
This commit is contained in:
23
owrando.asm
23
owrando.asm
@@ -835,9 +835,9 @@ OWWorldTerrainUpdate: ; x = owid of destination screen, y = 1 for land to water,
|
|||||||
; toggle bunny mode
|
; toggle bunny mode
|
||||||
lda MoonPearlEquipment : bne .nobunny
|
lda MoonPearlEquipment : bne .nobunny
|
||||||
lda.l InvertedMode : bne .inverted
|
lda.l InvertedMode : bne .inverted
|
||||||
lda CurrentWorld : and.b #$40 : bra +
|
lda CurrentWorld : bra +
|
||||||
.inverted lda CurrentWorld : and.b #$40 : eor #$40
|
.inverted lda CurrentWorld : eor #$40
|
||||||
+ cmp #$40 : bne .nobunny
|
+ and #$40 : beq .nobunny
|
||||||
|
|
||||||
LDA.w $0703 : BEQ + ; check if forced transition
|
LDA.w $0703 : BEQ + ; check if forced transition
|
||||||
CPY.b #$03 : BEQ .end_forced_whirlpool
|
CPY.b #$03 : BEQ .end_forced_whirlpool
|
||||||
@@ -865,8 +865,9 @@ OWWorldTerrainUpdate: ; x = owid of destination screen, y = 1 for land to water,
|
|||||||
.whirlpool
|
.whirlpool
|
||||||
PLX : RTS
|
PLX : RTS
|
||||||
.to_bunny_reset_swim
|
.to_bunny_reset_swim
|
||||||
JSL Link_ResetSwimmingState
|
LDA.b $5D : CMP.b #$04 : BNE .to_bunny ; check if swimming
|
||||||
STZ.w $0345
|
JSL Link_ResetSwimmingState
|
||||||
|
STZ.w $0345
|
||||||
.to_bunny
|
.to_bunny
|
||||||
LDA.b #$17 : STA.b $5D
|
LDA.b #$17 : STA.b $5D
|
||||||
.to_pseudo_bunny
|
.to_pseudo_bunny
|
||||||
@@ -886,7 +887,7 @@ OWWorldTerrainUpdate: ; x = owid of destination screen, y = 1 for land to water,
|
|||||||
.end_forced_whirlpool
|
.end_forced_whirlpool
|
||||||
STZ.w $0703
|
STZ.w $0703
|
||||||
CMP.b #$02 : BNE +
|
CMP.b #$02 : BNE +
|
||||||
DEC : STA.w $0345
|
DEC : STA.w $0345 : STZ.w $0340
|
||||||
LDA.b #$04 : BRA .set_state
|
LDA.b #$04 : BRA .set_state
|
||||||
+
|
+
|
||||||
CMP.b #$03 : BNE ++
|
CMP.b #$03 : BNE ++
|
||||||
@@ -897,17 +898,17 @@ OWWorldTerrainUpdate: ; x = owid of destination screen, y = 1 for land to water,
|
|||||||
RTS
|
RTS
|
||||||
.not_forced
|
.not_forced
|
||||||
CPY.b #$02 : BNE + ; check if going from water to land
|
CPY.b #$02 : BNE + ; check if going from water to land
|
||||||
JSL Link_ResetSwimmingState
|
LDA.b $5D : CMP.b #$04 : BNE .return ; check if swimming
|
||||||
STZ.w $0345
|
JSL Link_ResetSwimmingState
|
||||||
LDA.b $5D : CMP.b #$04 : BNE + ; check if swimming
|
STZ.w $0345
|
||||||
STZ.b $5D
|
STZ.b $5D
|
||||||
+
|
+
|
||||||
CPY.b #$01 : BNE .return ; check if going from land to water
|
CPY.b #$01 : BNE .return ; check if going from land to water
|
||||||
LDA.b #$01 : STA.w $0345
|
|
||||||
LDA.b $5D : CMP.b #$04 : BEQ .return ; check if swimming
|
LDA.b $5D : CMP.b #$04 : BEQ .return ; check if swimming
|
||||||
|
LDA.b #$01 : STA.w $0345
|
||||||
LDA.l FlippersEquipment : BEQ .no_flippers ; check if flippers obtained
|
LDA.l FlippersEquipment : BEQ .no_flippers ; check if flippers obtained
|
||||||
LDA.b $5D : CMP.b #$17 : BEQ .no_flippers ; check if bunny
|
LDA.b $5D : CMP.b #$17 : BEQ .no_flippers ; check if bunny
|
||||||
LDA.b #$04 : STA.b $5D : RTS
|
LDA.b #$04 : STA.b $5D : STZ.w $0340 : RTS
|
||||||
.no_flippers
|
.no_flippers
|
||||||
PHX
|
PHX
|
||||||
INC : STA.w $0703
|
INC : STA.w $0703
|
||||||
|
|||||||
Reference in New Issue
Block a user