diff options
author | Colin Noga <Tempus@chronometry.ca> | 2013-06-13 12:21:31 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2013-06-13 12:21:31 -0500 |
commit | 251754fd4b37b936e50ab40a7aa95ac0c1f4587e (patch) | |
tree | 44a19f54fd81978d8150727cabf1f00af4ae6e1e | |
parent | 450fab6ad76e5d23b7d898abd8c3e8112b6e3053 (diff) | |
download | kamek-251754fd4b37b936e50ab40a7aa95ac0c1f4587e.tar.gz kamek-251754fd4b37b936e50ab40a7aa95ac0c1f4587e.zip |
Fixed music house wrong item issue, removed OSReports, fixed thundercloud freezing issue
-rw-r--r-- | src/bonusRoom.cpp | 78 | ||||
-rwxr-xr-x | src/thundercloud.cpp | 2 |
2 files changed, 6 insertions, 74 deletions
diff --git a/src/bonusRoom.cpp b/src/bonusRoom.cpp index 5438b4f..ab06d31 100644 --- a/src/bonusRoom.cpp +++ b/src/bonusRoom.cpp @@ -163,9 +163,9 @@ int Songs[16][4][16][3] = { const char* Prizes[10][4] = { { "I_kinoko", "g3d/I_kinoko.brres", "I_kinoko", "wait2" }, { "I_fireflower", "g3d/I_fireflower.brres", "I_fireflower", "wait2" }, + { "I_propeller", "g3d/I_propeller.brres", "I_propeller_model", "wait2" }, { "I_iceflower", "g3d/I_iceflower.brres", "I_iceflower", "wait2" }, { "I_penguin", "g3d/I_penguin.brres", "I_penguin", "wait2" }, - { "I_propeller", "g3d/I_propeller.brres", "I_propeller_model", "wait2" }, { "I_kinoko_bundle","g3d/I_mini_kinoko.brres", "I_mini_kinoko", "wait2" }, { "I_star", "g3d/I_star.brres", "I_star", "wait2" }, { "I_hammer", "g3d/I_fireflower.brres", "I_fireflower", "wait2" }, @@ -173,39 +173,6 @@ const char* Prizes[10][4] = { { "obj_coin", "g3d/obj_coin.brres", "obj_coin", "wait2" } }; -int PrizePacks[16][4] = { // Numbers list prizes for each level - // 0 = Mushroom - // 1 = Fireflower - // 2 = Iceflower - // 3 = Penguin - // 4 = Propeller - // 5 = MiniShroom - // 6 = Starman - // 7 = Hammer - // 8 = 1-ups - // 9 = Coins - - {9, 9, 0, 8}, // Coins, Coins, Mushroom, 1-up - {9, 0, 8, 1}, // Coins, Mushroom, 1-up, Fireflower - {9, 0, 1, 2}, // Coins, Mushroom, Fireflower, Iceflower - {9, 0, 5, 4}, // Coins, Mushroom, MiniShroom, Propellor - - {0, 0, 8, 5}, // Mushroom, Mushroom, 1-up, MiniShroom - {0, 1, 2, 7}, // Mushroom, Fireflower, IceFlower, Hammer - {0, 8, 4, 4}, // Mushroom, 1-up, Propeller, Propeller - {0, 1, 2, 6}, // Mushroom, Fireflower, IceFlower, Starman - - {8, 8, 8, 8}, // 1-up, 1-up, 1-up, 1-up - {8, 1, 4, 7}, // 1-up, Fireflower, Propellor, Hammer - {8, 1, 7, 6}, // 1-up, Fireflower, Hammer, Starman - {8, 6, 5, 6}, // 1-up, Starman, MiniShroom, Starman - - {2, 2, 3, 6}, // Iceflower, Iceflower, Penguin, Starman - {0, 0, 5, 5}, // Mushroom, Mushroom, MiniShroom, MiniShroom - {4, 4, 4, 4}, // Propeller, Propeller, Propeller, Propeller - {6, 6, 6, 6} // Starman, Starman, Starman, Starman -}; - const char* Notes[24] = { "sfx/3C", "sfx/3C#", @@ -254,8 +221,6 @@ static nw4r::snd::StrmSoundHandle handle; u8 hijackMusicWithSongName(const char *songName, int themeID, bool hasFast, int channelCount, int trackCount, int *wantRealStreamID); void BonusMusicPlayer(int id) { - OSReport("Playing sfx %d\n", id); - if (handle.Exists()) handle.Stop(0); @@ -409,7 +374,6 @@ void dSongPrize::executeState_Shrink() { float modS = 3.0f - (timer * (2.0f / 60.0f)); pos = (Vec){ modX, modY, pos.z }; - //OSReport("Item scale according to Hermite Keys: %f from frame %d\n", modS, timer); scale = (Vec){ modS, modS, modS }; if (timer == 60) { doStateChange(&StateID_Wait); } @@ -540,7 +504,6 @@ class dSingAlong : public dStageActor_c { dSingAlong *dSingAlong::instance = 0; dSingAlong *dSingAlong::build() { - OSReport("Building Sing Along."); void *buffer = AllocFromGameHeap1(sizeof(dSingAlong)); dSingAlong *c = new(buffer) dSingAlong; @@ -554,7 +517,6 @@ dSingAlong *dSingAlong::build() { int dSingAlong::onCreate() { NoMichaelBuble = true; - OSReport("Creating the Sing Along gang."); // Load in the settings this->song = this->settings & 0xF; this->prize[0] = (this->settings >> 28) & 0xF; @@ -567,9 +529,9 @@ int dSingAlong::onCreate() { this->Powerups[0] = 0; // Mushroom this->Powerups[1] = 0; // Fireflower - this->Powerups[2] = 0; // Iceflower - this->Powerups[3] = 0; // Penguin - this->Powerups[4] = 0; // Propeller + this->Powerups[2] = 0; // Propeller + this->Powerups[3] = 0; // Iceflower + this->Powerups[4] = 0; // Penguin this->Powerups[5] = 0; // MiniShroom this->Powerups[6] = 0; // Starman this->Powerups[7] = 0; // Hammer @@ -606,31 +568,23 @@ int dSingAlong::onExecute() { int dSingAlong::onDraw() { return true; } int dSingAlong::onDelete() { - OSReport("Sing Along Instance Remove"); instance = 0; - OSReport("Sing Along Delete"); return 1; } /*****************************************************************************/ // Register a Note being played by the players void dSingAlong::RegisterNote(int note) { - OSReport("Register Note begins: %d", note); - OSReport("Responding is: %d", isResponding); - nw4r::snd::SoundHandle handle; if (isResponding == 1) { - OSReport("State was checked"); if (note == Songs[song][chorus][currentNote][0]) { BonusMusicPlayer(Songs[song][chorus][currentNote][1]-1); // MapSoundPlayer(SoundRelatedClass, Notes[Songs[song][chorus][currentNote][1]-1], 1); - OSReport("Note was correct"); currentNote += 1; } else { - OSReport("Player made a mistake"); PlaySoundWithFunctionB4(SoundRelatedClass, &handle, SE_MG_CMN_WIN_CLOSE, 1); isResponding = 0; state.setState(&StateID_Mistake); @@ -669,8 +623,6 @@ void dSingAlong::executeState_Prize() { } if ((timer == 60) && (chorus >= 0)) { - OSReport("Switching PrizeModel States"); - if (chorus == 0) { Pa = PrizeModel; } if (chorus == 1) { Pb = PrizeModel; } if (chorus == 2) { Pc = PrizeModel; } @@ -695,9 +647,7 @@ void dSingAlong::executeState_Prize() { PlaySoundWithFunctionB4(SoundRelatedClass, &handle, SE_OBJ_ITEM_APPEAR, 1); //PlaySound(this, SE_OBJ_ITEM_APPEAR); // SE_OBJ_GOOD_ITEM_APPEAR - OSReport("Making the prize model"); PrizeModel = (dSongPrize*)create(WM_SINKSHIP, chorus + (prize[chorus] << 16), &pos, &rot, 0); - OSReport("Prize Model Made"); } if (timer == -90) { @@ -716,19 +666,11 @@ CREATE_STATE(dSingAlong, Call); void dSingAlong::beginState_Call() { timer = 0; currentNote = 0; - - OSReport("SONG: {%d, %d} {%d %d} {%d %d}", Songs[song][chorus][0][0], Songs[song][chorus][0][1], Songs[song][chorus][1][0], Songs[song][chorus][1][1], Songs[song][chorus][2][0], Songs[song][chorus][2][1]); } void dSingAlong::executeState_Call() { - - // OSReport("%d: Waiting for timer %d", timer, *currentNote[1]); - if (timer == (Songs[song][chorus][currentNote][2] * Tempo[song])) { - OSReport("Playing Note %d", Songs[song][chorus][currentNote][0]); BonusMusicPlayer(Songs[song][chorus][currentNote][1]-1); - // nw4r::snd::SoundHandle handle; - // PlaySoundWithFunctionB4(SoundRelatedClass, &handle, Notes[Songs[song][chorus][currentNote][1]-1], 1); Vec effPos; @@ -744,10 +686,7 @@ void dSingAlong::executeState_Call() { currentNote += 1; - OSReport("Next Note %d", Songs[song][chorus][currentNote][0]); - if (Songs[song][chorus][currentNote][0] == 0) { - OSReport("Switching to Response Mode"); state.setState(&StateID_Response); } } @@ -767,12 +706,10 @@ void dSingAlong::beginState_Response() { timer = 0; currentNote = 0; isResponding = 1; - OSReport("Is now responding: %d", isResponding); } void dSingAlong::executeState_Response() { if (Songs[song][chorus][currentNote][0] == 0) { isResponding = 0; - OSReport("Switching to some other mode: %d", isResponding); MakeMarioEnterDemoMode(); this->success = this->success + 1; state.setState(&StateID_Prize); @@ -800,11 +737,6 @@ void dSingAlong::beginState_Mistake() { } void dSingAlong::executeState_Mistake() { - // if (timer == 145) - // for (int i = 0; i < 4; i++) - // if (dAcPy_c *player = dAcPy_c::findByID(i)) - // player->setAnimePlayWithAnimID(dm_surprise); - if (timer == 60) { nw4r::snd::SoundHandle handle; PlaySoundWithFunctionB4(SoundRelatedClass, &handle, SE_MG_IH_NOPAIR_NG, 1); @@ -823,9 +755,7 @@ void dSingAlong::executeState_Mistake() { nw4r::snd::SoundHandle handle; PlaySoundWithFunctionB4(SoundRelatedClass, &handle, SE_OBJ_ITEM_APPEAR, 1); - OSReport("Making the prize model"); PrizeModel = (dSongPrize*)create(WM_SINKSHIP, chorus + (prize[chorus] << 16), &pos, &rot, 0); - OSReport("Prize Model Made"); } if (timer == -90) { diff --git a/src/thundercloud.cpp b/src/thundercloud.cpp index 116d076..154a719 100755 --- a/src/thundercloud.cpp +++ b/src/thundercloud.cpp @@ -152,6 +152,8 @@ void dThunderCloud::powBlockActivated(bool isNotMPGP) { } //extern "C" __destroy_arr(struct DoSomethingCool, void(*)(void), int cnt, int bar); bool dThunderCloud::CreateIceActors() { + this->Lightning.removeFromList(); + struct DoSomethingCool my_struct = { 0, (Vec){pos.x, pos.y - 16.0, pos.z}, {1.75, 1.4, 1.5}, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; this->frzMgr.Create_ICEACTORs( (void*)&my_struct, 1 ); __destroy_arr( (void*)&my_struct, sub_80024C20, 0x3C, 1 ); |