diff options
author | Treeki <treeki@gmail.com> | 2012-11-24 17:00:56 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-11-24 17:00:56 +0100 |
commit | 1609b49c5c1777e663909b1936b2f8921677f230 (patch) | |
tree | 48fadc91172ce2329118df15808d521ce327a6b8 /src/koopatlas | |
parent | ad5b71629c3438aba0ee559d2b888b5f5d59567f (diff) | |
download | kamek-1609b49c5c1777e663909b1936b2f8921677f230.tar.gz kamek-1609b49c5c1777e663909b1936b2f8921677f230.zip |
cloud animation at start of game. untested
Diffstat (limited to 'src/koopatlas')
-rw-r--r-- | src/koopatlas/map.cpp | 8 | ||||
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 11 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/koopatlas/map.cpp b/src/koopatlas/map.cpp index ff28e19..c2cb13e 100644 --- a/src/koopatlas/map.cpp +++ b/src/koopatlas/map.cpp @@ -114,14 +114,20 @@ void dWMMap_c::renderer_c::drawXlu() { void dWMMap_c::renderer_c::drawLayers() { - dKPMapData_c *dataCls = &dScKoopatlas_c::instance->mapData; + dScKoopatlas_c *wm = dScKoopatlas_c::instance; + dKPMapData_c *dataCls = &wm->mapData; dKPMapFile_s *data = dataCls->data; baseZ = -100.0f - (2 * data->layerCount); + bool skipFirstLayer = (wm->currentMapID == 0) && !(wm->settings & 0x80000000); + beginRendering(); for (int iLayer = data->layerCount - 1; iLayer >= 0; iLayer--) { + if (skipFirstLayer && iLayer == 0) + continue; + dKPLayer_s *layer = data->layers[iLayer]; renderMtx[2][3] += 2.0f; 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); |