diff options
Diffstat (limited to 'src/koopatlas/core.cpp')
-rw-r--r-- | src/koopatlas/core.cpp | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp index 8584ee9..462b995 100644 --- a/src/koopatlas/core.cpp +++ b/src/koopatlas/core.cpp @@ -269,10 +269,10 @@ bool WMInit_SetupExtra(void *ptr) { // it is created in dScKoopatlas_c::onCreate SpammyReport("creating SHOP\n"); - wm->shop = (dWMShop_c*)CreateParentedObject(WM_SHOP, wm, 0, 2); + wm->shop = (dWMShop_c*)CreateParentedObject(WM_SHOP, wm, 0, 0); SpammyReport("creating Star Coin Menu\n"); - wm->coins = (dWMStarCoin*)CreateParentedObject(WM_STARCOIN, wm, 0, 2); + wm->coins = (dWMStarCoin_c*)CreateParentedObject(WM_STARCOIN, wm, 0, 0); SpammyReport("SetupExtra done\n"); @@ -333,6 +333,8 @@ DoStartLevel(GetGameMgr(), &sl); int dScKoopatlas_c::onCreate() { + OSReport("KP scene settings: %08x\n", settings); + SpammyReport("onCreate() called\n"); SpammyReport("LoadMapScene()\n"); @@ -401,6 +403,8 @@ int dScKoopatlas_c::onCreate() { SaveBlock *save = GetSaveFile()->GetBlock(-1); currentMapID = save->current_world; + somethingAboutSound(_8042A788); + return true; } @@ -541,30 +545,31 @@ void dScKoopatlas_c::executeState_CSMenu() { switch (CSMENU_CURRENT(this->csMenu)) { case 0: // Star Coins - 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); } +// 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); +// } +// } +// else { MapSoundPlayer(SoundRelatedClass, SE_SYS_INVALID, 1); } + coins->show(); + state.setState(&StateID_CoinsWait); break; case 1: @@ -758,7 +763,7 @@ void dScKoopatlas_c::executeState_ShopWait() { // STATE_StarCoin : Wait for the user to exit the Star Coin screen. void dScKoopatlas_c::executeState_CoinsWait() { - if (coins->isHidden) { + if (!coins->visible) { state.setState(&StateID_Normal); } |