Skip to content

Commit

Permalink
Add Town music
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Nov 8, 2024
1 parent 2e7f0fb commit e411da1
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/music.asm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
.IMPORT DataC_Title_Credits_sMusic
.IMPORT DataC_Title_Title_sMusic
.IMPORT DataC_Town_Attack_sMusic
.IMPORT DataC_Town_Town_sMusic
.IMPORT Data_Calm_sMusic
.IMPORT Data_Empty_bMusic_arr
.IMPORT Data_Upgrade_sMusic
Expand Down Expand Up @@ -61,6 +62,7 @@
d_entry table, Prison, DataC_Prison_Prison_sMusic
d_entry table, Temple, DataC_Temple_TemplePlaceholder_sMusic
d_entry table, Title, DataC_Title_Title_sMusic
d_entry table, Town, DataC_Town_Town_sMusic
d_entry table, Upgrade, Data_Upgrade_sMusic
D_END
.ENDREPEAT
Expand Down
1 change: 1 addition & 0 deletions src/music.inc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
Prison
Temple
Title
Town
Upgrade
NUM_VALUES
.ENDENUM
Expand Down
40 changes: 40 additions & 0 deletions src/music/town.sng
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@PRGC_Town

!SONG Town "|A"
% Composer: Jon T. Moran

=key 3b % Eb major

!INST 1A PulsePiano $06 d1/2
!INST 2A PulsePiano $06 d1/4
!INST TV TriangleVibrato

!PART A

=tempo q36

1| iA e4q g ' b e5 | db5h+ ' + +q3 b4q3 c5 |
| db5q3 c b4 ' eh | db5q3 c b4 ' eq eNq |
2| iA b3w | a3h f4h | g3w | eNh b3q db4q |
T| iV e3w | b2w | a2w | db3h. e3q |

1| e4q g ' b e5 | db5h+ ' + +q3 b4q3 c5 |
| db5q3 c b4 ' eh | db5q3 c b4 ' eq fq |
2| iA b3w | a3h f4h | g3w | eNh b3h |
T| iV e3w | b2w | a2w | db3h b3h |

1| g4q ce e ' f g d5 e | d5q f4e g ' dh |
| b4q ee f ' gq f | a4e b f c ' eq d |
2| re b3q.+h | re g3q.+h | re f3q.+h | re e3q. re f3q. |
T| c3w | b2w | a2w | f2h g2h |

1| g4q ce e ' f4e g d5 e | d5q f4e g ' dh |
| b4q ee f ' gq c5q |
2| re b3q.+h | re g3q.+h | re f3q.+h |
T| c3w | b2w | a2w |

=tempo q42

1| g5e f e c ' b4e a eN eb ' dbh |
2| re e3q. ' re e3q.+ ' +h |
T| f2h ' db3w |
14 changes: 7 additions & 7 deletions src/room.asm
Original file line number Diff line number Diff line change
Expand Up @@ -633,13 +633,13 @@ _PrisonMusic:
d_byte TemplePit, eMusic::Temple
d_byte TempleSpire, eMusic::Temple
d_byte TempleWest, eMusic::Temple
d_byte TownHouse1, eMusic::Silence
d_byte TownHouse2, eMusic::Silence
d_byte TownHouse3, eMusic::Silence
d_byte TownHouse4, eMusic::Silence
d_byte TownHouse5, eMusic::Silence
d_byte TownHouse6, eMusic::Silence
d_byte TownOutdoors, eMusic::Silence
d_byte TownHouse1, eMusic::Town
d_byte TownHouse2, eMusic::Town
d_byte TownHouse3, eMusic::Town
d_byte TownHouse4, eMusic::Town
d_byte TownHouse5, eMusic::Town
d_byte TownHouse6, eMusic::Town
d_byte TownOutdoors, eMusic::Town
D_END
.ENDPROC

Expand Down
5 changes: 5 additions & 0 deletions src/rooms/town_outdoors.asm
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ _AlexStanding:
.assert kTileIdBgPortraitGrontaFirst = kTileIdBgPortraitAlexFirst, error
dlg_Text ChildAlex, DataA_Text0_TownOutdoorsAlex3_Explore1_u8_arr
dlg_Text ChildAlex, DataA_Text0_TownOutdoorsAlex3_Explore2_u8_arr
dlg_Call _SilenceMusic
dlg_Call DataC_Town_OutdoorsScrollOrcsIntoView
dlg_Text OrcGronta, DataA_Text0_TownOutdoorsAlex3_HandleThis_u8_arr
dlg_Call _TurnKidsAround
Expand All @@ -404,6 +405,10 @@ _AlexStanding:
dlg_Text ChildAlexShout, DataA_Text0_TownOutdoorsAlex3_Attack2_u8_arr
dlg_Call _MakeOrcGruntsJump
dlg_Done
_SilenceMusic:
lda #eMusic::Silence
sta Zp_Next_sAudioCtrl + sAudioCtrl::Music_eMusic
rts
_TurnKidsAround:
;; Make Anna turn to face the orcs.
lda #kPaletteObjAvatarNormal
Expand Down

0 comments on commit e411da1

Please sign in to comment.