disallow song of storms on maps with overlays, dismiss maps with rain already
This commit is contained in:
@@ -122,7 +122,7 @@ LinkItem_NewFlute:
|
|||||||
; Success... play the flute.
|
; Success... play the flute.
|
||||||
LDA.b #$80 : STA.w $03F0
|
LDA.b #$80 : STA.w $03F0
|
||||||
|
|
||||||
LDA $030F
|
LDA.w $030F
|
||||||
CMP.b #$01 : BEQ .song_of_storms
|
CMP.b #$01 : BEQ .song_of_storms
|
||||||
CMP.b #$02 : BEQ .song_of_healing
|
CMP.b #$02 : BEQ .song_of_healing
|
||||||
CMP.b #$03 : BEQ .song_of_soaring
|
CMP.b #$03 : BEQ .song_of_soaring
|
||||||
@@ -134,7 +134,6 @@ LinkItem_NewFlute:
|
|||||||
|
|
||||||
.song_of_storms
|
.song_of_storms
|
||||||
; Play the Song of Storms SFX
|
; Play the Song of Storms SFX
|
||||||
; LDA.b #$18 : JSR Player_DoSfx1
|
|
||||||
LDA.b #$2F : JSR Player_DoSfx2
|
LDA.b #$2F : JSR Player_DoSfx2
|
||||||
JSL OcarinaEffect_SummonStorms
|
JSL OcarinaEffect_SummonStorms
|
||||||
RTS
|
RTS
|
||||||
@@ -225,7 +224,22 @@ org $02B011
|
|||||||
org $3C8000
|
org $3C8000
|
||||||
OcarinaEffect_SummonStorms:
|
OcarinaEffect_SummonStorms:
|
||||||
{
|
{
|
||||||
|
; Dismiss the rain in the Zora area where it is already raining
|
||||||
|
LDA.w $8A : CMP.b #$1E : BEQ .dismissStorms
|
||||||
|
CMP.b #$2E : BEQ .dismissStorms
|
||||||
|
CMP.b #$2F : BEQ .dismissStorms
|
||||||
|
; Check for areas which should not be allowed to have rain
|
||||||
|
CMP.b #$05 : BEQ .errorBeep
|
||||||
|
CMP.b #$06 : BEQ .errorBeep
|
||||||
|
CMP.b #$07 : BEQ .errorBeep
|
||||||
|
CMP.b #$10 : BEQ .errorBeep
|
||||||
|
CMP.b #$18 : BEQ .errorBeep
|
||||||
|
CMP.b #$28 : BEQ .errorBeep
|
||||||
|
CMP.b #$29 : BEQ .errorBeep
|
||||||
|
|
||||||
|
; If the rain is already summoned, dismiss it
|
||||||
LDA.l $7EE00E : BEQ .summonStorms
|
LDA.l $7EE00E : BEQ .summonStorms
|
||||||
|
.dismissStorms
|
||||||
LDA #$FF : STA $8C
|
LDA #$FF : STA $8C
|
||||||
LDA #$00 : STA $7EE00E
|
LDA #$00 : STA $7EE00E
|
||||||
STZ $1D
|
STZ $1D
|
||||||
@@ -238,6 +252,10 @@ OcarinaEffect_SummonStorms:
|
|||||||
LDA.b #$72 : STA.b $9A
|
LDA.b #$72 : STA.b $9A
|
||||||
LDA #$01 : STA $7EE00E
|
LDA #$01 : STA $7EE00E
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
.errorBeep
|
||||||
|
LDA.b #$3C : STA.w $012E ; Error beep
|
||||||
|
RTL
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayThunderAndRain:
|
PlayThunderAndRain:
|
||||||
@@ -256,7 +274,6 @@ CheckRealTable:
|
|||||||
LDA.b $8A : ASL : TAX
|
LDA.b $8A : ASL : TAX
|
||||||
LDA.l Pool_OverlayTable, X
|
LDA.l Pool_OverlayTable, X
|
||||||
CMP.b #$9F : BNE .not_rain_area
|
CMP.b #$9F : BNE .not_rain_area
|
||||||
|
|
||||||
RTL
|
RTL
|
||||||
.not_rain_area
|
.not_rain_area
|
||||||
|
|
||||||
@@ -292,7 +309,8 @@ UpdateFluteSong_Long:
|
|||||||
LDA $7EF34C : CMP.b #$01 : BEQ .notPressed
|
LDA $7EF34C : CMP.b #$01 : BEQ .notPressed
|
||||||
|
|
||||||
LDA $030F : BNE .songExists
|
LDA $030F : BNE .songExists
|
||||||
LDA #$01 : STA $030F ; if this code is running, we have the flute song 1
|
; if this code is running, we have the flute song 1
|
||||||
|
LDA #$01 : STA $030F
|
||||||
.songExists
|
.songExists
|
||||||
LDA.b $F6
|
LDA.b $F6
|
||||||
BIT.b #$20 : BNE .left ; pressed left
|
BIT.b #$20 : BNE .left ; pressed left
|
||||||
@@ -330,6 +348,8 @@ UpdateFluteSong_Long:
|
|||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warnpc $3CA62A
|
||||||
|
|
||||||
org $02F210 ; OverworldTransitionScrollAndLoadMap
|
org $02F210 ; OverworldTransitionScrollAndLoadMap
|
||||||
{
|
{
|
||||||
JSL ResetOcarinaFlag
|
JSL ResetOcarinaFlag
|
||||||
|
|||||||
Reference in New Issue
Block a user