diff options
author | Treeki <treeki@gmail.com> | 2012-10-28 13:19:01 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-10-28 13:19:01 +0100 |
commit | dd90d6a3cbd0288a1138122106b9f4f819f5bbba (patch) | |
tree | b472a6abd63528a953dcea910ae637ea3999f497 /src/koopatlas | |
parent | 29bdbddab8b9cf8cce5d548949b9d5b98e5b538a (diff) | |
download | kamek-dd90d6a3cbd0288a1138122106b9f4f819f5bbba.tar.gz kamek-dd90d6a3cbd0288a1138122106b9f4f819f5bbba.zip |
added the on-death anim/sound
Diffstat (limited to 'src/koopatlas')
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 38 | ||||
-rw-r--r-- | src/koopatlas/pathmanager.h | 3 |
2 files changed, 40 insertions, 1 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 5d301df..bb610e3 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -3,6 +3,7 @@ #include "koopatlas/hud.h" #include "koopatlas/player.h" #include <sfx.h> +#include <stage.h> extern "C" void PlaySoundWithFunctionB4(void *spc, nw4r::snd::SoundHandle *handle, int id, int unk); @@ -27,6 +28,19 @@ void dWMPathManager_c::setup() { isEnteringLevel = false; levelStartWait = -1; unlockPaths(); + + if (!countdownToFadeIn) + waitAtStart = 50; + else + waitAtStart = -1; + + waitForAfterDeathAnim = -1; + mustPlayAfterDeathAnim = false; + if (LastPowerupStoreType == LOSE_LEVEL) { + mustPlayAfterDeathAnim = true; + daWMPlayer_c::instance->visible = false; + } + SpammyReport("done\n"); // Figure out what path node to start at @@ -383,6 +397,28 @@ void dWMPathManager_c::execute() { return; } + if (waitAtStart > 0) { + waitAtStart--; + if (waitAtStart == 0) { + if (mustPlayAfterDeathAnim) { + daWMPlayer_c::instance->visible = true; + daWMPlayer_c::instance->startAnimation(ending_wait, 1.0f, 0.0f, 0.0f); + waitForAfterDeathAnim = 60; + + nw4r::snd::SoundHandle something; + PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_VOC_MA_CS_COURSE_MISS, 1); + } + } + return; + } + + if (waitForAfterDeathAnim > 0) { + waitForAfterDeathAnim--; + if (waitForAfterDeathAnim == 0) + daWMPlayer_c::instance->startAnimation(wait_select, 1.0f, 0.0f, 0.0f); + return; + } + if (shouldRequestSave) { dScKoopatlas_c::instance->showSaveWindow(); shouldRequestSave = false; @@ -771,7 +807,7 @@ void dWMPathManager_c::activatePoint() { nw4r::snd::SoundHandle something2; PlaySoundWithFunctionB4(SoundRelatedClass, &something2, (Player_Powerup[0] == 3) ? SE_VOC_MA_PLAYER_DECIDE_MAME: SE_VOC_MA_CS_COURSE_IN, 1); - daWMPlayer_c::instance->startAnimation(170, 1.2, 10.0, 0.0); + daWMPlayer_c::instance->startAnimation(course_in, 1.2, 10.0, 0.0); daWMPlayer_c::instance->rot.y = 0; isEnteringLevel = true; diff --git a/src/koopatlas/pathmanager.h b/src/koopatlas/pathmanager.h index 98a68d6..cd1d7ba 100644 --- a/src/koopatlas/pathmanager.h +++ b/src/koopatlas/pathmanager.h @@ -68,6 +68,9 @@ class dWMPathManager_c { bool calledEnteredNode; int levelStartWait; + int waitAtStart; + bool mustPlayAfterDeathAnim; + int waitForAfterDeathAnim; dLevelInfo_c::entry_s *enteredLevel; }; |