summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-12-09 23:57:58 +0100
committerTreeki <treeki@gmail.com>2012-12-09 23:57:58 +0100
commitf2957939bddd68ccbffd5cdc1336704b44960c1a (patch)
treed808b4629cfb3918cd8bd5780db3132021c4f542 /src
parentf96e157709d4a4f1e6c68791de7e651cf1e8e538 (diff)
downloadkamek-f2957939bddd68ccbffd5cdc1336704b44960c1a.tar.gz
kamek-f2957939bddd68ccbffd5cdc1336704b44960c1a.zip
starman fixes
Diffstat (limited to 'src')
-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();