diff options
author | Treeki <treeki@gmail.com> | 2013-02-25 22:04:42 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-02-25 22:04:42 +0100 |
commit | 8298fdf26d3bbcc203addee66d8598d6c6c024e0 (patch) | |
tree | c10d4f7941d15dbb3b072f037ec92b34d94fcdc8 | |
parent | 0293c106b254d818038439cc9a9a51bdd677c2b3 (diff) | |
download | kamek-8298fdf26d3bbcc203addee66d8598d6c6c024e0.tar.gz kamek-8298fdf26d3bbcc203addee66d8598d6c6c024e0.zip |
slightly improved debug crap for unlocking all exits/coins/etc
-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(); } } |