diff options
author | Treeki <treeki@gmail.com> | 2013-05-04 06:07:18 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-05-04 06:07:18 +0200 |
commit | bc113e8a4caee4502241e96b59a27f1a03c6b622 (patch) | |
tree | 02d1358bca2b49753cb500c32c3c4e73981e6f80 | |
parent | 219c3602e7e9353c7e32976e32f28e742b5766d5 (diff) | |
download | kamek-bc113e8a4caee4502241e96b59a27f1a03c6b622.tar.gz kamek-bc113e8a4caee4502241e96b59a27f1a03c6b622.zip |
various map engine fixes
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 19762c1..c09cd55 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -42,6 +42,7 @@ void dWMPathManager_c::setup() { shouldRequestSave = ((wm->settings & 0x80000) != 0); checkedForMoveAfterEndLevel = ((wm->settings & 0x40000) != 0); + afterFortressMode = ((wm->settings & 0x20000) != 0); pathLayer = wm->mapData.pathLayer; @@ -60,7 +61,7 @@ void dWMPathManager_c::setup() { mustPlayAfterDeathAnim = true; daWMPlayer_c::instance->visible = false; LastPowerupStoreType = BEAT_LEVEL; - } else if (LastPowerupStoreType == BEAT_LEVEL && LastLevelPlayed[0] < 0x80) { + } else if (LastPowerupStoreType == BEAT_LEVEL && LastLevelPlayed[0] < 0x80 && !wm->isAfter8Castle) { mustPlayAfterWinAnim = true; daWMPlayer_c::instance->visible = false; } @@ -268,7 +269,7 @@ void dWMPathManager_c::setup() { ResetAllCompletionCandidates(); - if (wm->isAfterKamekCutscene || wm->isEndingScene) + if (wm->isAfterKamekCutscene || wm->isAfter8Castle || wm->isEndingScene) copyWorldDefToSave(wm->mapData.findWorldDef(1)); finalisePathUnlocks(); @@ -852,8 +853,13 @@ void dWMPathManager_c::execute() { if (dmGladDuration > 0) { dmGladDuration--; - if (dmGladDuration == 0) + if (dmGladDuration == 60) { + nw4r::snd::SoundHandle something; + PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_VOC_MA_CLEAR_MULTI, 1); + } else if (dmGladDuration == 0) { daWMPlayer_c::instance->startAnimation(wait_select, 1.0f, 0.0f, 0.0f); + } + return; } if (completionAnimDelay > 0) { @@ -873,13 +879,13 @@ void dWMPathManager_c::execute() { int whichSound; if (completionMessageType == CMP_MSG_GLOBAL_COINS) { whichSound = STRM_BGM_STAR_COIN_CMPLT_ALL; - completionAnimDelay = 240; + completionAnimDelay = 240 - 154; } else if (completionMessageType == CMP_MSG_EVERYTHING) { whichSound = STRM_BGM_ALL_CMPLT_5STARS; - completionAnimDelay = 216; + completionAnimDelay = 216 - 154; } else { whichSound = STRM_BGM_STAR_COIN_CMPLT_WORLD; - completionAnimDelay = 138; + completionAnimDelay = 1;//138; } nw4r::snd::SoundHandle something; @@ -952,12 +958,14 @@ void dWMPathManager_c::execute() { if (shouldRequestSave) { dScKoopatlas_c::instance->showSaveWindow(); shouldRequestSave = false; + return; } if (!initialLoading) { dScKoopatlas_c::instance->startMusic(); dWMHud_c::instance->loadInitially(); initialLoading = true; + return; } int nowPressed = Remocon_GetPressed(GetActiveRemocon()); @@ -1323,10 +1331,7 @@ void dWMPathManager_c::moveThroughPath(int pressedDir) { if (to->type == dKPNode_s::LEVEL) { // Always stop on levels reallyStop = true; - } else if (to->type == dKPNode_s::CHANGE || to->type == dKPNode_s::WORLD_CHANGE) { - // Never stop on entrances or on world changes - reallyStop = false; - } else if (to->type == dKPNode_s::PASS_THROUGH) { + } else if (to->type == dKPNode_s::CHANGE || to->type == dKPNode_s::WORLD_CHANGE || to->type == dKPNode_s::PASS_THROUGH) { // If there's only one exit here, then stop even though // it's a passthrough node reallyStop = (to->getAvailableExitCount() == 1); @@ -1423,6 +1428,7 @@ void dWMPathManager_c::moveThroughPath(int pressedDir) { ActivateWipe(to->transition); u32 saveFlag = (shouldRequestSave ? 0x80000 : 0); saveFlag |= (checkedForMoveAfterEndLevel ? 0x40000 : 0); + saveFlag |= (afterFortressMode ? 0x20000 : 0); DoSceneChange(WORLD_MAP, 0x10000000 | (to->foreignID << 20) | saveFlag, 0); } else if (reallyStop) { |