summaryrefslogtreecommitdiff
path: root/src/koopatlas/pathmanager.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-11-24 17:00:56 +0100
committerTreeki <treeki@gmail.com>2012-11-24 17:00:56 +0100
commit1609b49c5c1777e663909b1936b2f8921677f230 (patch)
tree48fadc91172ce2329118df15808d521ce327a6b8 /src/koopatlas/pathmanager.cpp
parentad5b71629c3438aba0ee559d2b888b5f5d59567f (diff)
downloadkamek-1609b49c5c1777e663909b1936b2f8921677f230.tar.gz
kamek-1609b49c5c1777e663909b1936b2f8921677f230.zip
cloud animation at start of game. untested
Diffstat (limited to 'src/koopatlas/pathmanager.cpp')
-rw-r--r--src/koopatlas/pathmanager.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index 3463cac..a5e4294 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -10,6 +10,8 @@ extern "C" void PlaySoundWithFunctionB4(void *spc, nw4r::snd::SoundHandle *handl
static u8 MaybeFinishingLevel[2] = {0xFF,0xFF};
void dWMPathManager_c::setup() {
+ dScKoopatlas_c *wm = dScKoopatlas_c::instance;
+
isMoving = false;
isJumping = false;
scaleAnimProgress = -1;
@@ -17,7 +19,7 @@ void dWMPathManager_c::setup() {
currentPath = 0;
reverseThroughPath = false;
- pathLayer = dScKoopatlas_c::instance->mapData.pathLayer;
+ pathLayer = wm->mapData.pathLayer;
SpammyReport("setting up PathManager\n");
SaveBlock *save = GetSaveFile()->GetBlock(-1);
@@ -40,9 +42,9 @@ void dWMPathManager_c::setup() {
SpammyReport("done\n");
// Figure out what path node to start at
- if (dScKoopatlas_c::instance->settings & 0x10000000) {
+ if (wm->settings & 0x10000000) {
// Start off from a "Change"
- u8 changeID = (dScKoopatlas_c::instance->settings >> 20) & 0xFF;
+ u8 changeID = (wm->settings >> 20) & 0xFF;
SpammyReport("entering at Change ID %d\n", changeID);
SpammyReport("Path layer: %p\n", pathLayer);
SpammyReport("Node count: %d\n", pathLayer->nodeCount);
@@ -114,6 +116,9 @@ void dWMPathManager_c::setup() {
else
waitAtStart = -1;
+ if (wm->currentMapID == 0 && wm->settings & 0x80000000)
+ waitAtStart = 280;
+
SpammyReport("saved path node: %d\n", save->current_path_node);
if (save->current_path_node >= pathLayer->nodeCount) {
SpammyReport("out of bounds (%d), using node 0\n", pathLayer->nodeCount);