Update Song of Storms functionality and implement Magic Pedestal sprite
This commit is contained in:
@@ -40,6 +40,7 @@ CurrentSong = $030F
|
||||
|
||||
; 01 - Song of Healing
|
||||
; 02 - Song of Time
|
||||
; 03 - Song of Storms
|
||||
SongFlag = $FE
|
||||
|
||||
; =========================================================
|
||||
|
||||
@@ -159,6 +159,7 @@ LinkItem_NewFlute:
|
||||
.song_of_storms
|
||||
; Play the Song of Storms SFX
|
||||
LDA.b #$2F : JSR Player_DoSfx2
|
||||
LDA.b #$03 : STA.b SongFlag
|
||||
JSL OcarinaEffect_SummonStorms
|
||||
RTS
|
||||
|
||||
@@ -247,7 +248,6 @@ OcarinaEffect_SummonStorms:
|
||||
{
|
||||
; Dismiss the rain in the Zora area where it is already raining
|
||||
LDA.w $8A : CMP.b #$00 : BEQ .check_for_magic_bean
|
||||
CMP.b #$1E : BEQ .checkForEvent
|
||||
CMP.b #$2E : BEQ .dismiss_storms
|
||||
CMP.b #$2F : BEQ .dismiss_storms
|
||||
; Check for areas which should not be allowed to have rain
|
||||
@@ -280,10 +280,6 @@ OcarinaEffect_SummonStorms:
|
||||
LDA.b #$3C : STA.w $012E ; Error beep
|
||||
RTL
|
||||
|
||||
.checkForEvent
|
||||
JSR CheckForZoraEvent : BCC .error_beep
|
||||
JMP .dismiss_storms
|
||||
|
||||
.check_for_magic_bean
|
||||
LDA.b #Sprite_BeanVendor : LDX.b #$00
|
||||
JSL Sprite_CheckForPresence : BCC .not_active
|
||||
@@ -300,19 +296,6 @@ OcarinaEffect_SummonStorms:
|
||||
RTL
|
||||
}
|
||||
|
||||
; Y: E8 06, X: 48 0C
|
||||
CheckForZoraEvent:
|
||||
{
|
||||
LDA $20 : CMP.w #$06E8 : BNE .not_zora
|
||||
LDA $22 : CMP.w #$0C48 : BNE .not_zora
|
||||
LDA.b #$01 : STA $04C6
|
||||
SEC
|
||||
RTS
|
||||
.not_zora
|
||||
CLC
|
||||
RTS
|
||||
}
|
||||
|
||||
PlayThunderAndRain:
|
||||
{
|
||||
LDA.b #$01 : STA $012D
|
||||
|
||||
53
Sprites/Objects/pedestal.asm
Normal file
53
Sprites/Objects/pedestal.asm
Normal file
@@ -0,0 +1,53 @@
|
||||
; Magic Pedestal Sprite
|
||||
;
|
||||
; Zora Temple (Map 1E)
|
||||
; Goron Desert (Map 36)
|
||||
; Fortress Secrets (Map 5E)
|
||||
|
||||
pushpc
|
||||
org $1EE05F
|
||||
JSL CheckForBook
|
||||
pullpc
|
||||
|
||||
CheckForBook:
|
||||
{
|
||||
LDA.b $2F : BNE .exit
|
||||
JSL Sprite_CheckDamageToPlayer : BCC .exit
|
||||
LDA.w $0202 : CMP.b #$0F : BNE .not_holding_book
|
||||
LDY.b #$01 : BIT.b $F4 : BVS .not_pressing_y
|
||||
.not_holding_book
|
||||
LDY.b #$00
|
||||
.not_pressing_y
|
||||
CPY.b #$01 : BNE .no_book_pose
|
||||
STZ.w $0300
|
||||
LDA.b #$20
|
||||
STA.w $037A
|
||||
STZ.w $012E
|
||||
.no_book_pose
|
||||
JSR PedestalPlaque
|
||||
.exit
|
||||
LDA.b AreaIndex : CMP.b #$30
|
||||
RTL
|
||||
}
|
||||
|
||||
PedestalPlaque:
|
||||
{
|
||||
LDA.b AreaIndex : CMP.b #$1E : BEQ .zora_temple
|
||||
CMP.b #$36 : BEQ .goron_desert
|
||||
CMP.b #$5E : BEQ .fortress_secrets
|
||||
JMP .return
|
||||
.zora_temple
|
||||
|
||||
LDA.l $7EF29E : AND.b #$20 : BNE .return
|
||||
LDA.b SongFlag : CMP.b #$03 : BNE .return
|
||||
LDA.b #$01 : STA $04C6
|
||||
STZ.b SongFlag
|
||||
JMP .return
|
||||
.goron_desert
|
||||
|
||||
.fortress_secrets
|
||||
|
||||
.return
|
||||
RTS
|
||||
}
|
||||
|
||||
@@ -82,6 +82,9 @@ print "End of bottle_vendor.asm ", pc
|
||||
incsrc "Sprites/Enemies/leever.asm"
|
||||
print "End of leever.asm ", pc
|
||||
|
||||
incsrc "Sprites/Objects/pedestal.asm"
|
||||
print "End of pedestal.asm ", pc
|
||||
|
||||
DontTeleportWithoutFlippers:
|
||||
{
|
||||
LDA.l $7EF356 : BNE +
|
||||
|
||||
Reference in New Issue
Block a user