mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
- Now only disc 1 of double disc Gamecube games is added to gamelist. Disc 2 are skipped and no longer need to be hidden with a hidden category. double disc games will ask on launch which disc to use.
This commit is contained in:
parent
a8c4358caf
commit
33859d443b
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
@ -153,7 +153,7 @@ static void Add_GameCube_Game(char *FullPath)
|
||||
if(!fp && strstr(FullPath, "/root") != NULL) //fst folder (extracted game)
|
||||
{
|
||||
*(strstr(FullPath, "/root") + 1) = '\0';
|
||||
if(strlen(FullPath) + FST_APPEND_SIZE < MAX_MSG_SIZE) strcat(FullPath, FST_APPEND);
|
||||
if(strlen(FullPath) + FST_APPEND_SIZE < MAX_MSG_SIZE) strcat(FullPath, FST_APPEND);// append "sys/boot.bin" to end of path
|
||||
fp = fopen(FullPath, "rb");
|
||||
}
|
||||
if(fp)
|
||||
@ -168,16 +168,11 @@ static void Add_GameCube_Game(char *FullPath)
|
||||
}
|
||||
if(gc_hdr.magic == GC_MAGIC)
|
||||
{
|
||||
AddISO((const char*)gc_hdr.id, (const char*)gc_hdr.title,
|
||||
FullPath, 0x000000, TYPE_GC_GAME);
|
||||
/* Check for disc 2 */
|
||||
fseek(fp, hdr_offset + 0x06, SEEK_SET);
|
||||
fread(gc_disc, 1, 1, fp);
|
||||
if(gc_disc[0])
|
||||
{
|
||||
wcslcat(m_cacheList.back().title, L" disc 2", 63);
|
||||
m_cacheList.back().settings[0] = 1;
|
||||
}
|
||||
if(!gc_disc[0])// If not disc 2 add game iso
|
||||
AddISO((const char*)gc_hdr.id, (const char*)gc_hdr.title, FullPath, 0x000000, TYPE_GC_GAME);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
@ -2040,8 +2040,6 @@ void CMenu::_initCF(void)
|
||||
else // wii, gc, channels
|
||||
{
|
||||
strcpy(id, hdr->id);
|
||||
if(hdr->type == TYPE_GC_GAME && hdr->settings[0] == 1) /* disc 2 */
|
||||
strcat(id, "_2");
|
||||
strcpy(catID, id);
|
||||
}
|
||||
|
||||
@ -2406,7 +2404,11 @@ bool CMenu::_loadGamecubeList()
|
||||
m_cacheList.CreateList(COVERFLOW_GAMECUBE, gameDir, stringToVector(".iso|.gcm|.ciso|root", '|'), cacheDir, updateCache);
|
||||
m_cfg.remove(GC_DOMAIN, "update_cache");
|
||||
for(vector<dir_discHdr>::iterator tmp_itr = m_cacheList.begin(); tmp_itr != m_cacheList.end(); tmp_itr++)
|
||||
{
|
||||
if(tmp_itr->settings[0] == 1) /* disc 2 */
|
||||
continue;// skip gc disc 2 if its still part of the cached list
|
||||
m_gameList.push_back(*tmp_itr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -201,6 +201,7 @@ private:
|
||||
TexData m_systemBg;
|
||||
TexData m_wbfsBg;
|
||||
TexData m_gameSettingsBg;
|
||||
TexData m_promptBg;
|
||||
TexData m_gameBg;
|
||||
TexData m_gameBgLQ;
|
||||
TexData m_mainBg;
|
||||
@ -437,6 +438,10 @@ private:
|
||||
s16 m_gameBtnBack;
|
||||
s16 m_gameLblUser[5];
|
||||
int snapbg_x, snapbg_y, snapbg_w, snapbg_h;
|
||||
// disc 2 prompt menu
|
||||
s16 m_promptLblQuestion;
|
||||
s16 m_promptBtnChoice1;
|
||||
s16 m_promptBtnChoice2;
|
||||
// Parental code menu
|
||||
s16 m_codeLblTitle;
|
||||
s16 m_codeBtnKey[10];
|
||||
|
@ -136,8 +136,6 @@ void CMenu::_getGameCategories(void)
|
||||
}
|
||||
else
|
||||
strcpy(id, hdr->id);
|
||||
if(hdr->type == TYPE_GC_GAME && hdr->settings[0] == 1) /* disc 2 */
|
||||
strcat(id, "_2");
|
||||
|
||||
const char *gameCats = m_cat.getString(catDomain, id, "").c_str();
|
||||
if(strlen(gameCats) > 0)
|
||||
|
@ -177,8 +177,6 @@ void CMenu::_showGameSettings()
|
||||
else
|
||||
{
|
||||
strcpy(id, GameHdr->id);
|
||||
if(GameHdr->type == TYPE_GC_GAME && GameHdr->settings[0] == 1) /* disc 2 */
|
||||
strcat(id, "_2");
|
||||
}
|
||||
|
||||
_setBg(m_gameSettingsBg, m_gameSettingsBg);
|
||||
@ -548,8 +546,6 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc)
|
||||
else
|
||||
{
|
||||
strcpy(id, GameHdr->id);
|
||||
if(GameHdr->type == TYPE_GC_GAME && GameHdr->settings[0] == 1) /* disc 2 */
|
||||
strcat(id, "_2");
|
||||
}
|
||||
|
||||
if(GameHdr->type == TYPE_GC_GAME)
|
||||
|
@ -411,8 +411,6 @@ void CMenu::_game(bool launch)
|
||||
else
|
||||
{
|
||||
strcpy(id, hdr->id);
|
||||
if(hdr->type == TYPE_GC_GAME && hdr->settings[0] == 1) /* disc 2 */
|
||||
strcat(id, "_2");
|
||||
}
|
||||
|
||||
m_zoom_banner = m_cfg.getBool(_domainFromView(), "show_full_banner", false);
|
||||
@ -787,8 +785,6 @@ void CMenu::_game(bool launch)
|
||||
else
|
||||
{
|
||||
strcpy(id, hdr->id);
|
||||
if(hdr->type == TYPE_GC_GAME && hdr->settings[0] == 1) /* disc 2 */
|
||||
strcat(id, "_2");
|
||||
}
|
||||
if(m_newGame)
|
||||
{
|
||||
@ -1027,6 +1023,20 @@ void CMenu::_initGameMenu()
|
||||
snapbg_y = m_theme.getInt("GAME/SNAP_BG", "y", 31);
|
||||
snapbg_w = m_theme.getInt("GAME/SNAP_BG", "width", 246);
|
||||
snapbg_h = m_theme.getInt("GAME/SNAP_BG", "height", 170);
|
||||
|
||||
/* gc disc prompt menu */
|
||||
m_promptBg = _texture("PROMPT/BG", "texture", theme.bg, false);
|
||||
m_promptLblQuestion = _addLabel("PROMPT/QUESTION", theme.lblFont, L"", 112, 0, 500, 420, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_promptBtnChoice1 = _addButton("PROMPT/CHOICE1", theme.btnFont, L"", 112, 320, 200, 48, theme.btnFontColor);
|
||||
m_promptBtnChoice2 = _addButton("PROMPT/CHOICE2", theme.btnFont, L"", 332, 320, 200, 48, theme.btnFontColor);
|
||||
|
||||
_setHideAnim(m_promptLblQuestion, "PROMPT/QUESTION", 0, 0, 0.f, 0.f);
|
||||
_setHideAnim(m_promptBtnChoice1, "PROMPT/CHOICE1", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_promptBtnChoice2, "PROMPT/CHOICE2", 0, 0, 1.f, -1.f);
|
||||
|
||||
m_btnMgr.hide(m_promptLblQuestion, true);
|
||||
m_btnMgr.hide(m_promptBtnChoice1, true);
|
||||
m_btnMgr.hide(m_promptBtnChoice2, true);
|
||||
}
|
||||
|
||||
void CMenu::_textGame(void)
|
||||
|
@ -319,6 +319,64 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Set game path */
|
||||
char path[256];
|
||||
if(disc)
|
||||
snprintf(path, sizeof(path), "%s", "di");
|
||||
else
|
||||
snprintf(path, sizeof(path), "%s", hdr->path);
|
||||
|
||||
if(loader == NINTENDONT && !disc)// Check if game has multi Discs
|
||||
{
|
||||
char disc2Path[256];
|
||||
disc2Path[255] = '\0';
|
||||
strncpy(disc2Path, path, sizeof(disc2Path) - 1);
|
||||
char *pathPtr = strrchr(disc2Path, '/');
|
||||
if(pathPtr) *pathPtr = 0;
|
||||
strncpy(disc2Path, fmt("%s/disc2.iso", disc2Path), sizeof(disc2Path) - 1);
|
||||
// note fst extracted /boot.bin paths will not have disc2.iso
|
||||
if(fsop_FileExist(disc2Path))
|
||||
{
|
||||
SetupInput();
|
||||
_setBg(m_promptBg, m_promptBg);
|
||||
m_btnMgr.show(m_promptLblQuestion);
|
||||
m_btnMgr.show(m_promptBtnChoice1);
|
||||
m_btnMgr.show(m_promptBtnChoice2);
|
||||
m_btnMgr.setText(m_promptLblQuestion, _t("discq", L"This game has multiple discs. Please select the disc to launch."));
|
||||
m_btnMgr.setText(m_promptBtnChoice1, _t("disc1", L"Disc 1"));
|
||||
m_btnMgr.setText(m_promptBtnChoice2, _t("disc2", L"Disc 2"));
|
||||
int choice = -1;
|
||||
while(!m_exit)
|
||||
{
|
||||
_mainLoopCommon();
|
||||
if(BTN_UP_PRESSED)
|
||||
m_btnMgr.up();
|
||||
else if(BTN_DOWN_PRESSED)
|
||||
m_btnMgr.down();
|
||||
else if(BTN_A_PRESSED)
|
||||
{
|
||||
if(m_btnMgr.selected(m_promptBtnChoice1))
|
||||
{
|
||||
choice = 0;
|
||||
break;
|
||||
}
|
||||
else if(m_btnMgr.selected(m_promptBtnChoice2))
|
||||
{
|
||||
choice = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
m_btnMgr.hide(m_promptLblQuestion);
|
||||
m_btnMgr.hide(m_promptBtnChoice1);
|
||||
m_btnMgr.hide(m_promptBtnChoice2);
|
||||
if(choice < 0)
|
||||
return;
|
||||
if(choice == 1)
|
||||
snprintf(path, sizeof(path), "%s", disc2Path);
|
||||
}
|
||||
}
|
||||
|
||||
/* clear coverflow, start wiiflow wait animation, set exit handler */
|
||||
_launchShutdown();
|
||||
|
||||
@ -329,12 +387,6 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
add_game_to_card(id);
|
||||
|
||||
/* Get game settings */
|
||||
const char *path = NULL;
|
||||
if(disc)
|
||||
path = "di";
|
||||
else
|
||||
path = hdr->path;
|
||||
|
||||
u8 GClanguage = min(m_gcfg2.getUInt(id, "language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u);
|
||||
GClanguage = (GClanguage == 0) ? min(m_cfg.getUInt(GC_DOMAIN, "game_language", 0), ARRAY_SIZE(CMenu::_GlobalGClanguages) - 1u) : GClanguage-1;
|
||||
// language selection only works for PAL games. E and J are always set to english.
|
||||
|
@ -253,6 +253,9 @@ def=Default
|
||||
deltcover=Cover is deleted.
|
||||
deltbanner=Banner is deleted.
|
||||
disabled=Disabled
|
||||
discq=This game has multiple discs. Please select the disc to launch.
|
||||
disc1=Disc 1
|
||||
disc2=Disc 2
|
||||
dl1=Cancel
|
||||
dl10=Please donate\nto GameTDB.com
|
||||
dl12=GameTDB
|
||||
|
@ -253,6 +253,9 @@ def=Standard
|
||||
deltcover=Cover wurde gelöscht.
|
||||
deltbanner=Banner wurde gelöscht.
|
||||
disabled=Deaktiviert
|
||||
discq=This game has multiple discs. Please select the disc to launch.
|
||||
disc1=Disc 1
|
||||
disc2=Disc 2
|
||||
dl1=Abbrechen
|
||||
dl10=Bitte spendet\nan GameTDB.com
|
||||
dl12=GameTDB
|
||||
|
@ -243,6 +243,9 @@ def=Predefinito
|
||||
deltbanner=Banner eliminato.
|
||||
deltcover=Copertina eliminata.
|
||||
disabled=Disattivato
|
||||
discq=This game has multiple discs. Please select the disc to launch.
|
||||
disc1=Disc 1
|
||||
disc2=Disc 2
|
||||
dl1=Annulla
|
||||
dl10=Per piacere donate\na GameTDB.com
|
||||
dl12=GameTDB
|
||||
|
@ -253,6 +253,9 @@ def=기본
|
||||
deltcover=커버가 삭제되었습니다.
|
||||
deltbanner=배너가 삭제되었습니다.
|
||||
disabled=비활성화
|
||||
discq=This game has multiple discs. Please select the disc to launch.
|
||||
disc1=Disc 1
|
||||
disc2=Disc 2
|
||||
dl1=취소
|
||||
dl10=GameTDB.com에\n기부해 주세요
|
||||
dl12=GameTDB
|
||||
|
@ -250,6 +250,9 @@ def=Por defecto
|
||||
deltcover=Se ha eliminado la portada.
|
||||
deltbanner=Se ha eliminado el banner.
|
||||
disabled=Desactivado
|
||||
discq=This game has multiple discs. Please select the disc to launch.
|
||||
disc1=Disc 1
|
||||
disc2=Disc 2
|
||||
dl1=Cancelar
|
||||
dl10=Por favor dona\na GameTDB.com
|
||||
dl12=GameTDB
|
||||
|
Loading…
Reference in New Issue
Block a user