From 93faabab3cebc0bca795c0d8c1ad832b0c619134 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Thu, 18 Apr 2013 20:38:17 -0500 Subject: Did a whole bunch of editing to the song files, added a tempo meter for easy adjustments --- src/bonusRoom.cpp | 248 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 138 insertions(+), 110 deletions(-) (limited to 'src') diff --git a/src/bonusRoom.cpp b/src/bonusRoom.cpp index b7fd395..a5cd583 100644 --- a/src/bonusRoom.cpp +++ b/src/bonusRoom.cpp @@ -9,20 +9,30 @@ extern "C" void *MakeMarioExitDemoMode(); extern "C" bool SpawnEffect(const char*, int, Vec*, S16Vec*, Vec*); extern "C" void *StopBGMMusic(); extern "C" void *StartBGMMusic(); -extern "C" void *SoundRelatedClass; -extern "C" void *MapSoundPlayer(void *SoundClass, int soundID, int unk); +// extern "C" void *SoundRelatedClass; // THIS IS A DUMB NAME extern bool NoMichaelBuble; + +// Controls the tempo for the songs. +// Lower numbers are faster, by a ratio factor. + +int Tempo[16] = {13,11,12,12, + 8,8,7,15, + 15,8,10,16, + 12,10,8,8}; + int Songs[16][4][16][3] = { + // 15 + // First number is the block, Second is the note/sfx, Third is timing: 30 is one quarter note at 120 bpm, 0,0 ends the sequence + // Some possibles // SMW Donut Plains // SMW Forest of Illusion // Paper Mario Battle Theme - // Gusty Garden Galaxy // Thwomp Volcano: PiT // SMRPG Forest? // SMRPG Nimbus Land? @@ -31,120 +41,115 @@ int Songs[16][4][16][3] = { // Mario Sunshine Main Theme // Mario Kart DS Theme - - // Overworld Themes: 5-6 - // Cave Themes: 2-3 - // Themed: Yoshi, Ghost, Snow, Star, Desert, Space, Castle, Bowser - - // Currently.... - // Overworld Themes: 1,4,5,8,10 - // Cave Themes: 2,6 - // Themed: 9, -, 12, 3, -, -, 7, 11 - - { // Song 1 - Super Mario Bros Melody |*** | - {{3,17,0},{3,17,15},{3,17,45},{1,13,75},{3,17,90},{5,20,120},{0,0,0}}, - {{1,13,0},{5,8,22},{3,5,45},{6,10,67},{7,12,82},{6,11,97},{6,10,105},{0,0,0}}, - {{1,13,0},{1,13,7},{1,13,22},{1,13,37},{2,15,45},{3,17,60},{1,13,67},{7,10,82},{6,8,90},{0,0,0}}, - {{1,13,0},{1,13,7},{1,13,22},{1,13,37},{2,15,45},{3,17,52},{0,0,0}} + {{3,17,0},{3,17,2},{3,17,6},{1,13,10},{3,17,12},{5,20,16},{0,0,0}}, + {{1,13,0},{5,8,3},{3,5,6},{6,10,9},{7,12,11},{6,11,13},{6,10,14},{0,0,0}}, + {{1,13,0},{1,13,1},{1,13,3},{1,13,5},{2,15,6},{3,17,8},{1,13,9},{7,10,11},{6,8,12},{0,0,0}}, + {{1,13,0},{1,13,1},{1,13,3},{1,13,5},{2,15,6},{3,17,7},{0,0,0}} }, { // Song 2 - Super Mario Bros. Underground |**** | - {{7,12,0},{7,24,15},{5,9,30},{5,21,45},{6,10,60},{6,22,75},{0,0,0}}, - {{3,5,0},{3,17,15},{1,2,30},{1,14,45},{2,3,60},{2,15,75},{0,0,0}}, - {{2,15,0},{1,14,10},{1,13,20},{7,12,30},{2,15,45},{1,14,60},{5,8,75},{4,7,90},{1,13,105},{0,0,0}}, - {{7,12,0},{4,18,10},{3,17,20},{2,16,30},{6,22,40},{5,21,50},{4,20,60},{2,15,80},{6,11,100},{6,10,120},{5,9,140},{5,8,150},{0,0,0}} + {{7,12,0},{7,24,2},{5,9,4},{5,21,6},{6,10,8},{6,22,10},{0,0,0}}, + {{3,5,0},{3,17,2},{1,2,4},{1,14,6},{2,3,8},{2,15,10},{0,0,0}}, + {{2,15,0},{1,14,1},{1,13,2},{7,12,3},{2,15,5},{1,14,7},{5,8,9},{4,7,11},{1,13,13},{0,0,0}}, + {{7,12,0},{4,18,1},{3,17,2},{2,16,3},{6,22,4},{5,21,5},{4,20,6},{2,15,10},{6,11,12},{6,10,14},{5,9,16},{5,8,18},{0,0,0}} }, { // Song 3 - SMB Starman |** | - {{4,6,0},{4,6,15},{4,6,30},{2,3,45},{4,6,52},{4,6,68},{2,3,82},{4,6,90},{2,3,98},{4,6,105},{0,0,0}}, - {{3,5,0},{3,5,15},{3,5,30},{1,1,45},{3,5,52},{3,5,68},{1,1,82},{3,5,90},{1,1,98},{3,5,105},{0,0,0}}, - {{4,18,0},{4,18,15},{4,18,30},{2,15,45},{4,18,52},{4,18,68},{2,15,82},{4,18,90},{2,15,98},{4,18,105},{0,0,0}}, - {{3,17,0},{3,17,15},{3,17,30},{1,13,45},{3,17,52},{3,17,68},{1,13,82},{3,17,90},{1,13,98},{3,17,105},{0,0,0}} + {{4,6,0},{4,6,2},{4,6,4},{2,3,6},{4,6,7},{4,6,9},{2,3,11},{4,6,12},{2,3,13},{4,6,14},{0,0,0}}, + {{3,5,0},{3,5,2},{3,5,4},{1,1,6},{3,5,7},{3,5,9},{1,1,11},{3,5,12},{1,1,13},{3,5,14},{0,0,0}}, + {{4,18,0},{4,18,2},{4,18,4},{2,15,6},{4,18,7},{4,18,9},{2,15,11},{4,18,12},{2,15,13},{4,18,14},{0,0,0}}, + {{3,17,0},{3,17,2},{3,17,4},{1,13,6},{3,17,7},{3,17,9},{1,13,11},{3,17,12},{1,13,13},{3,17,14},{0,0,0}} }, { // Song 4 - SMB3 Clouds |* | - {{5,8,0},{5,20,30},{5,8,90},{6,9,120},{6,21,150},{0,0,0}}, - {{6,23,0},{5,20,30},{5,8,60},{3,17,120},{4,18,150},{1,14,180},{6,11,240},{0,0,0}}, - {{1,8,0},{6,20,30},{1,8,90},{2,9,120},{7,21,150},{0,0,0}}, - {{6,23,0},{5,20,30},{1,8,60},{3,17,120},{4,18,150},{1,14,180},{6,11,240},{0,0,0}} + {{1,8,0},{6,20,4},{1,8,12},{2,9,16},{7,21,20},{0,0,0}}, + {{6,23,0},{5,20,4},{1,8,8},{3,17,16},{4,18,20},{1,14,24},{6,11,32},{0,0,0}}, + {{1,8,0},{6,20,4},{1,8,12},{2,9,16},{7,21,20},{0,0,0}}, + {{6,23,0},{5,20,4},{1,8,8},{3,17,16},{4,18,20},{1,14,24},{6,11,32},{0,0,0}} }, { // Song 5 - SMB3 Hammer Bros |*****| - {{2,16,0},{3,17,15},{2,16,30},{3,17,45},{2,15,60},{1,13,75},{6,10,90},{1,13,105},{0,0,0}}, - {{2,16,0},{3,17,15},{2,16,30},{3,17,45},{2,15,60},{1,13,75},{6,10,90},{1,13,105},{1,13,135},{3,16,150},{2,15,158},{1,13,165},{6,10,195},{1,13,210},{0,0,0}}, - {{4,17,0},{4,17,15},{5,19,30},{6,20,45},{7,21,60},{4,17,75},{4,17,105},{3,15,120},{3,15,135},{2,14,150},{3,15,165},{0,0,0}}, - {{2,16,0},{3,17,15},{2,16,30},{3,17,45},{2,15,60},{1,13,75},{6,10,90},{1,13,105},{5,17,135},{5,17,150},{5,17,165},{5,17,180},{5,17,195},{5,17,210},{5,17,225},{0,0,0}} + {{2,16,0},{3,17,2},{2,16,4},{3,17,6},{2,15,8},{1,13,10},{6,10,12},{1,13,14},{0,0,0}}, + {{2,16,0},{3,17,2},{2,16,4},{3,17,6},{2,15,8},{1,13,10},{6,10,12},{1,13,14},{1,13,18},{3,16,20},{2,15,21},{1,13,22},{6,10,26},{1,13,28},{0,0,0}}, + {{4,17,0},{4,17,2},{5,19,4},{6,20,6},{7,21,8},{4,17,10},{4,17,14},{3,15,16},{3,15,18},{2,14,20},{3,15,22},{0,0,0}}, + {{2,16,0},{3,17,2},{2,16,4},{3,17,6},{2,15,8},{1,13,10},{6,10,12},{1,13,14},{5,17,18},{5,17,20},{5,17,22},{5,17,24},{5,17,26},{5,17,28},{5,17,30},{0,0,0}} }, - { // Song 6 - SMB3 Underwater |**** | - {{1,8,0},{3,13,15},{6,20,30},{5,19,45},{7,22,75},{5,19,105},{6,20,120},{4,17,135},{3,13,150},{1,8,165},{2,10,195},{0,0,0}}, - {{1,7,0},{2,8,15},{4,13,30},{6,20,45},{5,19,60},{7,22,90},{5,19,120},{6,20,135},{0,0,0}}, - {{2,10,0},{3,13,15},{6,22,30},{5,21,45},{7,24,75},{6,22,105},{4,20,120},{1,8,135},{6,22,150},{4,20,165},{0,0,0}}, - {{1,8,0},{2,11,15},{5,20,30},{4,18,45},{5,20,75},{3,16,105},{6,22,120},{5,20,180},{0,0,0}} + { // Song 6 - SMB3 Underwater |*** | + {{1,8,0},{3,13,2},{6,20,4},{5,19,6},{7,22,10},{0,0,0}}, + {{5,19,14},{6,20,16},{4,17,18},{3,13,20},{1,8,22},{2,10,26},{0,0,0}}, + {{1,7,0},{2,8,2},{4,13,4},{6,20,6},{5,19,8},{7,22,12},{0,0,0}}, + {{5,19,16},{6,20,18},{0,0,0}} + + // Fuckin' too hard + // {{1,8,0},{3,13,2},{6,20,4},{5,19,6},{7,22,10},{5,19,14},{6,20,16},{4,17,18},{3,13,20},{1,8,22},{2,10,26},{0,0,0}}, + // {{1,7,0},{2,8,2},{4,13,4},{6,20,6},{5,19,8},{7,22,12},{5,19,16},{6,20,18},{0,0,0}}, + // {{2,10,0},{3,13,2},{6,22,4},{5,21,6},{7,24,10},{6,22,14},{4,20,16},{1,8,18},{6,22,20},{4,20,22},{0,0,0}}, + // {{1,8,0},{2,11,2},{5,20,4},{4,18,6},{5,20,10},{3,16,14},{6,22,16},{5,20,24},{0,0,0}} }, { // Song 7 - SMW Castle |* | - {{5,9,0},{4,6,60},{1,1,90},{2,3,120},{4,6,150},{0,0,0}}, - {{1,1,0},{4,6,30},{7,13,60},{5,9,90},{4,8,150},{0,0,0}}, - {{3,16,0},{2,15,30},{1,13,60},{6,15,90},{1,10,150},{0,0,0}}, - {{2,15,0},{1,13,30},{2,15,60},{3,16,90},{1,15,150},{0,0,0}} + {{5,9,0},{4,6,8},{1,1,12},{2,3,16},{4,6,20},{0,0,0}}, + {{1,1,0},{4,6,4},{7,13,8},{5,9,12},{4,8,20},{0,0,0}}, + {{3,16,0},{2,15,4},{1,13,8},{2,15,12},{1,10,20},{0,0,0}}, + {{2,15,0},{1,13,4},{2,15,8},{3,16,12},{1,15,20},{0,0,0}} }, { // Song 8 - SMW Theme |** | - {{6,10,0},{4,6,30},{1,1,52},{2,3,60},{4,6,68},{4,6,82},{0,0,0}}, - {{2,3,0},{1,1,8},{4,6,22},{4,6,38},{7,13,52},{6,10,68},{5,8,90},{0,0,0}}, - {{6,10,0},{4,6,30},{1,1,52},{2,3,60},{4,6,68},{4,6,82},{5,8,112},{6,10,120},{4,6,128},{1,1,135},{2,3,150},{4,6,172},{0,0,0}}, - {{1,13,0},{2,15,15},{1,13,30},{2,15,45},{1,13,60},{1,1,82},{7,11,90},{6,10,98},{5,8,105},{4,6,120},{0,0,0}} + {{6,10,0},{4,6,4},{1,1,7},{2,3,8},{4,6,9},{4,6,11},{0,0,0}}, + {{2,3,0},{1,1,1},{4,6,3},{4,6,5},{7,13,7},{6,10,9},{5,8,12},{0,0,0}}, + {{6,10,0},{4,6,4},{1,1,7},{2,3,8},{4,6,9},{4,6,11},{5,8,15},{6,10,16},{4,6,17},{1,1,18},{2,3,20},{4,6,23},{0,0,0}}, + {{1,13,0},{2,15,2},{1,13,4},{2,15,6},{1,13,8},{1,1,11},{7,11,12},{6,10,13},{5,8,14},{4,6,16},{0,0,0}} }, { // Song 9 - Yoshi Story Theme |* | - {{5,17,0},{6,19,60},{5,17,75},{6,19,90},{5,17,120},{0,0,0}}, - {{3,14,0},{4,15,60},{3,14,75},{4,15,90},{3,14,120},{0,0,0}}, - {{5,17,0},{6,19,60},{5,17,75},{6,19,90},{5,17,120},{0,0,0}}, - {{4,15,0},{3,14,15},{4,15,30},{3,14,60},{2,12,120},{1,10,135},{2,12,150},{1,10,180},{0,0,0}} + {{5,17,0},{6,19,4},{5,17,5},{6,19,6},{5,17,8},{0,0,0}}, + {{3,14,0},{4,15,4},{3,14,5},{4,15,6},{3,14,8},{0,0,0}}, + {{5,17,0},{6,19,4},{5,17,5},{6,19,6},{5,17,8},{0,0,0}}, + {{4,15,0},{3,14,1},{4,15,2},{3,14,4},{2,12,8},{1,10,9},{2,12,10},{1,10,12},{0,0,0}} }, { // Song 10 - SM64 Peaches Castle |*** | - {{4,8,0},{5,10,45},{4,8,75},{3,7,105},{4,8,120},{6,13,135},{7,17,150},{0,0,0}}, - {{3,6,0},{4,8,45},{3,6,75},{2,5,105},{3,6,120},{5,12,135},{6,15,150},{0,0,0}}, - {{2,5,0},{3,6,45},{2,5,75},{1,4,105},{2,5,120},{4,10,135},{5,13,150},{0,0,0}}, - {{4,10,15},{5,12,30},{6,13,45},{7,15,60},{6,13,75},{7,15,90},{4,10,105},{5,12,135},{4,10,150},{5,12,165},{6,13,180},{6,13,210},{6,13,255},{6,13,270},{6,13,285},{0,0,0}} + {{4,8,0},{5,10,6},{4,8,10},{3,7,14},{4,8,16},{6,13,18},{7,17,20},{0,0,0}}, + {{3,6,0},{4,8,6},{3,6,10},{2,5,14},{3,6,16},{5,12,18},{6,15,20},{0,0,0}}, + {{2,5,0},{3,6,6},{2,5,10},{1,4,14},{2,5,16},{4,10,18},{5,13,20},{0,0,0}}, + {{4,10,2},{5,12,4},{6,13,6},{7,15,8},{6,13,10},{7,15,12},{4,10,14},{5,12,18},{4,10,20},{5,12,22},{6,13,24},{6,13,28},{6,13,34},{6,13,36},{6,13,38},{0,0,0}} }, { // Song 11 - SM64 Koopa Road |*** | - {{3,6,0},{1,1,75},{3,6,90},{7,16,105},{6,15,120},{5,11,135},{3,6,150},{0,0,0}}, - {{3,6,0},{2,4,45},{3,6,75},{5,11,90},{4,9,105},{5,11,120},{0,0,0}}, - {{3,6,0},{1,1,75},{3,6,90},{7,16,105},{6,15,120},{5,11,135},{3,6,150},{0,0,0}}, - {{1,1,0},{3,6,15},{7,18,30},{6,16,45},{5,15,75},{4,13,150},{5,15,165},{0,0,0}} + {{3,6,0},{1,1,10},{3,6,12},{7,16,14},{6,15,16},{5,11,18},{3,6,20},{0,0,0}}, + {{3,6,0},{2,4,6},{3,6,10},{5,11,12},{4,9,14},{5,11,16},{0,0,0}}, + {{3,6,0},{1,1,10},{3,6,12},{7,16,14},{6,15,16},{5,11,18},{3,6,20},{0,0,0}}, + {{1,1,0},{3,6,2},{7,18,4},{6,16,6},{5,15,10},{4,13,20},{5,15,22},{0,0,0}} }, { // Song 12 - Frappe Snowland |*** | - {{1,14,15},{2,15,22},{3,17,30},{6,22,38},{3,17,52},{0,0,0}}, - {{2,15,0},{1,14,15},{2,15,30},{1,14,38},{6,10,52},{3,5,68},{4,7,75},{3,5,82},{0,0,0}}, - {{1,14,15},{2,15,22},{3,17,30},{6,22,38},{3,17,52},{0,0,0}}, - {{2,15,0},{1,14,15},{2,15,30},{1,14,38},{6,10,52},{6,10,68},{7,12,75},{6,10,82},{0,0,0}} + {{1,14,2},{2,15,3},{3,17,4},{6,22,5},{3,17,7},{0,0,0}}, + {{2,15,0},{1,14,2},{2,15,4},{1,14,5},{6,10,7},{3,5,9},{4,7,10},{3,5,11},{0,0,0}}, + {{1,14,2},{2,15,3},{3,17,4},{6,22,5},{3,17,7},{0,0,0}}, + {{2,15,0},{1,14,2},{2,15,4},{1,14,5},{6,10,7},{6,10,9},{7,12,10},{6,10,11},{0,0,0}} }, { // Song 13 - Ghost Luigi Mansion theme |**** | - {{7,17,15},{7,17,30},{7,17,45},{7,17,60},{4,13,90},{7,17,105},{6,16,120},{3,12,150},{0,0,0}}, - {{5,15,15},{5,15,30},{5,15,45},{5,15,60},{3,12,90},{5,15,105},{4,13,120},{2,11,165},{3,12,180},{1,5,210},{0,0,0}}, - {{7,17,15},{7,17,30},{7,17,45},{7,17,60},{4,13,90},{7,17,105},{6,16,120},{3,12,150},{0,0,0}}, - {{5,15,15},{5,15,30},{5,15,45},{5,15,60},{3,12,90},{5,15,105},{7,17,120},{5,15,135},{4,13,150},{3,12,165},{1,10,180},{0,0,0}} + {{7,17,2},{7,17,4},{7,17,6},{7,17,8},{4,13,12},{7,17,14},{6,16,16},{3,12,20},{0,0,0}}, + {{5,15,2},{5,15,4},{5,15,6},{5,15,8},{3,12,12},{5,15,14},{4,13,16},{2,11,22},{3,12,24},{1,5,28},{0,0,0}}, + {{7,17,2},{7,17,4},{7,17,6},{7,17,8},{4,13,12},{7,17,14},{6,16,16},{3,12,20},{0,0,0}}, + {{5,15,2},{5,15,4},{5,15,6},{5,15,8},{3,12,12},{5,15,14},{7,17,16},{5,15,18},{4,13,20},{3,12,22},{1,10,24},{0,0,0}} }, { // Song 14 - Desert |** | - {{6,9,0},{4,6,30},{3,5,90},{3,5,120},{4,6,135},{0,0,0}}, - {{6,9,0},{4,6,30},{3,5,90},{3,5,120},{4,6,135},{0,0,0}}, - {{4,13,0},{3,12,150},{5,14,165},{6,17,180},{5,14,195},{4,13,240},{0,0,0}}, - {{1,9,0},{2,11,15},{3,12,30},{5,14,60},{4,13,90},{0,0,0}} + {{6,9,0},{4,6,4},{3,5,12},{3,5,16},{4,6,18},{0,0,0}}, + {{6,9,0},{4,6,4},{3,5,12},{3,5,16},{4,6,18},{0,0,0}}, + {{4,13,0},{3,12,20},{5,14,22},{6,17,24},{5,14,26},{4,13,32},{0,0,0}}, + {{1,9,0},{2,11,2},{3,12,4},{5,14,8},{4,13,12},{0,0,0}} }, { // Song 15 - Gusty Garden Galaxy |*****| - {{5,14,0},{4,13,75},{6,16,90},{5,14,105},{3,9,120},{1,6,195},{2,7,210},{3,9,225},{3,9,240},{2,7,285},{0,0,0}}, - {{6,16,0},{5,15,75},{7,18,90},{6,16,105},{4,14,120},{3,13,165},{2,11,195},{3,13,225},{2,11,240},{1,9,285},{0,0,0}}, - {{6,21,0},{5,20,75},{7,23,90},{6,21,105},{4,19,120},{3,18,165},{4,19,240},{3,18,315},{6,21,330},{4,19,345},{3,18,360},{1,16,405},{0,0,0}}, - {{5,18,0},{4,17,75},{6,19,90},{5,18,105},{4,16,120},{3,15,165},{5,18,195},{4,16,225},{2,14,240},{1,13,285},{2,14,360},{4,16,405},{0,0,0}} + {{5,14,0},{4,13,10},{6,16,12},{5,14,14},{3,9,16},{1,6,26},{2,7,28},{3,9,30},{3,9,32},{2,7,38},{0,0,0}}, + {{6,16,0},{5,15,10},{7,18,12},{6,16,14},{4,14,16},{3,13,22},{2,11,26},{3,13,30},{2,11,32},{1,9,38},{0,0,0}}, + {{6,21,0},{5,20,10},{7,23,12},{6,21,14},{4,19,16},{3,18,22},{4,19,32},{3,18,42},{6,21,44},{4,19,46},{3,18,48},{1,16,54},{0,0,0}}, + {{5,18,0},{4,17,10},{6,19,12},{5,18,14},{4,16,16},{3,15,22},{5,18,26},{4,16,30},{2,14,32},{1,13,38},{2,14,48},{4,16,54},{0,0,0}} }, { // Song 16 - Overworld or Cave @@ -160,10 +165,10 @@ const char* Prizes[10][4] = { { "I_fireflower", "g3d/I_fireflower.brres", "I_fireflower", "wait2" }, { "I_iceflower", "g3d/I_iceflower.brres", "I_iceflower", "wait2" }, { "I_penguin", "g3d/I_penguin.brres", "I_penguin", "wait2" }, - { "I_propeller", "g3d/I_propeller_model.brres", "I_propeller_model", "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_hammer", "wait2" }, + { "I_hammer", "g3d/I_fireflower.brres", "I_hammer", "wait2" }, { "I_kinoko_bundle","g3d/I_life_kinoko.brres", "I_life_kinoko", "wait2" }, { "obj_coin", "g3d/obj_coin.brres", "obj_coin", "wait2" } }; @@ -201,35 +206,33 @@ int PrizePacks[16][4] = { // Numbers list prizes for each level {6, 6, 6, 6} // Starman, Starman, Starman, Starman }; -int Notes[24] = { - STRM_BGM_HIKOUSEN_ROUKA, // C - STRM_BGM_HIKOUSEN_ROUKA_FAST, - STRM_BGM_LAST_BOSS_FAST, // D - STRM_BGM_LAST_BOSS, - STRM_BGM_ROAD_TO_LAST_FAST, // E - STRM_BGM_ROAD_TO_LAST, // F - STRM_BGM_LAST_CASTLE_APPEAR, - STRM_BGM_SELECT_W5, // G - STRM_BGM_SELECT_W7, - STRM_BGM_HIKOUSEN, // A - STRM_BGM_HIKOUSEN_BOSS_FAST, - STRM_BGM_HIKOUSEN_FAST, // B - STRM_BGM_OBAKE, // C - STRM_BGM_SHIRO_FAST, - STRM_BGM_SHIRO, // D - STRM_BGM_WATER_FAST, - STRM_BGM_WATER, // E - STRM_BGM_TORIDE_BOSS_FAST, // F - STRM_BGM_TORIDE_BOSS, - STRM_BGM_DEMO_ED, // G - STRM_BGM_DEMO_OP, - STRM_BGM_SELECT_W8, // A - STRM_BGM_MG_BTL, - STRM_BGM_OBAKE_FAST, // B +const char* Notes[24] = { + "sfx/3C", + "sfx/3C#", + "sfx/3D", + "sfx/3D#", + "sfx/3E", + "sfx/3F", + "sfx/3F#", + "sfx/3G", + "sfx/3G#", + "sfx/3A", + "sfx/3A#", + "sfx/3B", + "sfx/4C", + "sfx/4C#", + "sfx/4D", + "sfx/4D#", + "sfx/4E", + "sfx/4F", + "sfx/4F#", + "sfx/4G", + "sfx/4G#", + "sfx/4A", + "sfx/4A#", + "sfx/4B" }; - - const char* SAarcNameList [] = { "obj_coin", "I_hammer", @@ -241,6 +244,28 @@ const char* SAarcNameList [] = { }; + +/*****************************************************************************/ +// Playing frickin' sounds + +extern "C" void PlaySoundWithFunctionB4(void *spc, nw4r::snd::SoundHandle *handle, int id, int unk); +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); + + int sID; + hijackMusicWithSongName(Notes[id], -1, false, 2, 1, &sID); + PlaySoundWithFunctionB4(SoundRelatedClass, &handle, sID, 1); +} + + + /*****************************************************************************/ // The Prize Model @@ -594,7 +619,8 @@ void dSingAlong::RegisterNote(int note) { OSReport("State was checked"); if (note == Songs[song][chorus][currentNote][0]) { - MapSoundPlayer(SoundRelatedClass, Notes[Songs[song][chorus][currentNote][1]-1], 1); + BonusMusicPlayer(Songs[song][chorus][currentNote][1]-1); + // MapSoundPlayer(SoundRelatedClass, Notes[Songs[song][chorus][currentNote][1]-1], 1); OSReport("Note was correct"); currentNote += 1; } @@ -690,11 +716,12 @@ void dSingAlong::executeState_Call() { // OSReport("%d: Waiting for timer %d", timer, *currentNote[1]); - if (timer == (Songs[song][chorus][currentNote][2] * 2)) { + if (timer == (Songs[song][chorus][currentNote][2] * Tempo[song])) { OSReport("Playing Note %d", Songs[song][chorus][currentNote][0]); - nw4r::snd::SoundHandle handle; - PlaySoundWithFunctionB4(SoundRelatedClass, &handle, Notes[Songs[song][chorus][currentNote][1]-1], 1); + BonusMusicPlayer(Songs[song][chorus][currentNote][1]-1); + // nw4r::snd::SoundHandle handle; + // PlaySoundWithFunctionB4(SoundRelatedClass, &handle, Notes[Songs[song][chorus][currentNote][1]-1], 1); Vec effPos; @@ -1148,8 +1175,9 @@ void dSongBlock::blockWasHit(bool isDown) { else if (note == 7) { play = 23; } else if (note == 8) { play = 0; } - nw4r::snd::SoundHandle handle; - PlaySoundWithFunctionB4(SoundRelatedClass, &handle, Notes[play], 1); + // nw4r::snd::SoundHandle handle; + // PlaySoundWithFunctionB4(SoundRelatedClass, &handle, Notes[play], 1); + BonusMusicPlayer(play); } else { dSingAlong::instance->RegisterNote(this->note); -- cgit v1.2.3