diff options
author | Treeki <treeki@gmail.com> | 2013-01-28 02:34:45 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-01-28 02:34:45 +0100 |
commit | f6ff7ca41f6e9b496a03e05e2ae053481add2a9f (patch) | |
tree | a92095aeb5cd326d50e7ee6c1d447a956d9293b7 /src/koopatlas/pathmanager.cpp | |
parent | 5b3a54abcdfee1f82b200ed45c9b44a4251c8406 (diff) | |
download | kamek-f6ff7ca41f6e9b496a03e05e2ae053481add2a9f.tar.gz kamek-f6ff7ca41f6e9b496a03e05e2ae053481add2a9f.zip |
adding warp zone support to maps and a couple of fixes
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 7f4b754..435c6f1 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -753,7 +753,7 @@ void dWMPathManager_c::moveThroughPath(int pressedDir) { // Quick check: do we *actually* need to stop on this node? // If it's a junction with more than two exits, but only two are open, // take the opposite open one - if (to->getExitCount() > 2 && to->getAvailableExitCount() == 2) + if (!dScKoopatlas_c::instance->warpZoneHacks && to->getExitCount() > 2 && to->getAvailableExitCount() == 2) reallyStop = false; else reallyStop = true; @@ -791,8 +791,26 @@ void dWMPathManager_c::moveThroughPath(int pressedDir) { save->titleScreenWorld = world->titleScreenWorld; save->titleScreenLevel = world->titleScreenLevel; - if (visiblyChange && dWMHud_c::instance) - dWMHud_c::instance->showFooter(); + bool wzHack = false; + if (dScKoopatlas_c::instance->warpZoneHacks) { + save->hudHintH += 1000; + + if (world->worldID > 0) { + dLevelInfo_c *linfo = &dLevelInfo_c::s_info; + dLevelInfo_c::entry_s *lastLevel = linfo->searchByDisplayNum(world->worldID-1, lastLevelIDs[world->worldID-1]); + if (lastLevel) { + wzHack = !(save->GetLevelCondition(lastLevel->worldSlot,lastLevel->levelSlot) & COND_NORMAL); + } + } + } + + if (wzHack) { + save->hudHintH = 2000; + dWMHud_c::instance->hideFooter(); + } else { + if (visiblyChange && dWMHud_c::instance) + dWMHud_c::instance->showFooter(); + } dKPMusic::play(world->trackID); |