mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
*little fix to ignore case sensitivity on searching files on the WiiDisc (Thanks to LoudBob11 for pointing it out)
*Added new options for BannerSounds (You can loop them, make it be quite after once played or play the BGM again) NOTE: Changed the way how to disable BannerSounds. If you make Volume to 0 than the loading of the BannerSounds is disabled now.
This commit is contained in:
parent
781d204691
commit
ef956c430a
File diff suppressed because one or more lines are too long
@ -70,12 +70,12 @@ static char *u8Filename(const U8Entry *fst, int i)
|
||||
|
||||
inline u32 le32(u32 i)
|
||||
{
|
||||
return ((i & 0xFF) << 24) | ((i & 0xFF00) << 8) | ((i & 0xFF0000) >> 8) | ((i & 0xFF000000) >> 24);
|
||||
return ((i & 0xFF) << 24) | ((i & 0xFF00) << 8) | ((i & 0xFF0000) >> 8) | ((i & 0xFF000000) >> 24);
|
||||
}
|
||||
|
||||
inline u16 le16(u16 i)
|
||||
inline u16 le16(u16 i)
|
||||
{
|
||||
return ((i & 0xFF) << 8) | ((i & 0xFF00) >> 8);
|
||||
return ((i & 0xFF) << 8) | ((i & 0xFF00) >> 8);
|
||||
}
|
||||
|
||||
static u8 *uncompressLZ77(const u8 *inBuf, u32 inLength, u32 &size)
|
||||
@ -90,10 +90,10 @@ static u8 *uncompressLZ77(const u8 *inBuf, u32 inLength, u32 &size)
|
||||
buffer = new(std::nothrow) u8[uncSize];
|
||||
if (!buffer)
|
||||
return buffer;
|
||||
|
||||
|
||||
u8 *bufCur = buffer;
|
||||
u8 *bufEnd = buffer + uncSize;
|
||||
|
||||
|
||||
while (bufCur < bufEnd && inBuf < inBufEnd)
|
||||
{
|
||||
u8 flags = *inBuf;
|
||||
@ -170,7 +170,8 @@ const u8 *LoadBannerSound(const u8 *discid, u32 *size)
|
||||
break;
|
||||
if (i >= fst[0].numEntries)
|
||||
{
|
||||
WindowPrompt(tr("sound.bin not found."), 0, tr("OK"));
|
||||
/* Not all games have a sound.bin and this message is annoying **/
|
||||
//WindowPrompt(tr("sound.bin not found."), 0, tr("OK"));
|
||||
free(opening_bnr);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ static u32 do_fst(wiidisc_t *d,u8 *fst, const char *names, u32 i)
|
||||
return size;
|
||||
} else {
|
||||
offset = _be32(fst + 12*i + 4);
|
||||
if(d->extract_pathname && strcmp(name, d->extract_pathname)==0)
|
||||
if(d->extract_pathname && stricmp(name, d->extract_pathname)==0)
|
||||
{
|
||||
d->extracted_buffer = wbfs_ioalloc(size);
|
||||
partition_read(d,offset, d->extracted_buffer, size,0);
|
||||
|
@ -1234,7 +1234,7 @@ int GameWindowPrompt() {
|
||||
|
||||
//load disc image based or what game is seleted
|
||||
struct discHdr * header = (mountMethod==1||mountMethod==2?dvdheader:&gameList[gameSelected]);
|
||||
if(Settings.gamesound)
|
||||
if(Settings.gamesoundvolume > 0)
|
||||
{
|
||||
if(gameSound)
|
||||
{
|
||||
@ -1248,6 +1248,8 @@ int GameWindowPrompt() {
|
||||
{
|
||||
gameSound = new GuiSound(gameSoundData, gameSoundDataLen, Settings.gamesoundvolume, false, true);
|
||||
bgMusic->SetVolume(0);
|
||||
if(Settings.gamesound == 2)
|
||||
gameSound->SetLoop(1);
|
||||
gameSound->Play();
|
||||
}
|
||||
}
|
||||
@ -1383,7 +1385,10 @@ int GameWindowPrompt() {
|
||||
if(gameSound)
|
||||
{
|
||||
if(!gameSound->IsPlaying())
|
||||
bgMusic->SetVolume(Settings.volume);
|
||||
{
|
||||
if(Settings.gamesound == 1)
|
||||
bgMusic->SetVolume(Settings.volume);
|
||||
}
|
||||
}
|
||||
|
||||
if (btn1.GetState() == STATE_CLICKED) {
|
||||
|
@ -1304,18 +1304,20 @@ int MenuSettings()
|
||||
|
||||
if(ret == ++Idx || firstRun)
|
||||
{
|
||||
if(firstRun) options2.SetName(Idx, "%s",tr("Game (Banner) Sounds"));
|
||||
if(firstRun) options2.SetName(Idx, "%s",tr("Game Sound Mode"));
|
||||
if(ret == Idx)
|
||||
{
|
||||
Settings.gamesound++;
|
||||
if (Settings.gamesound > 1)
|
||||
if (Settings.gamesound > 2)
|
||||
Settings.gamesound = 0;
|
||||
}
|
||||
|
||||
if(Settings.gamesound == 1)
|
||||
options2.SetValue(Idx,"%s", tr("ON"));
|
||||
options2.SetValue(Idx,"%s", tr("Sound+BGM"));
|
||||
else if(Settings.gamesound == 2)
|
||||
options2.SetValue(Idx,"%s", tr("Loop Sound"));
|
||||
else
|
||||
options2.SetValue(Idx,"%s", tr("OFF"));
|
||||
options2.SetValue(Idx,"%s", tr("Sound+Quiet"));
|
||||
}
|
||||
|
||||
if(ret == ++Idx || firstRun)
|
||||
@ -1328,7 +1330,10 @@ int MenuSettings()
|
||||
Settings.gamesoundvolume = 0;
|
||||
}
|
||||
|
||||
options2.SetValue(Idx,"%i", Settings.gamesoundvolume);
|
||||
if (Settings.gamesoundvolume > 0)
|
||||
options2.SetValue(Idx,"%i", Settings.gamesoundvolume);
|
||||
else
|
||||
options2.SetValue(Idx,"%s", tr("OFF"));
|
||||
}
|
||||
|
||||
firstRun = false;
|
||||
|
Loading…
Reference in New Issue
Block a user