summaryrefslogtreecommitdiff
path: root/src/koopatlas
diff options
context:
space:
mode:
Diffstat (limited to 'src/koopatlas')
-rw-r--r--src/koopatlas/core.cpp2
-rw-r--r--src/koopatlas/mapmusic.cpp17
-rw-r--r--src/koopatlas/mapmusic.h1
-rw-r--r--src/koopatlas/player.cpp2
4 files changed, 20 insertions, 2 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp
index 71122e5..e9ae989 100644
--- a/src/koopatlas/core.cpp
+++ b/src/koopatlas/core.cpp
@@ -342,6 +342,8 @@ DoStartLevel(GetGameMgr(), &sl);
void dScKoopatlas_c::startMusic() {
dKPMusic::play(GetSaveFile()->GetBlock(-1)->currentMapMusic);
+ if (Player_Flags[0] & 1)
+ dKPMusic::playStarMusic();
}
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;
+}
+
diff --git a/src/koopatlas/mapmusic.h b/src/koopatlas/mapmusic.h
index e5d69f2..bd602bf 100644
--- a/src/koopatlas/mapmusic.h
+++ b/src/koopatlas/mapmusic.h
@@ -7,6 +7,7 @@ class dKPMusic {
static void play(int id);
static void execute();
static void stop();
+ static void playStarMusic();
};
#endif /* MAPMUSIC_H */
diff --git a/src/koopatlas/player.cpp b/src/koopatlas/player.cpp
index 351ba88..6e005b7 100644
--- a/src/koopatlas/player.cpp
+++ b/src/koopatlas/player.cpp
@@ -45,8 +45,6 @@ int daWMPlayer_c::onExecute() {
if (!dScKoopatlas_c::instance->mapIsRunning())
return true;
- OSReport("Flags: %08x ; Mode: %d\n", modelHandler->mdlClass->model_visibility_flags_maybe, modelHandler->mdlClass->mode_maybe);
-
dScKoopatlas_c::instance->pathManager.execute();
this->modelHandler->update();