diff options
Diffstat (limited to 'src/koopatlas/pathmanager.cpp')
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 335156f..89b9f59 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -1282,36 +1282,15 @@ void dWMPathManager_c::activatePoint() { void dWMPathManager_c::unlockAllPaths(char type) { - // Unlocks ALL paths, regular and secret - if (type == 0) { - for (int i = 0; i < pathLayer->pathCount; i++) { - dKPPath_s *path = pathLayer->paths[i]; - path->isAvailable = true; - - SaveBlock *save = GetSaveFile()->GetBlock(-1); - for (int j = 0; j < 10; j++) { - for (int h = 0; h < 0x2A; h++) { - save->completions[j][h] = 0x30; - } - } - unlockPaths(); - } - } - - // Unlocks ALL paths, regular only - if (type == 1) { - for (int i = 0; i < pathLayer->pathCount; i++) { - dKPPath_s *path = pathLayer->paths[i]; - path->isAvailable = true; - - SaveBlock *save = GetSaveFile()->GetBlock(-1); - for (int j = 0; j < 10; j++) { - for (int h = 0; h < 0x2A; h++) { - save->completions[j][h] = 0x10; - } + if (type == 0 || type == 1) { + SaveBlock *save = GetSaveFile()->GetBlock(-1); + for (int j = 0; j < 10; j++) { + for (int h = 0; h < 0x2A; h++) { + if (j != 1 || h != 9) + save->completions[j][h] = (type == 1) ? 0x17 : 0x37; } - unlockPaths(); } + unlockPaths(); } // Unlocks current path, regular and secret @@ -1321,7 +1300,7 @@ void dWMPathManager_c::unlockAllPaths(char type) { int l = currentNode->levelNumber[1] - 1; SaveBlock *save = GetSaveFile()->GetBlock(-1); - save->completions[w][l] = 0x30; + save->completions[w][l] = 0x37; unlockPaths(); } } |