From 8298fdf26d3bbcc203addee66d8598d6c6c024e0 Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 25 Feb 2013 22:04:42 +0100 Subject: slightly improved debug crap for unlocking all exits/coins/etc --- src/koopatlas/pathmanager.cpp | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) (limited to 'src') 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(); } } -- cgit v1.2.3