summaryrefslogtreecommitdiff
path: root/src/koopatlas
diff options
context:
space:
mode:
Diffstat (limited to 'src/koopatlas')
-rw-r--r--src/koopatlas/core.cpp8
-rw-r--r--src/koopatlas/core.h1
-rw-r--r--src/koopatlas/pathmanager.cpp14
3 files changed, 21 insertions, 2 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp
index 98c329d..9a24f82 100644
--- a/src/koopatlas/core.cpp
+++ b/src/koopatlas/core.cpp
@@ -405,9 +405,15 @@ int dScKoopatlas_c::onCreate() {
// Prepare this first
SaveBlock *save = GetSaveFile()->GetBlock(-1);
currentMapID = save->current_world;
-
isFirstPlay = (currentMapID == 0) && (settings & 0x80000000);
+ // Are we coming from Kamek cutscene? If so, then do.. some stuff!
+ isAfterKamekCutscene = (settings & 0x40000000);
+ if (isAfterKamekCutscene) {
+ currentMapID = 6; // KoopaPlanet
+ save->current_world = 6;
+ }
+
somethingAboutSound(_8042A788);
return true;
diff --git a/src/koopatlas/core.h b/src/koopatlas/core.h
index a55624d..ce72d64 100644
--- a/src/koopatlas/core.h
+++ b/src/koopatlas/core.h
@@ -113,6 +113,7 @@ class dScKoopatlas_c : public dScene_c {
dDvdLoader_c mapListLoader;
bool isFirstPlay;
+ bool isAfterKamekCutscene;
void startMusic();
bool warpZoneHacks;
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index 0ef89fc..dd291cb 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -7,7 +7,7 @@
extern "C" void PlaySoundWithFunctionB4(void *spc, nw4r::snd::SoundHandle *handle, int id, int unk);
-static u8 MaybeFinishingLevel[2] = {0xFF,0xFF};
+u8 MaybeFinishingLevel[2] = {0xFF,0xFF};
void dWMPathManager_c::setup() {
dScKoopatlas_c *wm = dScKoopatlas_c::instance;
@@ -127,6 +127,18 @@ void dWMPathManager_c::setup() {
currentNode = pathLayer->nodes[save->current_path_node];
SpammyReport("OK %p\n", currentNode);
}
+
+ if (wm->isAfterKamekCutscene) {
+ // look for the 8-1 node
+ 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] == 1) {
+ currentNode = node;
+ save->current_path_node = i;
+ break;
+ }
+ }
+ }
}
for (int i = 0; i < pathLayer->nodeCount; i++)