diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-07-28 00:03:36 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-07-28 00:03:36 -0500 |
commit | 6760e0279e18fbe615fc2dc3c0101ca155e4210a (patch) | |
tree | a3ee14506a13b6ff92ff8718d34a0661e1298e0d /src/koopatlas | |
parent | 2226bfeb0dc0892e7aaa9a507031c42515c0ef00 (diff) | |
download | kamek-6760e0279e18fbe615fc2dc3c0101ca155e4210a.tar.gz kamek-6760e0279e18fbe615fc2dc3c0101ca155e4210a.zip |
more star coin screen imrprovements
Diffstat (limited to 'src/koopatlas')
-rw-r--r-- | src/koopatlas/core.cpp | 31 | ||||
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 2 | ||||
-rw-r--r-- | src/koopatlas/starcoin.cpp | 32 |
3 files changed, 50 insertions, 15 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index 4709d8e..6378a27 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -470,9 +470,34 @@ void dScKoopatlas_c::executeState_Normal() { CSMENU_ACTIVE(this->csMenu) = true; state.setState(&StateID_CSMenu); } else if (nowPressed & WPAD_A) { - SaveBlock *save = GetSaveFile()->GetBlock(-1); - 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); + } + } else if (nowPressed & WPAD_B) { pathManager.unlockAllPaths(2); } diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 0b3f012..090a82e 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -537,7 +537,7 @@ void dWMPathManager_c::activatePoint() { int w = currentNode->levelNumber[0] - 1; int l = currentNode->levelNumber[1] - 1; - if (l == 2) { + if (l == 0) { dWMShop_c::instance->LoadShopForWorld(w); dScKoopatlas_c::instance->state.setState(&dScKoopatlas_c::instance->StateID_ShopWait); return; diff --git a/src/koopatlas/starcoin.cpp b/src/koopatlas/starcoin.cpp index 22fd044..667be09 100644 --- a/src/koopatlas/starcoin.cpp +++ b/src/koopatlas/starcoin.cpp @@ -48,6 +48,7 @@ int dWMStarCoin::onCreate() { if (!gotFile) return false; + isHidden = false; static const char *brlanNames[2] = {"coin_inWindow.brlan", "coin_outWindow.brlan"}; static const char *groupNames[2] = {"A00_Window", "A00_Window"}; @@ -117,7 +118,7 @@ int dWMStarCoin::onDraw() { void dWMStarCoin::specialDraw1() { if (!isHidden) { - Vec pos = {330.0f, 250.0f, -1000.0f}; + Vec pos = {420.0f, 194.0f, -1000.0f}; S16Vec rot = {0,rotation,0}; Vec scale = {2.0f, 2.0f, 2.0f}; matrix.translation(pos.x, pos.y, pos.z); @@ -409,17 +410,26 @@ void dWMStarCoin::setWorldName(int world) { case 10: setText("Goldwood Forest", "T_lefttitle_01"); setText(" ", "T_righttitle_01"); + break; + + case 11: + setText("Mini-Mega Island", "T_lefttitle_01"); + setText(" ", "T_righttitle_01"); + break; - // if ((level < 6) || (level == 33) || (level == 34)) - // setWorldText("Goldwood\nForest"); - // else if ((level < 11) || (level == 35) || (level == 36)) - // setWorldText("Mini-Mega\nIsland"); - // else if ((level < 16) || (level == 37) || (level == 38) || (level == 31) ) - // setWorldText("Crystal\nCaves"); - // else if ((level < 19) || (level == 39) || (level == 40)) - // setWorldText("Bombard\nCliffs"); - // else - // setWorldText("Sky\nCity"); + case 12: + setText("Crystal Caves", "T_lefttitle_01"); + setText(" ", "T_righttitle_01"); + break; + + case 13: + setText("Bombard Cliffs", "T_lefttitle_01"); + setText(" ", "T_righttitle_01"); + break; + + case 14: + setText("Sky City", "T_lefttitle_01"); + setText(" ", "T_righttitle_01"); break; default: |