diff options
author | Treeki <treeki@gmail.com> | 2012-12-09 23:57:58 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-12-09 23:57:58 +0100 |
commit | f2957939bddd68ccbffd5cdc1336704b44960c1a (patch) | |
tree | d808b4629cfb3918cd8bd5780db3132021c4f542 /src/koopatlas/mapmusic.cpp | |
parent | f96e157709d4a4f1e6c68791de7e651cf1e8e538 (diff) | |
download | kamek-f2957939bddd68ccbffd5cdc1336704b44960c1a.tar.gz kamek-f2957939bddd68ccbffd5cdc1336704b44960c1a.zip |
starman fixes
Diffstat (limited to '')
-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; +} + |