diff options
Diffstat (limited to 'src/koopatlas/mapmusic.cpp')
-rw-r--r-- | src/koopatlas/mapmusic.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/koopatlas/mapmusic.cpp b/src/koopatlas/mapmusic.cpp index 8890df5..3c887d4 100644 --- a/src/koopatlas/mapmusic.cpp +++ b/src/koopatlas/mapmusic.cpp @@ -6,6 +6,10 @@ extern "C" void PlaySoundWithFunctionB4(void *spc, nw4r::snd::SoundHandle *handl static nw4r::snd::StrmSoundHandle s_handle; static bool s_playing = false; + +static nw4r::snd::SoundHandle s_starHandle; +static bool s_starPlaying = false; + static int s_song = -1; static int s_nextSong = -1; @@ -160,4 +164,17 @@ void dKPMusic::stop() { if (s_handle.Exists()) s_handle.Stop(30); + + if (s_starHandle.Exists()) + s_starHandle.Stop(15); } + + +void dKPMusic::playStarMusic() { + if (!s_starPlaying) + return; + + PlaySoundWithFunctionB4(SoundRelatedClass, &s_starHandle, SE_BGM_CS_STAR, 1); + s_starPlaying = true; +} + |