mirror of
https://github.com/RocketRobz/SuperAllStarPhotoStudio.git
synced 2025-06-19 01:25:35 -04:00
Add two more BGM
This commit is contained in:
parent
c96ded54c3
commit
9ccfe572e2
BIN
3ds/romfs/music/marioGolfAdvanceTour/marionClub_loop.wav
Normal file
BIN
3ds/romfs/music/marioGolfAdvanceTour/marionClub_loop.wav
Normal file
Binary file not shown.
BIN
3ds/romfs/music/marioGolfAdvanceTour/marionClub_start.wav
Normal file
BIN
3ds/romfs/music/marioGolfAdvanceTour/marionClub_start.wav
Normal file
Binary file not shown.
BIN
3ds/romfs/music/mmBattleAndChase/straightOut_loop.wav
Normal file
BIN
3ds/romfs/music/mmBattleAndChase/straightOut_loop.wav
Normal file
Binary file not shown.
BIN
3ds/romfs/music/mmBattleAndChase/straightOut_start.wav
Normal file
BIN
3ds/romfs/music/mmBattleAndChase/straightOut_start.wav
Normal file
Binary file not shown.
@ -5,26 +5,25 @@
|
|||||||
|
|
||||||
extern sound *music;
|
extern sound *music;
|
||||||
extern sound *music_loop;
|
extern sound *music_loop;
|
||||||
|
extern bool dspfirmfound;
|
||||||
static bool music_loaded = false;
|
extern bool musicLoopPlaying;
|
||||||
static bool music_loop_loaded = false;
|
|
||||||
|
|
||||||
void loadMusic(int num) {
|
void loadMusic(int num) {
|
||||||
if (music_loaded) {
|
if (!dspfirmfound) return;
|
||||||
music->stop();
|
|
||||||
delete music;
|
|
||||||
}
|
|
||||||
if (music_loop_loaded) {
|
|
||||||
music_loop->stop();
|
|
||||||
delete music_loop;
|
|
||||||
}
|
|
||||||
switch (num) {
|
switch (num) {
|
||||||
case 0:
|
case 0: // Pokemon Stadium - Stadium Select
|
||||||
default:
|
default:
|
||||||
music = new sound("romfs:/music/pkmnStadium/stadiumSel_start.wav", 0, false);
|
music = new sound("romfs:/music/pkmnStadium/stadiumSel_start.wav", 0, false);
|
||||||
music_loop = new sound("romfs:/music/pkmnStadium/stadiumSel_loop.wav", 1, true);
|
music_loop = new sound("romfs:/music/pkmnStadium/stadiumSel_loop.wav", 1, true);
|
||||||
break;
|
break;
|
||||||
|
case 1: // MegaMan: Battle and Chase - The Straight Out
|
||||||
|
music = new sound("romfs:/music/mmBattleAndChase/straightOut_start.wav", 0, false);
|
||||||
|
music_loop = new sound("romfs:/music/mmBattleAndChase/straightOut_loop.wav", 1, true);
|
||||||
|
break;
|
||||||
|
case 2: // Mario Golf: Advance Tour - Marion Club
|
||||||
|
music = new sound("romfs:/music/marioGolfAdvanceTour/marionClub_start.wav", 0, false);
|
||||||
|
music_loop = new sound("romfs:/music/marioGolfAdvanceTour/marionClub_loop.wav", 1, true);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
music_loaded = true;
|
|
||||||
music_loop_loaded = true;
|
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ bool dspfirmfound = false;
|
|||||||
bool exiting = false;
|
bool exiting = false;
|
||||||
bool musicPlayStarted = false;
|
bool musicPlayStarted = false;
|
||||||
static bool musicPlaying = false;
|
static bool musicPlaying = false;
|
||||||
static bool musicLoopPlaying = false;
|
bool musicLoopPlaying = false;
|
||||||
static int musicLoopDelay = 0;
|
static int musicLoopDelay = 0;
|
||||||
bool clearTop = true; // Disable in order to render a second character
|
bool clearTop = true; // Disable in order to render a second character
|
||||||
bool renderTop = true; // Disable to prevent second character from flickering
|
bool renderTop = true; // Disable to prevent second character from flickering
|
||||||
@ -75,7 +75,7 @@ void saveSettings(void) {
|
|||||||
void Play_Music(void) {
|
void Play_Music(void) {
|
||||||
if (musicPlaying && !musicLoopPlaying) {
|
if (musicPlaying && !musicLoopPlaying) {
|
||||||
musicLoopDelay++;
|
musicLoopDelay++;
|
||||||
if (musicLoopDelay>60 && !ndspChnIsPlaying(0)) {
|
if (musicLoopDelay>5 && !ndspChnIsPlaying(0)) {
|
||||||
music_loop->play();
|
music_loop->play();
|
||||||
musicLoopPlaying = true;
|
musicLoopPlaying = true;
|
||||||
}
|
}
|
||||||
@ -87,6 +87,10 @@ void Play_Music(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Stop_Music(void) {
|
void Stop_Music(void) {
|
||||||
|
if (dspfirmfound) {
|
||||||
|
music->~sound();
|
||||||
|
music_loop->~sound();
|
||||||
|
}
|
||||||
musicPlayStarted = false;
|
musicPlayStarted = false;
|
||||||
musicPlaying = false;
|
musicPlaying = false;
|
||||||
musicLoopPlaying = false;
|
musicLoopPlaying = false;
|
||||||
@ -149,10 +153,6 @@ void renderTopScreenSubPixels(void) {
|
|||||||
shiftBySubPixel = false;
|
shiftBySubPixel = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ss2SaveFound = false;
|
|
||||||
bool ss3SaveFound = false;
|
|
||||||
bool ss4SaveFound = false;
|
|
||||||
|
|
||||||
static bool runThreads = true;
|
static bool runThreads = true;
|
||||||
|
|
||||||
void controlThread(void) {
|
void controlThread(void) {
|
||||||
|
9
include/marioGolfAdvanceTourBgmNames.h
Normal file
9
include/marioGolfAdvanceTourBgmNames.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
const char* marioGolfAdvanceTourBgmNames[] = {
|
||||||
|
"Marion Club",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
};
|
||||||
|
|
||||||
|
int marioGolfAdvanceTourBgmNums[] = {
|
||||||
|
2,
|
||||||
|
};
|
9
include/mmBattleAndChaseBgmNames.h
Normal file
9
include/mmBattleAndChaseBgmNames.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
const char* mmBattleAndChaseBgmNames[] = {
|
||||||
|
"The Straight Out",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
};
|
||||||
|
|
||||||
|
int mmBattleAndChaseBgmNums[] = {
|
||||||
|
1,
|
||||||
|
};
|
@ -25,6 +25,7 @@ private:
|
|||||||
const char* import_characterFileName(void) const;
|
const char* import_characterFileName(void) const;
|
||||||
const char* import_SS2CharacterNames(int i) const;
|
const char* import_SS2CharacterNames(int i) const;
|
||||||
const char* NESCharacterNames(int i) const;
|
const char* NESCharacterNames(int i) const;
|
||||||
|
const char* mmBattleAndChaseTitle(void) const;
|
||||||
const char* pkmnStadiumTitle(void) const;
|
const char* pkmnStadiumTitle(void) const;
|
||||||
const char* ss1Title(void) const;
|
const char* ss1Title(void) const;
|
||||||
const char* ss2Title(void) const;
|
const char* ss2Title(void) const;
|
||||||
|
@ -4,10 +4,27 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
void loadMusic(int num) {
|
void loadMusic(int num) {
|
||||||
|
const char* startName = "";
|
||||||
|
const char* loopName = "";
|
||||||
|
u32 sampleRate = 0;
|
||||||
|
|
||||||
switch (num) {
|
switch (num) {
|
||||||
case 0:
|
case 0: // Pokemon Stadium - Stadium Select
|
||||||
default:
|
default:
|
||||||
snd().loadStream("nitro:/music/pkmnStadium/stadiumSel_start.raw", "nitro:/music/pkmnStadium/stadiumSel_loop.raw", 22050, true);
|
startName = "nitro:/music/pkmnStadium/stadiumSel_start.raw";
|
||||||
|
loopName = "nitro:/music/pkmnStadium/stadiumSel_loop.raw";
|
||||||
|
sampleRate = 32000;
|
||||||
|
break;
|
||||||
|
case 1: // MegaMan: Battle and Chase - The Straight Out
|
||||||
|
startName = "nitro:/music/mmBattleAndChase/straightOut_start.raw";
|
||||||
|
loopName = "nitro:/music/mmBattleAndChase/straightOut_loop.raw";
|
||||||
|
sampleRate = 44100;
|
||||||
|
break;
|
||||||
|
case 2: // Mario Golf: Advance Tour - Marion Club
|
||||||
|
startName = "nitro:/music/marioGolfAdvanceTour/marionClub_start.raw";
|
||||||
|
loopName = "nitro:/music/marioGolfAdvanceTour/marionClub_loop.raw";
|
||||||
|
sampleRate = 48000;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
snd().loadStream(startName, loopName, sampleRate, true);
|
||||||
}
|
}
|
||||||
|
@ -116,8 +116,8 @@ void SoundControl::loadStream(const char* path, const char* loopPath, u32 sample
|
|||||||
|
|
||||||
fseek(stream_source, 0, SEEK_SET);
|
fseek(stream_source, 0, SEEK_SET);
|
||||||
|
|
||||||
stream.sampling_rate = sampleRate; // 22050Hz
|
stream.sampling_rate = sampleRate; // ?????Hz
|
||||||
stream.buffer_length = 1600; // should be adequate
|
stream.buffer_length = 0x1000; // should be adequate
|
||||||
stream.callback = on_stream_request;
|
stream.callback = on_stream_request;
|
||||||
stream.format = MM_STREAM_16BIT_MONO; // select format
|
stream.format = MM_STREAM_16BIT_MONO; // select format
|
||||||
stream.timer = MM_TIMER0; // use timer0
|
stream.timer = MM_TIMER0; // use timer0
|
||||||
|
@ -137,7 +137,7 @@ nitroFSInit(const char *ndsfile)
|
|||||||
chdirpathid = NITROROOT;
|
chdirpathid = NITROROOT;
|
||||||
ndsFileLastpos = 0;
|
ndsFileLastpos = 0;
|
||||||
ndsFile = NULL;
|
ndsFile = NULL;
|
||||||
bool headerFirst = ((strncmp((const char *)0x02FFFC38, __NDSHeader->gameCode, 4) == 0)
|
/*bool headerFirst = ((strncmp((const char *)0x02FFFC38, __NDSHeader->gameCode, 4) == 0)
|
||||||
&& (*(u16*)0x02FFFC36 == __NDSHeader->headerCRC16));
|
&& (*(u16*)0x02FFFC36 == __NDSHeader->headerCRC16));
|
||||||
if (!isDSiMode() || headerFirst)
|
if (!isDSiMode() || headerFirst)
|
||||||
{
|
{
|
||||||
@ -162,7 +162,7 @@ nitroFSInit(const char *ndsfile)
|
|||||||
AddDevice(&nitroFSdevoptab);
|
AddDevice(&nitroFSdevoptab);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
if (isDSiMode() && ndsfile == NULL)
|
if (isDSiMode() && ndsfile == NULL)
|
||||||
{
|
{
|
||||||
// Try SDNAND path
|
// Try SDNAND path
|
||||||
|
BIN
nds/nitrofiles/music/marioGolfAdvanceTour/marionClub_loop.raw
Normal file
BIN
nds/nitrofiles/music/marioGolfAdvanceTour/marionClub_loop.raw
Normal file
Binary file not shown.
BIN
nds/nitrofiles/music/marioGolfAdvanceTour/marionClub_start.raw
Normal file
BIN
nds/nitrofiles/music/marioGolfAdvanceTour/marionClub_start.raw
Normal file
Binary file not shown.
BIN
nds/nitrofiles/music/mmBattleAndChase/straightOut_loop.raw
Normal file
BIN
nds/nitrofiles/music/mmBattleAndChase/straightOut_loop.raw
Normal file
Binary file not shown.
BIN
nds/nitrofiles/music/mmBattleAndChase/straightOut_start.raw
Normal file
BIN
nds/nitrofiles/music/mmBattleAndChase/straightOut_start.raw
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -30,6 +30,8 @@
|
|||||||
#include "pdarkBgNames.h"
|
#include "pdarkBgNames.h"
|
||||||
#include "smBgNames.h"
|
#include "smBgNames.h"
|
||||||
|
|
||||||
|
#include "marioGolfAdvanceTourBgmNames.h"
|
||||||
|
#include "mmBattleAndChaseBgmNames.h"
|
||||||
#include "pkmnStadiumBgmNames.h"
|
#include "pkmnStadiumBgmNames.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -74,6 +76,7 @@ static bool redrawText = true;
|
|||||||
extern bool ditherlaceOnVBlank;
|
extern bool ditherlaceOnVBlank;
|
||||||
int characterLimit = 1;
|
int characterLimit = 1;
|
||||||
#else
|
#else
|
||||||
|
static bool musicPlayOnce = false;
|
||||||
int characterLimit = 4;
|
int characterLimit = 4;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -110,6 +113,8 @@ static u8 charPageOrder[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static u8 bgmPageOrder[] = {
|
static u8 bgmPageOrder[] = {
|
||||||
|
2, // Mario Golf: Advance Tour
|
||||||
|
1, // MegaMan: Battle and Chase
|
||||||
0, // Pokemon Stadium
|
0, // Pokemon Stadium
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -138,6 +143,8 @@ void PhotoStudio::getMaxChars() {
|
|||||||
// Music
|
// Music
|
||||||
switch (bgmPageOrder[bgm_highlightedGame]) {
|
switch (bgmPageOrder[bgm_highlightedGame]) {
|
||||||
case 0:
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
import_totalCharacters = 0;
|
import_totalCharacters = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -479,6 +486,15 @@ const char* PhotoStudio::NESCharacterNames(int i) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* PhotoStudio::mmBattleAndChaseTitle(void) const {
|
||||||
|
switch (sysRegion) {
|
||||||
|
default:
|
||||||
|
return "MegaMan: Battle and Chase";
|
||||||
|
case CFG_REGION_JPN:
|
||||||
|
return "Rockman: Battle and Chase";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const char* PhotoStudio::pkmnStadiumTitle(void) const {
|
const char* PhotoStudio::pkmnStadiumTitle(void) const {
|
||||||
switch (sysRegion) {
|
switch (sysRegion) {
|
||||||
default:
|
default:
|
||||||
@ -668,6 +684,10 @@ const char* PhotoStudio::bgmGameTitle(void) const {
|
|||||||
switch (bgmPageOrder[bgm_highlightedGame]) {
|
switch (bgmPageOrder[bgm_highlightedGame]) {
|
||||||
case 0:
|
case 0:
|
||||||
return pkmnStadiumTitle();
|
return pkmnStadiumTitle();
|
||||||
|
case 1:
|
||||||
|
return mmBattleAndChaseTitle();
|
||||||
|
case 2:
|
||||||
|
return "Mario Golf: Advance Tour";
|
||||||
}
|
}
|
||||||
return "???";
|
return "???";
|
||||||
}
|
}
|
||||||
@ -740,6 +760,10 @@ const char* PhotoStudio::bgmName(int i) const {
|
|||||||
switch (bgmPageOrder[bgm_highlightedGame]) {
|
switch (bgmPageOrder[bgm_highlightedGame]) {
|
||||||
case 0:
|
case 0:
|
||||||
return pkmnStadiumBgmNames[i];
|
return pkmnStadiumBgmNames[i];
|
||||||
|
case 1:
|
||||||
|
return mmBattleAndChaseBgmNames[i];
|
||||||
|
case 2:
|
||||||
|
return marioGolfAdvanceTourBgmNames[i];
|
||||||
}
|
}
|
||||||
return "???";
|
return "???";
|
||||||
}
|
}
|
||||||
@ -768,6 +792,10 @@ int PhotoStudio::getBgmNum(void) const {
|
|||||||
switch (bgmPageOrder[bgm_highlightedGame]) {
|
switch (bgmPageOrder[bgm_highlightedGame]) {
|
||||||
case 0:
|
case 0:
|
||||||
return pkmnStadiumBgmNums[bgmList_cursorPosition];
|
return pkmnStadiumBgmNums[bgmList_cursorPosition];
|
||||||
|
case 1:
|
||||||
|
return mmBattleAndChaseBgmNums[bgmList_cursorPosition];
|
||||||
|
case 2:
|
||||||
|
return marioGolfAdvanceTourBgmNums[bgmList_cursorPosition];
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1032,10 +1060,11 @@ void PhotoStudio::Draw(void) const {
|
|||||||
#else
|
#else
|
||||||
animateBg = bgCanAnimate;
|
animateBg = bgCanAnimate;
|
||||||
|
|
||||||
if (!musicPlayStarted) {
|
if (!musicPlayStarted && !musicPlayOnce) {
|
||||||
extern void Play_Music();
|
extern void Play_Music();
|
||||||
Play_Music();
|
Play_Music();
|
||||||
musicPlayStarted = true;
|
musicPlayStarted = true;
|
||||||
|
musicPlayOnce = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (renderTop) {
|
if (renderTop) {
|
||||||
@ -1342,6 +1371,9 @@ void PhotoStudio::Logic(u32 hDown, u32 hHeld, touchPosition touch) {
|
|||||||
extern void Stop_Music(void);
|
extern void Stop_Music(void);
|
||||||
Stop_Music();
|
Stop_Music();
|
||||||
loadMusic(getBgmNum());
|
loadMusic(getBgmNum());
|
||||||
|
#ifndef NDS
|
||||||
|
musicPlayStarted = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hDown & KEY_DLEFT) {
|
if (hDown & KEY_DLEFT) {
|
||||||
|
Loading…
Reference in New Issue
Block a user