Add Sega CD BIOS music as BGM

This commit is contained in:
RocketRobz 2020-06-22 23:36:37 -06:00
parent 5d3e4ac105
commit 5f6495386a
6 changed files with 18 additions and 7 deletions

View File

@ -13,6 +13,7 @@ For Style Savvy's 10th Anniversary, a save editor is here!
* High-resolution Hori-HD (800px wide mode), exclusive to 3DS, New 3DS, and New 2DS consoles!
* The GUI from Kirakira Code/Fashion Forward (third game).
* Pre-rendered characters and backgrounds.
* A Girls Mode/Style Savvy/Style Boutique soundfont cover of the Sega CD (Model 2) BIOS music!
* Sound effects from ChuChu Rocket.
* Play as most characters from all Girls Mode/Style Savvy/Style Boutique games, in all (except first) games! (Shop customers and brand reps not included.)
* When importing a character from those games, you can press L or R to select the seasonal outfit. (Note that not all characters will have seasonal outfits.)

BIN
romfs/sounds/music_loop.wav Normal file

Binary file not shown.

Binary file not shown.

View File

@ -30,7 +30,8 @@ bool cinemaWide = false;
int iFps = 60;
std::string currentMusicPack = "";
//sound *music = NULL;
sound *music = NULL;
sound *music_loop = NULL;
//sound *mus_logos = NULL;
sound *sfx_select = NULL;
sound *sfx_back = NULL;
@ -38,7 +39,8 @@ sound *sfx_highlight = NULL;
bool dspfirmfound = false;
bool exiting = false;
//static bool musicPlaying = false;
static bool musicPlaying = false;
static bool musicLoopPlaying = false;
static bool screenoff_ran = false;
static bool screenon_ran = true;
@ -64,12 +66,16 @@ void saveSettings(void) {
settingsini.SaveIniFileModified(settingsIni);
}
/*static void Play_Music(void) {
void Play_Music(void) {
if (musicPlaying && !musicLoopPlaying && !ndspChnIsPlaying(0)) {
music_loop->play();
musicLoopPlaying = true;
}
if (!musicPlaying && dspfirmfound) {
music->play();
musicPlaying = true;
}
}*/
}
/*void musLogos(void) {
if (!dspfirmfound) return;
@ -254,7 +260,8 @@ int main()
// Load the sound effects if DSP is available.
if (dspfirmfound) {
//mus_logos = new sound("romfs:/sounds/logos.wav", 0, false);
//music = new sound("romfs:/sounds/music.wav", 1, true);
music = new sound("romfs:/sounds/music_start.wav", 0, false);
music_loop = new sound("romfs:/sounds/music_loop.wav", 1, true);
sfx_select = new sound("romfs:/sounds/select.wav", 2, false);
sfx_back = new sound("romfs:/sounds/back.wav", 3, false);
sfx_highlight = new sound("romfs:/sounds/highlight.wav", 4, false);
@ -332,7 +339,6 @@ int main()
Gui::setScreen(std::make_unique<RocketRobz>(), false); // Set screen to RocketRobz's screen.
svcCreateEvent(&threadRequest,(ResetType)0);
createThread((ThreadFunc)controlThread);
//Play_Music();
//musLogos();
// Loop as long as the status is not exit

View File

@ -58,6 +58,9 @@ void GameSelect::drawCannotEditMsg(void) const {
}
void GameSelect::Draw(void) const {
extern void Play_Music();
Play_Music();
Gui::ScreenDraw(Top);
/*for(int w = 0; w < 7; w++) {

View File

@ -74,7 +74,6 @@ sound::sound(const string& path, int channel, bool toloop) {
fseek(fp, 44, SEEK_SET);
fread(data, 1, dataSize, fp);
fclose(fp);
dataSize /= 2; // FIXME: 16-bit or stereo?
// Find the right format
u16 ndspFormat;
@ -88,6 +87,8 @@ sound::sound(const string& path, int channel, bool toloop) {
NDSP_FORMAT_STEREO_PCM16;
}
dataSize /= (wavHeader.channels==1 ? 1 : 2); // FIXME: 16-bit or stereo?
ndspChnReset(channel);
ndspChnSetInterp(channel, NDSP_INTERP_NONE);
ndspChnSetRate(channel, float(wavHeader.frequency));