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 ; Current Song
CurrentSong = $030F CurrentSong = $030F
; 01 - Song of Healing
; 02 - Song of Time
SongFlag = $FE
; ========================================================= ; =========================================================
; The record format for the low table is 4 bytes: ; The record format for the low table is 4 bytes:
; byte OBJ*4+0: xxxxxxxx ; byte OBJ*4+0: xxxxxxxx

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -60,7 +60,7 @@ Sprite_ZoraPrincess_Main:
JSL Sprite_PlayerCantPassThrough JSL Sprite_PlayerCantPassThrough
LDA.w SprAction, X LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable JSL JumpTableLocal
dw WaitForLink dw WaitForLink
dw CheckForSongOfHealing dw CheckForSongOfHealing
@@ -79,8 +79,8 @@ Sprite_ZoraPrincess_Main:
CheckForSongOfHealing: CheckForSongOfHealing:
{ {
%PlayAnimation(0, 1, 10) %PlayAnimation(0, 1, 10)
LDA $FE : BEQ .ninguna_cancion LDA.b SongFlag : BEQ .ninguna_cancion
STZ $FE STZ.b SongFlag
LDA.b #$C0 : STA.w SprTimerD, X LDA.b #$C0 : STA.w SprTimerD, X
%GotoAction(2) %GotoAction(2)
.ninguna_cancion .ninguna_cancion