summaryrefslogtreecommitdiff
path: root/src/koopatlas/pathmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/koopatlas/pathmanager.cpp48
1 files changed, 38 insertions, 10 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index 00e1bef..579934a 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -146,7 +146,11 @@ void dWMPathManager_c::setup() {
SpammyReport("out of bounds (%d), using node 0\n", pathLayer->nodeCount);
currentNode = pathLayer->nodes[0];
} else {
- currentNode = pathLayer->nodes[save->current_path_node];
+ int butts = Remocon_GetButtons(GetActiveRemocon());
+ if ((butts & WPAD_MINUS) && (butts & WPAD_PLUS) && (butts & WPAD_ONE))
+ currentNode = pathLayer->nodes[0];
+ else
+ currentNode = pathLayer->nodes[save->current_path_node];
SpammyReport("OK %p\n", currentNode);
}
@@ -161,6 +165,18 @@ void dWMPathManager_c::setup() {
}
}
}
+
+ if (wm->isAfter8Castle) {
+ // warp to 8-L
+ for (int i = 0; i < pathLayer->nodeCount; i++) {
+ dKPNode_s *node = pathLayer->nodes[i];
+ if (node->type == dKPNode_s::LEVEL && node->levelNumber[0] == 8 && node->levelNumber[1] == 5) {
+ currentNode = node;
+ save->current_path_node = i;
+ break;
+ }
+ }
+ }
}
for (int i = 0; i < pathLayer->nodeCount; i++)
@@ -234,8 +250,13 @@ void dWMPathManager_c::setup() {
completionMessageType = CMP_MSG_GLOBAL_EXITS;
}
}
- if (CanFinishEverything && gFlag == gTotalFlag)
+ if (CanFinishEverything && gFlag == gTotalFlag) {
+ save->titleScreenWorld = 3;
+ save->titleScreenLevel = 10;
+
+ shouldRequestSave = true;
completionMessageType = CMP_MSG_EVERYTHING;
+ }
}
ResetAllCompletionCandidates();
@@ -250,7 +271,8 @@ static u8 *PathAvailabilityData = 0;
static u8 *NodeAvailabilityData = 0;
dWMPathManager_c::~dWMPathManager_c() {
- if (PathAvailabilityData && !isEnteringLevel) {
+ bool entering8_25 = (MaybeFinishingLevel[0] == 7) && (MaybeFinishingLevel[1] == 24);
+ if (PathAvailabilityData && !isEnteringLevel && !entering8_25) {
delete[] PathAvailabilityData;
PathAvailabilityData = 0;
@@ -259,6 +281,8 @@ dWMPathManager_c::~dWMPathManager_c() {
}
if (isEnteringLevel) {
+ ResetAllCompletionCandidates();
+
SaveBlock *save = GetSaveFile()->GetBlock(-1);
if ((enteredLevel->displayLevel >= 21 && enteredLevel->displayLevel <= 27 && enteredLevel->displayLevel != 26)
|| (enteredLevel->displayLevel >= 29 && enteredLevel->displayLevel <= 42)) {
@@ -338,8 +362,6 @@ dWMPathManager_c::~dWMPathManager_c() {
}
// So.. are we candidates for any of these?
- ResetAllCompletionCandidates();
-
LastLevelPlayed[0] = enteredLevel->worldSlot;
LastLevelPlayed[1] = enteredLevel->levelSlot;
@@ -604,7 +626,7 @@ bool dWMPathManager_c::doingThings() {
if (isEnteringLevel || (waitAfterUnlock > 0) || (completionAnimDelay > 0) ||
(waitAtStart > 0) || (waitAfterInitialPlayerAnim > 0) ||
panningCameraToPaths || panningCameraFromPaths ||
- (waitBeforePanBack > 0) ||
+ (waitBeforePanBack > 0) || !initialLoading ||
(countdownToFadeIn > 0) || (unlockingAlpha != -1))
return true;
@@ -637,11 +659,15 @@ void dWMPathManager_c::execute() {
PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_VOC_MA_CS_COURSE_MISS, 1);
} else if (mustPlayAfterWinAnim) {
daWMPlayer_c::instance->visible = true;
- daWMPlayer_c::instance->startAnimation(dm_surp_wait, 1.0f, 0.0f, 0.0f);
- waitAfterInitialPlayerAnim = 38;
+ if (dScKoopatlas_c::instance->isAfter8Castle) {
+ waitAfterInitialPlayerAnim = 1;
+ } else {
+ daWMPlayer_c::instance->startAnimation(dm_surp_wait, 1.0f, 0.0f, 0.0f);
+ waitAfterInitialPlayerAnim = 38;
- nw4r::snd::SoundHandle something;
- PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_VOC_MA_CS_JUMP, 1);
+ nw4r::snd::SoundHandle something;
+ PlaySoundWithFunctionB4(SoundRelatedClass, &something, SE_VOC_MA_CS_JUMP, 1);
+ }
}
}
return;
@@ -1308,6 +1334,8 @@ void dWMPathManager_c::copyWorldDefToSave(const dKPWorldDef_s *world) {
save->hudHintS = world->hudHintS;
save->hudHintL = world->hudHintL;
+ if (save->titleScreenWorld == 3 && save->titleScreenLevel == 10)
+ return;
save->titleScreenWorld = world->titleScreenWorld;
save->titleScreenLevel = world->titleScreenLevel;
}