diff options
Diffstat (limited to 'src/koopatlas/core.cpp')
-rw-r--r-- | src/koopatlas/core.cpp | 89 |
1 files changed, 56 insertions, 33 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index 6378a27..7435103 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -469,37 +469,39 @@ void dScKoopatlas_c::executeState_Normal() { } else if (nowPressed & WPAD_PLUS) { CSMENU_ACTIVE(this->csMenu) = true; state.setState(&StateID_CSMenu); - } else if (nowPressed & WPAD_A) { - - if (pathManager.currentNode->type == dKPNode_s::LEVEL) { - int w = pathManager.currentNode->levelNumber[0]; - if (w == 9) { - int l = pathManager.currentNode->levelNumber[1]; - - if ((l < 6) || (l == 33) || (l == 34)) - coins->LoadCoinsForWorld(9); - else if ((l < 11) || (l == 35) || (l == 36)) - coins->LoadCoinsForWorld(10); - else if ((l < 16) || (l == 37) || (l == 38) || (l == 31) ) - coins->LoadCoinsForWorld(11); - else if ((l < 19) || (l == 39) || (l == 40)) - coins->LoadCoinsForWorld(12); - else - coins->LoadCoinsForWorld(13); - - state.setState(&StateID_CoinsWait); - } - else { - coins->LoadCoinsForWorld(w-1); - state.setState(&StateID_CoinsWait); - } - } - else { - MapSoundPlayer(SoundRelatedClass, SE_SYS_INVALID, 1); - } - - } else if (nowPressed & WPAD_B) { + // } else if (nowPressed & WPAD_A) { + + // if (pathManager.currentNode->type == dKPNode_s::LEVEL) { + // int w = pathManager.currentNode->levelNumber[0]; + // if (w == 9) { + // int l = pathManager.currentNode->levelNumber[1]; + + // if ((l < 6) || (l == 33) || (l == 34)) + // coins->LoadCoinsForWorld(9); + // else if ((l < 11) || (l == 35) || (l == 36)) + // coins->LoadCoinsForWorld(10); + // else if ((l < 16) || (l == 37) || (l == 38) || (l == 31) ) + // coins->LoadCoinsForWorld(11); + // else if ((l < 19) || (l == 39) || (l == 40)) + // coins->LoadCoinsForWorld(12); + // else + // coins->LoadCoinsForWorld(13); + + // state.setState(&StateID_CoinsWait); + // } + // else { + // coins->LoadCoinsForWorld(w-1); + // state.setState(&StateID_CoinsWait); + // } + // } + // else { + // MapSoundPlayer(SoundRelatedClass, SE_SYS_INVALID, 1); + // } + + } else if (nowPressed & WPAD_MINUS) { pathManager.unlockAllPaths(2); + } else if (nowPressed & WPAD_A) { + pathManager.unlockAllPaths(0); } pathManager.execute(); @@ -518,9 +520,30 @@ void dScKoopatlas_c::executeState_CSMenu() { switch (CSMENU_CURRENT(this->csMenu)) { case 0: // Star Coins - MapReport("Star Coins was pressed\n"); - coins->LoadCoinsForWorld(save->current_world); - state.setState(&StateID_CoinsWait); + if (pathManager.currentNode->type == dKPNode_s::LEVEL) { + int w = pathManager.currentNode->levelNumber[0]; + if (w == 9) { + int l = pathManager.currentNode->levelNumber[1]; + + if ((l < 6) || (l == 33) || (l == 34)) + coins->LoadCoinsForWorld(9); + else if ((l < 11) || (l == 35) || (l == 36)) + coins->LoadCoinsForWorld(10); + else if ((l < 16) || (l == 37) || (l == 38) || (l == 31) ) + coins->LoadCoinsForWorld(11); + else if ((l < 19) || (l == 39) || (l == 40)) + coins->LoadCoinsForWorld(12); + else + coins->LoadCoinsForWorld(13); + + state.setState(&StateID_CoinsWait); + } + else { + coins->LoadCoinsForWorld(w-1); + state.setState(&StateID_CoinsWait); + } + } + else { MapSoundPlayer(SoundRelatedClass, SE_SYS_INVALID, 1); } break; case 1: |