diff --git a/out/boot.dol b/out/boot.dol index 8f880df3..1b8eb85c 100644 Binary files a/out/boot.dol and b/out/boot.dol differ diff --git a/source/list/ListGenerator.hpp b/source/list/ListGenerator.hpp index 622b7e80..6c8bfac2 100644 --- a/source/list/ListGenerator.hpp +++ b/source/list/ListGenerator.hpp @@ -31,7 +31,7 @@ #define CONFIG_FILENAME_SKIP_DOMAIN "PLUGINS" #define CONFIG_FILENAME_SKIP_KEY "filename_skip_regex" -#define CONFIG_FILENAME_SKIP_DEFAULT "((dis[ck]|tape|side|track)[ _-]?[b-z2-9])" +#define CONFIG_FILENAME_SKIP_DEFAULT "((dis[ck]|tape|side|track)[ _-]([b-l][^a-z]|0*[2-9]|0*[1-9][0-9]))|(disc2[.]iso)|(neogeo[.]zip)|(FUNBOOT[.]ROM)" class ListGenerator : public std::vector { diff --git a/source/menu/menu.hpp b/source/menu/menu.hpp index 566df7f3..88d84d8b 100644 --- a/source/menu/menu.hpp +++ b/source/menu/menu.hpp @@ -453,61 +453,6 @@ private: s16 m_gameSettingsBtnAspectRatioP; s16 m_gameSettingsBtnAspectRatioM; - s16 m_gameSettingsLblEmuMemCard; - s16 m_gameSettingsLblEmuMemCard_Val; - s16 m_gameSettingsBtnEmuMemCard_P; - s16 m_gameSettingsBtnEmuMemCard_M; - - s16 m_gameSettingsLblDevoMemcardEmu; - s16 m_gameSettingsBtnDevoMemcardEmu; - - s16 m_gameSettingsLblWidescreen; - s16 m_gameSettingsBtnWidescreen; - - s16 m_gameSettingsLblWiiuWidescreen; - s16 m_gameSettingsBtnWiiuWidescreen; - - s16 m_gameSettingsLblCC_Rumble; - s16 m_gameSettingsBtnCC_Rumble; - - s16 m_gameSettingsLblNATIVE_CTL; - s16 m_gameSettingsBtnNATIVE_CTL; - - s16 m_gameSettingsLblDeflicker; - s16 m_gameSettingsBtnDeflicker; - - s16 m_gameSettingsLblArcade; - s16 m_gameSettingsBtnArcade; - - s16 m_gameSettingsLblSkip_IPL; - s16 m_gameSettingsBtnSkip_IPL; - - s16 m_gameSettingsLblPatch50; - s16 m_gameSettingsBtnPatch50; - - s16 m_gameSettingsLblWidth; - s16 m_gameSettingsLblWidthVal; - s16 m_gameSettingsBtnWidthP; - s16 m_gameSettingsBtnWidthM; - - s16 m_gameSettingsLblPos; - s16 m_gameSettingsLblPosVal; - s16 m_gameSettingsBtnPosP; - s16 m_gameSettingsBtnPosM; - - s16 m_gameSettingsLblBBA; - s16 m_gameSettingsBtnBBA; - - s16 m_gameSettingsLblNetProf; - s16 m_gameSettingsLblNetProfVal; - s16 m_gameSettingsBtnNetProfP; - s16 m_gameSettingsBtnNetProfM; - - s16 m_gameSettingsLblGCLoader; - s16 m_gameSettingsLblGCLoader_Val; - s16 m_gameSettingsBtnGCLoader_P; - s16 m_gameSettingsBtnGCLoader_M; - s16 m_gameSettingsLblCustom; s16 m_gameSettingsBtnCustom; @@ -925,6 +870,7 @@ private: void _hideGameInfo(bool instant = false); void _hideGameSettings(bool instant = false); void _hideGameSettingsPg(bool instant = false); + void _hideConfigGCGame(bool instant = true); void _hideCheatSettings(bool instant = false); void _hideCoverBanner(bool instant = true); void _hideWBFS(bool instant = false); @@ -956,6 +902,7 @@ private: void _showCFTheme(u32 curParam, int version, bool wide); void _showGame(void); void _showGameSettings(void); + void _showConfigGCGame(void); void _showGameInfo(void); void _showCheatSettings(void); void _showCoverBanner(void); @@ -987,6 +934,7 @@ private: void _game(bool launch = false); bool _gameinfo(void); void _gameSettings(const dir_discHdr *GameHdr, bool disc = false); + void _configGCGame(const dir_discHdr *GameHdr, bool disc = false); void _CheatSettings(); void _CoverBanner(void); bool _wbfsOp(WBFS_OP op); diff --git a/source/menu/menu_config_game.cpp b/source/menu/menu_config_game.cpp index a07f0c59..86ab35d7 100644 --- a/source/menu/menu_config_game.cpp +++ b/source/menu/menu_config_game.cpp @@ -8,9 +8,7 @@ u8 m_gameSettingsMaxPgs = 5; u8 m_gameSettingsPage = 0; -u8 GCLoader = 0; -int videoScale, videoOffset; -const dir_discHdr *GameHdr; +static const dir_discHdr *GameHdr; const CMenu::SOption CMenu::_GlobalVideoModes[6] = { { "vidgame", L"Game" }, @@ -50,25 +48,6 @@ const CMenu::SOption CMenu::_DeflickerOptions[7] = { { "df_high", L"On (High)" }, }; -const CMenu::SOption CMenu::_GlobalGCvideoModes[6] = { - { "vidgame", L"Game" }, - { "vidp50", L"PAL 50Hz" }, - { "vidp60", L"PAL 60Hz" }, - { "vidntsc", L"NTSC" }, - { "DMLmpal", L"MPAL" }, - { "vidprog", L"Progressive" }, -}; - -const CMenu::SOption CMenu::_GCvideoModes[7] = { - { "viddef", L"Default" }, - { "vidgame", L"Game" }, - { "vidp50", L"PAL 50Hz" }, - { "vidp60", L"PAL 60Hz" }, - { "vidntsc", L"NTSC" }, - { "DMLmpal", L"MPAL" }, - { "vidprog", L"Progressive" }, -}; - const CMenu::SOption CMenu::_languages[11] = { { "lngdef", L"Default" },// next should be console { "lngjap", L"Japanese" }, @@ -83,27 +62,6 @@ const CMenu::SOption CMenu::_languages[11] = { { "lngkor", L"Korean" } }; -const CMenu::SOption CMenu::_GlobalGClanguages[7] = { - { "lngsys", L"System" }, - { "lngeng", L"English" }, - { "lngger", L"German" }, - { "lngfre", L"French" }, - { "lngspa", L"Spanish" }, - { "lngita", L"Italian" }, - { "lngdut", L"Dutch" } -}; - -const CMenu::SOption CMenu::_GClanguages[8] = { - { "lngdef", L"Default" }, - { "lngsys", L"System" }, - { "lngeng", L"English" }, - { "lngger", L"German" }, - { "lngfre", L"French" }, - { "lngspa", L"Spanish" }, - { "lngita", L"Italian" }, - { "lngdut", L"Dutch" } -}; - const CMenu::SOption CMenu::_ChannelsType[3] = { { "ChanReal", L"Real NAND" }, { "ChanEmu", L"Emu NAND" }, @@ -140,25 +98,6 @@ const CMenu::SOption CMenu::_WidescreenWiiu[3] = { { "aspect169", L"Force 16:9" }, }; -const CMenu::SOption CMenu::_NinEmuCard[5] = { - { "NinMCDef", L"Default" }, - { "NinMCOff", L"Disabled" }, - { "NinMCon", L"Enabled" }, - { "NinMCMulti", L"Multi Saves" }, - { "NinMCdebug", L"Debug" }, -}; - -const CMenu::SOption CMenu::_GlobalGCLoaders[2] = { - { "GC_Devo", L"Devolution" }, - { "GC_Nindnt", L"Nintendont" }, -}; - -const CMenu::SOption CMenu::_GCLoader[3] = { - { "GC_Def", L"Default" }, - { "GC_Devo", L"Devolution" }, - { "GC_Nindnt", L"Nintendont" }, -}; - const CMenu::SOption CMenu::_vidModePatch[4] = { { "vmpnone", L"None" }, { "vmpnormal", L"Normal" }, @@ -248,28 +187,6 @@ void CMenu::_hideGameSettingsPg(bool instant) m_btnMgr.hide(m_gameSettingsLblWidescreenWiiuVal, instant); m_btnMgr.hide(m_gameSettingsBtnWidescreenWiiuP, instant); m_btnMgr.hide(m_gameSettingsBtnWidescreenWiiuM, instant); - //wii only - m_btnMgr.hide(m_gameSettingsLblEmulation, instant); - m_btnMgr.hide(m_gameSettingsLblEmulationVal, instant); - m_btnMgr.hide(m_gameSettingsBtnEmulationP, instant); - m_btnMgr.hide(m_gameSettingsBtnEmulationM, instant); - m_btnMgr.hide(m_gameSettingsLblExtractSave, instant); - m_btnMgr.hide(m_gameSettingsBtnExtractSave, instant); - m_btnMgr.hide(m_gameSettingsLblFlashSave, instant); - m_btnMgr.hide(m_gameSettingsBtnFlashSave, instant); - m_btnMgr.hide(m_gameSettingsLblPrivateServer, instant); - m_btnMgr.hide(m_gameSettingsLblPrivateServerVal, instant); - m_btnMgr.hide(m_gameSettingsBtnPrivateServerP, instant); - m_btnMgr.hide(m_gameSettingsBtnPrivateServerM, instant); - m_btnMgr.hide(m_gameSettingsLblFix480p, instant); - m_btnMgr.hide(m_gameSettingsLblFix480pVal, instant); - m_btnMgr.hide(m_gameSettingsBtnFix480pP, instant); - m_btnMgr.hide(m_gameSettingsBtnFix480pM, instant); - m_btnMgr.hide(m_gameSettingsLblDeflickerWii, instant); - m_btnMgr.hide(m_gameSettingsLblDeflickerWiiVal, instant); - m_btnMgr.hide(m_gameSettingsBtnDeflickerWiiP, instant); - m_btnMgr.hide(m_gameSettingsBtnDeflickerWiiM, instant); - //All m_btnMgr.hide(m_gameSettingsLblManage, instant); m_btnMgr.hide(m_gameSettingsBtnManage, instant); m_btnMgr.hide(m_gameSettingsBtnAdultOnly, instant); @@ -292,47 +209,27 @@ void CMenu::_hideGameSettingsPg(bool instant) m_btnMgr.hide(m_gameSettingsBtnDebuggerM, instant); m_btnMgr.hide(m_gameSettingsLblLED, instant); m_btnMgr.hide(m_gameSettingsBtnLED, instant); - //GC only - m_btnMgr.hide(m_gameSettingsLblEmuMemCard, instant); - m_btnMgr.hide(m_gameSettingsLblEmuMemCard_Val, instant); - m_btnMgr.hide(m_gameSettingsBtnEmuMemCard_P, instant); - m_btnMgr.hide(m_gameSettingsBtnEmuMemCard_M, instant); - m_btnMgr.hide(m_gameSettingsLblDevoMemcardEmu, instant); - m_btnMgr.hide(m_gameSettingsBtnDevoMemcardEmu, instant); - m_btnMgr.hide(m_gameSettingsLblWidescreen, instant); - m_btnMgr.hide(m_gameSettingsBtnWidescreen, instant); - m_btnMgr.hide(m_gameSettingsLblWiiuWidescreen, instant); - m_btnMgr.hide(m_gameSettingsBtnWiiuWidescreen, instant); - m_btnMgr.hide(m_gameSettingsLblGCLoader, instant); - m_btnMgr.hide(m_gameSettingsLblGCLoader_Val, instant); - m_btnMgr.hide(m_gameSettingsBtnGCLoader_P, instant); - m_btnMgr.hide(m_gameSettingsBtnGCLoader_M, instant); - m_btnMgr.hide(m_gameSettingsLblCC_Rumble, instant); - m_btnMgr.hide(m_gameSettingsBtnCC_Rumble, instant); - m_btnMgr.hide(m_gameSettingsLblNATIVE_CTL, instant); - m_btnMgr.hide(m_gameSettingsBtnNATIVE_CTL, instant); - m_btnMgr.hide(m_gameSettingsLblDeflicker, instant); - m_btnMgr.hide(m_gameSettingsBtnDeflicker, instant); - m_btnMgr.hide(m_gameSettingsLblArcade, instant); - m_btnMgr.hide(m_gameSettingsBtnArcade, instant); - m_btnMgr.hide(m_gameSettingsLblSkip_IPL, instant); - m_btnMgr.hide(m_gameSettingsBtnSkip_IPL, instant); - m_btnMgr.hide(m_gameSettingsLblPatch50, instant); - m_btnMgr.hide(m_gameSettingsBtnPatch50, instant); - m_btnMgr.hide(m_gameSettingsLblWidthVal, instant); - m_btnMgr.hide(m_gameSettingsLblWidth, instant); - m_btnMgr.hide(m_gameSettingsBtnWidthP, instant); - m_btnMgr.hide(m_gameSettingsBtnWidthM, instant); - m_btnMgr.hide(m_gameSettingsLblPosVal, instant); - m_btnMgr.hide(m_gameSettingsLblPos, instant); - m_btnMgr.hide(m_gameSettingsBtnPosP, instant); - m_btnMgr.hide(m_gameSettingsBtnPosM, instant); - m_btnMgr.hide(m_gameSettingsLblBBA, instant); - m_btnMgr.hide(m_gameSettingsBtnBBA, instant); - m_btnMgr.hide(m_gameSettingsLblNetProfVal, instant); - m_btnMgr.hide(m_gameSettingsLblNetProf, instant); - m_btnMgr.hide(m_gameSettingsBtnNetProfP, instant); - m_btnMgr.hide(m_gameSettingsBtnNetProfM, instant); + //wii only + m_btnMgr.hide(m_gameSettingsLblEmulation, instant); + m_btnMgr.hide(m_gameSettingsLblEmulationVal, instant); + m_btnMgr.hide(m_gameSettingsBtnEmulationP, instant); + m_btnMgr.hide(m_gameSettingsBtnEmulationM, instant); + m_btnMgr.hide(m_gameSettingsLblExtractSave, instant); + m_btnMgr.hide(m_gameSettingsBtnExtractSave, instant); + m_btnMgr.hide(m_gameSettingsLblFlashSave, instant); + m_btnMgr.hide(m_gameSettingsBtnFlashSave, instant); + m_btnMgr.hide(m_gameSettingsLblPrivateServer, instant); + m_btnMgr.hide(m_gameSettingsLblPrivateServerVal, instant); + m_btnMgr.hide(m_gameSettingsBtnPrivateServerP, instant); + m_btnMgr.hide(m_gameSettingsBtnPrivateServerM, instant); + m_btnMgr.hide(m_gameSettingsLblFix480p, instant); + m_btnMgr.hide(m_gameSettingsLblFix480pVal, instant); + m_btnMgr.hide(m_gameSettingsBtnFix480pP, instant); + m_btnMgr.hide(m_gameSettingsBtnFix480pM, instant); + m_btnMgr.hide(m_gameSettingsLblDeflickerWii, instant); + m_btnMgr.hide(m_gameSettingsLblDeflickerWiiVal, instant); + m_btnMgr.hide(m_gameSettingsBtnDeflickerWiiP, instant); + m_btnMgr.hide(m_gameSettingsBtnDeflickerWiiM, instant); // Channels only m_btnMgr.hide(m_gameSettingsLblApploader, instant); m_btnMgr.hide(m_gameSettingsBtnApploader, instant); @@ -393,20 +290,7 @@ void CMenu::_showGameSettings() return; } - if(GameHdr->type == TYPE_GC_GAME) - { - GCLoader = min(m_gcfg2.getUInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u); - GCLoader = (GCLoader == 0) ? min(m_cfg.getUInt(GC_DOMAIN, "default_loader", 1), ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1u) : GCLoader-1; - } - m_gameSettingsMaxPgs = IsOnWiiU() ? 6 : 5; - if(GameHdr->type == TYPE_GC_GAME) - { - if(GCLoader == DEVOLUTION) - m_gameSettingsMaxPgs = 2; - else - m_gameSettingsMaxPgs = 6; - } m_btnMgr.setText(m_gameSettingsLblPage, wfmt(L"%i / %i", m_gameSettingsPage, m_gameSettingsMaxPgs)); m_btnMgr.show(m_gameSettingsLblPage); @@ -418,20 +302,10 @@ void CMenu::_showGameSettings() m_btnMgr.show(m_gameSettingsBtnAdultOnly); m_btnMgr.show(m_gameSettingsLblAdultOnly); - if(GameHdr->type == TYPE_GC_GAME) - { - m_btnMgr.show(m_gameSettingsLblGCLoader); - m_btnMgr.show(m_gameSettingsLblGCLoader_Val); - m_btnMgr.show(m_gameSettingsBtnGCLoader_P); - m_btnMgr.show(m_gameSettingsBtnGCLoader_M); - } - else - { - m_btnMgr.show(m_gameSettingsLblGameIOS); - m_btnMgr.show(m_gameSettingsLblIOS); - m_btnMgr.show(m_gameSettingsBtnIOSP); - m_btnMgr.show(m_gameSettingsBtnIOSM); - } + m_btnMgr.show(m_gameSettingsLblGameIOS); + m_btnMgr.show(m_gameSettingsLblIOS); + m_btnMgr.show(m_gameSettingsBtnIOSP); + m_btnMgr.show(m_gameSettingsBtnIOSM); m_btnMgr.show(m_gameSettingsLblGameLanguage); m_btnMgr.show(m_gameSettingsLblLanguage); @@ -445,195 +319,96 @@ void CMenu::_showGameSettings() } if(m_gameSettingsPage == 2) { - if(GameHdr->type == TYPE_GC_GAME && GCLoader == DEVOLUTION) - { - m_btnMgr.show(m_gameSettingsLblLED); - m_btnMgr.show(m_gameSettingsBtnLED); - - m_btnMgr.show(m_gameSettingsLblDevoMemcardEmu); - m_btnMgr.show(m_gameSettingsBtnDevoMemcardEmu); - - m_btnMgr.show(m_gameSettingsLblWidescreen); - m_btnMgr.show(m_gameSettingsBtnWidescreen); - - m_btnMgr.show(m_gameSettingsLblManage); - m_btnMgr.show(m_gameSettingsBtnManage); - } - else - { - m_btnMgr.show(m_gameSettingsLblDebugger); - m_btnMgr.show(m_gameSettingsLblDebuggerV); - m_btnMgr.show(m_gameSettingsBtnDebuggerP); - m_btnMgr.show(m_gameSettingsBtnDebuggerM); + m_btnMgr.show(m_gameSettingsLblDebugger); + m_btnMgr.show(m_gameSettingsLblDebuggerV); + m_btnMgr.show(m_gameSettingsBtnDebuggerP); + m_btnMgr.show(m_gameSettingsBtnDebuggerM); + + m_btnMgr.show(m_gameSettingsLblHooktype); + m_btnMgr.show(m_gameSettingsLblHooktypeVal); + m_btnMgr.show(m_gameSettingsBtnHooktypeM); + m_btnMgr.show(m_gameSettingsBtnHooktypeP); - if(GameHdr->type != TYPE_GC_GAME) - { - m_btnMgr.show(m_gameSettingsLblHooktype); - m_btnMgr.show(m_gameSettingsLblHooktypeVal); - m_btnMgr.show(m_gameSettingsBtnHooktypeM); - m_btnMgr.show(m_gameSettingsBtnHooktypeP); - } - else - { - m_btnMgr.show(m_gameSettingsLblDeflicker); - m_btnMgr.show(m_gameSettingsBtnDeflicker); - } - - m_btnMgr.show(m_gameSettingsLblOcarina); - m_btnMgr.show(m_gameSettingsBtnOcarina); - - m_btnMgr.show(m_gameSettingsLblCheat); - m_btnMgr.show(m_gameSettingsBtnCheat); - } + m_btnMgr.show(m_gameSettingsLblOcarina); + m_btnMgr.show(m_gameSettingsBtnOcarina); + + m_btnMgr.show(m_gameSettingsLblCheat); + m_btnMgr.show(m_gameSettingsBtnCheat); } if(m_gameSettingsPage == 3) { - if(GameHdr->type != TYPE_GC_GAME) - { - m_btnMgr.show(m_gameSettingsLblPatchVidModes); - m_btnMgr.show(m_gameSettingsLblPatchVidModesVal); - m_btnMgr.show(m_gameSettingsBtnPatchVidModesM); - m_btnMgr.show(m_gameSettingsBtnPatchVidModesP); - - m_btnMgr.show(m_gameSettingsLblVipatch); - m_btnMgr.show(m_gameSettingsBtnVipatch); + m_btnMgr.show(m_gameSettingsLblPatchVidModes); + m_btnMgr.show(m_gameSettingsLblPatchVidModesVal); + m_btnMgr.show(m_gameSettingsBtnPatchVidModesM); + m_btnMgr.show(m_gameSettingsBtnPatchVidModesP); + + m_btnMgr.show(m_gameSettingsLblVipatch); + m_btnMgr.show(m_gameSettingsBtnVipatch); - m_btnMgr.show(m_gameSettingsLblCountryPatch); - m_btnMgr.show(m_gameSettingsBtnCountryPatch); + m_btnMgr.show(m_gameSettingsLblCountryPatch); + m_btnMgr.show(m_gameSettingsBtnCountryPatch); - m_btnMgr.show(m_gameSettingsLblAspectRatio); - m_btnMgr.show(m_gameSettingsLblAspectRatioVal); - m_btnMgr.show(m_gameSettingsBtnAspectRatioP); - m_btnMgr.show(m_gameSettingsBtnAspectRatioM); - } - else - { - m_btnMgr.show(m_gameSettingsLblWiiuWidescreen); - m_btnMgr.show(m_gameSettingsBtnWiiuWidescreen); - - m_btnMgr.show(m_gameSettingsLblEmuMemCard); - m_btnMgr.show(m_gameSettingsLblEmuMemCard_Val); - m_btnMgr.show(m_gameSettingsBtnEmuMemCard_P); - m_btnMgr.show(m_gameSettingsBtnEmuMemCard_M); - - m_btnMgr.show(m_gameSettingsLblWidescreen); - m_btnMgr.show(m_gameSettingsBtnWidescreen); - - m_btnMgr.show(m_gameSettingsLblManage); - m_btnMgr.show(m_gameSettingsBtnManage); - } + m_btnMgr.show(m_gameSettingsLblAspectRatio); + m_btnMgr.show(m_gameSettingsLblAspectRatioVal); + m_btnMgr.show(m_gameSettingsBtnAspectRatioP); + m_btnMgr.show(m_gameSettingsBtnAspectRatioM); } if(m_gameSettingsPage == 4) { - if(GameHdr->type == TYPE_GC_GAME) + m_btnMgr.show(m_gameSettingsLblManage); + m_btnMgr.show(m_gameSettingsBtnManage); + + if(GameHdr->type == TYPE_CHANNEL || GameHdr->type == TYPE_EMUCHANNEL) { - m_btnMgr.show(m_gameSettingsLblCC_Rumble); - m_btnMgr.show(m_gameSettingsBtnCC_Rumble); + m_btnMgr.show(m_gameSettingsLblCustom); + m_btnMgr.show(m_gameSettingsBtnCustom); - m_btnMgr.show(m_gameSettingsLblNATIVE_CTL); - m_btnMgr.show(m_gameSettingsBtnNATIVE_CTL); - - m_btnMgr.show(m_gameSettingsBtnArcade); - m_btnMgr.show(m_gameSettingsLblArcade); - - m_btnMgr.show(m_gameSettingsBtnSkip_IPL); - m_btnMgr.show(m_gameSettingsLblSkip_IPL); + m_btnMgr.show(m_gameSettingsLblApploader); + m_btnMgr.show(m_gameSettingsBtnApploader); + m_btnMgr.show(m_gameSettingsLblLaunchNK); + m_btnMgr.show(m_gameSettingsBtnLaunchNK); } - else + else if(GameHdr->type == TYPE_WII_GAME) { - m_btnMgr.show(m_gameSettingsLblManage); - m_btnMgr.show(m_gameSettingsBtnManage); - - if(GameHdr->type == TYPE_CHANNEL || GameHdr->type == TYPE_EMUCHANNEL) - { - m_btnMgr.show(m_gameSettingsLblCustom); - m_btnMgr.show(m_gameSettingsBtnCustom); - - m_btnMgr.show(m_gameSettingsLblApploader); - m_btnMgr.show(m_gameSettingsBtnApploader); - - m_btnMgr.show(m_gameSettingsLblLaunchNK); - m_btnMgr.show(m_gameSettingsBtnLaunchNK); - } - else if(GameHdr->type == TYPE_WII_GAME) - { - m_btnMgr.show(m_gameSettingsLblEmulationVal); - m_btnMgr.show(m_gameSettingsLblEmulation); - m_btnMgr.show(m_gameSettingsBtnEmulationP); - m_btnMgr.show(m_gameSettingsBtnEmulationM); - - m_btnMgr.show(m_gameSettingsLblExtractSave); - m_btnMgr.show(m_gameSettingsBtnExtractSave); - - m_btnMgr.show(m_gameSettingsLblFlashSave); - m_btnMgr.show(m_gameSettingsBtnFlashSave); - } + m_btnMgr.show(m_gameSettingsLblEmulationVal); + m_btnMgr.show(m_gameSettingsLblEmulation); + m_btnMgr.show(m_gameSettingsBtnEmulationP); + m_btnMgr.show(m_gameSettingsBtnEmulationM); + + m_btnMgr.show(m_gameSettingsLblExtractSave); + m_btnMgr.show(m_gameSettingsBtnExtractSave); + + m_btnMgr.show(m_gameSettingsLblFlashSave); + m_btnMgr.show(m_gameSettingsBtnFlashSave); } } if(m_gameSettingsPage == 5) { - if(GameHdr->type == TYPE_GC_GAME) - { - m_btnMgr.show(m_gameSettingsLblLED); - m_btnMgr.show(m_gameSettingsBtnLED); - - m_btnMgr.show(m_gameSettingsLblWidthVal); - m_btnMgr.show(m_gameSettingsLblWidth); - m_btnMgr.show(m_gameSettingsBtnWidthP); - m_btnMgr.show(m_gameSettingsBtnWidthM); - - m_btnMgr.show(m_gameSettingsLblPosVal); - m_btnMgr.show(m_gameSettingsLblPos); - m_btnMgr.show(m_gameSettingsBtnPosP); - m_btnMgr.show(m_gameSettingsBtnPosM); - - m_btnMgr.show(m_gameSettingsBtnPatch50); - m_btnMgr.show(m_gameSettingsLblPatch50); - } - else - { - m_btnMgr.show(m_gameSettingsLblLED); - m_btnMgr.show(m_gameSettingsBtnLED); + m_btnMgr.show(m_gameSettingsLblLED); + m_btnMgr.show(m_gameSettingsBtnLED); - //if(GameHdr->type == TYPE_WII_GAME) - //{ - m_btnMgr.show(m_gameSettingsLblPrivateServer); - m_btnMgr.show(m_gameSettingsLblPrivateServerVal); - m_btnMgr.show(m_gameSettingsBtnPrivateServerP); - m_btnMgr.show(m_gameSettingsBtnPrivateServerM); - - m_btnMgr.show(m_gameSettingsLblFix480p); - m_btnMgr.show(m_gameSettingsLblFix480pVal); - m_btnMgr.show(m_gameSettingsBtnFix480pP); - m_btnMgr.show(m_gameSettingsBtnFix480pM); + m_btnMgr.show(m_gameSettingsLblPrivateServer); + m_btnMgr.show(m_gameSettingsLblPrivateServerVal); + m_btnMgr.show(m_gameSettingsBtnPrivateServerP); + m_btnMgr.show(m_gameSettingsBtnPrivateServerM); + + m_btnMgr.show(m_gameSettingsLblFix480p); + m_btnMgr.show(m_gameSettingsLblFix480pVal); + m_btnMgr.show(m_gameSettingsBtnFix480pP); + m_btnMgr.show(m_gameSettingsBtnFix480pM); - m_btnMgr.show(m_gameSettingsLblDeflickerWii); - m_btnMgr.show(m_gameSettingsLblDeflickerWiiVal); - m_btnMgr.show(m_gameSettingsBtnDeflickerWiiM); - m_btnMgr.show(m_gameSettingsBtnDeflickerWiiP); - //} - } + m_btnMgr.show(m_gameSettingsLblDeflickerWii); + m_btnMgr.show(m_gameSettingsLblDeflickerWiiVal); + m_btnMgr.show(m_gameSettingsBtnDeflickerWiiM); + m_btnMgr.show(m_gameSettingsBtnDeflickerWiiP); } if(m_gameSettingsPage == 6) { - if(GameHdr->type == TYPE_GC_GAME) - { - m_btnMgr.show(m_gameSettingsLblBBA); - m_btnMgr.show(m_gameSettingsBtnBBA); - - m_btnMgr.show(m_gameSettingsLblNetProfVal); - m_btnMgr.show(m_gameSettingsLblNetProf); - m_btnMgr.show(m_gameSettingsBtnNetProfP); - m_btnMgr.show(m_gameSettingsBtnNetProfM); - } - else - { - m_btnMgr.show(m_gameSettingsLblWidescreenWiiu); - m_btnMgr.show(m_gameSettingsLblWidescreenWiiuVal); - m_btnMgr.show(m_gameSettingsBtnWidescreenWiiuP); - m_btnMgr.show(m_gameSettingsBtnWidescreenWiiuM); - } + m_btnMgr.show(m_gameSettingsLblWidescreenWiiu); + m_btnMgr.show(m_gameSettingsLblWidescreenWiiuVal); + m_btnMgr.show(m_gameSettingsBtnWidescreenWiiuP); + m_btnMgr.show(m_gameSettingsBtnWidescreenWiiuM); } m_btnMgr.setText(m_gameSettingsBtnAdultOnly, m_gcfg1.getBool("ADULTONLY", id, false) ? _t("yes", L"Yes") : _t("no", L"No")); @@ -643,107 +418,60 @@ void CMenu::_showGameSettings() i = min(m_gcfg2.getUInt(id, "debugger", 0), ARRAY_SIZE(CMenu::_debugger) - 1u); m_btnMgr.setText(m_gameSettingsLblDebuggerV, _t(CMenu::_debugger[i].id, CMenu::_debugger[i].text)); - if(GameHdr->type == TYPE_GC_GAME) - { - //widescreen is shared by devo and nintendont - m_btnMgr.setText(m_gameSettingsBtnWidescreen, _optBoolToString(m_gcfg2.getOptBool(id, "widescreen", 0))); - m_btnMgr.setText(m_gameSettingsBtnWiiuWidescreen, _optBoolToString(m_gcfg2.getOptBool(id, "wiiu_widescreen", 0))); - m_btnMgr.setText(m_gameSettingsBtnDevoMemcardEmu, _optBoolToString(m_gcfg2.getOptBool(id, "devo_memcard_emu", 2))); - m_btnMgr.setText(m_gameSettingsBtnCC_Rumble, _optBoolToString(m_gcfg2.getOptBool(id, "cc_rumble", 2))); - m_btnMgr.setText(m_gameSettingsBtnNATIVE_CTL, _optBoolToString(m_gcfg2.getOptBool(id, "native_ctl", 2))); - m_btnMgr.setText(m_gameSettingsBtnDeflicker, _optBoolToString(m_gcfg2.getOptBool(id, "deflicker", 0))); - m_btnMgr.setText(m_gameSettingsBtnArcade, _optBoolToString(m_gcfg2.getOptBool(id, "triforce_arcade", 0))); - m_btnMgr.setText(m_gameSettingsBtnSkip_IPL, _optBoolToString(m_gcfg2.getOptBool(id, "skip_ipl", 0))); - m_btnMgr.setText(m_gameSettingsBtnPatch50, _optBoolToString(m_gcfg2.getOptBool(id, "patch_pal50", 0))); - m_btnMgr.setText(m_gameSettingsBtnBBA, _optBoolToString(m_gcfg2.getOptBool(id, "bba_emu", 0))); - - u8 netprofile = m_gcfg2.getUInt(id, "net_profile", 0); - if(netprofile == 0) - m_btnMgr.setText(m_gameSettingsLblNetProfVal, _t("GC_Auto", L"Auto")); - else - m_btnMgr.setText(m_gameSettingsLblNetProfVal, wfmt(L"%i", netprofile)); - - if(videoScale == 0) - m_btnMgr.setText(m_gameSettingsLblWidthVal, _t("GC_Auto", L"Auto")); - else if(videoScale == 127) - m_btnMgr.setText(m_gameSettingsLblWidthVal, _t("def", L"Default")); - else - m_btnMgr.setText(m_gameSettingsLblWidthVal, wfmt(L"%i", max(40, min(120, videoScale)) + 600)); - - if(videoOffset == 127) - m_btnMgr.setText(m_gameSettingsLblPosVal, _t("def", L"Default")); - else - m_btnMgr.setText(m_gameSettingsLblPosVal, wfmt(L"%i", max(-20, min(20, videoOffset)))); - - i = min(m_gcfg2.getUInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_GCvideoModes) - 1u); - m_btnMgr.setText(m_gameSettingsLblVideo, _t(CMenu::_GCvideoModes[i].id, CMenu::_GCvideoModes[i].text)); - - i = min(m_gcfg2.getUInt(id, "language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u); - m_btnMgr.setText(m_gameSettingsLblLanguage, _t(CMenu::_GClanguages[i].id, CMenu::_GClanguages[i].text)); - - i = min(m_gcfg2.getUInt(id, "emu_memcard", 0), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u); - m_btnMgr.setText(m_gameSettingsLblEmuMemCard_Val, _t(CMenu::_NinEmuCard[i].id, CMenu::_NinEmuCard[i].text)); - - i = min(m_gcfg2.getUInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u); - m_btnMgr.setText(m_gameSettingsLblGCLoader_Val, _t(CMenu::_GCLoader[i].id, CMenu::_GCLoader[i].text)); - } + m_btnMgr.setText(m_gameSettingsBtnVipatch, _optBoolToString(m_gcfg2.getOptBool(id, "vipatch", 0))); + m_btnMgr.setText(m_gameSettingsBtnCountryPatch, _optBoolToString(m_gcfg2.getOptBool(id, "country_patch", 0))); + i = min(m_gcfg2.getUInt(id, "private_server", 0), ARRAY_SIZE(CMenu::_privateServer) - 1u); + if(i < 3) + m_btnMgr.setText(m_gameSettingsLblPrivateServerVal, _t(CMenu::_privateServer[i].id, CMenu::_privateServer[i].text)); else + m_btnMgr.setText(m_gameSettingsLblPrivateServerVal, custom_servers[i - 3]);//wstringEx() + + m_btnMgr.setText(m_gameSettingsLblFix480pVal, _optBoolToString(m_gcfg2.getOptBool(id, "fix480p", 2))); + + i = min(m_gcfg2.getUInt(id, "deflicker_wii", 0), ARRAY_SIZE(CMenu::_DeflickerOptions) - 1u); + m_btnMgr.setText(m_gameSettingsLblDeflickerWiiVal, _t(CMenu::_DeflickerOptions[i].id, CMenu::_DeflickerOptions[i].text)); + + i = min(m_gcfg2.getUInt(id, "widescreen_wiiu", 0), ARRAY_SIZE(CMenu::_WidescreenWiiu) - 1u); + m_btnMgr.setText(m_gameSettingsLblWidescreenWiiuVal, _t(CMenu::_WidescreenWiiu[i].id, CMenu::_WidescreenWiiu[i].text)); + + m_btnMgr.setText(m_gameSettingsBtnCustom, _optBoolToString(m_gcfg2.getOptBool(id, "custom", 0))); + m_btnMgr.setText(m_gameSettingsBtnLaunchNK, _optBoolToString(m_gcfg2.getOptBool(id, "useneek", 0))); + m_btnMgr.setText(m_gameSettingsBtnApploader, _optBoolToString(m_gcfg2.getOptBool(id, "apploader", 0))); + + i = min(m_gcfg2.getUInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u); + m_btnMgr.setText(m_gameSettingsLblVideo, _t(CMenu::_VideoModes[i].id, CMenu::_VideoModes[i].text)); + + i = min(m_gcfg2.getUInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u); + m_btnMgr.setText(m_gameSettingsLblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text)); + + i = min(m_gcfg2.getUInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u); + m_btnMgr.setText(m_gameSettingsLblAspectRatioVal, _t(CMenu::_AspectRatio[i].id, CMenu::_AspectRatio[i].text)); + + // this getInt() is different than the normal getInt() + // this getInt() will actually set the j variable to the value of the key. hence the & before j. + // this appears to be the only time this getInt() is called of all wiiflow code. + // why they didn't just set int j = m_gcfg2.getInt(id, "ios", 0); i do not know. + int j = 0; + if(m_gcfg2.getInt(id, "ios", &j) && _installed_cios.size() > 0) { - m_btnMgr.setText(m_gameSettingsBtnVipatch, _optBoolToString(m_gcfg2.getOptBool(id, "vipatch", 0))); - m_btnMgr.setText(m_gameSettingsBtnCountryPatch, _optBoolToString(m_gcfg2.getOptBool(id, "country_patch", 0))); - i = min(m_gcfg2.getUInt(id, "private_server", 0), ARRAY_SIZE(CMenu::_privateServer) - 1u); - if(i < 3) - m_btnMgr.setText(m_gameSettingsLblPrivateServerVal, _t(CMenu::_privateServer[i].id, CMenu::_privateServer[i].text)); - else - m_btnMgr.setText(m_gameSettingsLblPrivateServerVal, custom_servers[i - 3]);//wstringEx() - - m_btnMgr.setText(m_gameSettingsLblFix480pVal, _optBoolToString(m_gcfg2.getOptBool(id, "fix480p", 2))); - - i = min(m_gcfg2.getUInt(id, "deflicker_wii", 0), ARRAY_SIZE(CMenu::_DeflickerOptions) - 1u); - m_btnMgr.setText(m_gameSettingsLblDeflickerWiiVal, _t(CMenu::_DeflickerOptions[i].id, CMenu::_DeflickerOptions[i].text)); - - i = min(m_gcfg2.getUInt(id, "widescreen_wiiu", 0), ARRAY_SIZE(CMenu::_WidescreenWiiu) - 1u); - m_btnMgr.setText(m_gameSettingsLblWidescreenWiiuVal, _t(CMenu::_WidescreenWiiu[i].id, CMenu::_WidescreenWiiu[i].text)); - - m_btnMgr.setText(m_gameSettingsBtnCustom, _optBoolToString(m_gcfg2.getOptBool(id, "custom", 0))); - m_btnMgr.setText(m_gameSettingsBtnLaunchNK, _optBoolToString(m_gcfg2.getOptBool(id, "useneek", 0))); - m_btnMgr.setText(m_gameSettingsBtnApploader, _optBoolToString(m_gcfg2.getOptBool(id, "apploader", 0))); - - i = min(m_gcfg2.getUInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u); - m_btnMgr.setText(m_gameSettingsLblVideo, _t(CMenu::_VideoModes[i].id, CMenu::_VideoModes[i].text)); - - i = min(m_gcfg2.getUInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u); - m_btnMgr.setText(m_gameSettingsLblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text)); - - i = min(m_gcfg2.getUInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u); - m_btnMgr.setText(m_gameSettingsLblAspectRatioVal, _t(CMenu::_AspectRatio[i].id, CMenu::_AspectRatio[i].text)); - - // this getInt() is different than the normal getInt() - // this getInt() will actually set the j variable to the value of the key. hence the & before j. - // this appears to be the only time this getInt() is called of all wiiflow code. - // why they didn't just set int j = m_gcfg2.getInt(id, "ios", 0); i do not know. - int j = 0; - if(m_gcfg2.getInt(id, "ios", &j) && _installed_cios.size() > 0) - { - CIOSItr itr = _installed_cios.find(j); - j = (itr == _installed_cios.end()) ? 0 : itr->first; - } - else j = 0; - - if(j > 0) - m_btnMgr.setText(m_gameSettingsLblIOS, wfmt(L"%i", j)); - else - m_btnMgr.setText(m_gameSettingsLblIOS, L"AUTO"); - - i = min(m_gcfg2.getUInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u); - m_btnMgr.setText(m_gameSettingsLblPatchVidModesVal, _t(CMenu::_vidModePatch[i].id, CMenu::_vidModePatch[i].text)); - - i = min(m_gcfg2.getUInt(id, "hooktype", 0), ARRAY_SIZE(CMenu::_hooktype) - 1u); - m_btnMgr.setText(m_gameSettingsLblHooktypeVal, _t(CMenu::_hooktype[i].id, CMenu::_hooktype[i].text)); - - i = min(m_gcfg2.getUInt(id, "emulate_save", 0), ARRAY_SIZE(CMenu::_SaveEmu) - 1u); - m_btnMgr.setText(m_gameSettingsLblEmulationVal, _t(CMenu::_SaveEmu[i].id, CMenu::_SaveEmu[i].text)); + CIOSItr itr = _installed_cios.find(j); + j = (itr == _installed_cios.end()) ? 0 : itr->first; } + else j = 0; + + if(j > 0) + m_btnMgr.setText(m_gameSettingsLblIOS, wfmt(L"%i", j)); + else + m_btnMgr.setText(m_gameSettingsLblIOS, L"AUTO"); + + i = min(m_gcfg2.getUInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u); + m_btnMgr.setText(m_gameSettingsLblPatchVidModesVal, _t(CMenu::_vidModePatch[i].id, CMenu::_vidModePatch[i].text)); + + i = min(m_gcfg2.getUInt(id, "hooktype", 0), ARRAY_SIZE(CMenu::_hooktype) - 1u); + m_btnMgr.setText(m_gameSettingsLblHooktypeVal, _t(CMenu::_hooktype[i].id, CMenu::_hooktype[i].text)); + + i = min(m_gcfg2.getUInt(id, "emulate_save", 0), ARRAY_SIZE(CMenu::_SaveEmu) - 1u); + m_btnMgr.setText(m_gameSettingsLblEmulationVal, _t(CMenu::_SaveEmu[i].id, CMenu::_SaveEmu[i].text)); } void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc) @@ -774,11 +502,6 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc) strcpy(id, GameHdr->id); } - if(GameHdr->type == TYPE_GC_GAME) - { - videoScale = m_gcfg2.getInt(id, "nin_width", 127); - videoOffset = m_gcfg2.getInt(id, "nin_pos", 127); - } m_gameSettingsPage = 1; _showGameSettings(); while(!m_exit) @@ -840,21 +563,6 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc) m_gcfg2.setBool(id, "useneek", !m_gcfg2.getBool(id, "useneek", 0)); _showGameSettings(); } - else if(m_btnMgr.selected(m_gameSettingsBtnDevoMemcardEmu)) - { - m_gcfg2.setOptBool(id, "devo_memcard_emu", loopNum(m_gcfg2.getOptBool(id, "devo_memcard_emu") + 1, 3)); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnWidescreen)) - { - m_gcfg2.setBool(id, "widescreen", !m_gcfg2.getBool(id, "widescreen", 0)); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnWiiuWidescreen)) - { - m_gcfg2.setBool(id, "wiiu_widescreen", !m_gcfg2.getBool(id, "wiiu_widescreen", 0)); - _showGameSettings(); - } else if(m_btnMgr.selected(m_gameSettingsBtnWidescreenWiiuP) || m_btnMgr.selected(m_gameSettingsBtnWidescreenWiiuM)) { s8 direction = m_btnMgr.selected(m_gameSettingsBtnWidescreenWiiuP) ? 1 : -1; @@ -864,19 +572,13 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc) else if(m_btnMgr.selected(m_gameSettingsBtnLanguageP) || m_btnMgr.selected(m_gameSettingsBtnLanguageM)) { s8 direction = m_btnMgr.selected(m_gameSettingsBtnLanguageP) ? 1 : -1; - if(GameHdr->type == TYPE_GC_GAME) - m_gcfg2.setInt(id, "language", (int)loopNum(m_gcfg2.getUInt(id, "language", 0) + direction, ARRAY_SIZE(CMenu::_GClanguages))); - else - m_gcfg2.setInt(id, "language", (int)loopNum(m_gcfg2.getUInt(id, "language", 0) + direction, ARRAY_SIZE(CMenu::_languages))); + m_gcfg2.setInt(id, "language", (int)loopNum(m_gcfg2.getUInt(id, "language", 0) + direction, ARRAY_SIZE(CMenu::_languages))); _showGameSettings(); } else if(m_btnMgr.selected(m_gameSettingsBtnVideoP) || m_btnMgr.selected(m_gameSettingsBtnVideoM)) { s8 direction = m_btnMgr.selected(m_gameSettingsBtnVideoP) ? 1 : -1; - if(GameHdr->type == TYPE_GC_GAME) - m_gcfg2.setInt(id, "video_mode", (int)loopNum(m_gcfg2.getUInt(id, "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_GCvideoModes))); - else - m_gcfg2.setInt(id, "video_mode", (int)loopNum(m_gcfg2.getUInt(id, "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_VideoModes))); + m_gcfg2.setInt(id, "video_mode", (int)loopNum(m_gcfg2.getUInt(id, "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_VideoModes))); _showGameSettings(); } else if(m_btnMgr.selected(m_gameSettingsBtnAspectRatioP) || m_btnMgr.selected(m_gameSettingsBtnAspectRatioM)) @@ -885,60 +587,6 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc) m_gcfg2.setInt(id, "aspect_ratio", (int)loopNum(m_gcfg2.getUInt(id, "aspect_ratio", 0) + direction, ARRAY_SIZE(CMenu::_AspectRatio))); _showGameSettings(); } - else if(m_btnMgr.selected(m_gameSettingsBtnWidthP) || m_btnMgr.selected(m_gameSettingsBtnWidthM)) - { - if(m_btnMgr.selected(m_gameSettingsBtnWidthP)) - { - if(videoScale == 0) - videoScale = 40; - else if(videoScale == 127) - videoScale = 0; - else if(videoScale < 120) - videoScale += 2; - } - else - { - if(videoScale == 40) - videoScale = 0; - else if(videoScale == 0) - videoScale = 127; - else if(videoScale > 40 && videoScale != 127) - videoScale -= 2; - } - m_gcfg2.setInt(id, "nin_width", videoScale); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnPosP) || m_btnMgr.selected(m_gameSettingsBtnPosM)) - { - if(m_btnMgr.selected(m_gameSettingsBtnPosP)) - { - if(videoOffset == 127) - videoOffset = -20; - else if(videoOffset < 20) - videoOffset++; - } - else - { - if(videoOffset == -20) - videoOffset = 127; - else if(videoOffset > -20 && videoOffset != 127) - videoOffset--; - } - m_gcfg2.setInt(id, "nin_pos", videoOffset); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnEmuMemCard_P) || m_btnMgr.selected(m_gameSettingsBtnEmuMemCard_M)) - { - s8 direction = m_btnMgr.selected(m_gameSettingsBtnEmuMemCard_P) ? 1 : -1; - m_gcfg2.setInt(id, "emu_memcard", (int)loopNum(m_gcfg2.getUInt(id, "emu_memcard", 2) + direction, ARRAY_SIZE(CMenu::_NinEmuCard))); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnGCLoader_P) || m_btnMgr.selected(m_gameSettingsBtnGCLoader_M)) - { - s8 direction = m_btnMgr.selected(m_gameSettingsBtnGCLoader_P) ? 1 : -1; - m_gcfg2.setInt(id, "gc_loader", (int)loopNum(m_gcfg2.getUInt(id, "gc_loader", 0) + direction, ARRAY_SIZE(CMenu::_GCLoader))); - _showGameSettings(); - } else if(m_btnMgr.selected(m_gameSettingsBtnIOSM) || m_btnMgr.selected(m_gameSettingsBtnIOSP)) { if(_installed_cios.size() > 0) @@ -1015,47 +663,6 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc) m_gcfg2.setBool(id, "led", !m_gcfg2.getBool(id, "led", 0)); _showGameSettings(); } - else if(m_btnMgr.selected(m_gameSettingsBtnNATIVE_CTL)) - { - m_gcfg2.setOptBool(id, "native_ctl", loopNum(m_gcfg2.getOptBool(id, "native_ctl") + 1, 3)); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnDeflicker)) - { - m_gcfg2.setBool(id, "deflicker", !m_gcfg2.getBool(id, "deflicker", 0)); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnCC_Rumble)) - { - m_gcfg2.setOptBool(id, "cc_rumble", loopNum(m_gcfg2.getOptBool(id, "cc_rumble") + 1, 3)); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnArcade)) - { - m_gcfg2.setBool(id, "triforce_arcade", !m_gcfg2.getBool(id, "triforce_arcade", 0)); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnSkip_IPL)) - { - m_gcfg2.setBool(id, "skip_ipl", !m_gcfg2.getBool(id, "skip_ipl", 0)); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnPatch50)) - { - m_gcfg2.setBool(id, "patch_pal50", !m_gcfg2.getBool(id, "patch_pal50", 0)); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnBBA)) - { - m_gcfg2.setBool(id, "bba_emu", !m_gcfg2.getBool(id, "bba_emu", 0)); - _showGameSettings(); - } - else if(m_btnMgr.selected(m_gameSettingsBtnNetProfP) || m_btnMgr.selected(m_gameSettingsBtnNetProfM)) - { - s8 direction = m_btnMgr.selected(m_gameSettingsBtnNetProfP) ? 1 : -1; - m_gcfg2.setInt(id, "net_profile", loopNum(m_gcfg2.getInt(id, "net_profile") + direction, 4)); - _showGameSettings(); - } else if(m_btnMgr.selected(m_gameSettingsBtnPrivateServerP) || m_btnMgr.selected(m_gameSettingsBtnPrivateServerM)) { s8 direction = m_btnMgr.selected(m_gameSettingsBtnPrivateServerP) ? 1 : -1; @@ -1137,12 +744,6 @@ void CMenu::_initGameSettingsMenu() m_gameSettingsBtnVideoM = _addPicButton("GAME_SETTINGS/VIDEO_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48); m_gameSettingsBtnVideoP = _addPicButton("GAME_SETTINGS/VIDEO_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48); -//GC Page 1 line 2 - m_gameSettingsLblGCLoader = _addLabel("GAME_SETTINGS/GC_LOADER", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsLblGCLoader_Val = _addLabel("GAME_SETTINGS/GC_LOADER_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC); - m_gameSettingsBtnGCLoader_M = _addPicButton("GAME_SETTINGS/GC_LOADER_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48); - m_gameSettingsBtnGCLoader_P = _addPicButton("GAME_SETTINGS/GC_LOADER_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48); - // Page 2 m_gameSettingsLblDebugger = _addLabel("GAME_SETTINGS/GAME_DEBUGGER", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); m_gameSettingsLblDebuggerV = _addLabel("GAME_SETTINGS/GAME_DEBUGGER_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC); @@ -1160,16 +761,6 @@ void CMenu::_initGameSettingsMenu() m_gameSettingsLblCheat = _addLabel("GAME_SETTINGS/CHEAT", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); m_gameSettingsBtnCheat = _addButton("GAME_SETTINGS/CHEAT_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor); -//GC Page 2 - //nintendont = debugger, deflicker, ocarina, cheats - //devolution = led_activity(pg5), emu_memcard, widescreen(pg3), mng_cvr_bnr (pg4) - - m_gameSettingsLblDeflicker = _addLabel("GAME_SETTINGS/DEFLICKER", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnDeflicker = _addButton("GAME_SETTINGS/DEFLICKER_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor); - - m_gameSettingsLblDevoMemcardEmu = _addLabel("GAME_SETTINGS/DEVO_MEMCARD_EMU", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnDevoMemcardEmu = _addButton("GAME_SETTINGS/DEVO_MEMCARD_EMU_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor); - //Page 3 m_gameSettingsLblCountryPatch = _addLabel("GAME_SETTINGS/COUNTRY_PATCH", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); m_gameSettingsBtnCountryPatch = _addButton("GAME_SETTINGS/COUNTRY_PATCH_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor); @@ -1187,19 +778,6 @@ void CMenu::_initGameSettingsMenu() m_gameSettingsBtnAspectRatioM = _addPicButton("GAME_SETTINGS/ASPECT_RATIO_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48); m_gameSettingsBtnAspectRatioP = _addPicButton("GAME_SETTINGS/ASPECT_RATIO_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48); -//GC Nintendont Page 3 - //nintendont = wiiu widescreen, emu_memcard, widescreen, mng_cvr_bnr (pg4) - m_gameSettingsLblWiiuWidescreen = _addLabel("GAME_SETTINGS/WIIU_WIDESCREEN", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnWiiuWidescreen = _addButton("GAME_SETTINGS/WIIU_WIDESCREEN_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor); - - m_gameSettingsLblEmuMemCard = _addLabel("GAME_SETTINGS/DML_NMM", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsLblEmuMemCard_Val = _addLabel("GAME_SETTINGS/DML_NMM_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC); - m_gameSettingsBtnEmuMemCard_M = _addPicButton("GAME_SETTINGS/DML_NMM_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48); - m_gameSettingsBtnEmuMemCard_P = _addPicButton("GAME_SETTINGS/DML_NMM_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48); - - m_gameSettingsLblWidescreen = _addLabel("GAME_SETTINGS/WIDESCREEN", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnWidescreen = _addButton("GAME_SETTINGS/WIDESCREEN_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor); - //Page 4 m_gameSettingsLblEmulation = _addLabel("GAME_SETTINGS/EMU_SAVE", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); m_gameSettingsLblEmulationVal = _addLabel("GAME_SETTINGS/EMU_SAVE_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC); @@ -1225,19 +803,6 @@ void CMenu::_initGameSettingsMenu() m_gameSettingsLblLaunchNK = _addLabel("GAME_SETTINGS/LAUNCHNEEK", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); m_gameSettingsBtnLaunchNK = _addButton("GAME_SETTINGS/LAUNCHNEEK_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor); -//GC Nintendont Page 4 - m_gameSettingsLblCC_Rumble = _addLabel("GAME_SETTINGS/CC_RUMBLE", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnCC_Rumble = _addButton("GAME_SETTINGS/CC_RUMBLE_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor); - - m_gameSettingsLblNATIVE_CTL = _addLabel("GAME_SETTINGS/NATIVE_CTL", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnNATIVE_CTL = _addButton("GAME_SETTINGS/NATIVE_CTL_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor); - - m_gameSettingsLblArcade = _addLabel("GAME_SETTINGS/ARCADE", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnArcade = _addButton("GAME_SETTINGS/ARCADE_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor); - - m_gameSettingsLblSkip_IPL = _addLabel("GAME_SETTINGS/SKIP_IPL", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnSkip_IPL = _addButton("GAME_SETTINGS/SKIP_IPL_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor); - //Page 5 m_gameSettingsLblLED = _addLabel("GAME_SETTINGS/LED", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); m_gameSettingsBtnLED = _addButton("GAME_SETTINGS/LED_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor); @@ -1257,30 +822,7 @@ void CMenu::_initGameSettingsMenu() m_gameSettingsBtnDeflickerWiiM = _addPicButton("GAME_SETTINGS/DEFLICKER_WII_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48); m_gameSettingsBtnDeflickerWiiP = _addPicButton("GAME_SETTINGS/DEFLICKER_WII_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48); - //GC - m_gameSettingsLblWidth = _addLabel("GAME_SETTINGS/NIN_WIDTH", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsLblWidthVal = _addLabel("GAME_SETTINGS/NIN_WIDTH_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC); - m_gameSettingsBtnWidthM = _addPicButton("GAME_SETTINGS/NIN_WIDTH_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48); - m_gameSettingsBtnWidthP = _addPicButton("GAME_SETTINGS/NIN_WIDTH_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48); - - m_gameSettingsLblPos = _addLabel("GAME_SETTINGS/NIN_POS", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsLblPosVal = _addLabel("GAME_SETTINGS/NIN_POS_BTN", theme.btnFont, L"", 468, 250, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC); - m_gameSettingsBtnPosM = _addPicButton("GAME_SETTINGS/NIN_POS_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 250, 48, 48); - m_gameSettingsBtnPosP = _addPicButton("GAME_SETTINGS/NIN_POS_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 250, 48, 48); - - m_gameSettingsLblPatch50 = _addLabel("GAME_SETTINGS/PATCH_PAL50", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnPatch50 = _addButton("GAME_SETTINGS/PATCH_PAL50_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor); - -//Page 6 GC - m_gameSettingsLblBBA = _addLabel("GAME_SETTINGS/BBA", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsBtnBBA = _addButton("GAME_SETTINGS/BBA_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor); - - m_gameSettingsLblNetProf = _addLabel("GAME_SETTINGS/NET_PROFILE", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); - m_gameSettingsLblNetProfVal = _addLabel("GAME_SETTINGS/NET_PROFILE_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC); - m_gameSettingsBtnNetProfM = _addPicButton("GAME_SETTINGS/NET_PROFILE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48); - m_gameSettingsBtnNetProfP = _addPicButton("GAME_SETTINGS/NET_PROFILE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48); - - //wii +//Page 6 m_gameSettingsLblWidescreenWiiu = _addLabel("GAME_SETTINGS/WIDESCREEN_WIIU", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); m_gameSettingsLblWidescreenWiiuVal = _addLabel("GAME_SETTINGS/WIDESCREEN_WIIU_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC); m_gameSettingsBtnWidescreenWiiuM = _addPicButton("GAME_SETTINGS/WIDESCREEN_WIIU_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48); @@ -1362,66 +904,11 @@ void CMenu::_initGameSettingsMenu() _setHideAnim(m_gameSettingsLblLED, "GAME_SETTINGS/LED", 50, 0, -2.f, 0.f); _setHideAnim(m_gameSettingsBtnLED, "GAME_SETTINGS/LED_BTN", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsLblCC_Rumble, "GAME_SETTINGS/CC_RUMBLE", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnCC_Rumble, "GAME_SETTINGS/CC_RUMBLE_BTN", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblNATIVE_CTL, "GAME_SETTINGS/NATIVE_CTL", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnNATIVE_CTL, "GAME_SETTINGS/NATIVE_CTL_BTN", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblDeflicker, "GAME_SETTINGS/DEFLICKER", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnDeflicker, "GAME_SETTINGS/DEFLICKER_BTN", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblEmuMemCard, "GAME_SETTINGS/DML_NMM", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsLblEmuMemCard_Val, "GAME_SETTINGS/DML_NMM_BTN", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnEmuMemCard_P, "GAME_SETTINGS/DML_NMM_PLUS", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnEmuMemCard_M, "GAME_SETTINGS/DML_NMM_MINUS", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblDevoMemcardEmu, "GAME_SETTINGS/DEVO_MEMCARD_EMU", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnDevoMemcardEmu, "GAME_SETTINGS/DEVO_MEMCARD_EMU_BTN", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblWidescreen, "GAME_SETTINGS/WIDESCREEN", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnWidescreen, "GAME_SETTINGS/WIDESCREEN_BTN", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblWiiuWidescreen, "GAME_SETTINGS/WIIU_WIDESCREEN", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnWiiuWidescreen, "GAME_SETTINGS/WIIU_WIDESCREEN_BTN", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsLblWidescreenWiiu, "GAME_SETTINGS/WIDESCREEN_WIIU", 50, 0, -2.f, 0.f); _setHideAnim(m_gameSettingsLblWidescreenWiiuVal, "GAME_SETTINGS/WIDESCREEN_WIIU_BTN", -50, 0, 1.f, 0.f); _setHideAnim(m_gameSettingsBtnWidescreenWiiuM, "GAME_SETTINGS/WIDESCREEN_WIIU_MINUS", -50, 0, 1.f, 0.f); _setHideAnim(m_gameSettingsBtnWidescreenWiiuP, "GAME_SETTINGS/WIDESCREEN_WIIU_PLUS", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsLblArcade, "GAME_SETTINGS/ARCADE", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnArcade, "GAME_SETTINGS/ARCADE_BTN", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblSkip_IPL, "GAME_SETTINGS/SKIP_IPL", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnSkip_IPL, "GAME_SETTINGS/SKIP_IPL_BTN", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblPatch50, "GAME_SETTINGS/PATCH_PAL50", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnPatch50, "GAME_SETTINGS/PATCH_PAL50_BTN", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblWidth, "GAME_SETTINGS/NIN_WIDTH", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsLblWidthVal, "GAME_SETTINGS/NIN_WIDTH_BTN", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnWidthM, "GAME_SETTINGS/NIN_WIDTH_MINUS", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnWidthP, "GAME_SETTINGS/NIN_WIDTH_PLUS", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblPos, "GAME_SETTINGS/NIN_POS", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsLblPosVal, "GAME_SETTINGS/NIN_POS_BTN", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnPosM, "GAME_SETTINGS/NIN_POS_MINUS", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnPosP, "GAME_SETTINGS/NIN_POS_PLUS", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblBBA, "GAME_SETTINGS/BBA", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsBtnBBA, "GAME_SETTINGS/BBA_BTN", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblNetProf, "GAME_SETTINGS/NET_PROFILE", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsLblNetProfVal, "GAME_SETTINGS/NET_PROFILE_BTN", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnNetProfM, "GAME_SETTINGS/NET_PROFILE_MINUS", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnNetProfP, "GAME_SETTINGS/NET_PROFILE_PLUS", -50, 0, 1.f, 0.f); - - _setHideAnim(m_gameSettingsLblGCLoader, "GAME_SETTINGS/GC_LOADER", 50, 0, -2.f, 0.f); - _setHideAnim(m_gameSettingsLblGCLoader_Val, "GAME_SETTINGS/GC_LOADER_BTN", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnGCLoader_P, "GAME_SETTINGS/GC_LOADER_PLUS", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsBtnGCLoader_M, "GAME_SETTINGS/GC_LOADER_MINUS", -50, 0, 1.f, 0.f); - _setHideAnim(m_gameSettingsLblHooktype, "GAME_SETTINGS/HOOKTYPE", 50, 0, -2.f, 0.f); _setHideAnim(m_gameSettingsLblHooktypeVal, "GAME_SETTINGS/HOOKTYPE_BTN", -50, 0, 1.f, 0.f); _setHideAnim(m_gameSettingsBtnHooktypeM, "GAME_SETTINGS/HOOKTYPE_MINUS", -50, 0, 1.f, 0.f); @@ -1463,7 +950,6 @@ void CMenu::_textGameSettings(void) m_btnMgr.setText(m_gameSettingsLblManage, _t("cfgg40", L"Manage Cover and Banner")); m_btnMgr.setText(m_gameSettingsBtnManage, _t("cfgg41", L"Manage")); m_btnMgr.setText(m_gameSettingsLblAdultOnly, _t("cfgg58", L"Adult only")); - m_btnMgr.setText(m_gameSettingsLblGCLoader, _t("cfgg35", L"GameCube Loader")); m_btnMgr.setText(m_gameSettingsLblGameVideo, _t("cfgg2", L"Video mode")); m_btnMgr.setText(m_gameSettingsLblGameLanguage, _t("cfgg3", L"Language")); @@ -1472,10 +958,6 @@ void CMenu::_textGameSettings(void) m_btnMgr.setText(m_gameSettingsLblOcarina, _t("cfgg5", L"Ocarina")); m_btnMgr.setText(m_gameSettingsLblCheat, _t("cfgg15", L"Cheat Codes")); m_btnMgr.setText(m_gameSettingsBtnCheat, _t("cfgg16", L"Select")); - m_btnMgr.setText(m_gameSettingsLblDeflicker, _t("cfgg44", L"Video Deflicker")); - m_btnMgr.setText(m_gameSettingsLblDevoMemcardEmu, _t("cfgg47", L"Emulated MemCard")); - m_btnMgr.setText(m_gameSettingsLblWidescreen, _t("cfgg36", L"Widescreen Patch")); - m_btnMgr.setText(m_gameSettingsLblWiiuWidescreen, _t("cfgg46", L"WiiU Widescreen")); m_btnMgr.setText(m_gameSettingsLblWidescreenWiiu, _t("cfgg46", L"WiiU Widescreen")); m_btnMgr.setText(m_gameSettingsLblCountryPatch, _t("cfgg4", L"Patch country strings")); @@ -1483,15 +965,7 @@ void CMenu::_textGameSettings(void) m_btnMgr.setText(m_gameSettingsLblPatchVidModes, _t("cfgg14", L"Patch video modes")); m_btnMgr.setText(m_gameSettingsLblAspectRatio, _t("cfgg27", L"Aspect Ratio")); m_btnMgr.setText(m_gameSettingsLblApploader, _t("cfgg37", L"Boot Apploader")); - m_btnMgr.setText(m_gameSettingsLblEmuMemCard, _t("cfgg47", L"Emulated MemCard")); - m_btnMgr.setText(m_gameSettingsLblCC_Rumble, _t("cfgg52", L"Wiimote CC Rumble")); - m_btnMgr.setText(m_gameSettingsLblNATIVE_CTL, _t("cfgg43", L"Native Control")); - m_btnMgr.setText(m_gameSettingsLblSkip_IPL, _t("cfgg53", L"Skip IPL BIOS")); - m_btnMgr.setText(m_gameSettingsLblPatch50, _t("cfgg56", L"Patch PAL50")); - m_btnMgr.setText(m_gameSettingsLblBBA, _t("cfgg59", L"BBA Emulation")); - m_btnMgr.setText(m_gameSettingsLblNetProf, _t("cfgg60", L"BBA Net Profile")); - m_btnMgr.setText(m_gameSettingsLblArcade, _t("cfgg48", L"Triforce Arcade Mode")); m_btnMgr.setText(m_gameSettingsLblEmulation, _t("cfgg24", L"NAND Emulation")); m_btnMgr.setText(m_gameSettingsLblGameIOS, _t("cfgg10", L"IOS")); m_btnMgr.setText(m_gameSettingsLblLED, _t("cfgg38", L"Activity LED")); @@ -1504,7 +978,5 @@ void CMenu::_textGameSettings(void) m_btnMgr.setText(m_gameSettingsBtnFlashSave, _t("cfgg33", L"Flash")); m_btnMgr.setText(m_gameSettingsLblPrivateServer, _t("cfgg45", L"Private Server")); m_btnMgr.setText(m_gameSettingsLblFix480p, _t("cfgg49", L"480p Pixel Patch")); - m_btnMgr.setText(m_gameSettingsLblWidth, _t("cfgg54", L"Video Width")); - m_btnMgr.setText(m_gameSettingsLblPos, _t("cfgg55", L"Video Position")); m_btnMgr.setText(m_gameSettingsLblDeflickerWii, _t("cfgg61", L"Deflicker Filter")); } diff --git a/source/menu/menu_config_gc_game.cpp b/source/menu/menu_config_gc_game.cpp new file mode 100644 index 00000000..06e4884b --- /dev/null +++ b/source/menu/menu_config_gc_game.cpp @@ -0,0 +1,641 @@ + +#include "menu.hpp" +#include "types.h" + +u8 m_configGCGameMaxPgs = 5; +u8 m_configGCGamePage = 0; +u8 GCLoader = 0; +int videoScale, videoOffset; +static const dir_discHdr *GameHdr; + +const CMenu::SOption CMenu::_GlobalGCvideoModes[6] = { + { "vidgame", L"Game" }, + { "vidp50", L"PAL 50Hz" }, + { "vidp60", L"PAL 60Hz" }, + { "vidntsc", L"NTSC" }, + { "DMLmpal", L"MPAL" }, + { "vidprog", L"Progressive" }, +}; + +const CMenu::SOption CMenu::_GCvideoModes[7] = { + { "viddef", L"Default" }, + { "vidgame", L"Game" }, + { "vidp50", L"PAL 50Hz" }, + { "vidp60", L"PAL 60Hz" }, + { "vidntsc", L"NTSC" }, + { "DMLmpal", L"MPAL" }, + { "vidprog", L"Progressive" }, +}; + +const CMenu::SOption CMenu::_GlobalGClanguages[7] = { + { "lngsys", L"System" }, + { "lngeng", L"English" }, + { "lngger", L"German" }, + { "lngfre", L"French" }, + { "lngspa", L"Spanish" }, + { "lngita", L"Italian" }, + { "lngdut", L"Dutch" } +}; + +const CMenu::SOption CMenu::_GClanguages[8] = { + { "lngdef", L"Default" }, + { "lngsys", L"System" }, + { "lngeng", L"English" }, + { "lngger", L"German" }, + { "lngfre", L"French" }, + { "lngspa", L"Spanish" }, + { "lngita", L"Italian" }, + { "lngdut", L"Dutch" } +}; + +const CMenu::SOption CMenu::_NinEmuCard[5] = { + { "NinMCDef", L"Default" }, + { "NinMCOff", L"Disabled" }, + { "NinMCon", L"Enabled" }, + { "NinMCMulti", L"Multi Saves" }, + { "NinMCdebug", L"Debug" }, +}; + +const CMenu::SOption CMenu::_GlobalGCLoaders[2] = { + { "GC_Devo", L"Devolution" }, + { "GC_Nindnt", L"Nintendont" }, +}; + +const CMenu::SOption CMenu::_GCLoader[3] = { + { "GC_Def", L"Default" }, + { "GC_Devo", L"Devolution" }, + { "GC_Nindnt", L"Nintendont" }, +}; + +template static inline T loopNum(T i, T s) +{ + return (i + s) % s; +} + +void CMenu::_hideConfigGCGame(bool instant) +{ + m_btnMgr.hide(m_gameSettingsLblTitle, instant); + m_btnMgr.hide(m_gameSettingsBtnBack, instant); + m_btnMgr.hide(m_gameSettingsLblPage, instant); + m_btnMgr.hide(m_gameSettingsBtnPageM, instant); + m_btnMgr.hide(m_gameSettingsBtnPageP, instant); + for(u8 i = 0; i < ARRAY_SIZE(m_gameSettingsLblUser); ++i) + if(m_gameSettingsLblUser[i] != -1) + m_btnMgr.hide(m_gameSettingsLblUser[i], instant); + _hideConfigButtons(instant); +} + +void CMenu::_showConfigGCGame() +{ + u8 i; + _setBg(m_gameSettingsBg, m_gameSettingsBg); + + string id(GameHdr->id); + wstringEx title(_t("cfgg1", L"Settings")); + title.append(wfmt(L" [%s]", id)); + m_btnMgr.setText(m_gameSettingsLblTitle, title); + m_btnMgr.show(m_gameSettingsLblTitle); + + m_btnMgr.show(m_gameSettingsBtnBack); + for(i = 0; i < ARRAY_SIZE(m_gameSettingsLblUser); ++i) + if(m_gameSettingsLblUser[i] != -1) + m_btnMgr.show(m_gameSettingsLblUser[i]); + + _hideConfigButtons(); + + GCLoader = min(m_gcfg2.getUInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u); + GCLoader = (GCLoader == 0) ? min(m_cfg.getUInt(GC_DOMAIN, "default_loader", 1), ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1u) : GCLoader-1; + if(GCLoader == DEVOLUTION) + m_configGCGameMaxPgs = 2; + else + m_configGCGameMaxPgs = 6; + + m_btnMgr.setText(m_gameSettingsLblPage, wfmt(L"%i / %i", m_configGCGamePage, m_configGCGameMaxPgs)); + m_btnMgr.show(m_gameSettingsLblPage); + m_btnMgr.show(m_gameSettingsBtnPageM); + m_btnMgr.show(m_gameSettingsBtnPageP); + + if(m_configGCGamePage == 1) + { + m_btnMgr.setText(m_configLbl1, _t("cfgg58", L"Adult only")); + m_btnMgr.setText(m_configLbl2, _t("cfgg35", L"GameCube Loader")); + m_btnMgr.setText(m_configLbl3, _t("cfgg2", L"Video mode")); + m_btnMgr.setText(m_configLbl4, _t("cfgg3", L"Language")); + + m_btnMgr.setText(m_configBtn1, m_gcfg1.getBool("ADULTONLY", id, false) ? _t("yes", L"Yes") : _t("no", L"No")); + + i = min(m_gcfg2.getUInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u); + m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_GCLoader[i].id, CMenu::_GCLoader[i].text)); + + i = min(m_gcfg2.getUInt(id, "language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u); + m_btnMgr.setText(m_configLbl3Val, _t(CMenu::_GClanguages[i].id, CMenu::_GClanguages[i].text)); + + i = min(m_gcfg2.getUInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_GCvideoModes) - 1u); + m_btnMgr.setText(m_configLbl4Val, _t(CMenu::_GCvideoModes[i].id, CMenu::_GCvideoModes[i].text)); + + m_btnMgr.show(m_configLbl1); + m_btnMgr.show(m_configBtn1); + + m_btnMgr.show(m_configLbl2); + m_btnMgr.show(m_configLbl2Val); + m_btnMgr.show(m_configBtn2P); + m_btnMgr.show(m_configBtn2M); + + m_btnMgr.show(m_configLbl3); + m_btnMgr.show(m_configLbl3Val); + m_btnMgr.show(m_configBtn3P); + m_btnMgr.show(m_configBtn3M); + + m_btnMgr.show(m_configLbl4); + m_btnMgr.show(m_configLbl4Val); + m_btnMgr.show(m_configBtn4P); + m_btnMgr.show(m_configBtn4M); + } + else if(m_configGCGamePage == 2) + { + if(GCLoader == DEVOLUTION) + { + m_btnMgr.setText(m_configLbl1, _t("cfgg38", L"Activity LED")); + m_btnMgr.setText(m_configLbl2, _t("cfgg47", L"Emulated MemCard")); + m_btnMgr.setText(m_configLbl3, _t("cfgg36", L"Widescreen Patch")); + m_btnMgr.setText(m_configLbl4, _t("cfgg40", L"Manage Cover and Banner")); + + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "led", 0))); + + m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "devo_memcard_emu", 2))); + + m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "widescreen", 0))); + + m_btnMgr.setText(m_configBtn4, _t("cfgg41", L"Manage")); + + m_btnMgr.show(m_configLbl1); + m_btnMgr.show(m_configBtn1); + + m_btnMgr.show(m_configLbl2); + m_btnMgr.show(m_configBtn2); + + m_btnMgr.show(m_configLbl3); + m_btnMgr.show(m_configBtn3); + + m_btnMgr.show(m_configLbl4); + m_btnMgr.show(m_configBtn4); + } + else //nintendont + { + m_btnMgr.setText(m_configLbl1, _t("cfgg22", L"Debugger")); + m_btnMgr.setText(m_configLbl2, _t("cfgg44", L"Video Deflicker")); + m_btnMgr.setText(m_configLbl3, _t("cfgg5", L"Ocarina")); + m_btnMgr.setText(m_configLbl4, _t("cfgg15", L"Cheat Codes")); + + i = min(m_gcfg2.getUInt(id, "debugger", 0), ARRAY_SIZE(CMenu::_debugger) - 1u); + m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_debugger[i].id, CMenu::_debugger[i].text)); + + m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "deflicker", 0))); + + m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "cheat", 0))); + + m_btnMgr.setText(m_configBtn4, _t("cfgg16", L"Select")); + + m_btnMgr.show(m_configLbl1); + m_btnMgr.show(m_configLbl1Val); + m_btnMgr.show(m_configBtn1P); + m_btnMgr.show(m_configBtn1M); + + m_btnMgr.show(m_configLbl2); + m_btnMgr.show(m_configBtn2); + + m_btnMgr.show(m_configLbl3); + m_btnMgr.show(m_configBtn3); + + m_btnMgr.show(m_configLbl4); + m_btnMgr.show(m_configBtn4); + } + } + else if(m_configGCGamePage == 3) + { + m_btnMgr.setText(m_configLbl1, _t("cfgg46", L"WiiU Widescreen")); + m_btnMgr.setText(m_configLbl2, _t("cfgg47", L"Emulated MemCard")); + m_btnMgr.setText(m_configLbl3, _t("cfgg36", L"Widescreen Patch")); + m_btnMgr.setText(m_configLbl4, _t("cfgg40", L"Manage Cover and Banner")); + + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "wiiu_widescreen", 0))); + + i = min(m_gcfg2.getUInt(id, "emu_memcard", 0), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u); + m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_NinEmuCard[i].id, CMenu::_NinEmuCard[i].text)); + + m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "widescreen", 0))); + + m_btnMgr.setText(m_configBtn4, _t("cfgg41", L"Manage")); + + m_btnMgr.show(m_configLbl1); + m_btnMgr.show(m_configBtn1); + + m_btnMgr.show(m_configLbl2); + m_btnMgr.show(m_configLbl2Val); + m_btnMgr.show(m_configBtn2P); + m_btnMgr.show(m_configBtn2M); + + m_btnMgr.show(m_configLbl3); + m_btnMgr.show(m_configBtn3); + + m_btnMgr.show(m_configLbl4); + m_btnMgr.show(m_configBtn4); + } + else if(m_configGCGamePage == 4) + { + m_btnMgr.setText(m_configLbl1, _t("cfgg52", L"Wiimote CC Rumble")); + m_btnMgr.setText(m_configLbl2, _t("cfgg43", L"Native Control")); + m_btnMgr.setText(m_configLbl3, _t("cfgg48", L"Triforce Arcade Mode")); + m_btnMgr.setText(m_configLbl4, _t("cfgg53", L"Skip IPL BIOS")); + + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "cc_rumble", 2))); + + m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "native_ctl", 2))); + + m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "triforce_arcade", 0))); + + m_btnMgr.setText(m_configBtn4, _optBoolToString(m_gcfg2.getOptBool(id, "skip_ipl", 0))); + + m_btnMgr.show(m_configLbl1); + m_btnMgr.show(m_configBtn1); + + m_btnMgr.show(m_configLbl2); + m_btnMgr.show(m_configBtn2); + + m_btnMgr.show(m_configLbl3); + m_btnMgr.show(m_configBtn3); + + m_btnMgr.show(m_configLbl4); + m_btnMgr.show(m_configBtn4); + } + else if(m_configGCGamePage == 5) + { + m_btnMgr.setText(m_configLbl1, _t("cfgg38", L"Activity LED")); + m_btnMgr.setText(m_configLbl2, _t("cfgg54", L"Video Width")); + m_btnMgr.setText(m_configLbl3, _t("cfgg55", L"Video Position")); + m_btnMgr.setText(m_configLbl4, _t("cfgg56", L"Patch PAL50")); + + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "led", 0))); + + if(videoScale == 0) + m_btnMgr.setText(m_configLbl2Val, _t("GC_Auto", L"Auto")); + else if(videoScale == 127) + m_btnMgr.setText(m_configLbl2Val, _t("def", L"Default")); + else + m_btnMgr.setText(m_configLbl2Val, wfmt(L"%i", max(40, min(120, videoScale)) + 600)); + + if(videoOffset == 127) + m_btnMgr.setText(m_configLbl3Val, _t("def", L"Default")); + else + m_btnMgr.setText(m_configLbl3Val, wfmt(L"%i", max(-20, min(20, videoOffset)))); + + m_btnMgr.setText(m_configBtn4, _optBoolToString(m_gcfg2.getOptBool(id, "patch_pal50", 0))); + + m_btnMgr.show(m_configLbl1); + m_btnMgr.show(m_configBtn1); + + m_btnMgr.show(m_configLbl2); + m_btnMgr.show(m_configLbl2Val); + m_btnMgr.show(m_configBtn2P); + m_btnMgr.show(m_configBtn2M); + + m_btnMgr.show(m_configLbl3); + m_btnMgr.show(m_configLbl3Val); + m_btnMgr.show(m_configBtn3P); + m_btnMgr.show(m_configBtn3M); + + m_btnMgr.show(m_configLbl4); + m_btnMgr.show(m_configBtn4); + } + else if(m_configGCGamePage == 6) + { + m_btnMgr.setText(m_configLbl1, _t("cfgg59", L"BBA Emulation")); + m_btnMgr.setText(m_configLbl2, _t("cfgg60", L"BBA Net Profile")); + + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "bba_emu", 0))); + + u8 netprofile = m_gcfg2.getUInt(id, "net_profile", 0); + if(netprofile == 0) + m_btnMgr.setText(m_configLbl2Val, _t("GC_Auto", L"Auto")); + else + m_btnMgr.setText(m_configLbl2Val, wfmt(L"%i", netprofile)); + + m_btnMgr.show(m_configLbl1); + m_btnMgr.show(m_configBtn1); + + m_btnMgr.show(m_configLbl2); + m_btnMgr.show(m_configLbl2Val); + m_btnMgr.show(m_configBtn2P); + m_btnMgr.show(m_configBtn2M); + } +} + +void CMenu::_configGCGame(const dir_discHdr *hdr, bool disc) +{ + u8 i; + m_gcfg2.load(fmt("%s/" GAME_SETTINGS2_FILENAME, m_settingsDir.c_str())); + GameHdr = hdr;// set for global use in other fuctions + string id(GameHdr->id); + + videoScale = m_gcfg2.getInt(id, "nin_width", 127); + videoOffset = m_gcfg2.getInt(id, "nin_pos", 127); + + m_configGCGamePage = 1; + _showConfigGCGame(); + while(!m_exit) + { + _mainLoopCommon(); + if(BTN_HOME_PRESSED || BTN_B_PRESSED) + break; + else if(BTN_UP_PRESSED) + m_btnMgr.up(); + else if(BTN_DOWN_PRESSED) + m_btnMgr.down(); + if(BTN_MINUS_PRESSED || BTN_LEFT_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_gameSettingsBtnPageM))) + { + if(m_configGCGamePage == 1) + m_configGCGamePage = m_configGCGameMaxPgs; + else + --m_configGCGamePage; + if(BTN_LEFT_PRESSED || BTN_MINUS_PRESSED) + m_btnMgr.click(m_gameSettingsBtnPageM); + _showConfigGCGame(); + } + else if(BTN_PLUS_PRESSED || BTN_RIGHT_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_gameSettingsBtnPageP))) + { + if(m_configGCGamePage == m_configGCGameMaxPgs) + m_configGCGamePage = 1; + else + ++m_configGCGamePage; + if(BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED) + m_btnMgr.click(m_gameSettingsBtnPageP); + _showConfigGCGame(); + } + else if(BTN_A_PRESSED) + { + if(m_configGCGamePage == 1) + { + //m_btnMgr.setText(m_configLbl1, _t("cfgg58", L"Adult only")); + //m_btnMgr.setText(m_configLbl2, _t("cfgg35", L"GameCube Loader")); + //m_btnMgr.setText(m_configLbl3, _t("cfgg2", L"Video mode")); + //m_btnMgr.setText(m_configLbl4, _t("cfgg3", L"Language")); + if(m_btnMgr.selected(m_configBtn1)) + { + if(disc) + { + _error(_t("cfgg57", L"Not allowed for disc!")); + _showConfigGCGame(); + } + else + { + m_gcfg1.setBool("ADULTONLY", id, !m_gcfg1.getBool("ADULTONLY", id, false)); + m_btnMgr.setText(m_configBtn1, m_gcfg1.getBool("ADULTONLY", id, false) ? _t("yes", L"Yes") : _t("no", L"No")); + } + } + else if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M)) + { + s8 direction = m_btnMgr.selected(m_configBtn2P) ? 1 : -1; + m_gcfg2.setInt(id, "gc_loader", (int)loopNum(m_gcfg2.getUInt(id, "gc_loader", 0) + direction, ARRAY_SIZE(CMenu::_GCLoader))); + i = min(m_gcfg2.getUInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u); + m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_GCLoader[i].id, CMenu::_GCLoader[i].text)); + } + else if(m_btnMgr.selected(m_configBtn3P) || m_btnMgr.selected(m_configBtn3M)) + { + s8 direction = m_btnMgr.selected(m_configBtn3P) ? 1 : -1; + m_gcfg2.setInt(id, "language", (int)loopNum(m_gcfg2.getUInt(id, "language", 0) + direction, ARRAY_SIZE(CMenu::_GClanguages))); + i = min(m_gcfg2.getUInt(id, "language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u); + m_btnMgr.setText(m_configLbl3Val, _t(CMenu::_GClanguages[i].id, CMenu::_GClanguages[i].text)); + } + else if(m_btnMgr.selected(m_configBtn4P) || m_btnMgr.selected(m_configBtn4M)) + { + s8 direction = m_btnMgr.selected(m_configBtn4P) ? 1 : -1; + m_gcfg2.setInt(id, "video_mode", (int)loopNum(m_gcfg2.getUInt(id, "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_GCvideoModes))); + i = min(m_gcfg2.getUInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_GCvideoModes) - 1u); + m_btnMgr.setText(m_configLbl4Val, _t(CMenu::_GCvideoModes[i].id, CMenu::_GCvideoModes[i].text)); + } + } + else if(m_configGCGamePage == 2) + { + if(GCLoader == DEVOLUTION) + { + //m_btnMgr.setText(m_configLbl1, _t("cfgg38", L"Activity LED")); + //m_btnMgr.setText(m_configLbl2, _t("cfgg47", L"Emulated MemCard")); + //m_btnMgr.setText(m_configLbl3, _t("cfgg36", L"Widescreen Patch")); + //m_btnMgr.setText(m_configLbl4, _t("cfgg40", L"Manage Cover and Banner")) + if(m_btnMgr.selected(m_configBtn1)) + { + m_gcfg2.setBool(id, "led", !m_gcfg2.getBool(id, "led", 0)); + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "led", 0))); + } + else if(m_btnMgr.selected(m_configBtn2)) + { + m_gcfg2.setBool(id, "devo_memcard_emu", !m_gcfg2.getBool(id, "devo_memcard_emu", 0)); + m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "devo_memcard_emu", 0))); + } + else if(m_btnMgr.selected(m_configBtn3)) + { + m_gcfg2.setBool(id, "widescreen", !m_gcfg2.getBool(id, "widescreen", 0)); + m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "widescreen", 0))); + } + else if(m_btnMgr.selected(m_configBtn4)) + { + if(disc) + _error(_t("cfgg57", L"Not allowed for disc!")); + else + { + CoverFlow.stopCoverLoader(true); + _hideConfigGCGame(); + _CoverBanner(); + CoverFlow.startCoverLoader(); + } + _showConfigGCGame(); + } + } + else + { + //m_btnMgr.setText(m_configLbl1, _t("cfgg22", L"Debugger")); + //m_btnMgr.setText(m_configLbl2, _t("cfgg44", L"Video Deflicker")); + //m_btnMgr.setText(m_configLbl3, _t("cfgg5", L"Ocarina")); + //m_btnMgr.setText(m_configLbl4, _t("cfgg15", L"Cheat Codes")); + if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M)) + { + s8 direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1; + m_gcfg2.setInt(id, "debugger", (int)loopNum(m_gcfg2.getUInt(id, "debugger", 0) + direction, ARRAY_SIZE(CMenu::_debugger))); + i = min(m_gcfg2.getUInt(id, "debugger", 0), ARRAY_SIZE(CMenu::_debugger) - 1u); + m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_debugger[i].id, CMenu::_debugger[i].text)); + } + else if(m_btnMgr.selected(m_configBtn2)) + { + m_gcfg2.setBool(id, "deflicker", !m_gcfg2.getBool(id, "deflicker", 0)); + m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "deflicker", 0))); + } + else if(m_btnMgr.selected(m_configBtn3)) + { + m_gcfg2.setBool(id, "cheat", !m_gcfg2.getBool(id, "cheat", 0)); + m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "cheat", 0))); + } + else if(m_btnMgr.selected(m_configBtn4)) + { + _hideConfigGCGame(); + _CheatSettings(); + _showConfigGCGame(); + } + } + } + else if(m_configGCGamePage == 3) + { + //m_btnMgr.setText(m_configLbl1, _t("cfgg46", L"WiiU Widescreen")); + //m_btnMgr.setText(m_configLbl2, _t("cfgg47", L"Emulated MemCard")); + //m_btnMgr.setText(m_configLbl3, _t("cfgg36", L"Widescreen Patch")); + //m_btnMgr.setText(m_configLbl4, _t("cfgg40", L"Manage Cover and Banner")) + if(m_btnMgr.selected(m_configBtn1)) + { + m_gcfg2.setBool(id, "wiiu_widescreen", !m_gcfg2.getBool(id, "wiiu_widescreen", 0)); + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "wiiu_widescreen", 0))); + } + else if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M)) + { + s8 direction = m_btnMgr.selected(m_configBtn2P) ? 1 : -1; + m_gcfg2.setInt(id, "emu_memcard", (int)loopNum(m_gcfg2.getUInt(id, "emu_memcard", 2) + direction, ARRAY_SIZE(CMenu::_NinEmuCard))); + i = min(m_gcfg2.getUInt(id, "emu_memcard", 0), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u); + m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_NinEmuCard[i].id, CMenu::_NinEmuCard[i].text)); + } + else if(m_btnMgr.selected(m_configBtn3)) + { + m_gcfg2.setBool(id, "widescreen", !m_gcfg2.getBool(id, "widescreen", 0)); + m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "widescreen", 0))); + } + else if(m_btnMgr.selected(m_configBtn4)) + { + if(disc) + _error(_t("cfgg57", L"Not allowed for disc!")); + else + { + CoverFlow.stopCoverLoader(true); + _hideConfigGCGame(); + _CoverBanner(); + CoverFlow.startCoverLoader(); + } + _showConfigGCGame(); + } + } + else if(m_configGCGamePage == 4) + { + //m_btnMgr.setText(m_configLbl1, _t("cfgg52", L"Wiimote CC Rumble")); + //m_btnMgr.setText(m_configLbl2, _t("cfgg43", L"Native Control")); + //m_btnMgr.setText(m_configLbl3, _t("cfgg48", L"Triforce Arcade Mode")); + //m_btnMgr.setText(m_configLbl4, _t("cfgg53", L"Skip IPL BIOS")); + if(m_btnMgr.selected(m_configBtn1)) + { + m_gcfg2.setOptBool(id, "cc_rumble", loopNum(m_gcfg2.getOptBool(id, "cc_rumble") + 1, 3)); + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "cc_rumble", 2))); + } + else if(m_btnMgr.selected(m_configBtn2)) + { + m_gcfg2.setOptBool(id, "native_ctl", loopNum(m_gcfg2.getOptBool(id, "native_ctl") + 1, 3)); + m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "native_ctl", 2))); + } + else if(m_btnMgr.selected(m_configBtn3)) + { + m_gcfg2.setBool(id, "triforce_arcade", !m_gcfg2.getBool(id, "triforce_arcade", 0)); + m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "triforce_arcade", 0))); + } + else if(m_btnMgr.selected(m_configBtn4)) + { + m_gcfg2.setBool(id, "skip_ipl", !m_gcfg2.getBool(id, "skip_ipl", 0)); + m_btnMgr.setText(m_configBtn4, _optBoolToString(m_gcfg2.getOptBool(id, "skip_ipl", 0))); + } + } + else if(m_configGCGamePage == 5) + { + //m_btnMgr.setText(m_configLbl1, _t("cfgg38", L"Activity LED")); + //m_btnMgr.setText(m_configLbl2, _t("cfgg54", L"Video Width")); + //m_btnMgr.setText(m_configLbl3, _t("cfgg55", L"Video Position")); + //m_btnMgr.setText(m_configLbl4, _t("cfgg56", L"Patch PAL50")); + if(m_btnMgr.selected(m_configBtn1)) + { + m_gcfg2.setBool(id, "led", !m_gcfg2.getBool(id, "led", 0)); + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "led", 0))); + } + else if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M)) + { + if(m_btnMgr.selected(m_configBtn2P)) + { + if(videoScale == 0) + videoScale = 40; + else if(videoScale == 127) + videoScale = 0; + else if(videoScale < 120) + videoScale += 2; + } + else + { + if(videoScale == 40) + videoScale = 0; + else if(videoScale == 0) + videoScale = 127; + else if(videoScale > 40 && videoScale != 127) + videoScale -= 2; + } + m_gcfg2.setInt(id, "nin_width", videoScale); + if(videoScale == 0) + m_btnMgr.setText(m_configLbl2Val, _t("GC_Auto", L"Auto")); + else if(videoScale == 127) + m_btnMgr.setText(m_configLbl2Val, _t("def", L"Default")); + else + m_btnMgr.setText(m_configLbl2Val, wfmt(L"%i", max(40, min(120, videoScale)) + 600)); + } + else if(m_btnMgr.selected(m_configBtn3P) || m_btnMgr.selected(m_configBtn3M)) + { + if(m_btnMgr.selected(m_configBtn3P)) + { + if(videoOffset == 127) + videoOffset = -20; + else if(videoOffset < 20) + videoOffset++; + } + else + { + if(videoOffset == -20) + videoOffset = 127; + else if(videoOffset > -20 && videoOffset != 127) + videoOffset--; + } + m_gcfg2.setInt(id, "nin_pos", videoOffset); + if(videoOffset == 127) + m_btnMgr.setText(m_configLbl3Val, _t("def", L"Default")); + else + m_btnMgr.setText(m_configLbl3Val, wfmt(L"%i", max(-20, min(20, videoOffset)))); + } + else if(m_btnMgr.selected(m_configBtn4)) + { + m_gcfg2.setBool(id, "patch_pal50", !m_gcfg2.getBool(id, "patch_pal50", 0)); + m_btnMgr.setText(m_configBtn4, _optBoolToString(m_gcfg2.getOptBool(id, "patch_pal50", 0))); + } + } + else + { + //m_btnMgr.setText(m_configLbl1, _t("cfgg59", L"BBA Emulation")); + //m_btnMgr.setText(m_configLbl2, _t("cfgg60", L"BBA Net Profile")); + if(m_btnMgr.selected(m_configBtn1)) + { + m_gcfg2.setBool(id, "bba_emu", !m_gcfg2.getBool(id, "bba_emu", 0)); + m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "bba_emu", 0))); + } + else if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M)) + { + s8 direction = m_btnMgr.selected(m_configBtn2P) ? 1 : -1; + m_gcfg2.setInt(id, "net_profile", loopNum(m_gcfg2.getInt(id, "net_profile") + direction, 4)); + u8 netprofile = m_gcfg2.getUInt(id, "net_profile", 0); + if(netprofile == 0) + m_btnMgr.setText(m_configLbl2Val, _t("GC_Auto", L"Auto")); + else + m_btnMgr.setText(m_configLbl2Val, wfmt(L"%i", netprofile)); + } + } + } + } + if(!disc) + m_gcfg2.save(true);// do not save changes for disc games + _hideConfigGCGame(); +} diff --git a/source/menu/menu_error.cpp b/source/menu/menu_error.cpp index f170733b..f389d2e4 100644 --- a/source/menu/menu_error.cpp +++ b/source/menu/menu_error.cpp @@ -30,6 +30,7 @@ void CMenu::_error(const wstringEx &msg) _hideAbout(); _hideCode(); _hideConfigMain(); + _hideConfigGCGame(); _hideDownload(); _hideExitTo(); _hideGame();