Add SongFlag symbol

This commit is contained in:
scawful
2025-01-19 13:04:50 -05:00
parent 07317bf238
commit a00c78d9f0
8 changed files with 22 additions and 24 deletions

View File

@@ -39,6 +39,10 @@ CurrentDream = $0426
; Current Song
CurrentSong = $030F
; 01 - Song of Healing
; 02 - Song of Time
SongFlag = $FE
; =========================================================
; The record format for the low table is 4 bytes:
; byte OBJ*4+0: xxxxxxxx

View File

@@ -148,12 +148,12 @@ LinkItem_NewFlute:
JMP .song_of_storms
.song_of_time
LDA.b #$27 : JSR $802F ; Player_DoSfx3
LDA.b #$02 : STA $FE
LDA.b #$02 : STA SongFlag
RTS
.song_of_healing
LDA.b #$13 : JSR Player_DoSfx2
LDA.b #$01 : STA $FE
LDA.b #$01 : STA SongFlag
RTS
.song_of_storms

View File

@@ -193,7 +193,7 @@ RunClock:
CheckForSongOfTime:
{
; Check if Song of Time was activated
LDA $FE : CMP.b #$02 : BNE +
LDA SongFlag : CMP.b #$02 : BNE +
; Speed up the time
LDA.b #$00 : STA.l TimeSpeed
@@ -201,14 +201,14 @@ CheckForSongOfTime:
LDA.l Hours : CMP.b #$06 : BNE ++
LDA.l Minutes : BNE ++
LDA.b #$3F : STA.l TimeSpeed
STZ $FE
STZ SongFlag
++
; If we reached 6pm
LDA.l Hours : CMP.b #$12 : BNE ++
LDA.l Minutes : BNE ++
LDA.b #$3F : STA.l TimeSpeed
STZ $FE
STZ SongFlag
++
+
RTS

View File

@@ -32,8 +32,6 @@
%Set_Sprite_Properties(Sprite_PolsVoice_Prep, Sprite_PolsVoice_Long)
; =========================================================
Sprite_PolsVoice_Long:
{
PHB : PHK : PLB
@@ -46,8 +44,6 @@ Sprite_PolsVoice_Long:
RTL
}
; =========================================================
Sprite_PolsVoice_Prep:
{
PHB : PHK : PLB
@@ -58,8 +54,6 @@ Sprite_PolsVoice_Prep:
RTL
}
; =========================================================
Sprite_PolsVoice_Main:
{
JSR PolsVoice_CheckForFluteSong
@@ -132,7 +126,7 @@ Sprite_PolsVoice_Main:
PolsVoice_CheckForFluteSong:
{
; If the player plays the flute
LDA $FE : BEQ +
LDA SongFlag : BEQ +
LDA.b #$03 : STA.w SprState, X
+
RTS

View File

@@ -3,10 +3,10 @@
SickKid_CheckForSongOfHealing:
{
LDA $FE : CMP.b #$01 : BNE .no_song
LDA SongFlag : CMP.b #$01 : BNE .no_song
INC $0D80, X
INC $02E4
STZ $FE
STZ.w SongFlag
.no_song
RTL
}

View File

@@ -81,7 +81,7 @@ Sprite_DekuScrub_Prep:
Sprite_DekuScrub_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw EstadoInactivo
dw QuiereCuracion
@@ -107,8 +107,8 @@ Sprite_DekuScrub_Main:
QuiereCuracion:
{
%PlayAnimation(0, 1, 16)
LDA $FE : BEQ .ninguna_cancion
STZ $FE
LDA SongFlag : CMP.b #$01 : BNE .ninguna_cancion
STZ.w SongFlag
LDA.b #$C0 : STA.w SprTimerD, X
%GotoAction(2)
.ninguna_cancion

View File

@@ -52,7 +52,7 @@ Sprite_Zora_Handler:
RTS
.not_princess
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Sprite_Zora_Main
dw Sprite_ZoraPrincess_Main
@@ -68,7 +68,7 @@ Sprite_Zora_Main:
JSR Zora_HandleDialogue
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Zora_Forward
dw Zora_Right

View File

@@ -35,7 +35,7 @@ Sprite_ZoraPrincess_Long:
PHB : PHK : PLB
JSR Sprite_ZoraPrincess_Draw
JSL Sprite_CheckActive : BCC .SpriteIsNotActive
JSR Sprite_ZoraPrincess_Main
JSR Sprite_ZoraPrincess_Main
.SpriteIsNotActive
PLB
RTL
@@ -44,7 +44,7 @@ Sprite_ZoraPrincess_Long:
Sprite_ZoraPrincess_Prep:
{
PHB : PHK : PLB
LDA.l $7EF302 : BEQ .doesnt_have_mask
LDA.l $7EF302 : BEQ .doesnt_have_mask
STZ.w SprState, X ; Kill the sprite
.doesnt_have_mask
@@ -60,7 +60,7 @@ Sprite_ZoraPrincess_Main:
JSL Sprite_PlayerCantPassThrough
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw WaitForLink
dw CheckForSongOfHealing
@@ -79,8 +79,8 @@ Sprite_ZoraPrincess_Main:
CheckForSongOfHealing:
{
%PlayAnimation(0, 1, 10)
LDA $FE : BEQ .ninguna_cancion
STZ $FE
LDA.b SongFlag : BEQ .ninguna_cancion
STZ.b SongFlag
LDA.b #$C0 : STA.w SprTimerD, X
%GotoAction(2)
.ninguna_cancion