From 32144f46f97d6c2189c6d1d785b6f4d53178129d Mon Sep 17 00:00:00 2001
From: dimok321 <15055714+dimok789@users.noreply.github.com>
Date: Sat, 6 Jun 2009 17:26:52 +0000
Subject: [PATCH] *Whole new GlobalSettingsMenu arrangement (thx to dj_skull
for his idea and plan (issue 433)) *Lots of small fixes *Added Error002fix
selection in GameSettings
**NOTE 1: You might want to delete your Configfiles before using this new Rev.
**NOTE 2: Known issue with Settings is that WiiMotePointer is sometimes being displaced. I am searching for the reason right now.
---
gui.pnproj | 2 +-
source/PromptWindows.cpp | 53 +-
source/PromptWindows.h | 1 +
source/Settings.cpp | 2159 +++++++++++-------
source/SettingsPrompts.cpp | 512 +++++
source/SettingsPrompts.h | 14 +
source/apploader.c | 6 +-
source/apploader.h | 2 +-
source/cfg.c | 30 +-
source/cfg.h | 22 +-
source/disc.c | 8 +-
source/disc.h | 4 +-
source/filelist.h | 19 +-
source/images/tab_bg1.png | Bin 3467 -> 0 bytes
source/images/tab_bg2.png | Bin 3844 -> 0 bytes
source/images/tab_bg3.png | Bin 3390 -> 0 bytes
source/images/updateRev.png | Bin 6097 -> 0 bytes
source/language.c | 60 +-
source/language.h | 14 +-
source/libwiigui/gui_customoptionbrowser.cpp | 19 +-
source/libwiigui/gui_customoptionbrowser.h | 1 +
source/libwiigui/gui_gamebrowser.cpp | 4 +-
source/libwiigui/gui_gamecarousel.cpp | 6 +-
source/libwiigui/gui_gamegrid.cpp | 7 +-
source/libwiigui/gui_keyboard.cpp | 11 +-
source/listfiles.c | 14 +-
source/listfiles.h | 3 +-
source/menu.cpp | 411 +---
source/menu.h | 3 +-
29 files changed, 2051 insertions(+), 1334 deletions(-)
create mode 100644 source/SettingsPrompts.cpp
create mode 100644 source/SettingsPrompts.h
delete mode 100644 source/images/tab_bg1.png
delete mode 100644 source/images/tab_bg2.png
delete mode 100644 source/images/tab_bg3.png
delete mode 100644 source/images/updateRev.png
diff --git a/gui.pnproj b/gui.pnproj
index 77c31d0b..d27620f0 100644
--- a/gui.pnproj
+++ b/gui.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/source/PromptWindows.cpp b/source/PromptWindows.cpp
index d019b2fe..1fafa3ef 100644
--- a/source/PromptWindows.cpp
+++ b/source/PromptWindows.cpp
@@ -22,7 +22,6 @@
#include "getentries.h"
/*** Variables that are also used extern ***/
-char missingFiles[500][12];
int cntMissFiles = 0;
int networkisinitialized;
@@ -32,6 +31,7 @@ static GuiText timeTxt(NULL, 26, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g,
static GuiText sizeTxt(NULL, 26, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
static GuiImageData progressbar(progressbar_png);
static GuiImage progressbarImg(&progressbar);
+static char missingFiles[500][12];
/*** Extern variables ***/
extern GuiWindow * mainWindow;
@@ -42,7 +42,6 @@ extern float gamesize;
extern struct discHdr * gameList;
extern u8 shutdown;
extern u8 reset;
-extern int vol;
/*** Extern functions ***/
extern void ResumeGui();
@@ -65,8 +64,8 @@ int OnScreenKeyboard(char * var, u32 maxlen, int min)
GuiKeyboard keyboard(var, maxlen, min, keyset);
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[50];
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
@@ -139,7 +138,7 @@ void WindowCredits()
StopOgg();
creditsMusic = new GuiSound(credits_music_ogg, credits_music_ogg_size, SOUND_OGG, 55);
- creditsMusic->SetVolume(55);
+ creditsMusic->SetVolume(60);
creditsMusic->SetLoop(1);
creditsMusic->Play();
@@ -327,7 +326,7 @@ void WindowCredits()
bgMusic->PlayOggFile(Settings.ogg_path);
}
bgMusic->SetPlayTime(thetimeofbg);
- SetVolumeOgg(255*(vol/100.0));
+ SetVolumeOgg(255*(Settings.volume/100.0));
}
/****************************************************************************
@@ -350,8 +349,9 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label,
GuiWindow promptWindow(472,320);
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10);
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[50];
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
GuiImageData btnOutline(imgPath, button_dialogue_box_png);
@@ -597,14 +597,14 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
const char *btn4Label)
{
GuiSound * homein = NULL;
- homein = new GuiSound(menuin_ogg, menuin_ogg_size, SOUND_OGG, vol);
- homein->SetVolume(vol);
+ homein = new GuiSound(menuin_ogg, menuin_ogg_size, SOUND_OGG, Settings.sfxvolume);
+ homein->SetVolume(Settings.sfxvolume);
homein->SetLoop(0);
homein->Play();
GuiSound * homeout = NULL;
- homeout = new GuiSound(menuout_ogg, menuout_ogg_size, SOUND_OGG, vol);
- homeout->SetVolume(vol);
+ homeout = new GuiSound(menuout_ogg, menuout_ogg_size, SOUND_OGG, Settings.sfxvolume);
+ homeout->SetVolume(Settings.sfxvolume);
homeout->SetLoop(0);
int choice = -1;
@@ -613,8 +613,8 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
GuiWindow promptWindow(640,480);
promptWindow.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
promptWindow.SetPosition(0, 0);
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
GuiImageData top(exit_top_png);
GuiImageData topOver(exit_top_over_png);
@@ -909,8 +909,8 @@ int GameWindowPrompt()
GuiWindow promptWindow(472,320);
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10);
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[100];
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
@@ -1401,8 +1401,8 @@ DiscWait(const char *title, const char *msg, const char *btn1Label, const char *
GuiWindow promptWindow(472,320);
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10);
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[100];
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
@@ -1604,8 +1604,8 @@ int NetworkInitPromp(int choice2)
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10);
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[100];
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
@@ -1922,8 +1922,8 @@ ProgressDownloadWindow(int choice2)
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10);
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[100];
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
@@ -2159,8 +2159,8 @@ ProgressUpdateWindow()
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10);
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[100];
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
@@ -2436,3 +2436,8 @@ ProgressUpdateWindow()
return 1;
}
+
+char * GetMissingFiles()
+{
+ return (char *) missingFiles;
+}
diff --git a/source/PromptWindows.h b/source/PromptWindows.h
index 56430195..01eb2029 100644
--- a/source/PromptWindows.h
+++ b/source/PromptWindows.h
@@ -21,5 +21,6 @@ int NetworkInitPromp(int choice2);
int ProgressWindow(const char *title, const char *msg);
int ProgressDownloadWindow(int choice2);
int ProgressUpdateWindow();
+char * GetMissingFiles();
#endif
diff --git a/source/Settings.cpp b/source/Settings.cpp
index 0eb59e54..8a0c0aa5 100644
--- a/source/Settings.cpp
+++ b/source/Settings.cpp
@@ -1,4 +1,5 @@
#include
+#include
#include "menu.h"
#include "filelist.h"
@@ -10,6 +11,7 @@
#include "fatmounter.h"
#include "PromptWindows.h"
#include "getentries.h"
+#include "SettingsPrompts.h"
/*** Extern functions ***/
extern void ResumeGui();
@@ -23,7 +25,6 @@ extern GuiImageData * pointer[4];
extern GuiImageData * background;
extern u8 shutdown;
extern u8 reset;
-extern int vol;
/****************************************************************************
* MenuSettings
@@ -33,9 +34,19 @@ int MenuSettings()
int menu = MENU_NONE;
int ret;
int choice = 0;
+ bool exit = false;
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ enum {
+ FADE,
+ LEFT,
+ RIGHT
+ };
+
+ int slidedirection = FADE;
+
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick1(button_click_pcm, button_click_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[100];
@@ -43,14 +54,30 @@ int MenuSettings()
GuiImageData btnOutline(imgPath, button_dialogue_box_png);
snprintf(imgPath, sizeof(imgPath), "%ssettings_background.png", CFG.theme_path);
GuiImageData settingsbg(imgPath, settings_background_png);
- snprintf(imgPath, sizeof(imgPath), "%stab_bg1.png", CFG.theme_path);
- GuiImageData tab1(imgPath, tab_bg1_png);
- snprintf(imgPath, sizeof(imgPath), "%stab_bg2.png", CFG.theme_path);
- GuiImageData tab2(imgPath, tab_bg2_png);
- snprintf(imgPath, sizeof(imgPath), "%stab_bg3.png", CFG.theme_path);
- GuiImageData tab3(imgPath, tab_bg3_png);
- snprintf(imgPath, sizeof(imgPath), "%supdateRev.png", CFG.theme_path);
- GuiImageData updateRevImgData(imgPath, updateRev_png);
+
+ snprintf(imgPath, sizeof(imgPath), "%ssettings_title.png", CFG.theme_path);
+ GuiImageData MainButtonImgData(imgPath, settings_title_png);
+
+ snprintf(imgPath, sizeof(imgPath), "%ssettings_title_over.png", CFG.theme_path);
+ GuiImageData MainButtonImgOverData(imgPath, settings_title_over_png);
+
+ snprintf(imgPath, sizeof(imgPath), "%spageindicator.png", CFG.theme_path);
+ GuiImageData PageindicatorImgData(imgPath, pageindicator_png);
+
+ snprintf(imgPath, sizeof(imgPath), "%sstartgame_arrow_left.png", CFG.theme_path);
+ GuiImageData arrow_left(imgPath, startgame_arrow_left_png);
+
+ snprintf(imgPath, sizeof(imgPath), "%sstartgame_arrow_right.png", CFG.theme_path);
+ GuiImageData arrow_right(imgPath, startgame_arrow_right_png);
+
+ snprintf(imgPath, sizeof(imgPath), "%scredits_button.png", CFG.theme_path);
+ GuiImageData creditsImgData(imgPath, credits_button_png);
+
+ snprintf(imgPath, sizeof(imgPath), "%scredits_button_over.png", CFG.theme_path);
+ GuiImageData creditsOver(imgPath, credits_button_over_png);
+
+ GuiImage creditsImg(&creditsImgData);
+ GuiImage creditsImgOver(&creditsOver);
GuiTrigger trigA;
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
@@ -72,773 +99,1313 @@ int MenuSettings()
titleTxt.SetPosition(0,40);
GuiImage settingsbackground(&settingsbg);
- GuiButton settingsbackgroundbtn(settingsbackground.GetWidth(), settingsbackground.GetHeight());
- settingsbackgroundbtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
- settingsbackgroundbtn.SetPosition(0, 0);
- settingsbackgroundbtn.SetImage(&settingsbackground);
GuiText backBtnTxt(LANGUAGE.Back , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
backBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
GuiImage backBtnImg(&btnOutline);
if (Settings.wsprompt == yes){
backBtnTxt.SetWidescreen(CFG.widescreen);
- backBtnImg.SetWidescreen(CFG.widescreen);}
+ backBtnImg.SetWidescreen(CFG.widescreen);
+ }
GuiButton backBtn(&backBtnImg,&backBtnImg, 2, 3, -180, 400, &trigA, &btnSoundOver, &btnClick,1);
backBtn.SetLabel(&backBtnTxt);
backBtn.SetTrigger(&trigB);
GuiButton homo(1,1);
homo.SetTrigger(&trigHome);
- homo.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
- homo.SetPosition(0,0);
- GuiImage tab1Img(&tab1);
- GuiImage tab2Img(&tab2);
- GuiImage tab3Img(&tab3);
- GuiButton tabBtn(tab1.GetWidth(), tab1.GetHeight());
- tabBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- tabBtn.SetPosition(-202, 90);
- tabBtn.SetImage(&tab1Img);
- tabBtn.SetRumble(false);
+ GuiImage PageindicatorImg1(&PageindicatorImgData);
+ GuiText PageindicatorTxt1("1", 22, (GXColor){0, 0, 0, 255});
+ GuiButton PageIndicatorBtn1(PageindicatorImg1.GetWidth(), PageindicatorImg1.GetHeight());
+ PageIndicatorBtn1.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ PageIndicatorBtn1.SetPosition(200, 400);
+ PageIndicatorBtn1.SetImage(&PageindicatorImg1);
+ PageIndicatorBtn1.SetLabel(&PageindicatorTxt1);
+ PageIndicatorBtn1.SetSoundOver(&btnSoundOver);
+ PageIndicatorBtn1.SetSoundClick(&btnClick1);
+ PageIndicatorBtn1.SetTrigger(&trigA);
+ PageIndicatorBtn1.SetEffectGrow();
- GuiButton page1Btn(40, 96);
- page1Btn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- page1Btn.SetPosition(-202, 90);
- page1Btn.SetSoundOver(&btnSoundOver);
- page1Btn.SetSoundClick(&btnClick);
- page1Btn.SetTrigger(0, &trigA);
+ GuiImage PageindicatorImg2(&PageindicatorImgData);
+ GuiText PageindicatorTxt2("2", 22, (GXColor){0, 0, 0, 255});
+ GuiButton PageIndicatorBtn2(PageindicatorImg2.GetWidth(), PageindicatorImg2.GetHeight());
+ PageIndicatorBtn2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ PageIndicatorBtn2.SetPosition(235, 400);
+ PageIndicatorBtn2.SetImage(&PageindicatorImg2);
+ PageIndicatorBtn2.SetLabel(&PageindicatorTxt2);
+ PageIndicatorBtn2.SetSoundOver(&btnSoundOver);
+ PageIndicatorBtn2.SetSoundClick(&btnClick1);
+ PageIndicatorBtn2.SetTrigger(&trigA);
+ PageIndicatorBtn2.SetEffectGrow();
- GuiButton page2Btn(40, 96);
- page2Btn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- page2Btn.SetPosition(-202, 186);
- page2Btn.SetSoundOver(&btnSoundOver);
- page2Btn.SetSoundClick(&btnClick);
- page2Btn.SetTrigger(0, &trigA);
- page2Btn.SetTrigger(1, &trigR);
- page2Btn.SetTrigger(2, &trigPlus);
+ GuiImage GoLeftImg(&arrow_left);
+ GuiButton GoLeftBtn(GoLeftImg.GetWidth(), GoLeftImg.GetHeight());
+ GoLeftBtn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
+ GoLeftBtn.SetPosition(25, -25);
+ GoLeftBtn.SetImage(&GoLeftImg);
+ GoLeftBtn.SetSoundOver(&btnSoundOver);
+ GoLeftBtn.SetSoundClick(&btnClick);
+ GoLeftBtn.SetEffectGrow();
+ GoLeftBtn.SetTrigger(&trigA);
+ GoLeftBtn.SetTrigger(&trigL);
+ GoLeftBtn.SetTrigger(&trigMinus);
- GuiButton page3Btn(40, 96);
- page3Btn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- page3Btn.SetPosition(-202, 282);
- page3Btn.SetSoundOver(&btnSoundOver);
- page3Btn.SetSoundClick(&btnClick);
- page3Btn.SetTrigger(0, &trigA);
- page3Btn.SetTrigger(1, &trigR);
- page3Btn.SetTrigger(2, &trigPlus);
+ GuiImage GoRightImg(&arrow_right);
+ GuiButton GoRightBtn(GoRightImg.GetWidth(), GoRightImg.GetHeight());
+ GoRightBtn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
+ GoRightBtn.SetPosition(-25, -25);
+ GoRightBtn.SetImage(&GoRightImg);
+ GoRightBtn.SetSoundOver(&btnSoundOver);
+ GoRightBtn.SetSoundClick(&btnClick);
+ GoRightBtn.SetEffectGrow();
+ GoRightBtn.SetTrigger(&trigA);
+ GoRightBtn.SetTrigger(&trigR);
+ GoRightBtn.SetTrigger(&trigPlus);
- const char * text = LANGUAGE.Unlock;
- if (Settings.godmode == 1)
- text = LANGUAGE.Lock;
- GuiText lockBtnTxt(text, 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
- lockBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
- GuiImage lockBtnImg(&btnOutline);
- lockBtnImg.SetWidescreen(CFG.widescreen);
- GuiButton lockBtn(&lockBtnImg,&lockBtnImg, 2, 3, 180, 400, &trigA, &btnSoundOver, &btnClick,1);
- lockBtn.SetLabel(&lockBtnTxt);
+ char MainButtonText[50];
+ snprintf(MainButtonText, sizeof(MainButtonText), "%s", " ");
- GuiImage updateBtnImg(&updateRevImgData);
- updateBtnImg.SetWidescreen(CFG.widescreen);
- GuiButton updateBtn(&updateBtnImg,&updateBtnImg, 2, 3, 70, 400, &trigA, &btnSoundOver, &btnClick,1);
- updateBtn.SetVisible(false);
- updateBtn.SetClickable(false);
+ GuiImage MainButton1Img(&MainButtonImgData);
+ GuiImage MainButton1ImgOver(&MainButtonImgOverData);
+ GuiText MainButton1Txt(MainButtonText, 22, (GXColor){0, 0, 0, 255});
+ MainButton1Txt.SetMaxWidth(MainButton1Img.GetWidth());
+ GuiButton MainButton1(MainButton1Img.GetWidth(), MainButton1Img.GetHeight());
+ MainButton1.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ MainButton1.SetPosition(0, 90);
+ MainButton1.SetImage(&MainButton1Img);
+ MainButton1.SetImageOver(&MainButton1ImgOver);
+ MainButton1.SetLabel(&MainButton1Txt);
+ MainButton1.SetSoundOver(&btnSoundOver);
+ MainButton1.SetSoundClick(&btnClick1);
+ MainButton1.SetEffectGrow();
+ MainButton1.SetTrigger(&trigA);
- GuiImageData logo(credits_button_png);
- GuiImage logoImg(&logo);
- GuiImageData logoOver(credits_button_over_png);
- GuiImage logoImgOver(&logoOver);
+ GuiImage MainButton2Img(&MainButtonImgData);
+ GuiImage MainButton2ImgOver(&MainButtonImgOverData);
+ GuiText MainButton2Txt(MainButtonText, 22, (GXColor){0, 0, 0, 255});
+ MainButton2Txt.SetMaxWidth(MainButton2Img.GetWidth());
+ GuiButton MainButton2(MainButton2Img.GetWidth(), MainButton2Img.GetHeight());
+ MainButton2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ MainButton2.SetPosition(0, 160);
+ MainButton2.SetImage(&MainButton2Img);
+ MainButton2.SetImageOver(&MainButton2ImgOver);
+ MainButton2.SetLabel(&MainButton2Txt);
+ MainButton2.SetSoundOver(&btnSoundOver);
+ MainButton2.SetSoundClick(&btnClick1);
+ MainButton2.SetEffectGrow();
+ MainButton2.SetTrigger(&trigA);
- GuiButton btnLogo(logoImg.GetWidth(), logoImg.GetHeight());
- btnLogo.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
- btnLogo.SetPosition(0, -35);
- btnLogo.SetImage(&logoImg);
- btnLogo.SetImageOver(&logoImgOver);
- btnLogo.SetEffectGrow();
- btnLogo.SetSoundOver(&btnSoundOver);
- btnLogo.SetSoundClick(&btnClick);
- btnLogo.SetTrigger(&trigA);
+ GuiImage MainButton3Img(&MainButtonImgData);
+ GuiImage MainButton3ImgOver(&MainButtonImgOverData);
+ GuiText MainButton3Txt(MainButtonText, 22, (GXColor){0, 0, 0, 255});
+ MainButton3Txt.SetMaxWidth(MainButton3Img.GetWidth());
+ GuiButton MainButton3(MainButton3Img.GetWidth(), MainButton3Img.GetHeight());
+ MainButton3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ MainButton3.SetPosition(0, 230);
+ MainButton3.SetImage(&MainButton3Img);
+ MainButton3.SetImageOver(&MainButton3ImgOver);
+ MainButton3.SetLabel(&MainButton3Txt);
+ MainButton3.SetSoundOver(&btnSoundOver);
+ MainButton3.SetSoundClick(&btnClick1);
+ MainButton3.SetEffectGrow();
+ MainButton3.SetTrigger(&trigA);
+
+ GuiImage MainButton4Img(&MainButtonImgData);
+ GuiImage MainButton4ImgOver(&MainButtonImgOverData);
+ GuiText MainButton4Txt(MainButtonText, 22, (GXColor){0, 0, 0, 255});
+ MainButton4Txt.SetMaxWidth(MainButton4Img.GetWidth());
+ GuiButton MainButton4(MainButton4Img.GetWidth(), MainButton4Img.GetHeight());
+ MainButton4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ MainButton4.SetPosition(0, 300);
+ MainButton4.SetImage(&MainButton4Img);
+ MainButton4.SetImageOver(&MainButton4ImgOver);
+ MainButton4.SetLabel(&MainButton4Txt);
+ MainButton4.SetSoundOver(&btnSoundOver);
+ MainButton4.SetSoundClick(&btnClick1);
+ MainButton4.SetEffectGrow();
+ MainButton4.SetTrigger(&trigA);
customOptionList options2(9);
GuiCustomOptionBrowser optionBrowser2(396, 280, &options2, CFG.theme_path, "bg_options_settings.png", bg_options_settings_png, 0, 150);
optionBrowser2.SetPosition(0, 90);
optionBrowser2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+
GuiWindow w(screenwidth, screenheight);
int pageToDisplay = 1;
while ( pageToDisplay > 0) //set pageToDisplay to 0 to quit
{
+ VIDEO_WaitVSync ();
+
menu = MENU_NONE;
+
if ( pageToDisplay == 1)
{
+ /** Standard procedure made in all pages **/
+ MainButton1.StopEffect();
+ MainButton2.StopEffect();
+ MainButton3.StopEffect();
+ MainButton4.StopEffect();
- options2.SetName(0, "%s",LANGUAGE.VideoMode);
- options2.SetName(1, "%s",LANGUAGE.VIDTVPatch);
- options2.SetName(2, "%s",LANGUAGE.Language);
-
- options2.SetName(3, "Ocarina");
-
- options2.SetName(4,"%s", LANGUAGE.Display);
- options2.SetName(5,"%s", LANGUAGE.Clock); //CLOCK
- options2.SetName(6,"%s", LANGUAGE.Rumble); //RUMBLE
- options2.SetName(7,"%s", LANGUAGE.Volume);
- options2.SetName(8,"%s", LANGUAGE.Tooltips);
+ if(slidedirection == RIGHT) {
+ MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
+ MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
+ MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
+ MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
+ while (MainButton1.GetEffect()>0) usleep(50);
+ }
+ else if(slidedirection == LEFT) {
+ MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
+ MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
+ MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
+ MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
+ while (MainButton1.GetEffect()>0) usleep(50);
+ }
HaltGui();
- w.Append(&settingsbackgroundbtn);
+
+ snprintf(MainButtonText, sizeof(MainButtonText), "%s", LANGUAGE.GUISettings);
+ MainButton1Txt.SetText(MainButtonText);
+ snprintf(MainButtonText, sizeof(MainButtonText), "%s", LANGUAGE.Gameload);
+ MainButton2Txt.SetText(MainButtonText);
+ snprintf(MainButtonText, sizeof(MainButtonText), "%s", LANGUAGE.Parentalcontrol);
+ MainButton3Txt.SetText(MainButtonText);
+ snprintf(MainButtonText, sizeof(MainButtonText), "%s", LANGUAGE.Sound);
+ MainButton4Txt.SetText(MainButtonText);
+
+ mainWindow->RemoveAll();
+ mainWindow->Append(&w);
+ w.RemoveAll();
+ w.Append(&settingsbackground);
+ w.Append(&PageIndicatorBtn1);
+ w.Append(&PageIndicatorBtn2);
w.Append(&titleTxt);
w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- w.Append(&btnLogo);
w.Append(&homo);
- //set triggers for tabs
- page1Btn.RemoveTrigger(1);
- page1Btn.RemoveTrigger(2);
- page2Btn.RemoveTrigger(1);
- page2Btn.RemoveTrigger(2);
- page3Btn.RemoveTrigger(1);
- page3Btn.RemoveTrigger(2);
- page2Btn.SetTrigger(1, &trigPlus);
- page2Btn.SetTrigger(2, &trigR);
- page3Btn.SetTrigger(1, &trigMinus);
- page3Btn.SetTrigger(2, &trigL);
+ w.Append(&GoRightBtn);
+ w.Append(&GoLeftBtn);
+ w.Append(&MainButton1);
+ w.Append(&MainButton2);
+ w.Append(&MainButton3);
+ w.Append(&MainButton4);
+ PageIndicatorBtn1.SetAlpha(255);
+ PageIndicatorBtn2.SetAlpha(50);
+
+ /** Creditsbutton change **/
+ MainButton4.SetImage(&MainButton4Img);
+ MainButton4.SetImageOver(&MainButton4ImgOver);
+
+ /** Disable ability to click through MainButtons */
+ optionBrowser2.SetClickable(false);
+
+ MainButton1.StopEffect();
+ MainButton2.StopEffect();
+ MainButton3.StopEffect();
+ MainButton4.StopEffect();
+
+ MainButton1.SetEffectGrow();
+ MainButton2.SetEffectGrow();
+ MainButton3.SetEffectGrow();
+ MainButton4.SetEffectGrow();
+
+ if(slidedirection == FADE) {
+ MainButton1.SetEffect(EFFECT_FADE, 20);
+ MainButton2.SetEffect(EFFECT_FADE, 20);
+ MainButton3.SetEffect(EFFECT_FADE, 20);
+ MainButton4.SetEffect(EFFECT_FADE, 20);
+ }
+ else if(slidedirection == LEFT) {
+ MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
+ MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
+ MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
+ MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
+ }
+ else if(slidedirection == RIGHT) {
+ MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
+ MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
+ MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
+ MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
+ }
mainWindow->Append(&w);
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&page3Btn);
-
ResumeGui();
+
+ while(MainButton1.GetEffect() > 0) usleep(50);
+
}
else if ( pageToDisplay == 2 )
{
- page1Btn.RemoveTrigger(1);
- page1Btn.RemoveTrigger(2);
- page2Btn.RemoveTrigger(1);
- page2Btn.RemoveTrigger(2);
- page3Btn.RemoveTrigger(1);
- page3Btn.RemoveTrigger(2);
- page1Btn.SetTrigger(1, &trigMinus);
- page1Btn.SetTrigger(2, &trigL);
- page3Btn.SetTrigger(1, &trigPlus);
- page3Btn.SetTrigger(2, &trigR);
+ /** Standard procedure made in all pages **/
+ MainButton1.StopEffect();
+ MainButton2.StopEffect();
+ MainButton3.StopEffect();
+ MainButton4.StopEffect();
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page3Btn);
+ if(slidedirection == RIGHT) {
+ MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
+ MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
+ MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
+ MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
+ while (MainButton1.GetEffect()>0) usleep(50);
+ }
+ else if(slidedirection == LEFT) {
+ MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
+ MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
+ MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
+ MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
+ while (MainButton1.GetEffect()>0) usleep(50);
+ }
- options2.SetName(0,"%s", LANGUAGE.Password);
- options2.SetName(1,"%s", LANGUAGE.BootStandard);
- options2.SetName(2,"%s", LANGUAGE.FlipX);
- options2.SetName(3,"%s", LANGUAGE.QuickBoot);
- options2.SetName(4,"%s", LANGUAGE.PromptsButtons);
- options2.SetName(5,"%s", LANGUAGE.Parentalcontrol);
- options2.SetName(6,"%s", LANGUAGE.CoverPath);
- options2.SetName(7,"%s", LANGUAGE.DiscimagePath);
- options2.SetName(8,"%s", LANGUAGE.ThemePath);
- }
- else if ( pageToDisplay == 3 )
- {
- page1Btn.RemoveTrigger(1);
- page1Btn.RemoveTrigger(2);
- page2Btn.RemoveTrigger(1);
- page2Btn.RemoveTrigger(2);
- page3Btn.RemoveTrigger(1);
- page3Btn.RemoveTrigger(2);
- page2Btn.SetTrigger(1, &trigMinus);
- page2Btn.SetTrigger(2, &trigL);
- page1Btn.SetTrigger(1, &trigPlus);
- page1Btn.SetTrigger(2, &trigR);
+ HaltGui();
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page3Btn);
+ snprintf(MainButtonText, sizeof(MainButtonText), "%s", LANGUAGE.Custompaths);
+ MainButton1Txt.SetText(MainButtonText);
+ snprintf(MainButtonText, sizeof(MainButtonText), "%s", LANGUAGE.Update);
+ MainButton2Txt.SetText(MainButtonText);
+ snprintf(MainButtonText, sizeof(MainButtonText), "%s", LANGUAGE.Defaultsettings);
+ MainButton3Txt.SetText(MainButtonText);
+ snprintf(MainButtonText, sizeof(MainButtonText), "%s", LANGUAGE.Credits);
+ MainButton4Txt.SetText(MainButtonText);
- options2.SetName(0, "%s",LANGUAGE.Titlestxtpath);
- options2.SetName(1, "%s",LANGUAGE.AppLanguage);
- options2.SetName(2, "%s",LANGUAGE.keyboard);
- options2.SetName(3, "%s",LANGUAGE.Unicodefix);
- options2.SetName(4, "%s",LANGUAGE.Backgroundmusic);
- options2.SetName(5, "%s",LANGUAGE.Wiilight);
- options2.SetName(6, "%s",LANGUAGE.Updatepath);
- options2.SetName(7, "%s",LANGUAGE.Patchcountrystrings);
- options2.SetName(8, "%s",LANGUAGE.Defaultsettings);
+ mainWindow->RemoveAll();
+ mainWindow->Append(&w);
+ w.RemoveAll();
+ w.Append(&settingsbackground);
+ w.Append(&PageIndicatorBtn1);
+ w.Append(&PageIndicatorBtn2);
+ w.Append(&titleTxt);
+ w.Append(&backBtn);
+ w.Append(&homo);
+ w.Append(&GoRightBtn);
+ w.Append(&GoLeftBtn);
+ w.Append(&MainButton1);
+ w.Append(&MainButton2);
+ w.Append(&MainButton3);
+ w.Append(&MainButton4);
+
+ PageIndicatorBtn1.SetAlpha(50);
+ PageIndicatorBtn2.SetAlpha(255);
+
+ /** Creditsbutton change **/
+ MainButton4.SetImage(&creditsImg);
+ MainButton4.SetImageOver(&creditsImgOver);
+
+ /** Disable ability to click through MainButtons */
+ optionBrowser2.SetClickable(false);
+
+ MainButton1.StopEffect();
+ MainButton2.StopEffect();
+ MainButton3.StopEffect();
+ MainButton4.StopEffect();
+
+ MainButton1.SetEffectGrow();
+ MainButton2.SetEffectGrow();
+ MainButton3.SetEffectGrow();
+ MainButton4.SetEffectGrow();
+
+ if(slidedirection == FADE) {
+ MainButton1.SetEffect(EFFECT_FADE, 20);
+ MainButton2.SetEffect(EFFECT_FADE, 20);
+ MainButton3.SetEffect(EFFECT_FADE, 20);
+ MainButton4.SetEffect(EFFECT_FADE, 20);
+ }
+ else if(slidedirection == LEFT) {
+ MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
+ MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
+ MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
+ MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
+ }
+ else if(slidedirection == RIGHT) {
+ MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
+ MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
+ MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
+ MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
+ }
+
+ mainWindow->Append(&w);
+
+ ResumeGui();
+
+ while(MainButton1.GetEffect() > 0) usleep(50);
}
+
while(menu == MENU_NONE)
{
VIDEO_WaitVSync ();
if ( pageToDisplay == 1 )
{
- if(Settings.video >= settings_video_max)
- Settings.video = 0;
- if(Settings.language >= settings_language_max)
- Settings.language = 0;
- if(Settings.ocarina >= settings_off_on_max)
- Settings.ocarina = 0;
- if(Settings.vpatch >= settings_off_on_max)
- Settings.vpatch = 0;
- if(Settings.sinfo >= settings_sinfo_max)
- Settings.sinfo = 0;
- if(Settings.hddinfo >= settings_clock_max)
- Settings.hddinfo = 0; //CLOCK
- if(Settings.rumble >= settings_rumble_max)
- Settings.rumble = 0; //RUMBLE
- if(Settings.volume >= settings_volume_max)
- Settings.volume = 0;
- if (Settings.tooltips >= settings_tooltips_max)
- Settings.tooltips = 0;
+ if(MainButton1.GetState() == STATE_CLICKED) {
+ MainButton1.SetEffect(EFFECT_FADE, -20);
+ MainButton2.SetEffect(EFFECT_FADE, -20);
+ MainButton3.SetEffect(EFFECT_FADE, -20);
+ MainButton4.SetEffect(EFFECT_FADE, -20);
+ while(MainButton1.GetEffect() > 0) usleep(50);
+ HaltGui();
+ w.Remove(&PageIndicatorBtn1);
+ w.Remove(&PageIndicatorBtn2);
+ w.Remove(&GoRightBtn);
+ w.Remove(&GoLeftBtn);
+ w.Remove(&MainButton1);
+ w.Remove(&MainButton2);
+ w.Remove(&MainButton3);
+ w.Remove(&MainButton4);
+ titleTxt.SetText(LANGUAGE.GUISettings);
+ exit = false;
+ options2.SetName(0, "%s",LANGUAGE.AppLanguage);
+ options2.SetName(1, "%s",LANGUAGE.Display);
+ options2.SetName(2, "%s",LANGUAGE.Clock);
+ options2.SetName(3, "%s",LANGUAGE.Tooltips);
+ options2.SetName(4, "%s",LANGUAGE.FlipX);
+ options2.SetName(5, "%s",LANGUAGE.PromptsButtons);
+ options2.SetName(6, "%s",LANGUAGE.keyboard);
+ options2.SetName(7, "%s",LANGUAGE.Wiilight);
+ options2.SetName(8, "%s", LANGUAGE.Rumble);
+ for(int i = 0; i < 9; i++) options2.SetValue(i, NULL);
+ w.Append(&optionBrowser2);
+ optionBrowser2.SetClickable(true);
+ ResumeGui();
- if (Settings.video == discdefault) options2.SetValue(0,"%s",LANGUAGE.DiscDefault);
- else if (Settings.video == systemdefault) options2.SetValue(0,"%s",LANGUAGE.SystemDefault);
- else if (Settings.video == patch) options2.SetValue(0,"%s",LANGUAGE.AutoPatch);
- else if (Settings.video == pal50) options2.SetValue(0,"%s PAL50",LANGUAGE.Force);
- else if (Settings.video == pal60) options2.SetValue(0,"%s PAL60",LANGUAGE.Force);
- else if (Settings.video == ntsc) options2.SetValue(0,"%s NTSC",LANGUAGE.Force);
+ VIDEO_WaitVSync ();
+ optionBrowser2.SetEffect(EFFECT_FADE, 20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
- if (Settings.vpatch == on) options2.SetValue(1,"%s",LANGUAGE.ON);
- else if (Settings.vpatch == off) options2.SetValue(1,"%s",LANGUAGE.OFF);
+ int returnhere = 1;
+ char * languagefile;
+ languagefile = strrchr(Settings.language_path, '/')+1;
- if (Settings.language == ConsoleLangDefault) options2.SetValue(2,"%s",LANGUAGE.ConsoleDefault);
- else if (Settings.language == jap) options2.SetValue(2,"%s",LANGUAGE.Japanese);
- else if (Settings.language == ger) options2.SetValue(2,"%s",LANGUAGE.German);
- else if (Settings.language == eng) options2.SetValue(2,"%s",LANGUAGE.English);
- else if (Settings.language == fren) options2.SetValue(2,"%s",LANGUAGE.French);
- else if (Settings.language == esp) options2.SetValue(2,"%s",LANGUAGE.Spanish);
- else if (Settings.language == it) options2.SetValue(2,"%s",LANGUAGE.Italian);
- else if (Settings.language == dut) options2.SetValue(2,"%s",LANGUAGE.Dutch);
- else if (Settings.language == schin) options2.SetValue(2,"%s",LANGUAGE.SChinese);
- else if (Settings.language == tchin) options2.SetValue(2,"%s",LANGUAGE.TChinese);
- else if (Settings.language == kor) options2.SetValue(2,"%s",LANGUAGE.Korean);
+ while(!exit)
+ {
+ VIDEO_WaitVSync ();
- if (Settings.ocarina == on) options2.SetValue(3,"%s",LANGUAGE.ON);
- else if (Settings.ocarina == off) options2.SetValue(3,"%s",LANGUAGE.OFF);
+ returnhere = 1;
- if (Settings.sinfo == GameID) options2.SetValue(4,"%s",LANGUAGE.GameID);
- else if (Settings.sinfo == GameRegion) options2.SetValue(4,"%s",LANGUAGE.GameRegion);
- else if (Settings.sinfo == Both) options2.SetValue(4,"%s",LANGUAGE.Both);
- else if (Settings.sinfo == Neither) options2.SetValue(4,"%s",LANGUAGE.Neither);
+ if(Settings.sinfo >= settings_sinfo_max)
+ Settings.sinfo = 0;
+ if(Settings.hddinfo >= settings_clock_max)
+ Settings.hddinfo = 0; //CLOCK
+ if (Settings.tooltips >= settings_tooltips_max)
+ Settings.tooltips = 0;
+ if ( Settings.xflip >= settings_xflip_max)
+ Settings.xflip = 0;
+ if ( Settings.wsprompt > 1 )
+ Settings.wsprompt = 0;
+ if ( Settings.keyset >= settings_keyset_max)
+ Settings.keyset = 0;
+ if ( Settings.wiilight > 2 )
+ Settings.wiilight = 0;
+ if(Settings.rumble >= settings_rumble_max)
+ Settings.rumble = 0; //RUMBLE
- if (Settings.hddinfo == hr12) options2.SetValue(5,"12 %s",LANGUAGE.hour);
- else if (Settings.hddinfo == hr24) options2.SetValue(5,"24 %s",LANGUAGE.hour);
- else if (Settings.hddinfo == Off) options2.SetValue(5,"%s",LANGUAGE.OFF);
+ if(!strcmp("notset", Settings.language_path))
+ options2.SetValue(0, "%s", LANGUAGE.Default);
+ else
+ options2.SetValue(0, "%s", languagefile);
- if (Settings.rumble == RumbleOn) options2.SetValue(6,"%s",LANGUAGE.ON);
- else if (Settings.rumble == RumbleOff) options2.SetValue(6,"%s",LANGUAGE.OFF);
+ if (Settings.sinfo == GameID) options2.SetValue(1,"%s",LANGUAGE.GameID);
+ else if (Settings.sinfo == GameRegion) options2.SetValue(1,"%s",LANGUAGE.GameRegion);
+ else if (Settings.sinfo == Both) options2.SetValue(1,"%s",LANGUAGE.Both);
+ else if (Settings.sinfo == Neither) options2.SetValue(1,"%s",LANGUAGE.Neither);
- if (Settings.volume == v10) options2.SetValue(7,"10");
- else if (Settings.volume == v20) options2.SetValue(7,"20");
- else if (Settings.volume == v30) options2.SetValue(7,"30");
- else if (Settings.volume == v40) options2.SetValue(7,"40");
- else if (Settings.volume == v50) options2.SetValue(7,"50");
- else if (Settings.volume == v60) options2.SetValue(7,"60");
- else if (Settings.volume == v70) options2.SetValue(7,"70");
- else if (Settings.volume == v80) options2.SetValue(7,"80");
- else if (Settings.volume == v90) options2.SetValue(7,"90");
- else if (Settings.volume == v100) options2.SetValue(7,"100");
- else if (Settings.volume == v0) options2.SetValue(7,"%s",LANGUAGE.OFF);
+ if (Settings.hddinfo == hr12) options2.SetValue(2,"12 %s",LANGUAGE.hour);
+ else if (Settings.hddinfo == hr24) options2.SetValue(2,"24 %s",LANGUAGE.hour);
+ else if (Settings.hddinfo == Off) options2.SetValue(2,"%s",LANGUAGE.OFF);
+ if (Settings.tooltips == TooltipsOn) options2.SetValue(3,"%s",LANGUAGE.ON);
+ else if (Settings.tooltips == TooltipsOff) options2.SetValue(3,"%s",LANGUAGE.OFF);
- if (Settings.tooltips == TooltipsOn) options2.SetValue(8,"%s",LANGUAGE.ON);
- else if (Settings.tooltips == TooltipsOff) options2.SetValue(8,"%s",LANGUAGE.OFF);
+ if (Settings.xflip == no) options2.SetValue(4,"%s/%s",LANGUAGE.Right,LANGUAGE.Next);
+ else if (Settings.xflip == yes) options2.SetValue(4,"%s/%s",LANGUAGE.Left,LANGUAGE.Prev);
+ else if (Settings.xflip == sysmenu) options2.SetValue(4,"%s", LANGUAGE.LikeSysMenu);
+ else if (Settings.xflip == wtf) options2.SetValue(4,"%s/%s",LANGUAGE.Right,LANGUAGE.Prev);
+ else if (Settings.xflip == disk3d) options2.SetValue(4,"DiskFlip");
- ret = optionBrowser2.GetClickedOption();
+ if (Settings.wsprompt == no) options2.SetValue(5,"%s",LANGUAGE.Normal);
+ else if (Settings.wsprompt == yes) options2.SetValue(5,"%s",LANGUAGE.WidescreenFix);
- switch (ret)
- {
- case 0:
- Settings.video++;
- break;
- case 1:
- Settings.vpatch++;
- break;
- case 2:
- Settings.language++;
- break;
- case 3:
- Settings.ocarina++;
- break;
- case 4: // Game Code and Region
- Settings.sinfo++;
- break;
- case 5: //CLOCK
- Settings.hddinfo++;
- break;
- case 6: //Rumble
- Settings.rumble++;
- break;
- case 7:
- Settings.volume++;
- break;
- case 8:
- Settings.tooltips++;
- break;
- }
- }
+ if (Settings.keyset == us) options2.SetValue(6,"QWERTY");
+ else if (Settings.keyset == dvorak) options2.SetValue(6,"DVORAK");
+ else if (Settings.keyset == euro) options2.SetValue(6,"QWERTZ");
+ else if (Settings.keyset == azerty) options2.SetValue(6,"AZERTY");
- if ( pageToDisplay == 2 )
- {
- if ( Settings.cios >= settings_cios_max)
- Settings.cios = 0;
- if ( Settings.xflip >= settings_xflip_max)
- Settings.xflip = 0;
- if ( Settings.qboot > 1 )
- Settings.qboot = 0;
- if ( Settings.wsprompt > 1 )
- Settings.wsprompt = 0;
- if (Settings.parentalcontrol > 3 )
- Settings.parentalcontrol = 0;
+ if (Settings.wiilight == 0) options2.SetValue(7,"%s",LANGUAGE.OFF);
+ else if (Settings.wiilight == 1) options2.SetValue(7,"%s",LANGUAGE.ON);
+ else if (Settings.wiilight == 2) options2.SetValue(7,"%s",LANGUAGE.OnlyInstall);
+ if (Settings.rumble == RumbleOn) options2.SetValue(8,"%s",LANGUAGE.ON);
+ else if (Settings.rumble == RumbleOff) options2.SetValue(8,"%s",LANGUAGE.OFF);
- if ( Settings.godmode != 1) options2.SetValue(0, "********");
- else if (!strcmp("", Settings.unlockCode)) options2.SetValue(0, "%s",LANGUAGE.notset);
- else options2.SetValue(0, Settings.unlockCode);
-
- if (Settings.godmode != 1) options2.SetValue(1, "********");
- else if (Settings.cios == ios249) options2.SetValue(1,"cIOS 249");
- else if (Settings.cios == ios222) options2.SetValue(1,"cIOS 222");
-
- if (Settings.xflip == no) options2.SetValue(2,"%s/%s",LANGUAGE.Right,LANGUAGE.Next);
- else if (Settings.xflip == yes) options2.SetValue(2,"%s/%s",LANGUAGE.Left,LANGUAGE.Prev);
- else if (Settings.xflip == sysmenu) options2.SetValue(2,"%s", LANGUAGE.LikeSysMenu);
- else if (Settings.xflip == wtf) options2.SetValue(2,"%s/%s",LANGUAGE.Right,LANGUAGE.Prev);
- else if (Settings.xflip == disk3d) options2.SetValue(2,"DiskFlip");
-
- if (Settings.qboot == no) options2.SetValue(3,"%s",LANGUAGE.No);
- else if (Settings.qboot == yes) options2.SetValue(3,"%s",LANGUAGE.Yes);
-
- if (Settings.wsprompt == no) options2.SetValue(4,"%s",LANGUAGE.Normal);
- else if (Settings.wsprompt == yes) options2.SetValue(4,"%s",LANGUAGE.WidescreenFix);
-
- if (Settings.godmode != 1) options2.SetValue(5, "********");
- else if(Settings.parentalcontrol == 0) options2.SetValue(5, "0");
- else if(Settings.parentalcontrol == 1) options2.SetValue(5, "1");
- else if(Settings.parentalcontrol == 2) options2.SetValue(5, "2");
- else if(Settings.parentalcontrol == 3) options2.SetValue(5, "3");
-
- options2.SetValue(6, "%s", Settings.covers_path);
- options2.SetValue(7, "%s", Settings.disc_path);
- options2.SetValue(8, "%s", CFG.theme_path);
-
- ret = optionBrowser2.GetClickedOption();
-
- switch (ret)
- {
-
- case 0: // Modify Password
- if ( Settings.godmode == 1)
- {
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- char entered[20] = "";
- strncpy(entered, Settings.unlockCode, sizeof(entered));
- int result = OnScreenKeyboard(entered, 20,0);
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- if ( result == 1 )
- {
- strncpy(Settings.unlockCode, entered, sizeof(Settings.unlockCode));
- WindowPrompt(LANGUAGE.PasswordChanged,LANGUAGE.Passwordhasbeenchanged,LANGUAGE.ok,0,0,0);
- }
- }
- else
- {
- WindowPrompt(LANGUAGE.Passwordchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
- }
- break;
- case 1:
- if ( Settings.godmode == 1)
- Settings.cios++;
- break;
- case 2:
- Settings.xflip++;
- break;
- case 3:
- Settings.qboot++;
- break;
- case 4:
- Settings.wsprompt++;
- break;
- case 5:
- if ( Settings.godmode == 1)
- Settings.parentalcontrol++;
- break;
- case 6:
- if ( Settings.godmode == 1)
+ if(backBtn.GetState() == STATE_CLICKED)
{
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- char entered[43] = "";
- strncpy(entered, Settings.covers_path, sizeof(entered));
- int result = OnScreenKeyboard(entered,43,4);
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- if ( result == 1 )
- {
- int len = (strlen(entered)-1);
- if(entered[len] !='/')
- strncat (entered, "/", 1);
- strncpy(Settings.covers_path, entered, sizeof(Settings.covers_path));
- WindowPrompt(LANGUAGE.CoverpathChanged,0,LANGUAGE.ok,0,0,0);
- if(!isSdInserted()) {
- WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
- }
- }
- }
- else
- {
- WindowPrompt(LANGUAGE.Coverpathchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
- }
- break;
- case 7:
- if ( Settings.godmode == 1)
+ backBtn.ResetState();
+ exit = true;
+ break;
+ }
+
+ if(shutdown == 1)
+ Sys_Shutdown();
+ else if(reset == 1)
+ Sys_Reboot();
+
+ else if(menu == MENU_DISCLIST) {
+ w.Remove(&optionBrowser2);
+ w.Remove(&backBtn);
+ WindowCredits();
+ w.Append(&optionBrowser2);
+ w.Append(&backBtn);
+ }
+ else if(homo.GetState() == STATE_CLICKED)
{
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- char entered[43] = "";
- strncpy(entered, Settings.disc_path, sizeof(entered));
- int result = OnScreenKeyboard(entered, 43,4);
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- if ( result == 1 )
- {
- int len = (strlen(entered)-1);
- if(entered[len] !='/')
- strncat (entered, "/", 1);
- strncpy(Settings.disc_path, entered, sizeof(Settings.disc_path));
- WindowPrompt(LANGUAGE.DiscpathChanged,0,LANGUAGE.ok,0,0,0);
- if(!isSdInserted()) {
- WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
- }
- }
- }
- else
- {
- WindowPrompt(LANGUAGE.Discpathchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
- }
- break;
- case 8:
- if ( Settings.godmode == 1)
+ cfg_save_global();
+ optionBrowser2.SetState(STATE_DISABLED);
+ s32 thetimeofbg = bgMusic->GetPlayTime();
+ bgMusic->Stop();
+ choice = WindowExitPrompt(LANGUAGE.ExitUSBISOLoader,0, LANGUAGE.BacktoLoader,LANGUAGE.WiiMenu,LANGUAGE.Back,0);
+ if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path))
+ {
+ bgMusic->Play();
+ } else {
+ bgMusic->PlayOggFile(Settings.ogg_path);
+ }
+ bgMusic->SetPlayTime(thetimeofbg);
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ if(choice == 3) {
+ Sys_LoadMenu(); // Back to System Menu
+ } else if (choice == 2) {
+ Sys_BackToLoader();
+ } else {
+ homo.ResetState();
+ }
+ optionBrowser2.SetState(STATE_DEFAULT);
+ }
+
+ ret = optionBrowser2.GetClickedOption();
+
+ switch (ret)
{
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- char entered[43] = "";
- strncpy(entered, CFG.theme_path, sizeof(entered));
- int result = OnScreenKeyboard(entered, 43,4);
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- if ( result == 1 )
- {
- int len = (strlen(entered)-1);
- if(entered[len] !='/')
- strncat (entered, "/", 1);
- strncpy(CFG.theme_path, entered, sizeof(CFG.theme_path));
- WindowPrompt(LANGUAGE.ThemepathChanged,0,LANGUAGE.ok,0,0,0);
- if(!isSdInserted()) {
- WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
+ case 0:
+ if(isSdInserted()) {
+ if ( Settings.godmode == 1)
+ {
+ w.SetEffect(EFFECT_FADE, -20);
+ while(w.GetEffect()>0) usleep(50);
+ mainWindow->Remove(&w);
+ while(returnhere == 1)
+ returnhere = MenuLanguageSelect();
+ if(returnhere == 2) {
+ menu = MENU_SETTINGS;
+ pageToDisplay = 0;
+ exit = true;
+ mainWindow->Append(&w);
+ break;
+ } else {
+ HaltGui();
+ mainWindow->Append(&w);
+ w.SetEffect(EFFECT_FADE, 20);
+ ResumeGui();
+ while(w.GetEffect()>0) usleep(50);
+ }
} else {
- cfg_save_global();
+ WindowPrompt(LANGUAGE.Langchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
}
- mainWindow->Remove(bgImg);
- CFG_Load();
- CFG_LoadGlobal();
- menu = MENU_SETTINGS;
- #ifdef HW_RVL
- snprintf(imgPath, sizeof(imgPath), "%splayer1_point.png", CFG.theme_path);
- pointer[0] = new GuiImageData(imgPath, player1_point_png);
- snprintf(imgPath, sizeof(imgPath), "%splayer2_point.png", CFG.theme_path);
- pointer[1] = new GuiImageData(imgPath, player2_point_png);
- snprintf(imgPath, sizeof(imgPath), "%splayer3_point.png", CFG.theme_path);
- pointer[2] = new GuiImageData(imgPath, player3_point_png);
- snprintf(imgPath, sizeof(imgPath), "%splayer4_point.png", CFG.theme_path);
- pointer[3] = new GuiImageData(imgPath, player4_point_png);
- #endif
- if (CFG.widescreen)
- snprintf(imgPath, sizeof(imgPath), "%swbackground.png", CFG.theme_path);
- else
- snprintf(imgPath, sizeof(imgPath), "%sbackground.png", CFG.theme_path);
+ } else {
+ WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtousethatoption, LANGUAGE.ok, 0,0,0);
+ }
+ break;
+ case 1:
+ Settings.sinfo++;
+ break;
+ case 2:
+ Settings.hddinfo++;
+ break;
+ case 3:
+ Settings.tooltips++;
+ break;
+ case 4:
+ Settings.xflip++;
+ break;
+ case 5:
+ Settings.wsprompt++;
+ break;
+ case 6:
+ Settings.keyset++;
+ break;
+ case 7:
+ Settings.wiilight++;
+ break;
+ case 8:
+ Settings.rumble++;
+ break;
+ }
+ }
+ optionBrowser2.SetEffect(EFFECT_FADE, -20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
+ titleTxt.SetText(LANGUAGE.settings);
+ slidedirection = FADE;
+ if(returnhere != 2)
+ pageToDisplay = 1;
+ MainButton1.ResetState();
+ break;
+ }
- background = new GuiImageData(imgPath, CFG.widescreen? wbackground_png : background_png);
+ if(MainButton2.GetState() == STATE_CLICKED) {
+ MainButton1.SetEffect(EFFECT_FADE, -20);
+ MainButton2.SetEffect(EFFECT_FADE, -20);
+ MainButton3.SetEffect(EFFECT_FADE, -20);
+ MainButton4.SetEffect(EFFECT_FADE, -20);
+ while(MainButton2.GetEffect() > 0) usleep(50);
+ HaltGui();
+ w.Remove(&PageIndicatorBtn1);
+ w.Remove(&PageIndicatorBtn2);
+ w.Remove(&GoRightBtn);
+ w.Remove(&GoLeftBtn);
+ w.Remove(&MainButton1);
+ w.Remove(&MainButton2);
+ w.Remove(&MainButton3);
+ w.Remove(&MainButton4);
+ titleTxt.SetText(LANGUAGE.Gameload);
+ exit = false;
+ options2.SetName(0, "%s",LANGUAGE.VideoMode);
+ options2.SetName(1, "%s",LANGUAGE.VIDTVPatch);
+ options2.SetName(2, "%s",LANGUAGE.Patchcountrystrings);
+ options2.SetName(3, "Ocarina");
+ options2.SetName(4,"%s", LANGUAGE.BootStandard);
+ options2.SetName(5, "%s",LANGUAGE.QuickBoot);
+ options2.SetName(6, NULL);
+ options2.SetName(7, NULL);
+ options2.SetName(8, NULL);
+ for(int i = 0; i < 9; i++) options2.SetValue(i, NULL);
+ w.Append(&optionBrowser2);
+ optionBrowser2.SetClickable(true);
+ ResumeGui();
- bgImg = new GuiImage(background);
- mainWindow->Append(bgImg);
- mainWindow->Append(&w);
+ VIDEO_WaitVSync ();
+ optionBrowser2.SetEffect(EFFECT_FADE, 20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
- w.Append(&settingsbackgroundbtn);
- w.Append(&titleTxt);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- w.Append(&btnLogo);
+ while(!exit)
+ {
+ VIDEO_WaitVSync ();
+ if(Settings.video >= settings_video_max)
+ Settings.video = 0;
+ if(Settings.vpatch >= settings_off_on_max)
+ Settings.vpatch = 0;
+ if ( Settings.patchcountrystrings > 1)
+ Settings.patchcountrystrings = 0;
+ if(Settings.ocarina >= settings_off_on_max)
+ Settings.ocarina = 0;
+ if ( Settings.qboot > 1 )
+ Settings.qboot = 0;
+ if ( Settings.cios >= settings_cios_max)
+ Settings.cios = 0;
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- }
- }
- else
- {
- WindowPrompt(LANGUAGE.Themepathchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
- }
- break;
- }
+ if (Settings.video == discdefault) options2.SetValue(0,"%s",LANGUAGE.DiscDefault);
+ else if (Settings.video == systemdefault) options2.SetValue(0,"%s",LANGUAGE.SystemDefault);
+ else if (Settings.video == patch) options2.SetValue(0,"%s",LANGUAGE.AutoPatch);
+ else if (Settings.video == pal50) options2.SetValue(0,"%s PAL50",LANGUAGE.Force);
+ else if (Settings.video == pal60) options2.SetValue(0,"%s PAL60",LANGUAGE.Force);
+ else if (Settings.video == ntsc) options2.SetValue(0,"%s NTSC",LANGUAGE.Force);
+
+ if (Settings.vpatch == on) options2.SetValue(1,"%s",LANGUAGE.ON);
+ else if (Settings.vpatch == off) options2.SetValue(1,"%s",LANGUAGE.OFF);
+
+ if (Settings.patchcountrystrings == 0) options2.SetValue(2,"%s",LANGUAGE.OFF);
+ else if (Settings.patchcountrystrings == 1) options2.SetValue(2,"%s",LANGUAGE.ON);
+
+ if (Settings.ocarina == on) options2.SetValue(3,"%s",LANGUAGE.ON);
+ else if (Settings.ocarina == off) options2.SetValue(3,"%s",LANGUAGE.OFF);
+
+ if (Settings.godmode != 1) options2.SetValue(4, "********");
+ else if (Settings.cios == ios249) options2.SetValue(4,"cIOS 249");
+ else if (Settings.cios == ios222) options2.SetValue(4,"cIOS 222");
+
+ if (Settings.qboot == no) options2.SetValue(5,"%s",LANGUAGE.No);
+ else if (Settings.qboot == yes) options2.SetValue(5,"%s",LANGUAGE.Yes);
+
+ if(backBtn.GetState() == STATE_CLICKED)
+ {
+ backBtn.ResetState();
+ exit = true;
+ break;
+ }
+
+ if(shutdown == 1)
+ Sys_Shutdown();
+ else if(reset == 1)
+ Sys_Reboot();
+
+ else if(homo.GetState() == STATE_CLICKED)
+ {
+ cfg_save_global();
+ optionBrowser2.SetState(STATE_DISABLED);
+ s32 thetimeofbg = bgMusic->GetPlayTime();
+ bgMusic->Stop();
+ choice = WindowExitPrompt(LANGUAGE.ExitUSBISOLoader,0, LANGUAGE.BacktoLoader,LANGUAGE.WiiMenu,LANGUAGE.Back,0);
+ if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path))
+ {
+ bgMusic->Play();
+ } else {
+ bgMusic->PlayOggFile(Settings.ogg_path);
+ }
+ bgMusic->SetPlayTime(thetimeofbg);
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ if(choice == 3) {
+ Sys_LoadMenu(); // Back to System Menu
+ } else if (choice == 2) {
+ Sys_BackToLoader();
+ } else {
+ homo.ResetState();
+ }
+ optionBrowser2.SetState(STATE_DEFAULT);
+ }
+
+ ret = optionBrowser2.GetClickedOption();
+
+ switch (ret)
+ {
+ case 0:
+ Settings.video++;
+ break;
+ case 1:
+ Settings.vpatch++;
+ break;
+ case 2:
+ Settings.patchcountrystrings++;
+ break;
+ case 3:
+ Settings.ocarina++;
+ break;
+ case 4:
+ if(Settings.godmode)
+ Settings.cios++;
+ break;
+ case 5:
+ Settings.qboot++;
+ break;
+ }
+ }
+ optionBrowser2.SetEffect(EFFECT_FADE, -20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
+ titleTxt.SetText(LANGUAGE.settings);
+ slidedirection = FADE;
+ pageToDisplay = 1;
+ MainButton2.ResetState();
+ break;
+ }
+
+ if(MainButton3.GetState() == STATE_CLICKED) {
+ MainButton1.SetEffect(EFFECT_FADE, -20);
+ MainButton2.SetEffect(EFFECT_FADE, -20);
+ MainButton3.SetEffect(EFFECT_FADE, -20);
+ MainButton4.SetEffect(EFFECT_FADE, -20);
+ while(MainButton3.GetEffect() > 0) usleep(50);
+ HaltGui();
+ w.Remove(&PageIndicatorBtn1);
+ w.Remove(&PageIndicatorBtn2);
+ w.Remove(&GoRightBtn);
+ w.Remove(&GoLeftBtn);
+ w.Remove(&MainButton1);
+ w.Remove(&MainButton2);
+ w.Remove(&MainButton3);
+ w.Remove(&MainButton4);
+ titleTxt.SetText(LANGUAGE.Parentalcontrol);
+ exit = false;
+ if(Settings.godmode)
+ options2.SetName(0, "Console");
+ options2.SetName(1, "%s", LANGUAGE.Password);
+ options2.SetName(2, "%s",LANGUAGE.Controllevel);
+ options2.SetName(3, NULL);
+ options2.SetName(4, NULL);
+ options2.SetName(5, NULL);
+ options2.SetName(6, NULL);
+ options2.SetName(7, NULL);
+ options2.SetName(8, NULL);
+ for(int i = 0; i < 9; i++) options2.SetValue(i, NULL);
+ w.Append(&optionBrowser2);
+ optionBrowser2.SetClickable(true);
+ ResumeGui();
+
+ VIDEO_WaitVSync ();
+ optionBrowser2.SetEffect(EFFECT_FADE, 20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
+
+ while(!exit)
+ {
+ VIDEO_WaitVSync ();
+
+ if (Settings.parentalcontrol > 3 )
+ Settings.parentalcontrol = 0;
+
+ if( Settings.godmode == 1 ) options2.SetValue(0, "Unlocked");
+ else if( Settings.godmode == 0 ) options2.SetValue(0, "Locked");
+
+ if ( Settings.godmode != 1) options2.SetValue(1, "********");
+ else if (!strcmp("", Settings.unlockCode)) options2.SetValue(1, "%s",LANGUAGE.notset);
+ else options2.SetValue(1, Settings.unlockCode);
+
+ if (Settings.godmode != 1) options2.SetValue(2, "********");
+ else if(Settings.parentalcontrol == 0) options2.SetValue(2, "%s", LANGUAGE.OFF);
+ else if(Settings.parentalcontrol == 1) options2.SetValue(2, "1");
+ else if(Settings.parentalcontrol == 2) options2.SetValue(2, "2");
+ else if(Settings.parentalcontrol == 3) options2.SetValue(2, "3");
+
+ if(backBtn.GetState() == STATE_CLICKED)
+ {
+ backBtn.ResetState();
+ exit = true;
+ break;
+ }
+
+ if(shutdown == 1)
+ Sys_Shutdown();
+ else if(reset == 1)
+ Sys_Reboot();
+
+ else if(homo.GetState() == STATE_CLICKED)
+ {
+ cfg_save_global();
+ optionBrowser2.SetState(STATE_DISABLED);
+ s32 thetimeofbg = bgMusic->GetPlayTime();
+ bgMusic->Stop();
+ choice = WindowExitPrompt(LANGUAGE.ExitUSBISOLoader,0, LANGUAGE.BacktoLoader,LANGUAGE.WiiMenu,LANGUAGE.Back,0);
+ if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path))
+ {
+ bgMusic->Play();
+ } else {
+ bgMusic->PlayOggFile(Settings.ogg_path);
+ }
+ bgMusic->SetPlayTime(thetimeofbg);
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ if(choice == 3) {
+ Sys_LoadMenu(); // Back to System Menu
+ } else if (choice == 2) {
+ Sys_BackToLoader();
+ } else {
+ homo.ResetState();
+ }
+ optionBrowser2.SetState(STATE_DEFAULT);
+ }
+
+ ret = optionBrowser2.GetClickedOption();
+
+ switch (ret)
+ {
+ case 0:
+ if (!strcmp("", Settings.unlockCode))
+ {
+ Settings.godmode = !Settings.godmode;
+ break;
+ }
+ else if ( Settings.godmode == 0 ) {
+ //password check to unlock Install,Delete and Format
+ w.Remove(&optionBrowser2);
+ w.Remove(&backBtn);
+ char entered[20] = "";
+ int result = OnScreenKeyboard(entered, 20,0);
+ w.Append(&optionBrowser2);
+ w.Append(&backBtn);
+ if ( result == 1 ) {
+ if (!strcmp(entered, Settings.unlockCode)) //if password correct
+ {
+ if (Settings.godmode == 0) {
+ WindowPrompt(LANGUAGE.CorrectPassword,LANGUAGE.InstallRenameandDeleteareunlocked,LANGUAGE.ok,0,0,0);
+ Settings.godmode = 1;
+ __Menu_GetEntries();
+ menu = MENU_DISCLIST;
+ }
+ } else {
+ WindowPrompt(LANGUAGE.WrongPassword,LANGUAGE.USBLoaderisprotected,LANGUAGE.ok,0,0,0);
+ }
+ }
+ } else {
+ int choice = WindowPrompt (LANGUAGE.LockConsole,LANGUAGE.Areyousure,LANGUAGE.Yes,LANGUAGE.No,0,0);
+ if(choice == 1) {
+ WindowPrompt(LANGUAGE.ConsoleLocked,LANGUAGE.USBLoaderisprotected,LANGUAGE.ok,0,0,0);
+ Settings.godmode = 0;
+ __Menu_GetEntries();
+ menu = MENU_DISCLIST;
+ }
+ }
+ break;
+ case 1:// Modify Password
+ if ( Settings.godmode == 1)
+ {
+ w.Remove(&optionBrowser2);
+ w.Remove(&backBtn);
+ char entered[20] = "";
+ strncpy(entered, Settings.unlockCode, sizeof(entered));
+ int result = OnScreenKeyboard(entered, 20,0);
+ w.Append(&optionBrowser2);
+ w.Append(&backBtn);
+ if ( result == 1 ) {
+ strncpy(Settings.unlockCode, entered, sizeof(Settings.unlockCode));
+ WindowPrompt(LANGUAGE.PasswordChanged,LANGUAGE.Passwordhasbeenchanged,LANGUAGE.ok,0,0,0);
+ }
+ } else {
+ WindowPrompt(LANGUAGE.Passwordchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
+ }
+ break;
+ case 2:
+ if(Settings.godmode)
+ Settings.parentalcontrol++;
+ break;
+ }
+ }
+ optionBrowser2.SetEffect(EFFECT_FADE, -20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
+ titleTxt.SetText(LANGUAGE.settings);
+ slidedirection = FADE;
+ pageToDisplay = 1;
+ MainButton3.ResetState();
+ break;
+ }
+
+ if(MainButton4.GetState() == STATE_CLICKED) {
+ MainButton1.SetEffect(EFFECT_FADE, -20);
+ MainButton2.SetEffect(EFFECT_FADE, -20);
+ MainButton3.SetEffect(EFFECT_FADE, -20);
+ MainButton4.SetEffect(EFFECT_FADE, -20);
+ while(MainButton4.GetEffect() > 0) usleep(50);
+ HaltGui();
+ w.Remove(&PageIndicatorBtn1);
+ w.Remove(&PageIndicatorBtn2);
+ w.Remove(&GoRightBtn);
+ w.Remove(&GoLeftBtn);
+ w.Remove(&MainButton1);
+ w.Remove(&MainButton2);
+ w.Remove(&MainButton3);
+ w.Remove(&MainButton4);
+ titleTxt.SetText(LANGUAGE.Sound);
+ exit = false;
+ options2.SetName(0, "%s",LANGUAGE.Backgroundmusic);
+ options2.SetName(1, "%s",LANGUAGE.Volume);
+ options2.SetName(2, "%s",LANGUAGE.SFXVolume);
+ options2.SetName(3, NULL);
+ options2.SetName(4, NULL);
+ options2.SetName(5, NULL);
+ options2.SetName(6, NULL);
+ options2.SetName(7, NULL);
+ options2.SetName(8, NULL);
+ for(int i = 0; i < 9; i++) options2.SetValue(i, NULL);
+ w.Append(&optionBrowser2);
+ optionBrowser2.SetClickable(true);
+ ResumeGui();
+
+ VIDEO_WaitVSync ();
+ optionBrowser2.SetEffect(EFFECT_FADE, 20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
+
+ char * oggfile;
+ oggfile = strrchr(Settings.ogg_path, '/')+1;
+
+ while(!exit)
+ {
+ VIDEO_WaitVSync ();
+
+ if(!strcmp("notset", Settings.ogg_path) || !strcmp("",Settings.oggload_path))
+ options2.SetValue(0, "%s", LANGUAGE.Standard);
+ else {
+ options2.SetValue(0, "%s", oggfile);
+ }
+
+ if(Settings.volume > 0)
+ options2.SetValue(1,"%i", Settings.volume);
+ else
+ options2.SetValue(1,"%s", LANGUAGE.OFF);
+ if(Settings.sfxvolume > 0)
+ options2.SetValue(2,"%i", Settings.sfxvolume);
+ else
+ options2.SetValue(2,"%s", LANGUAGE.OFF);
+
+ if(backBtn.GetState() == STATE_CLICKED)
+ {
+ backBtn.ResetState();
+ exit = true;
+ break;
+ }
+
+ if(shutdown == 1)
+ Sys_Shutdown();
+ else if(reset == 1)
+ Sys_Reboot();
+
+ else if(homo.GetState() == STATE_CLICKED)
+ {
+ cfg_save_global();
+ optionBrowser2.SetState(STATE_DISABLED);
+ s32 thetimeofbg = bgMusic->GetPlayTime();
+ bgMusic->Stop();
+ choice = WindowExitPrompt(LANGUAGE.ExitUSBISOLoader,0, LANGUAGE.BacktoLoader,LANGUAGE.WiiMenu,LANGUAGE.Back,0);
+ if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path))
+ {
+ bgMusic->Play();
+ } else {
+ bgMusic->PlayOggFile(Settings.ogg_path);
+ }
+ bgMusic->SetPlayTime(thetimeofbg);
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ if(choice == 3) {
+ Sys_LoadMenu(); // Back to System Menu
+ } else if (choice == 2) {
+ Sys_BackToLoader();
+ } else {
+ homo.ResetState();
+ }
+ optionBrowser2.SetState(STATE_DEFAULT);
+ }
+
+ ret = optionBrowser2.GetClickedOption();
+
+ switch (ret)
+ {
+ case 0:
+ if(isSdInserted())
+ {
+ w.SetEffect(EFFECT_FADE, -20);
+ while(w.GetEffect()>0) usleep(50);
+ mainWindow->Remove(&w);
+ bool returnhere = true;
+ while(returnhere)
+ returnhere = MenuOGG();
+ HaltGui();
+ mainWindow->Append(&w);
+ w.SetEffect(EFFECT_FADE, 20);
+ ResumeGui();
+ while(w.GetEffect()>0) usleep(50);
+ }
+ else
+ WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtousethatoption, LANGUAGE.ok, 0,0,0);
+ break;
+ case 1:
+ Settings.volume += 10;
+ if(Settings.volume > 100)
+ Settings.volume = 0;
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ break;
+ case 2:
+ Settings.sfxvolume += 10;
+ if(Settings.sfxvolume > 100)
+ Settings.sfxvolume = 0;
+ btnSoundOver.SetVolume(Settings.sfxvolume);
+ btnClick.SetVolume(Settings.sfxvolume);
+ btnClick1.SetVolume(Settings.sfxvolume);
+ break;
+ }
+ }
+ optionBrowser2.SetEffect(EFFECT_FADE, -20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
+ titleTxt.SetText(LANGUAGE.settings);
+ slidedirection = FADE;
+ pageToDisplay = 1;
+ MainButton4.ResetState();
+ break;
+ }
}
- if (pageToDisplay == 3)
+
+ if ( pageToDisplay == 2)
{
+ if(MainButton1.GetState() == STATE_CLICKED) {
+ MainButton1.SetEffect(EFFECT_FADE, -20);
+ MainButton2.SetEffect(EFFECT_FADE, -20);
+ MainButton3.SetEffect(EFFECT_FADE, -20);
+ MainButton4.SetEffect(EFFECT_FADE, -20);
+ while(MainButton1.GetEffect() > 0) usleep(50);
+ HaltGui();
+ w.Remove(&PageIndicatorBtn1);
+ w.Remove(&PageIndicatorBtn2);
+ w.Remove(&GoRightBtn);
+ w.Remove(&GoLeftBtn);
+ w.Remove(&MainButton1);
+ w.Remove(&MainButton2);
+ w.Remove(&MainButton3);
+ w.Remove(&MainButton4);
+ titleTxt.SetText(LANGUAGE.Custompaths);
+ exit = false;
+ if(Settings.godmode)
+ options2.SetName(0, "%s", LANGUAGE.CoverPath);
+ options2.SetName(1, "%s", LANGUAGE.DiscimagePath);
+ options2.SetName(2, "%s", LANGUAGE.ThemePath);
+ options2.SetName(3, "%s", LANGUAGE.Titlestxtpath);
+ options2.SetName(4, "%s", LANGUAGE.Updatepath);
+ options2.SetName(5, NULL);
+ options2.SetName(6, NULL);
+ options2.SetName(7, NULL);
+ options2.SetName(8, NULL);
+ for(int i = 0; i < 9; i++) options2.SetValue(i, NULL);
+ w.Append(&optionBrowser2);
+ optionBrowser2.SetClickable(true);
+ ResumeGui();
- if ( Settings.keyset >= settings_keyset_max)
- Settings.keyset = 0;
- if ( Settings.unicodefix > 2 )
- Settings.unicodefix = 0;
- if ( Settings.wiilight > 2 )
- Settings.wiilight = 0;
- if ( Settings.patchcountrystrings > 1)
- Settings.patchcountrystrings = 0;
+ VIDEO_WaitVSync ();
+ optionBrowser2.SetEffect(EFFECT_FADE, 20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
- options2.SetValue(0, "%s", Settings.titlestxt_path);
+ if(Settings.godmode) {
- options2.SetValue(1, "%s", Settings.language_path);
+ while(!exit)
+ {
+ VIDEO_WaitVSync ();
- if (Settings.keyset == us) options2.SetValue(2,"QWERTY");
- else if (Settings.keyset == dvorak) options2.SetValue(2,"DVORAK");
- else if (Settings.keyset == euro) options2.SetValue(2,"QWERTZ");
- else if (Settings.keyset == azerty) options2.SetValue(2,"AZERTY");
+ options2.SetValue(0, "%s", Settings.covers_path);
+ options2.SetValue(1, "%s", Settings.disc_path);
+ options2.SetValue(2, "%s", CFG.theme_path);
+ options2.SetValue(3, "%s", Settings.titlestxt_path);
+ options2.SetValue(4, "%s", Settings.update_path);
- if (Settings.unicodefix == 0) options2.SetValue(3,"%s",LANGUAGE.OFF);
- else if (Settings.unicodefix == 1) options2.SetValue(3,"%s",LANGUAGE.TChinese);
- else if (Settings.unicodefix == 2) options2.SetValue(3,"%s",LANGUAGE.SChinese);
+ if(backBtn.GetState() == STATE_CLICKED)
+ {
+ backBtn.ResetState();
+ exit = true;
+ break;
+ }
- if(!strcmp("notset", Settings.ogg_path) || !strcmp("",Settings.oggload_path))
- options2.SetValue(4, "%s", LANGUAGE.Standard);
- else
- options2.SetValue(4, "%s", Settings.ogg_path);
+ if(shutdown == 1)
+ Sys_Shutdown();
+ else if(reset == 1)
+ Sys_Reboot();
- if (Settings.wiilight == 0) options2.SetValue(5,"%s",LANGUAGE.OFF);
- else if (Settings.wiilight == 1) options2.SetValue(5,"%s",LANGUAGE.ON);
- else if (Settings.wiilight == 2) options2.SetValue(5,"%s",LANGUAGE.OnlyInstall);
+ else if(homo.GetState() == STATE_CLICKED)
+ {
+ cfg_save_global();
+ optionBrowser2.SetState(STATE_DISABLED);
+ s32 thetimeofbg = bgMusic->GetPlayTime();
+ bgMusic->Stop();
+ choice = WindowExitPrompt(LANGUAGE.ExitUSBISOLoader,0, LANGUAGE.BacktoLoader,LANGUAGE.WiiMenu,LANGUAGE.Back,0);
+ if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path))
+ {
+ bgMusic->Play();
+ } else {
+ bgMusic->PlayOggFile(Settings.ogg_path);
+ }
+ bgMusic->SetPlayTime(thetimeofbg);
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ if(choice == 3) {
+ Sys_LoadMenu(); // Back to System Menu
+ } else if (choice == 2) {
+ Sys_BackToLoader();
+ } else {
+ homo.ResetState();
+ }
+ optionBrowser2.SetState(STATE_DEFAULT);
+ }
- options2.SetValue(6, "%s", Settings.update_path);
+ ret = optionBrowser2.GetClickedOption();
- if (Settings.patchcountrystrings == 0) options2.SetValue(7,"%s",LANGUAGE.OFF);
- else if (Settings.patchcountrystrings == 1) options2.SetValue(7,"%s",LANGUAGE.ON);
+ switch (ret)
+ {
+ case 0:
+ if ( Settings.godmode == 1)
+ {
+ w.Remove(&optionBrowser2);
+ w.Remove(&backBtn);
+ char entered[43] = "";
+ strncpy(entered, Settings.covers_path, sizeof(entered));
+ int result = OnScreenKeyboard(entered,43,4);
+ w.Append(&optionBrowser2);
+ w.Append(&backBtn);
+ if ( result == 1 )
+ {
+ int len = (strlen(entered)-1);
+ if(entered[len] !='/')
+ strncat (entered, "/", 1);
+ strncpy(Settings.covers_path, entered, sizeof(Settings.covers_path));
+ WindowPrompt(LANGUAGE.CoverpathChanged,0,LANGUAGE.ok,0,0,0);
+ if(!isSdInserted()) {
+ WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
+ }
+ }
+ } else {
+ WindowPrompt(LANGUAGE.Coverpathchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
+ }
+ break;
+ case 1:
+ if ( Settings.godmode == 1)
+ {
+ w.Remove(&optionBrowser2);
+ w.Remove(&backBtn);
+ char entered[43] = "";
+ strncpy(entered, Settings.disc_path, sizeof(entered));
+ int result = OnScreenKeyboard(entered, 43,4);
+ w.Append(&optionBrowser2);
+ w.Append(&backBtn);
+ if ( result == 1 )
+ {
+ int len = (strlen(entered)-1);
+ if(entered[len] !='/')
+ strncat (entered, "/", 1);
+ strncpy(Settings.disc_path, entered, sizeof(Settings.disc_path));
+ WindowPrompt(LANGUAGE.DiscpathChanged,0,LANGUAGE.ok,0,0,0);
+ if(!isSdInserted()) {
+ WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
+ }
+ }
+ } else {
+ WindowPrompt(LANGUAGE.Discpathchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
+ }
+ break;
+ case 2:
+ if ( Settings.godmode == 1)
+ {
+ w.Remove(&optionBrowser2);
+ w.Remove(&backBtn);
+ char entered[43] = "";
+ strncpy(entered, CFG.theme_path, sizeof(entered));
+ int result = OnScreenKeyboard(entered, 43,4);
+ HaltGui();
+ w.RemoveAll();
+ if ( result == 1 )
+ {
+ int len = (strlen(entered)-1);
+ if(entered[len] !='/')
+ strncat (entered, "/", 1);
+ strncpy(CFG.theme_path, entered, sizeof(CFG.theme_path));
+ WindowPrompt(LANGUAGE.ThemepathChanged,0,LANGUAGE.ok,0,0,0);
+ if(!isSdInserted()) {
+ WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
+ } else {
+ cfg_save_global();
+ }
+ mainWindow->Remove(bgImg);
+ CFG_Load();
+ CFG_LoadGlobal();
+ menu = MENU_SETTINGS;
+ #ifdef HW_RVL
+ snprintf(imgPath, sizeof(imgPath), "%splayer1_point.png", CFG.theme_path);
+ pointer[0] = new GuiImageData(imgPath, player1_point_png);
+ snprintf(imgPath, sizeof(imgPath), "%splayer2_point.png", CFG.theme_path);
+ pointer[1] = new GuiImageData(imgPath, player2_point_png);
+ snprintf(imgPath, sizeof(imgPath), "%splayer3_point.png", CFG.theme_path);
+ pointer[2] = new GuiImageData(imgPath, player3_point_png);
+ snprintf(imgPath, sizeof(imgPath), "%splayer4_point.png", CFG.theme_path);
+ pointer[3] = new GuiImageData(imgPath, player4_point_png);
+ #endif
+ if (CFG.widescreen)
+ snprintf(imgPath, sizeof(imgPath), "%swbackground.png", CFG.theme_path);
+ else
+ snprintf(imgPath, sizeof(imgPath), "%sbackground.png", CFG.theme_path);
- options2.SetValue(8, " ");
+ background = new GuiImageData(imgPath, CFG.widescreen? wbackground_png : background_png);
- ret = optionBrowser2.GetClickedOption();
+ bgImg = new GuiImage(background);
+ mainWindow->Append(bgImg);
+ mainWindow->Append(&w);
+ }
+ w.Append(&settingsbackground);
+ w.Append(&titleTxt);
+ w.Append(&backBtn);
+ w.Append(&optionBrowser2);
+ ResumeGui();
+ } else {
+ WindowPrompt(LANGUAGE.Themepathchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
+ }
+ break;
+ }
+ }
+ /** If not godmode don't let him inside **/
+ } else {
+ WindowPrompt(LANGUAGE.ConsoleLocked, LANGUAGE.UnlockConsoletousethisOption, LANGUAGE.ok, 0, 0, 0);
+ }
+ optionBrowser2.SetEffect(EFFECT_FADE, -20);
+ while(optionBrowser2.GetEffect() > 0) usleep(50);
+ titleTxt.SetText(LANGUAGE.settings);
+ slidedirection = FADE;
+ pageToDisplay = 2;
+ MainButton1.ResetState();
+ break;
+ }
- switch(ret)
- {
- case 0:
- if ( Settings.godmode == 1)
- {
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- char entered[43] = "";
- strncpy(entered, Settings.titlestxt_path, sizeof(entered));
- int result = OnScreenKeyboard(entered,43,4);
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- if ( result == 1 )
- {
- int len = (strlen(entered)-1);
- if(entered[len] !='/')
- strncat (entered, "/", 1);
- strncpy(Settings.titlestxt_path, entered, sizeof(Settings.titlestxt_path));
- WindowPrompt(LANGUAGE.TitlestxtpathChanged,0,LANGUAGE.ok,0,0,0);
- if(isSdInserted()) {
- cfg_save_global();
- CFG_Load();
- } else {
- WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
- }
- }
- }
- else
- {
- WindowPrompt(LANGUAGE.Titlestxtpathchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
- }
- break;
- case 1: // language file path
- if ( Settings.godmode == 1)
- {
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- char entered[40] = "";
- strncpy(entered, Settings.language_path, sizeof(entered));
- int result = OnScreenKeyboard(entered, 40,0);
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- if ( result == 1 )
- { strncpy(Settings.language_path, entered, sizeof(Settings.language_path));
- if(isSdInserted()) {
- cfg_save_global();
- if(!checkfile(Settings.language_path)) {
- WindowPrompt(LANGUAGE.Filenotfound,LANGUAGE.Loadingstandardlanguage,LANGUAGE.ok,0,0,0);
- }
- lang_default();
- CFG_Load();
- menu = MENU_SETTINGS;
- pageToDisplay = 0;
- } else {
- WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
- }
- }
- }
- else
- {
- WindowPrompt(LANGUAGE.Langchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
- }
- break;
- case 2:
- Settings.keyset++;
- break;
- case 3:
- Settings.unicodefix++;
- break;
- case 4:
- if(isSdInserted())
- {
- menu = MENU_OGG;
- pageToDisplay = 0;
- }
- else
- WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtousethatoption, LANGUAGE.ok, 0,0,0);
- break;
- case 5:
- Settings.wiilight++;
- break;
- case 7:
- Settings.patchcountrystrings++;
- break;
- case 6:
- if ( Settings.godmode == 1)
- {
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- char entered[43] = "";
- strncpy(entered, Settings.update_path, sizeof(entered));
- int result = OnScreenKeyboard(entered,43,4);
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- if ( result == 1 )
- {
- int len = (strlen(entered)-1);
- if(entered[len] !='/')
- strncat (entered, "/", 1);
- strncpy(Settings.update_path, entered, sizeof(Settings.update_path));
- WindowPrompt(LANGUAGE.Updatepathchanged,0,LANGUAGE.ok,0,0,0);
- }
- }
- else
- WindowPrompt(0,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
- break;
- case 8:
- int choice = WindowPrompt(LANGUAGE.Areyousure, 0, LANGUAGE.Yes, LANGUAGE.Cancel, 0, 0);
- if(choice == 1)
- {
+ if(MainButton2.GetState() == STATE_CLICKED) {
+ MainButton1.SetEffect(EFFECT_FADE, -20);
+ MainButton2.SetEffect(EFFECT_FADE, -20);
+ MainButton3.SetEffect(EFFECT_FADE, -20);
+ MainButton4.SetEffect(EFFECT_FADE, -20);
+ while(MainButton2.GetEffect() > 0) usleep(50);
+ w.Remove(&PageIndicatorBtn1);
+ w.Remove(&PageIndicatorBtn2);
+ w.Remove(&GoRightBtn);
+ w.Remove(&GoLeftBtn);
+ w.Remove(&MainButton1);
+ w.Remove(&MainButton2);
+ w.Remove(&MainButton3);
+ w.Remove(&MainButton4);
+ if(isSdInserted() && Settings.godmode) {
+ w.Remove(&optionBrowser2);
+ w.Remove(&backBtn);
+ int ret = ProgressUpdateWindow();
+ if(ret < 0) {
+ WindowPrompt(LANGUAGE.Updatefailed,0,LANGUAGE.ok,0,0,0);
+ }
+ w.Append(&optionBrowser2);
+ w.Append(&backBtn);
+ } else {
+ WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtousethatoption, LANGUAGE.ok, 0,0,0);
+ }
+ slidedirection = FADE;
+ pageToDisplay = 2;
+ MainButton2.ResetState();
+ break;
+ }
+
+ if(MainButton3.GetState() == STATE_CLICKED) {
+ MainButton1.SetEffect(EFFECT_FADE, -20);
+ MainButton2.SetEffect(EFFECT_FADE, -20);
+ MainButton3.SetEffect(EFFECT_FADE, -20);
+ MainButton4.SetEffect(EFFECT_FADE, -20);
+ while(MainButton3.GetEffect() > 0) usleep(50);
+ w.Remove(&PageIndicatorBtn1);
+ w.Remove(&PageIndicatorBtn2);
+ w.Remove(&GoRightBtn);
+ w.Remove(&GoLeftBtn);
+ w.Remove(&MainButton1);
+ w.Remove(&MainButton2);
+ w.Remove(&MainButton3);
+ w.Remove(&MainButton4);
+ w.Remove(&backBtn);
+ w.Remove(&optionBrowser2);
+ if(Settings.godmode) {
+ int choice = WindowPrompt(LANGUAGE.Areyousure, 0, LANGUAGE.Yes, LANGUAGE.Cancel, 0, 0);
+ if(choice == 1) {
if(isSdInserted())
remove("SD:/config/GXGlobal.cfg");
lang_default();
CFG_Load();
menu = MENU_SETTINGS;
pageToDisplay = 0;
- }
- break;
- }
+ }
+ } else {
+ WindowPrompt(LANGUAGE.ConsoleLocked, LANGUAGE.UnlockConsoletousethisOption, LANGUAGE.ok, 0, 0, 0);
+ }
+ w.Append(&backBtn);
+ w.Append(&optionBrowser2);
+ slidedirection = FADE;
+ pageToDisplay = 2;
+ MainButton3.ResetState();
+ break;
+ }
+
+ if(MainButton4.GetState() == STATE_CLICKED) {
+ MainButton1.SetEffect(EFFECT_FADE, -20);
+ MainButton2.SetEffect(EFFECT_FADE, -20);
+ MainButton3.SetEffect(EFFECT_FADE, -20);
+ MainButton4.SetEffect(EFFECT_FADE, -20);
+ while(MainButton4.GetEffect() > 0) usleep(50);
+ w.Remove(&PageIndicatorBtn1);
+ w.Remove(&PageIndicatorBtn2);
+ w.Remove(&GoRightBtn);
+ w.Remove(&GoLeftBtn);
+ w.Remove(&MainButton1);
+ w.Remove(&MainButton2);
+ w.Remove(&MainButton3);
+ w.Remove(&MainButton4);
+ WindowCredits();
+ slidedirection = FADE;
+ pageToDisplay = 2;
+ MainButton4.ResetState();
+ break;
+ }
}
if(shutdown == 1)
@@ -846,33 +1413,6 @@ int MenuSettings()
if(reset == 1)
Sys_Reboot();
- if(page1Btn.GetState() == STATE_CLICKED)
- {
- pageToDisplay = 1;
- page1Btn.ResetState();
- tabBtn.SetImage(&tab1Img);
- menu = MENU_NONE;
- break;
- }
-
- if(page2Btn.GetState() == STATE_CLICKED)
- {
- pageToDisplay = 2;
- menu = MENU_NONE;
- page2Btn.ResetState();
- tabBtn.SetImage(&tab2Img);
- break;
- }
-
- if(page3Btn.GetState() == STATE_CLICKED)
- {
- pageToDisplay = 3;
- menu = MENU_NONE;
- page3Btn.ResetState();
- tabBtn.SetImage(&tab3Img);
- break;
- }
-
if(backBtn.GetState() == STATE_CLICKED)
{
//Add the procedure call to save the global configuration
@@ -884,124 +1424,50 @@ int MenuSettings()
break;
}
- if(updateBtn.GetState() == STATE_CLICKED) {
- if(isSdInserted() && Settings.godmode) {
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&btnLogo);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- int ret = ProgressUpdateWindow();
- if(ret < 0) {
- WindowPrompt(LANGUAGE.Updatefailed,0,LANGUAGE.ok,0,0,0);
- }
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- w.Append(&btnLogo);
- } else {
- WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtousethatoption, LANGUAGE.ok, 0,0,0);
- }
- updateBtn.ResetState();
- }
-
- if(btnLogo.GetState() == STATE_CLICKED) {
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&btnLogo);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- WindowCredits();
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- w.Append(&btnLogo);
- btnLogo.ResetState();
- }
-
- if(lockBtn.GetState() == STATE_CLICKED)
+ if(GoLeftBtn.GetState() == STATE_CLICKED)
{
- if (!strcmp("", Settings.unlockCode))
- {
- Settings.godmode = !Settings.godmode;
- }
- else if ( Settings.godmode == 0 )
- {
- //password check to unlock Install,Delete and Format
- mainWindow->Remove(&optionBrowser2);
- mainWindow->Remove(&page1Btn);
- mainWindow->Remove(&page2Btn);
- mainWindow->Remove(&tabBtn);
- mainWindow->Remove(&page3Btn);
- w.Remove(&backBtn);
- w.Remove(&lockBtn);
- w.Remove(&updateBtn);
- char entered[20] = "";
- int result = OnScreenKeyboard(entered, 20,0);
- mainWindow->Append(&optionBrowser2);
- mainWindow->Append(&tabBtn);
- mainWindow->Append(&page1Btn);
- mainWindow->Append(&page2Btn);
- mainWindow->Append(&page3Btn);
- w.Append(&backBtn);
- w.Append(&lockBtn);
- w.Append(&updateBtn);
- mainWindow->Append(&tabBtn);
- if ( result == 1 ) {
- if (!strcmp(entered, Settings.unlockCode)) //if password correct
- {
- if (Settings.godmode == 0) {
- WindowPrompt(LANGUAGE.CorrectPassword,LANGUAGE.InstallRenameandDeleteareunlocked,LANGUAGE.ok,0,0,0);
- Settings.godmode = 1;
- __Menu_GetEntries();
- menu = MENU_DISCLIST;
- }
- }
- else
- {
- WindowPrompt(LANGUAGE.WrongPassword,LANGUAGE.USBLoaderisprotected,LANGUAGE.ok,0,0,0);
- }
- }
- }
- else
- {
- int choice = WindowPrompt (LANGUAGE.LockConsole,LANGUAGE.Areyousure,LANGUAGE.Yes,LANGUAGE.No,0,0);
- if(choice == 1) {
- WindowPrompt(LANGUAGE.ConsoleLocked,LANGUAGE.USBLoaderisprotected,LANGUAGE.ok,0,0,0);
- Settings.godmode = 0;
- __Menu_GetEntries();
- menu = MENU_DISCLIST;
- }
- }
- if ( Settings.godmode == 1)
- {
- lockBtnTxt.SetText(LANGUAGE.Lock);
- }
- else
- {
- lockBtnTxt.SetText(LANGUAGE.Unlock);
- }
- lockBtn.ResetState();
+ pageToDisplay--;
+ /** Change direction of the flying buttons **/
+ if(pageToDisplay < 1)
+ pageToDisplay = 2;
+ slidedirection = LEFT;
+ GoLeftBtn.ResetState();
+ break;
}
- else if(homo.GetState() == STATE_CLICKED)
+
+ if(GoRightBtn.GetState() == STATE_CLICKED)
+ {
+ pageToDisplay++;
+ /** Change direction of the flying buttons **/
+ if(pageToDisplay > 2)
+ pageToDisplay = 1;
+ slidedirection = RIGHT;
+ GoRightBtn.ResetState();
+ break;
+ }
+
+ if(PageIndicatorBtn1.GetState() == STATE_CLICKED)
+ {
+ if(pageToDisplay == 2) {
+ slidedirection = LEFT;
+ pageToDisplay = 1;
+ PageIndicatorBtn1.ResetState();
+ break;
+ }
+ PageIndicatorBtn1.ResetState();
+ }
+ else if(PageIndicatorBtn2.GetState() == STATE_CLICKED)
+ {
+ if(pageToDisplay == 1) {
+ slidedirection = RIGHT;
+ pageToDisplay = 2;
+ PageIndicatorBtn2.ResetState();
+ break;
+ } else
+ PageIndicatorBtn2.ResetState();
+ }
+
+ if(homo.GetState() == STATE_CLICKED)
{
cfg_save_global();
optionBrowser2.SetState(STATE_DISABLED);
@@ -1011,41 +1477,28 @@ int MenuSettings()
if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path))
{
bgMusic->Play();
- }
- else
- {
+ } else {
bgMusic->PlayOggFile(Settings.ogg_path);
}
bgMusic->SetPlayTime(thetimeofbg);
- SetVolumeOgg(255*(vol/100.0));
+ SetVolumeOgg(255*(Settings.volume/100.0));
if(choice == 3)
{
Sys_LoadMenu(); // Back to System Menu
- }
- else if (choice == 2)
- {
+ } else if (choice == 2) {
Sys_BackToLoader();
- }
- else
- {
+ } else {
homo.ResetState();
}
- }
- if(Settings.godmode) {
- updateBtn.SetVisible(true);
- updateBtn.SetClickable(true);
- } else {
- updateBtn.SetVisible(false);
- updateBtn.SetClickable(false);
- }
- if(settingsbackgroundbtn.GetState() == STATE_CLICKED)
- {
- optionBrowser2.SetFocus(1);
- break;
+ optionBrowser2.SetState(STATE_DEFAULT);
}
}
}
+
+ w.SetEffect(EFFECT_FADE, -20);
+ while(w.GetEffect()>0) usleep(50);
+
HaltGui();
mainWindow->RemoveAll();
mainWindow->Append(bgImg);
@@ -1074,17 +1527,18 @@ int GameSettings(struct discHdr * header)
strncat(gameName, "...", 3);
}
- customOptionList options3(7);
+ customOptionList options3(8);
options3.SetName(0,"%s", LANGUAGE.VideoMode);
options3.SetName(1,"%s", LANGUAGE.VIDTVPatch);
options3.SetName(2,"%s", LANGUAGE.Language);
options3.SetName(3, "Ocarina");
options3.SetName(4, "IOS");
options3.SetName(5,"%s", LANGUAGE.Parentalcontrol);
- options3.SetName(6,"%s", LANGUAGE.Defaultgamesettings);
+ options3.SetName(6,"%s", "Error 002 fix");
+ options3.SetName(7,"%s", LANGUAGE.Defaultgamesettings);
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[100];
@@ -1153,11 +1607,9 @@ int GameSettings(struct discHdr * header)
w.Append(&deleteBtn);
w.Append(&saveBtn);
w.Append(&cancelBtn);
+ w.Append(&optionBrowser3);
mainWindow->Append(&w);
- mainWindow->Append(&optionBrowser3);
-
- ResumeGui();
struct Game_CFG* game_cfg = CFG_get_game_opt(header->id);
@@ -1169,6 +1621,7 @@ int GameSettings(struct discHdr * header)
viChoice = game_cfg->vipatch;
iosChoice = game_cfg->ios;
parentalcontrolChoice = game_cfg->parentalcontrol;
+ fix002 = game_cfg->errorfix002;
}
else
{
@@ -1182,8 +1635,11 @@ int GameSettings(struct discHdr * header)
iosChoice = i249;
}
parentalcontrolChoice = 0;
+ fix002 = off;
}
+ ResumeGui();
+
while(!exit)
{
@@ -1222,13 +1678,15 @@ int GameSettings(struct discHdr * header)
else if (parentalcontrolChoice == 2) options3.SetValue(5,"2");
else if (parentalcontrolChoice == 3) options3.SetValue(5,"3 (Mature)");
+ if (fix002 == on) options3.SetValue(6,LANGUAGE.ON);
+ else if (fix002 == off) options3.SetValue(6,LANGUAGE.OFF);
if(shutdown == 1)
Sys_Shutdown();
if(reset == 1)
Sys_Reboot();
- options3.SetValue(6, " ");
+ options3.SetValue(7, NULL);
ret = optionBrowser3.GetClickedOption();
@@ -1253,12 +1711,16 @@ int GameSettings(struct discHdr * header)
parentalcontrolChoice = (parentalcontrolChoice + 1) % 4;
break;
case 6:
+ fix002 = (fix002+1) % 2;
+ break;
+ case 7:
int choice = WindowPrompt(LANGUAGE.Areyousure,0,LANGUAGE.Yes,LANGUAGE.Cancel,0,0);
if(choice == 1) {
videoChoice = discdefault;
viChoice = off;
languageChoice = ConsoleLangDefault;
ocarinaChoice = off;
+ fix002 = off;
if(Settings.cios == ios222) {
iosChoice = i222;
} else {
@@ -1333,7 +1795,6 @@ int GameSettings(struct discHdr * header)
}
HaltGui();
- mainWindow->Remove(&optionBrowser3);
mainWindow->Remove(&w);
ResumeGui();
diff --git a/source/SettingsPrompts.cpp b/source/SettingsPrompts.cpp
new file mode 100644
index 00000000..e374b723
--- /dev/null
+++ b/source/SettingsPrompts.cpp
@@ -0,0 +1,512 @@
+#include
+#include
+#include
+
+#include "filelist.h"
+#include "sys.h"
+#include "language.h"
+#include "libwiigui/gui.h"
+#include "libwiigui/gui_customoptionbrowser.h"
+#include "listfiles.h"
+#include "cfg.h"
+#include "main.h"
+#include "PromptWindows.h"
+#include "fatmounter.h"
+
+
+/*** Extern variables ***/
+extern GuiWindow * mainWindow;
+extern GuiSound * bgMusic;
+extern u8 shutdown;
+extern u8 reset;
+
+/*** Extern functions ***/
+extern void ResumeGui();
+extern void HaltGui();
+
+
+/****************************************************************************
+ * MenuOGG
+ ***************************************************************************/
+bool MenuOGG()
+{
+ int cnt = 0;
+ int ret = 0, choice = 0;
+ int scrollon, nothingchanged = 0;
+ bool returnhere = false;
+
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
+
+ char imgPath[100];
+
+ snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
+ GuiImageData btnOutline(imgPath, button_dialogue_box_png);
+ snprintf(imgPath, sizeof(imgPath), "%ssettings_background.png", CFG.theme_path);
+ GuiImageData settingsbg(imgPath, settings_background_png);
+
+ GuiTrigger trigA;
+ trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
+ GuiTrigger trigB;
+ trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
+ GuiTrigger trigMinus;
+ trigMinus.SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0);
+ GuiTrigger trigPlus;
+ trigPlus.SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0);
+
+ char fullpath[150];
+ char shortpath[35];
+ int countoggs = GetAllDirFiles(Settings.oggload_path);
+
+ if(!strcmp("", Settings.oggload_path)) {
+ sprintf(shortpath, "%s", LANGUAGE.Standard);
+ } else {
+ sprintf(shortpath, "%s", Settings.oggload_path);
+ }
+
+ GuiText titleTxt(shortpath, 24, (GXColor){0, 0, 0, 255});
+ titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
+ titleTxt.SetPosition(0,0);
+ GuiButton pathBtn(300, 50);
+ pathBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ pathBtn.SetPosition(0,28);
+ pathBtn.SetLabel(&titleTxt);
+ pathBtn.SetSoundOver(&btnSoundOver);
+ pathBtn.SetSoundClick(&btnClick);
+ pathBtn.SetTrigger(&trigA);
+ pathBtn.SetEffectGrow();
+
+ GuiImage oggmenubackground(&settingsbg);
+ oggmenubackground.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
+ oggmenubackground.SetPosition(0, 0);
+
+ GuiText backBtnTxt(LANGUAGE.Back , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
+ backBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
+ GuiImage backBtnImg(&btnOutline);
+ if (Settings.wsprompt == yes){
+ backBtnTxt.SetWidescreen(CFG.widescreen);
+ backBtnImg.SetWidescreen(CFG.widescreen);
+ }
+ GuiButton backBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
+ backBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ backBtn.SetPosition(-180, 400);
+ backBtn.SetLabel(&backBtnTxt);
+ backBtn.SetImage(&backBtnImg);
+ backBtn.SetSoundOver(&btnSoundOver);
+ backBtn.SetSoundClick(&btnClick);
+ backBtn.SetTrigger(&trigA);
+ backBtn.SetTrigger(&trigB);
+ backBtn.SetEffectGrow();
+
+ GuiText defaultBtnTxt(LANGUAGE.Default , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
+ defaultBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
+ GuiImage defaultBtnImg(&btnOutline);
+ if (Settings.wsprompt == yes){
+ defaultBtnTxt.SetWidescreen(CFG.widescreen);
+ defaultBtnImg.SetWidescreen(CFG.widescreen);
+ }
+ GuiButton defaultBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
+ defaultBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ defaultBtn.SetPosition(180, 400);
+ defaultBtn.SetLabel(&defaultBtnTxt);
+ defaultBtn.SetImage(&defaultBtnImg);
+ defaultBtn.SetSoundOver(&btnSoundOver);
+ defaultBtn.SetSoundClick(&btnClick);
+ defaultBtn.SetTrigger(&trigA);
+ defaultBtn.SetEffectGrow();
+
+ customOptionList options2(countoggs);
+
+ for (cnt = 0; cnt < countoggs; cnt++) {
+ options2.SetValue(cnt, "%s", GetFileName(cnt));
+ options2.SetName(cnt,"%i.", cnt+1);
+ }
+
+ if(cnt < 9) {
+ scrollon = 0;
+ } else {
+ scrollon = 1;
+ }
+
+ GuiCustomOptionBrowser optionBrowser4(396, 280, &options2, CFG.theme_path, "bg_options_settings.png", bg_options_settings_png, scrollon, 10);
+ optionBrowser4.SetPosition(0, 90);
+ optionBrowser4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+
+ snprintf(imgPath, sizeof(imgPath), "%smp3_stop.png", CFG.theme_path);
+ GuiImageData stop(imgPath, mp3_stop_png);
+ snprintf(imgPath, sizeof(imgPath), "%sstartgame_arrow_right.png", CFG.theme_path);
+ GuiImageData play(imgPath, startgame_arrow_right_png);
+
+ GuiImage playBtnImg(&play);
+ playBtnImg.SetWidescreen(CFG.widescreen);
+ GuiButton playBtn(play.GetWidth(), play.GetHeight());
+ playBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ playBtn.SetPosition(50, 400);
+ playBtn.SetImage(&playBtnImg);
+ playBtn.SetSoundOver(&btnSoundOver);
+ playBtn.SetSoundClick(&btnClick);
+ playBtn.SetTrigger(&trigA);
+ playBtn.SetTrigger(&trigPlus);
+ playBtn.SetEffectGrow();
+
+ GuiImage stopBtnImg(&stop);
+ stopBtnImg.SetWidescreen(CFG.widescreen);
+ GuiButton stopBtn(stop.GetWidth(), stop.GetHeight());
+ stopBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ stopBtn.SetPosition(-15, 400);
+ stopBtn.SetImage(&stopBtnImg);
+ stopBtn.SetSoundOver(&btnSoundOver);
+ stopBtn.SetSoundClick(&btnClick);
+ stopBtn.SetTrigger(&trigA);
+ stopBtn.SetTrigger(&trigMinus);
+ stopBtn.SetEffectGrow();
+
+ HaltGui();
+ GuiWindow w(screenwidth, screenheight);
+ w.Append(&oggmenubackground);
+ w.Append(&pathBtn);
+ w.Append(&backBtn);
+ w.Append(&playBtn);
+ w.Append(&stopBtn);
+ w.Append(&defaultBtn);
+ w.Append(&optionBrowser4);
+ mainWindow->Append(&w);
+
+ w.SetEffect(EFFECT_FADE, 20);
+ ResumeGui();
+
+ while(w.GetEffect()>0) usleep(50);
+
+ while(!returnhere)
+ {
+
+ if (backBtn.GetState() == STATE_CLICKED) {
+ if(nothingchanged == 1 && countoggs > 0) {
+ if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
+ bgMusic->Play();
+ } else {
+ bgMusic->PlayOggFile(Settings.ogg_path);
+ }
+ }
+ break;
+ }
+
+ if (defaultBtn.GetState() == STATE_CLICKED) {
+ choice = WindowPrompt(LANGUAGE.Loadingstandardmusic,0,LANGUAGE.ok, LANGUAGE.Cancel,0,0);
+ if (choice == 1) {
+ sprintf(Settings.ogg_path, "notset");
+ bgMusic->Play();
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ cfg_save_global();
+ }
+ defaultBtn.ResetState();
+ optionBrowser4.SetFocus(1);
+ }
+
+ if (pathBtn.GetState() == STATE_CLICKED) {
+ w.Remove(&optionBrowser4);
+ w.Remove(&backBtn);
+ w.Remove(&pathBtn);
+ w.Remove(&playBtn);
+ w.Remove(&stopBtn);
+ w.Remove(&defaultBtn);
+ char entered[43] = "";
+ strncpy(entered, Settings.oggload_path, sizeof(entered));
+ int result = OnScreenKeyboard(entered,43,0);
+ w.Append(&optionBrowser4);
+ w.Append(&pathBtn);
+ w.Append(&backBtn);
+ w.Append(&playBtn);
+ w.Append(&stopBtn);
+ w.Append(&defaultBtn);
+ if ( result == 1 ) {
+ int len = (strlen(entered)-1);
+ if(entered[len] !='/')
+ strncat (entered, "/", 1);
+ strncpy(Settings.oggload_path, entered, sizeof(Settings.oggload_path));
+ WindowPrompt(LANGUAGE.Backgroundmusicpath,0,LANGUAGE.ok,0,0,0);
+ if(isSdInserted()) {
+ if(!strcmp("", Settings.oggload_path)) {
+ sprintf(Settings.ogg_path, "notset");
+ bgMusic->Play();
+ }
+ cfg_save_global();
+ returnhere = true;
+ break;
+ } else {
+ WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
+ }
+ }
+ if(countoggs > 0) {
+ optionBrowser4.SetFocus(1);
+ }
+ pathBtn.ResetState();
+ }
+
+ ret = optionBrowser4.GetClickedOption();
+
+ if(ret>=0) {
+ choice = WindowPrompt(LANGUAGE.Setasbackgroundmusic,GetFileName(ret),LANGUAGE.Yes,LANGUAGE.No,0,0);
+ if(choice == 1) {
+ snprintf(fullpath,150,"%s%s",Settings.oggload_path,GetFileName(ret));
+ choice = bgMusic->PlayOggFile(fullpath);
+ if(choice < 0) {
+ WindowPrompt(LANGUAGE.Notasupportedformat, LANGUAGE.Loadingstandardmusic, LANGUAGE.ok, 0,0,0);
+ sprintf(Settings.ogg_path, "notset");
+ bgMusic->Play();
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ } else {
+ snprintf(Settings.ogg_path, sizeof(Settings.ogg_path), "%s", fullpath);
+ cfg_save_global();
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ nothingchanged = 0;
+ }
+ }
+ optionBrowser4.SetFocus(1);
+ }
+
+ if (playBtn.GetState() == STATE_CLICKED && countoggs > 0) {
+ if(countoggs > 0) {
+ ret = optionBrowser4.GetSelectedOption();
+ snprintf(fullpath, 150,"%s%s", Settings.oggload_path,GetFileName(ret));
+ choice = bgMusic->PlayOggFile(fullpath);
+ if(choice < 0) {
+ WindowPrompt(LANGUAGE.Notasupportedformat, LANGUAGE.Loadingstandardmusic, LANGUAGE.ok, 0,0,0);
+ if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
+ bgMusic->Play();
+ } else {
+ bgMusic->PlayOggFile(Settings.ogg_path);
+ }
+ }
+ SetVolumeOgg(255*(Settings.volume/100.0));
+ nothingchanged = 1;
+ optionBrowser4.SetFocus(1);
+ }
+ playBtn.ResetState();
+ }
+
+ if(stopBtn.GetState() == STATE_CLICKED) {
+ if(countoggs > 0) {
+ StopOgg();
+ nothingchanged = 1;
+ optionBrowser4.SetFocus(1);
+ }
+ stopBtn.ResetState();
+ }
+ }
+
+ w.SetEffect(EFFECT_FADE, -20);
+ while(w.GetEffect()>0) usleep(50);
+
+ HaltGui();
+ mainWindow->Remove(&w);
+ ResumeGui();
+
+ return returnhere;
+}
+
+/****************************************************************************
+ * MenuLanguageSelect
+ ***************************************************************************/
+int MenuLanguageSelect()
+{
+ int cnt = 0;
+ int ret = 0, choice = 0;
+ int scrollon;
+ int returnhere = 0;
+
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
+
+ char imgPath[100];
+
+ snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
+ GuiImageData btnOutline(imgPath, button_dialogue_box_png);
+ snprintf(imgPath, sizeof(imgPath), "%ssettings_background.png", CFG.theme_path);
+ GuiImageData settingsbg(imgPath, settings_background_png);
+
+ GuiTrigger trigA;
+ trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
+ GuiTrigger trigB;
+ trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
+
+ char fullpath[100];
+ int countfiles = GetAllDirFiles(Settings.languagefiles_path);
+
+ if(!strcmp("", Settings.languagefiles_path)) {
+ sprintf(fullpath, "%s", LANGUAGE.Standard);
+ } else {
+ sprintf(fullpath, "%s", Settings.languagefiles_path);
+ }
+
+ GuiText titleTxt(fullpath, 24, (GXColor){0, 0, 0, 255});
+ titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
+ titleTxt.SetPosition(0,0);
+ GuiButton pathBtn(300, 50);
+ pathBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ pathBtn.SetPosition(0,28);
+ pathBtn.SetLabel(&titleTxt);
+ pathBtn.SetSoundOver(&btnSoundOver);
+ pathBtn.SetSoundClick(&btnClick);
+ pathBtn.SetTrigger(&trigA);
+ pathBtn.SetEffectGrow();
+
+ GuiImage oggmenubackground(&settingsbg);
+ oggmenubackground.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
+ oggmenubackground.SetPosition(0, 0);
+
+ GuiText backBtnTxt(LANGUAGE.Back , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
+ backBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
+ GuiImage backBtnImg(&btnOutline);
+ if (Settings.wsprompt == yes){
+ backBtnTxt.SetWidescreen(CFG.widescreen);
+ backBtnImg.SetWidescreen(CFG.widescreen);
+ }
+ GuiButton backBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
+ backBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ backBtn.SetPosition(-180, 400);
+ backBtn.SetLabel(&backBtnTxt);
+ backBtn.SetImage(&backBtnImg);
+ backBtn.SetSoundOver(&btnSoundOver);
+ backBtn.SetSoundClick(&btnClick);
+ backBtn.SetTrigger(&trigA);
+ backBtn.SetTrigger(&trigB);
+ backBtn.SetEffectGrow();
+
+ GuiText defaultBtnTxt(LANGUAGE.Default , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
+ defaultBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
+ GuiImage defaultBtnImg(&btnOutline);
+ if (Settings.wsprompt == yes) {
+ defaultBtnTxt.SetWidescreen(CFG.widescreen);
+ defaultBtnImg.SetWidescreen(CFG.widescreen);
+ }
+ GuiButton defaultBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
+ defaultBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ defaultBtn.SetPosition(180, 400);
+ defaultBtn.SetLabel(&defaultBtnTxt);
+ defaultBtn.SetImage(&defaultBtnImg);
+ defaultBtn.SetSoundOver(&btnSoundOver);
+ defaultBtn.SetSoundClick(&btnClick);
+ defaultBtn.SetTrigger(&trigA);
+ defaultBtn.SetEffectGrow();
+
+ customOptionList options2(countfiles);
+
+ for (cnt = 0; cnt < countfiles; cnt++) {
+ options2.SetName(cnt, "%s", GetFileName(cnt));
+ options2.SetValue(cnt, NULL);
+ }
+
+ if(cnt < 9) {
+ scrollon = 0;
+ } else {
+ scrollon = 1;
+ }
+
+ GuiCustomOptionBrowser optionBrowser4(396, 280, &options2, CFG.theme_path, "bg_options_settings.png", bg_options_settings_png, scrollon, 10);
+ optionBrowser4.SetPosition(0, 90);
+ optionBrowser4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+
+ HaltGui();
+ GuiWindow w(screenwidth, screenheight);
+ w.Append(&oggmenubackground);
+ w.Append(&pathBtn);
+ w.Append(&backBtn);
+ w.Append(&defaultBtn);
+ w.Append(&optionBrowser4);
+ mainWindow->Append(&w);
+
+ w.SetEffect(EFFECT_FADE, 20);
+ ResumeGui();
+
+ while(w.GetEffect()>0) usleep(50);
+
+ while(!returnhere)
+ {
+
+ if (backBtn.GetState() == STATE_CLICKED) {
+
+ backBtn.ResetState();
+ break;
+ }
+
+ if (defaultBtn.GetState() == STATE_CLICKED) {
+ choice = WindowPrompt(LANGUAGE.Loadingstandardlanguage,0,LANGUAGE.ok, LANGUAGE.Cancel,0,0);
+ if (choice == 1) {
+ sprintf(Settings.language_path, "notset");
+ cfg_save_global();
+ lang_default();
+ CFG_Load();
+ returnhere = 2;
+ }
+ defaultBtn.ResetState();
+ optionBrowser4.SetFocus(1);
+ }
+
+ if (pathBtn.GetState() == STATE_CLICKED) {
+ w.Remove(&optionBrowser4);
+ w.Remove(&backBtn);
+ w.Remove(&pathBtn);
+ w.Remove(&defaultBtn);
+ char entered[43] = "";
+ strncpy(entered, Settings.languagefiles_path, sizeof(entered));
+ int result = OnScreenKeyboard(entered,43,0);
+ w.Append(&optionBrowser4);
+ w.Append(&pathBtn);
+ w.Append(&backBtn);
+ w.Append(&defaultBtn);
+ if ( result == 1 ) {
+ int len = (strlen(entered)-1);
+ if(entered[len] !='/')
+ strncat (entered, "/", 1);
+ strncpy(Settings.languagefiles_path, entered, sizeof(Settings.languagefiles_path));
+ WindowPrompt(LANGUAGE.Languagepathchanged,0,LANGUAGE.ok,0,0,0);
+ if(isSdInserted()) {
+ cfg_save_global();
+ returnhere = 1;
+ break;
+ } else {
+ WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
+ }
+ }
+ if(countfiles > 0) {
+ optionBrowser4.SetFocus(1);
+ }
+ pathBtn.ResetState();
+ }
+
+ ret = optionBrowser4.GetClickedOption();
+
+ if(ret>=0) {
+ choice = WindowPrompt(LANGUAGE.Doyouwanttochangelanguage, 0, LANGUAGE.Yes, LANGUAGE.Cancel,0,0);
+ if(choice == 1) {
+ if(isSdInserted()) {
+ snprintf(Settings.language_path, sizeof(Settings.language_path), "%s%s", Settings.languagefiles_path, GetFileName(ret));
+ cfg_save_global();
+ if(!checkfile(Settings.language_path)) {
+ sprintf(Settings.language_path, "notset");
+ WindowPrompt(LANGUAGE.Filenotfound,LANGUAGE.Loadingstandardlanguage,LANGUAGE.ok,0,0,0);
+ }
+ lang_default();
+ CFG_Load();
+ returnhere = 2;
+ break;
+ } else {
+ WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
+ }
+ }
+ optionBrowser4.SetFocus(1);
+ }
+
+ }
+
+ w.SetEffect(EFFECT_FADE, -20);
+ while(w.GetEffect()>0) usleep(50);
+
+ HaltGui();
+ mainWindow->Remove(&w);
+ ResumeGui();
+
+ return returnhere;
+}
+
diff --git a/source/SettingsPrompts.h b/source/SettingsPrompts.h
new file mode 100644
index 00000000..69ec697c
--- /dev/null
+++ b/source/SettingsPrompts.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ * SettingsPrompts
+ * USB Loader GX 2009
+ *
+ * SettingsPrompts.h
+ ***************************************************************************/
+
+#ifndef _SETTINGSPROMPTS_H_
+#define _SETTINGSPROMPTS_H_
+
+bool MenuOGG();
+int MenuLanguageSelect();
+
+#endif
diff --git a/source/apploader.c b/source/apploader.c
index fa44369f..3d95c9cd 100644
--- a/source/apploader.c
+++ b/source/apploader.c
@@ -218,7 +218,7 @@ bool Search_and_patch_Video_Modes(void *Address, u32 Size, GXRModeObj* Table[])
return found;
}
-s32 Apploader_Run(entry_point *entry, u8 cheat, u8 videoSelected, u8 vipatch, u8 patchcountrystring)
+s32 Apploader_Run(entry_point *entry, u8 cheat, u8 videoSelected, u8 vipatch, u8 patchcountrystring, u8 error002fix)
{
app_entry appldr_entry;
app_init appldr_init;
@@ -250,8 +250,10 @@ s32 Apploader_Run(entry_point *entry, u8 cheat, u8 videoSelected, u8 vipatch, u8
/* Initialize apploader */
appldr_init(__noprint);
+ if(error002fix) {
/* ERROR 002 fix (thanks to WiiPower for sharing this)*/
- *(u32 *)0x80003140 = *(u32 *)0x80003188;
+ *(u32 *)0x80003140 = *(u32 *)0x80003188;
+ }
if (cheat)
{
diff --git a/source/apploader.h b/source/apploader.h
index c1d75c00..6123ad71 100644
--- a/source/apploader.h
+++ b/source/apploader.h
@@ -5,6 +5,6 @@
typedef void (*entry_point)(void);
/* Prototypes */
-s32 Apploader_Run(entry_point *, u8, u8, u8, u8);
+s32 Apploader_Run(entry_point *, u8, u8, u8, u8, u8);
#endif
diff --git a/source/cfg.c b/source/cfg.c
index c9200b8a..1e1b61c2 100644
--- a/source/cfg.c
+++ b/source/cfg.c
@@ -29,6 +29,7 @@ u8 languageChoice = 0;
u8 viChoice = 0;
u8 iosChoice = 0;
u8 parentalcontrolChoice = 0;
+u8 fix002 = 0;
u8 xflip = 0;
u8 sort = 0;
u8 fave = 0;
@@ -232,6 +233,7 @@ void CFG_Default(int widescreen) // -1 = non forced Mode
snprintf(Settings.titlestxt_path, sizeof(Settings.titlestxt_path), "SD:/config/");//default path for disc images
snprintf(Settings.unlockCode, sizeof(Settings.unlockCode), "ab121b"); // default password
snprintf(Settings.language_path, sizeof(Settings.language_path), "SD:/config/language/");
+ snprintf(Settings.languagefiles_path, sizeof(Settings.languagefiles_path), "SD:/config/language/");
snprintf(Settings.oggload_path, sizeof(Settings.oggload_path), "SD:/config/backgroundmusic/");
snprintf(Settings.update_path, sizeof(Settings.update_path), "SD:/apps/usbloader_gx/");
sprintf(Settings.ogg_path, "notset");
@@ -335,7 +337,8 @@ void Global_Default(void)
{
Settings.sinfo = ((Settings.sinfo == GameID) ? Both : GameRegion);
}
- Settings.volume = v80;
+ Settings.volume = 80;
+ Settings.sfxvolume = 80;
Settings.tooltips = TooltipsOn;
snprintf(Settings.unlockCode, sizeof(Settings.unlockCode), "ab121b");
Settings.parentalcontrol = 0;
@@ -480,6 +483,10 @@ void path_set(char *name, char *val)
strcopy(Settings.language_path, val, sizeof(Settings.language_path));
return;
}
+ if (strcmp(name, "languagefiles_path") == 0) {
+ strcopy(Settings.languagefiles_path, val, sizeof(Settings.languagefiles_path));
+ return;
+ }
if (strcmp(name, "update_path") == 0) {
strcopy(Settings.update_path, val, sizeof(Settings.update_path));
return;
@@ -888,6 +895,13 @@ void global_cfg_set(char *name, char *val)
}
return;
}
+ else if (strcmp(name, "sfxvolume") == 0) {
+ int i;
+ if (sscanf(val, "%d", &i) == 1) {
+ Settings.sfxvolume = i;
+ }
+ return;
+ }
else if (strcmp(name, "tooltips") == 0) {
int i;
if (sscanf(val, "%d", &i) == 1) {
@@ -1104,6 +1118,7 @@ void cfg_set_game_opt(struct Game_CFG *game, u8 *id)
game->vipatch = viChoice;
game->ios = iosChoice;
game->parentalcontrol = parentalcontrolChoice;
+ game->errorfix002 = fix002;
}
struct Game_NUM* cfg_get_game_num(u8 *id)
@@ -1154,6 +1169,7 @@ bool cfg_save_global()// save global settings
fprintf(f, "sinfo = %d\n ", Settings.sinfo);
fprintf(f, "rumble = %d\n ", Settings.rumble);
fprintf(f, "volume = %d\n ", Settings.volume);
+ fprintf(f, "sfxvolume = %d\n ", Settings.sfxvolume);
fprintf(f, "tooltips = %d\n ", Settings.tooltips);
fprintf(f, "password = %s\n ", Settings.unlockCode);
fprintf(f, "sort = %d\n ", Settings.sort);
@@ -1173,6 +1189,7 @@ bool cfg_save_global()// save global settings
}
fprintf(f, "disc_path = %s\n ", Settings.disc_path);
fprintf(f, "language_path = %s\n ", Settings.language_path);
+ fprintf(f, "languagefiles_path = %s\n ", Settings.languagefiles_path);
fprintf(f, "oggload_path = %s\n ", Settings.oggload_path);
fprintf(f, "titlestxt_path = %s\n ", Settings.titlestxt_path);
if(!strcmp("", Settings.unlockCode)) {
@@ -1247,6 +1264,11 @@ void game_set(char *name, char *val)
game->parentalcontrol = opt_c;
}
}
+ if (strcmp("errorfix002", opt_name) == 0) {
+ if (sscanf(opt_val, "%hd", &opt_c) == 1) {
+ game->errorfix002 = opt_c;
+ }
+ }
}
// next opt
@@ -1383,7 +1405,8 @@ bool cfg_save_games()
fprintf(f, "ocarina:%d; ", cfg_game[i].ocarina);
fprintf(f, "vipatch:%d; ", cfg_game[i].vipatch);
fprintf(f, "ios:%d;", cfg_game[i].ios);
- fprintf(f, "pctrl:%d;\n", cfg_game[i].parentalcontrol);
+ fprintf(f, "pctrl:%d;", cfg_game[i].parentalcontrol);
+ fprintf(f, "errorfix002:%d;\n", cfg_game[i].errorfix002);
}
fprintf(f, "# END\n");
fclose(f);
@@ -1438,7 +1461,8 @@ bool cfg_load_global()
{
Settings.sinfo = ((Settings.sinfo == GameID) ? Both : GameRegion);
}
- Settings.volume = v80;
+ Settings.volume = 80;
+ Settings.sfxvolume = 80;
return cfg_parsefile("SD:/config/GXGlobal.cfg", &global_cfg_set);
}
diff --git a/source/cfg.h b/source/cfg.h
index c6834c85..4fb3385e 100644
--- a/source/cfg.h
+++ b/source/cfg.h
@@ -152,6 +152,7 @@ extern u8 viChoice;
extern u8 iosChoice;
extern u8 faveChoice;
extern u8 parentalcontrolChoice;
+extern u8 fix002;
extern u8 xflip;
extern u8 qboot;
extern u8 sort;
@@ -169,6 +170,7 @@ struct Game_CFG
u8 vipatch;
u8 ios;
u8 parentalcontrol;
+ u8 errorfix002;
};
struct Game_NUM
{
@@ -201,7 +203,6 @@ enum {
schin,
tchin,
kor,
-
settings_language_max // always the last entry
};
@@ -263,21 +264,6 @@ enum {
settings_tooltips_max // always the last entry
};
-enum {
- v10=0,
- v20,
- v30,
- v40,
- v50,
- v60,
- v70,
- v80,
- v90,
- v100,
- v0,
- settings_volume_max // always the last entry
-};
-
enum {
no=0,
yes,
@@ -297,11 +283,11 @@ enum {
list,
grid,
carousel,
+ settings_display_max
};
enum {
scrollDefault,
scrollMarquee,
-
settings_scrolleffect_max // always the last entry
};
struct SSettings {
@@ -315,6 +301,7 @@ struct SSettings {
int rumble;
int xflip;
int volume;
+ int sfxvolume;
int tooltips;
char unlockCode[20];
int parentalcontrol;
@@ -335,6 +322,7 @@ struct SSettings {
char disc_path[100];
char titlestxt_path[100];
char language_path[100];
+ char languagefiles_path[100];
char oggload_path[100];
char ogg_path[150];
char update_path[150];
diff --git a/source/disc.c b/source/disc.c
index 527017c0..6f83df56 100644
--- a/source/disc.c
+++ b/source/disc.c
@@ -248,7 +248,7 @@ s32 Disc_IsWii(void)
return 0;
}
-s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 patchcountrystring)
+s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 patchcountrystring, u8 error002fix)
{
entry_point p_entry;
@@ -260,7 +260,7 @@ s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 pa
return ret;
/* Run apploader */
- ret = Apploader_Run(&p_entry, cheat, videoselected, vipatch, patchcountrystring);
+ ret = Apploader_Run(&p_entry, cheat, videoselected, vipatch, patchcountrystring, error002fix);
if (ret < 0)
return ret;
@@ -295,7 +295,7 @@ s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 pa
return 0;
}
-s32 Disc_WiiBoot(u8 videoselected, u8 cheat, u8 vipatch, u8 patchcountrystring)
+s32 Disc_WiiBoot(u8 videoselected, u8 cheat, u8 vipatch, u8 patchcountrystring, u8 error002fix)
{
u64 offset;
s32 ret;
@@ -306,7 +306,7 @@ s32 Disc_WiiBoot(u8 videoselected, u8 cheat, u8 vipatch, u8 patchcountrystring)
return ret;
/* Boot partition */
- return Disc_BootPartition(offset, videoselected, cheat, vipatch, patchcountrystring);
+ return Disc_BootPartition(offset, videoselected, cheat, vipatch, patchcountrystring, error002fix);
}
void PatchCountryStrings(void *Address, int Size)
diff --git a/source/disc.h b/source/disc.h
index f52e1e71..d7d3f82c 100644
--- a/source/disc.h
+++ b/source/disc.h
@@ -46,8 +46,8 @@ void __Disc_SetLowMem(void);
s32 Disc_SetUSB(u8 *, int ios222);
s32 Disc_ReadHeader(void *);
s32 Disc_IsWii(void);
-s32 Disc_BootPartition(u64, u8, u8, u8, u8);
-s32 Disc_WiiBoot(u8, u8, u8, u8);
+s32 Disc_BootPartition(u64, u8, u8, u8, u8, u8);
+s32 Disc_WiiBoot(u8, u8, u8, u8, u8);
void PatchCountryStrings(void *Address, int Size);
#ifdef __cplusplus
diff --git a/source/filelist.h b/source/filelist.h
index 127eab67..b3351505 100644
--- a/source/filelist.h
+++ b/source/filelist.h
@@ -38,15 +38,6 @@ extern const u32 menuin_ogg_size;
extern const u8 menuout_ogg[];
extern const u32 menuout_ogg_size;
-extern const u8 tab_bg1_png[];
-extern const u32 tab_bg1_png_size;
-
-extern const u8 tab_bg2_png[];
-extern const u32 tab_bg2_png_size;
-
-extern const u8 tab_bg3_png[];
-extern const u32 tab_bg3_png_size;
-
extern const u8 credits_button_png[];
extern const u32 credits_button_png_size;
@@ -290,7 +281,13 @@ extern const u32 arrangeList_gray_png_size;
extern const u8 arrangeCarousel_gray_png[];
extern const u32 arrangeCarousel_gray_png_size;
-extern const u8 updateRev_png[];
-extern const u32 updateRev_png_size;
+extern const u8 settings_title_png[];
+extern const u32 settings_title_png_size;
+
+extern const u8 settings_title_over_png[];
+extern const u32 settings_title_over_png_size;
+
+extern const u8 pageindicator_png[];
+extern const u32 pageindicator_png_size;
#endif
diff --git a/source/images/tab_bg1.png b/source/images/tab_bg1.png
deleted file mode 100644
index fd738f65f4b795ce7b1b1c043a6679e865cb15a9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 3467
zcmbVP_dgVl<34Ada~wyub5M^vX0;Pu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XkkEh%D#$#|k1dVR;Asa`&3#L4eAD%D$x(q`^V*zd5azXR#%
zdX8GY8}mWc-ucUgEfr+pI;Crynviy@9DwNN3U%uIDS}8BnA?hLky@eJC1h_#!Nyk?
zA+%qftk`)9Bx^mwZh$L)jp+A@9US|CPYK{gyoXS+r-C5DNckqKr-#$7k0X;tLeR%(
zY6F0RW5DyX{7cbgB$hlj{=0zqpj7O5UaB*zv@3|8lKI9YCG(6N=x;1dC%G5KGg%QK
zKbGdFV9c2Mkhnuu4PEe!J^p0V9rG1ZHkcb&rSP_XnnF);%no;A8?;R32}=EHYRxLB
z^&>C4coaTqqzaDY;^K;q4iC@qWFcmON~`7H|429ICZU3-1WF~SW)4fB=ZDE|-k3AW
z`6DowM|1`IGP({x#i5%5;^b-TSO52&)N6^_11sl$<3wxBer8J8;5*uaVdHOR*|-o0*{n~<3GK#{n}v?1^>+v
z$$zX7!Zrb`w;!u6H_k)3iuE)&wYA~4Hjf|U(xkT~NcK3~;Ho_kI5p_;x7L4;E>BK-
zMBT6=b*l-shr_g4_BD4f7dl(HM?|P?sa{Q)1-_cyYc(>
z?j@m8&f}LJ=Pib>@(i=W@Hj0My#$^>5rOq|mW20;=zSibJKn*F@$>Dchk>o#^h}i8&_bEOavh$Z7!q)?(vyD#fNfD^^T*ShG&%on*X##Igz!>_!dc1ssQ?O0+F=2cacddfP@M|VtA
z{n03mc4V~%I35qR&&kOFkS(V5bIL3;RtB}oG@Jz}bUZ%&2-taA!O)l@{qDWZ-3KMF
z=o%kd28xlwCeZB{`Z^=nP%aG&D(>vk0bDIsJ!y79#lV4PlTXXKYH4lw-zGlqR8i4ySUG_4bIya{Ez;15kOztNUK`IKI(rG
C_epO6
diff --git a/source/images/updateRev.png b/source/images/updateRev.png
deleted file mode 100644
index d5e67e2dd9e9761238fb8ec350ed32f980f5ceee..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 6097
zcmV;?7cS_DP)KLZ*U+IBfRsybQWXdwQbLP>6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!U_kFtEE}$>!FkcfPd(n`Rd
z(ZE5ynBrLT&zt8tX__(~j|sz&X0v(19~a$YISVdV*2`}5xeFsksZF(w(Gb~kAI&Q>
zT%@z=?MsGmUAJnnE?VvLC}~xr@XM@L6-9ye0!$s3EIw};N^1kubb2B|lu_$>9{*p<
zW0qwhm0~cj4R;rnTImw5(GkR)E*Bif`Hcf!bT0tgvY1LGvG~w%@d?0I*?Wyeaq3f+
zYORd;F9TwcXG=gOb!k&t7H-Dt5ZubD5xWD=%%!6;WG+NQ5;_7llLA{pV6SP{pWVx(-DVUIN&Li{ckZ=02=
zbQ$o(yvcX=?MBqqQ))V`fR*yHw9XaFh#jCtxTAN10|Q
zEjhy}7a@m6h4svW;u9m(4;S_xF#197#|6B40`M4k2e|&P;j4evR@2(Lny@JctQSMp
z+=z!0$?hm2vwg*N)ZU;UPOaJ97cHtT(Q|b=wA-Moat-@J+ModCv4H9Fxy;GiWLK2F4Ok4VZo4
znYmtCa=HL0F+yDaT8ramfMa9nJHU?&&9%*1hiC3d7baf@lA8V32K0r&{M+{L2md<&
XZmL**lTDT000000NkvXXu0mjfbUdM6
diff --git a/source/language.c b/source/language.c
index b6375cf3..d92a53eb 100644
--- a/source/language.c
+++ b/source/language.c
@@ -57,6 +57,7 @@ snprintf(LANGUAGE.Continueinstallgame, sizeof(LANGUAGE.Continueinstallgame), "Co
snprintf(LANGUAGE.ConsoleDefault, sizeof(LANGUAGE.ConsoleDefault), "Console Default");
snprintf(LANGUAGE.Consoleshouldbeunlockedtomodifyit, sizeof(LANGUAGE.Consoleshouldbeunlockedtomodifyit), "Console should be unlocked to modify it.");
snprintf(LANGUAGE.ConsoleLocked, sizeof(LANGUAGE.ConsoleLocked), "Console Locked");
+snprintf(LANGUAGE.Controllevel, sizeof(LANGUAGE.Controllevel), "Controllevel");
snprintf(LANGUAGE.CorrectPassword, sizeof(LANGUAGE.CorrectPassword), "Correct Password");
snprintf(LANGUAGE.Couldnotinitializenetwork, sizeof(LANGUAGE.Couldnotinitializenetwork), "Could not initialize network!");
snprintf(LANGUAGE.CouldnotopenDisc, sizeof(LANGUAGE.CouldnotopenDisc), "Could not open Disc");
@@ -67,6 +68,7 @@ snprintf(LANGUAGE.CoverpathChanged, sizeof(LANGUAGE.CoverpathChanged), "Coverpat
snprintf(LANGUAGE.Coverpathchange, sizeof(LANGUAGE.Coverpathchange), "Coverpath change");
snprintf(LANGUAGE.count, sizeof(LANGUAGE.count), "Play Count");
snprintf(LANGUAGE.Credits, sizeof(LANGUAGE.Credits), "Credits");
+snprintf(LANGUAGE.Custompaths, sizeof(LANGUAGE.Custompaths), "Custom Paths");
snprintf(LANGUAGE.DiscImages, sizeof(LANGUAGE.DiscImages), "Disc Images");
snprintf(LANGUAGE.DiscimagePath, sizeof(LANGUAGE.DiscimagePath), "Discimage Path");
snprintf(LANGUAGE.DiscpathChanged, sizeof(LANGUAGE.DiscpathChanged), "Discpath Changed");
@@ -77,11 +79,13 @@ snprintf(LANGUAGE.Doyouwanttoformat, sizeof(LANGUAGE.Doyouwanttoformat), "Do you
snprintf(LANGUAGE.Doyoureallywanttodelete, sizeof(LANGUAGE.Doyoureallywanttodelete), "Do you really want to delete:");
snprintf(LANGUAGE.Doyouwanttoretryfor30secs, sizeof(LANGUAGE.Doyouwanttoretryfor30secs), "Do you want to retry for 30 secs?");
snprintf(LANGUAGE.Doyouwanttoupdate, sizeof(LANGUAGE.Doyouwanttoupdate), "How do you want to update?");
+snprintf(LANGUAGE.Doyouwanttochangelanguage, sizeof(LANGUAGE.Doyouwanttochangelanguage), "Do you want to change language?");
snprintf(LANGUAGE.Downloadingfile, sizeof(LANGUAGE.Downloadingfile), "Downloading file");
snprintf(LANGUAGE.DownloadBoxartimage, sizeof(LANGUAGE.DownloadBoxartimage), "Download Boxart image?");
snprintf(LANGUAGE.Downloadfinished, sizeof(LANGUAGE.Downloadfinished), "Download finished");
snprintf(LANGUAGE.Defaultgamesettings, sizeof(LANGUAGE.Defaultgamesettings), "Default Gamesettings");
snprintf(LANGUAGE.Defaultsettings, sizeof(LANGUAGE.Defaultsettings), "Default Settings");
+snprintf(LANGUAGE.Default, sizeof(LANGUAGE.Default), "Default");
snprintf(LANGUAGE.Error, sizeof(LANGUAGE.Error), "Error !");
snprintf(LANGUAGE.hour, sizeof(LANGUAGE.hour), "Hour");
snprintf(LANGUAGE.Homemenu, sizeof(LANGUAGE.Homemenu), "HOME Menu");
@@ -122,8 +126,11 @@ snprintf(LANGUAGE.Gameisalreadyinstalled, sizeof(LANGUAGE.Gameisalreadyinstalled
snprintf(LANGUAGE.GameRegion, sizeof(LANGUAGE.GameRegion), "Game Region");
snprintf(LANGUAGE.GameSize, sizeof(LANGUAGE.GameSize), "Game Size");
snprintf(LANGUAGE.GoBack, sizeof(LANGUAGE.GoBack), "Go Back");
+snprintf(LANGUAGE.GUISettings, sizeof(LANGUAGE.GUISettings), "GUI Settings");
+snprintf(LANGUAGE.Gameload, sizeof(LANGUAGE.Gameload), "Game Load");
snprintf(LANGUAGE.HowtoShutdown, sizeof(LANGUAGE.HowtoShutdown), "How to Shutdown?");
snprintf(LANGUAGE.Language, sizeof(LANGUAGE.Language), "Game Language");
+snprintf(LANGUAGE.Languagepathchanged, sizeof(LANGUAGE.Languagepathchanged), "Languagepath changed.");
snprintf(LANGUAGE.Left, sizeof(LANGUAGE.Left), "Left");
snprintf(LANGUAGE.LikeSysMenu, sizeof(LANGUAGE.LikeSysMenu), "Like SysMenu");
snprintf(LANGUAGE.LoadingincIOS, sizeof(LANGUAGE.LoadingincIOS), "Loading in cIOS249");
@@ -157,7 +164,7 @@ snprintf(LANGUAGE.OFF, sizeof(LANGUAGE.OFF), "OFF");
snprintf(LANGUAGE.OfficialSite, sizeof(LANGUAGE.OfficialSite), "Official Site");
snprintf(LANGUAGE.ON, sizeof(LANGUAGE.ON), "ON");
snprintf(LANGUAGE.OnlyInstall, sizeof(LANGUAGE.OnlyInstall), "Only for Install");
-snprintf(LANGUAGE.Parentalcontrol, sizeof(LANGUAGE.Parentalcontrol), "Parental control");
+snprintf(LANGUAGE.Parentalcontrol, sizeof(LANGUAGE.Parentalcontrol), "Parental Control");
snprintf(LANGUAGE.Partition, sizeof(LANGUAGE.Partition), "Partition");
snprintf(LANGUAGE.Password, sizeof(LANGUAGE.Password), "Password");
snprintf(LANGUAGE.PasswordChanged, sizeof(LANGUAGE.PasswordChanged), "Password Changed");
@@ -188,6 +195,7 @@ snprintf(LANGUAGE.Specialthanksto, sizeof(LANGUAGE.Specialthanksto), "Special th
snprintf(LANGUAGE.youwanttoformat, sizeof(LANGUAGE.youwanttoformat), "you want to format");
snprintf(LANGUAGE.Standard, sizeof(LANGUAGE.Standard), "Standard");
snprintf(LANGUAGE.settings, sizeof(LANGUAGE.settings), "Settings");
+snprintf(LANGUAGE.Sound, sizeof(LANGUAGE.Sound), "Sound");
snprintf(LANGUAGE.ShutdowntoIdle, sizeof(LANGUAGE.ShutdowntoIdle), "Shutdown to Idle");
snprintf(LANGUAGE.ShutdownSystem, sizeof(LANGUAGE.ShutdownSystem), "Shutdown System");
snprintf(LANGUAGE.Success, sizeof(LANGUAGE.Success), "Success:");
@@ -207,6 +215,7 @@ snprintf(LANGUAGE.Tooltips, sizeof(LANGUAGE.Tooltips), "Tooltips");
snprintf(LANGUAGE.Timeleft, sizeof(LANGUAGE.Timeleft), "Time left:");
snprintf(LANGUAGE.updating, sizeof(LANGUAGE.updating), "Updating");
snprintf(LANGUAGE.Unlock, sizeof(LANGUAGE.Unlock), "Unlock");
+snprintf(LANGUAGE.UnlockConsoletousethisOption, sizeof(LANGUAGE.UnlockConsoletousethisOption), "Unlock console to use this option.");
snprintf(LANGUAGE.Unicodefix, sizeof(LANGUAGE.Unicodefix), "Unicode Fix");
snprintf(LANGUAGE.Uninstall, sizeof(LANGUAGE.Uninstall), "Uninstall");
snprintf(LANGUAGE.Updatepath, sizeof(LANGUAGE.Updatepath), "Updatepath");
@@ -215,11 +224,13 @@ snprintf(LANGUAGE.Updatefailed, sizeof(LANGUAGE.Updatefailed), "Update failed");
snprintf(LANGUAGE.Updatedol, sizeof(LANGUAGE.Updatedol), "Update DOL");
snprintf(LANGUAGE.Updateall, sizeof(LANGUAGE.Updateall), "Update All");
snprintf(LANGUAGE.Updateto, sizeof(LANGUAGE.Updateto), "Update to");
+snprintf(LANGUAGE.Update, sizeof(LANGUAGE.Update), "Update");
snprintf(LANGUAGE.USBLoaderisprotected, sizeof(LANGUAGE.USBLoaderisprotected), "USB Loader GX is protected");
snprintf(LANGUAGE.USBDevicenotfound, sizeof(LANGUAGE.USBDevicenotfound), "USB Device not found");
snprintf(LANGUAGE.VideoMode, sizeof(LANGUAGE.VideoMode), "Video Mode");
snprintf(LANGUAGE.VIDTVPatch, sizeof(LANGUAGE.VIDTVPatch), "VIDTV Patch");
-snprintf(LANGUAGE.Volume, sizeof(LANGUAGE.Volume), "Volume");
+snprintf(LANGUAGE.Volume, sizeof(LANGUAGE.Volume), "Music Volume");
+snprintf(LANGUAGE.SFXVolume, sizeof(LANGUAGE.SFXVolume), "SFX Volume");
snprintf(LANGUAGE.Waiting, sizeof(LANGUAGE.Waiting), "Waiting...");
snprintf(LANGUAGE.WaitingforUSBDevice, sizeof(LANGUAGE.WaitingforUSBDevice), "Waiting for USB Device");
snprintf(LANGUAGE.WidescreenFix, sizeof(LANGUAGE.WidescreenFix), "Widescreen Fix");
@@ -356,6 +367,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.ConsoleLocked, val, sizeof(LANGUAGE.ConsoleLocked));
return;
}
+ if (strcmp(name, "Controllevel") == 0) {
+ strcopy(LANGUAGE.Controllevel, val, sizeof(LANGUAGE.Controllevel));
+ return;
+ }
if (strcmp(name, "CorrectPassword") == 0) {
strcopy(LANGUAGE.CorrectPassword, val, sizeof(LANGUAGE.CorrectPassword));
return;
@@ -396,6 +411,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Credits, val, sizeof(LANGUAGE.Credits));
return;
}
+ if (strcmp(name, "Custompaths") == 0) {
+ strcopy(LANGUAGE.Custompaths, val, sizeof(LANGUAGE.Custompaths));
+ return;
+ }
if (strcmp(name, "DiscImages") == 0) {
strcopy(LANGUAGE.DiscImages, val, sizeof(LANGUAGE.DiscImages));
return;
@@ -432,6 +451,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Doyouwanttoretryfor30secs, val, sizeof(LANGUAGE.Doyouwanttoretryfor30secs));
return;
}
+ if (strcmp(name, "Doyouwanttochangelanguage") == 0) {
+ strcopy(LANGUAGE.Doyouwanttochangelanguage, val, sizeof(LANGUAGE.Doyouwanttochangelanguage));
+ return;
+ }
if (strcmp(name, "Downloadingfile") == 0) {
strcopy(LANGUAGE.Downloadingfile, val, sizeof(LANGUAGE.Downloadingfile));
return;
@@ -452,6 +475,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Defaultsettings, val, sizeof(LANGUAGE.Defaultsettings));
return;
}
+ if (strcmp(name, "Default") == 0) {
+ strcopy(LANGUAGE.Default, val, sizeof(LANGUAGE.Default));
+ return;
+ }
if (strcmp(name, "Error") == 0) {
strcopy(LANGUAGE.Error, val, sizeof(LANGUAGE.Error));
return;
@@ -608,6 +635,14 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.GoBack, val, sizeof(LANGUAGE.GoBack));
return;
}
+ if (strcmp(name, "GUISettings") == 0) {
+ strcopy(LANGUAGE.GUISettings, val, sizeof(LANGUAGE.GUISettings));
+ return;
+ }
+ if (strcmp(name, "Gameload") == 0) {
+ strcopy(LANGUAGE.Gameload, val, sizeof(LANGUAGE.Gameload));
+ return;
+ }
if (strcmp(name, "GotoPage") == 0) {
strcopy(LANGUAGE.GotoPage, val, sizeof(LANGUAGE.GotoPage));
return;
@@ -624,11 +659,14 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.keyboard, val, sizeof(LANGUAGE.keyboard));
return;
}
-
if (strcmp(name, "Language") == 0) {
strcopy(LANGUAGE.Language, val, sizeof(LANGUAGE.Language));
return;
}
+ if (strcmp(name, "Languagepathchanged") == 0) {
+ strcopy(LANGUAGE.Languagepathchanged, val, sizeof(LANGUAGE.Languagepathchanged));
+ return;
+ }
if (strcmp(name, "Langchange") == 0) {
strcopy(LANGUAGE.Langchange, val, sizeof(LANGUAGE.Langchange));
return;
@@ -869,6 +907,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Setasbackgroundmusic, val, sizeof(LANGUAGE.Setasbackgroundmusic));
return;
}
+ if (strcmp(name, "Sound") == 0) {
+ strcopy(LANGUAGE.Sound, val, sizeof(LANGUAGE.Sound));
+ return;
+ }
if (strcmp(name, "ShutdowntoIdle") == 0) {
strcopy(LANGUAGE.ShutdowntoIdle, val, sizeof(LANGUAGE.ShutdowntoIdle));
return;
@@ -941,6 +983,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Unlock, val, sizeof(LANGUAGE.Unlock));
return;
}
+ if (strcmp(name, "UnlockConsoletousethisOption") == 0) {
+ strcopy(LANGUAGE.UnlockConsoletousethisOption, val, sizeof(LANGUAGE.UnlockConsoletousethisOption));
+ return;
+ }
if (strcmp(name, "Unicodefix") == 0) {
strcopy(LANGUAGE.Unicodefix, val, sizeof(LANGUAGE.Unicodefix));
return;
@@ -977,6 +1023,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Updateto, val, sizeof(LANGUAGE.Updateto));
return;
}
+ if (strcmp(name, "Update") == 0) {
+ strcopy(LANGUAGE.Update, val, sizeof(LANGUAGE.Update));
+ return;
+ }
if (strcmp(name, "USBLoaderisprotected") == 0) {
strcopy(LANGUAGE.USBLoaderisprotected, val, sizeof(LANGUAGE.USBLoaderisprotected));
return;
@@ -997,6 +1047,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Volume, val, sizeof(LANGUAGE.Volume));
return;
}
+ if (strcmp(name, "SFXVolume") == 0) {
+ strcopy(LANGUAGE.SFXVolume, val, sizeof(LANGUAGE.SFXVolume));
+ return;
+ }
if (strcmp(name, "Waiting") == 0) {
strcopy(LANGUAGE.Waiting, val, sizeof(LANGUAGE.Waiting));
return;
diff --git a/source/language.h b/source/language.h
index ffaaabc4..cf30051c 100644
--- a/source/language.h
+++ b/source/language.h
@@ -11,7 +11,6 @@ extern "C"
struct LANGUAGE
{
-
char t3Covers[50];
char addToFavorite[50];
char all[30];
@@ -39,6 +38,7 @@ struct LANGUAGE
char ConsoleDefault[50];
char Consoleshouldbeunlockedtomodifyit[100];
char ConsoleLocked[50];
+ char Controllevel[50];
char CorrectPassword[50];
char Couldnotinitializenetwork[50];
char CouldnotopenDisc[50];
@@ -49,6 +49,7 @@ struct LANGUAGE
char Coverpathchange[50];
char count[20];
char Credits[30];
+ char Custompaths[60];
char DiscImages[50];
char DiscimagePath[50];
char DiscpathChanged[50];
@@ -59,11 +60,13 @@ struct LANGUAGE
char Doyoureallywanttodelete[50];
char Doyouwanttoretryfor30secs[80];
char Doyouwanttoupdate[50];
+ char Doyouwanttochangelanguage[80];
char Downloadingfile[50];
char DownloadBoxartimage[50];
char Downloadfinished[50];
char Defaultgamesettings[50];
char Defaultsettings[40];
+ char Default[40];
char Error[30];
char BOOTERROR[50];
char ErrorreadingDisc[50];
@@ -101,12 +104,15 @@ struct LANGUAGE
char GameRegion[50];
char GameSize[50];
char GoBack[50];
- char GotoPage[50];///////
+ char GotoPage[50];
+ char GUISettings[80];
+ char Gameload[50];
char HowtoShutdown[50];
char Homemenu[30];
char hour[30];
char keyboard[50];
char Language[50];
+ char Languagepathchanged[80];
char Langchange[50];
char Left[50];
char LikeSysMenu[50];
@@ -172,6 +178,7 @@ struct LANGUAGE
char settings[50];
char Setasbackgroundmusic[90];
char Standard[30];
+ char Sound[40];
char ShutdowntoIdle[50];
char ShutdownSystem[50];
char Success[30];
@@ -190,6 +197,7 @@ struct LANGUAGE
char Tooltips[50];
char Timeleft[50];
char Unlock[50];
+ char UnlockConsoletousethisOption[100];
char Unicodefix[50];
char Uninstall[50];
char USBLoaderisprotected[80];
@@ -201,9 +209,11 @@ struct LANGUAGE
char Updatedol[40];
char Updateall[40];
char Updateto[40];
+ char Update[40];
char VideoMode[50];
char VIDTVPatch[50];
char Volume[50];
+ char SFXVolume[50];
char Waiting[50];
char WaitingforUSBDevice[80];
char WidescreenFix[50];
diff --git a/source/libwiigui/gui_customoptionbrowser.cpp b/source/libwiigui/gui_customoptionbrowser.cpp
index a6c5adba..905d9512 100644
--- a/source/libwiigui/gui_customoptionbrowser.cpp
+++ b/source/libwiigui/gui_customoptionbrowser.cpp
@@ -8,6 +8,7 @@
#include "gui.h"
#include "../wpad.h"
+#include "../main.h"
#include "../cfg.h"
#include "gui_customoptionbrowser.h"
@@ -77,10 +78,6 @@ void customOptionList::SetValue(int i, const char *format, ...)
}
}
-
-
-//int vol;
-extern const int vol;
/**
* Constructor for the GuiCustomOptionBrowser class.
*/
@@ -102,7 +99,7 @@ GuiCustomOptionBrowser::GuiCustomOptionBrowser(int w, int h, customOptionList *
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
trigHeldA = new GuiTrigger;
trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A, PAD_BUTTON_A);
- btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM, vol);
+ btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM, Settings.sfxvolume);
snprintf(imgPath, sizeof(imgPath), "%s%s", themePath, custombg);
bgOptions = new GuiImageData(imgPath, imagebg);
@@ -315,6 +312,14 @@ int GuiCustomOptionBrowser::GetSelectedOption()
return found;
}
+void GuiCustomOptionBrowser::SetClickable(bool enable)
+{
+ for(int i = 0; i < size; i++)
+ {
+ optionBtn[i]->SetClickable(enable);
+ }
+}
+
/****************************************************************************
* FindMenuItem
*
@@ -419,8 +424,10 @@ void GuiCustomOptionBrowser::Update(GuiTrigger * t)
if(state == STATE_DISABLED || !t)
return;
- if(options->IsChanged())
+ if(options->IsChanged()) {
+ coL2 = 0;
UpdateListEntries();
+ }
int old_listOffset = listOffset;
// scrolldelay affects how fast the list scrolls
diff --git a/source/libwiigui/gui_customoptionbrowser.h b/source/libwiigui/gui_customoptionbrowser.h
index 3a6be5e3..66f568e5 100644
--- a/source/libwiigui/gui_customoptionbrowser.h
+++ b/source/libwiigui/gui_customoptionbrowser.h
@@ -38,6 +38,7 @@ class GuiCustomOptionBrowser : public GuiElement
int FindMenuItem(int c, int d);
int GetClickedOption();
int GetSelectedOption();
+ void SetClickable(bool enable);
void ResetState();
void SetFocus(int f);
void Draw();
diff --git a/source/libwiigui/gui_gamebrowser.cpp b/source/libwiigui/gui_gamebrowser.cpp
index bc74545b..63f7070e 100644
--- a/source/libwiigui/gui_gamebrowser.cpp
+++ b/source/libwiigui/gui_gamebrowser.cpp
@@ -12,12 +12,12 @@
#include
#include "gui_gamebrowser.h"
#include "../cfg.h"
+#include "../main.h"
#include
#include
#define GAMESELECTSIZE 30
-extern const int vol;
int txtscroll = 0;
/**
* Constructor for the GuiGameBrowser class.
@@ -40,7 +40,7 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
trigHeldA = new GuiTrigger;
trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A, PAD_BUTTON_A);
- btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM, vol);
+ btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM, Settings.sfxvolume);
snprintf(imgPath, sizeof(imgPath), "%sbg_options.png", themePath);
bgGames = new GuiImageData(imgPath, imagebg);
diff --git a/source/libwiigui/gui_gamecarousel.cpp b/source/libwiigui/gui_gamecarousel.cpp
index 0044f504..e2928cf8 100644
--- a/source/libwiigui/gui_gamecarousel.cpp
+++ b/source/libwiigui/gui_gamecarousel.cpp
@@ -26,8 +26,6 @@
#define SPEED_STEP 4
#define SAFETY 320
-extern const int vol;
-
/**
* Constructor for the GuiGameCarousel class.
*/
@@ -58,8 +56,8 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int count, co
trigMinus = new GuiTrigger;
trigMinus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0);
- btnSoundClick = new GuiSound(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
- btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
+ btnSoundClick = new GuiSound(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
snprintf(imgPath, sizeof(imgPath), "%sstartgame_arrow_left.png", CFG.theme_path);
imgLeft = new GuiImageData(imgPath, startgame_arrow_left_png);
diff --git a/source/libwiigui/gui_gamegrid.cpp b/source/libwiigui/gui_gamegrid.cpp
index d4571d64..21259f37 100644
--- a/source/libwiigui/gui_gamegrid.cpp
+++ b/source/libwiigui/gui_gamegrid.cpp
@@ -17,9 +17,6 @@
#include
#include
-
-extern const int vol;
-
/**
* Constructor for the GuiGameGrid class.
*/
@@ -50,8 +47,8 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int gameCnt, const ch
trigMinus = new GuiTrigger;
trigMinus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0);
- btnSoundClick = new GuiSound(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
- btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
+ btnSoundClick = new GuiSound(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
snprintf(imgPath, sizeof(imgPath), "%sstartgame_arrow_left.png", CFG.theme_path);
imgLeft = new GuiImageData(imgPath, startgame_arrow_left_png);
diff --git a/source/libwiigui/gui_keyboard.cpp b/source/libwiigui/gui_keyboard.cpp
index effb8810..fdf0debe 100644
--- a/source/libwiigui/gui_keyboard.cpp
+++ b/source/libwiigui/gui_keyboard.cpp
@@ -9,12 +9,13 @@
***************************************************************************/
#include "gui.h"
+#include "../main.h"
+#include "../cfg.h"
#include
#include
/**
* Constructor for the GuiKeyboard class.
*/
-extern const int vol;
unsigned int m;
//const Key thekeys;
GuiKeyboard::GuiKeyboard(char * t, u32 max, int min, int lang)
@@ -209,7 +210,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max, int min, int lang)
}
};
memcpy(keys, thekeys, sizeof(thekeys));}
-
+
//AZERTY//
if (mode == 3){
Key thekeys[4][11] = {
@@ -286,8 +287,8 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max, int min, int lang)
keyLarge = new GuiImageData(keyboard_largekey_over_png);
keyLargeOver = new GuiImageData(keyboard_largekey_over_png);
- keySoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- keySoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM, vol);
+ keySoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ keySoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM, Settings.sfxvolume);
trigA = new GuiTrigger;
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
trigB = new GuiTrigger;
@@ -302,7 +303,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max, int min, int lang)
keyBackOverImg = new GuiImage(keyMediumOver);
keyBackText = new GuiText("Back", 20, (GXColor){0, 0, 0, 0xff});
//GuiButton(GuiImage* img, GuiImage* imgOver, int hor, int vert, int x, int y, GuiTrigger* trig, GuiSound* sndOver, GuiSound* sndClick, u8 grow);
-
+
//keyBack = new GuiButton(keyMedium->GetWidth(), keyMedium->GetHeight());
keyBack = new GuiButton(keyBackImg, keyBackOverImg, 0, 3, 11*42+40+eurocheck, 0*42+120, trigA, keySoundOver, keySoundClick,1);
//keyBack->SetImage(keyBackImg);
diff --git a/source/listfiles.c b/source/listfiles.c
index c5f554fc..9a1d1619 100644
--- a/source/listfiles.c
+++ b/source/listfiles.c
@@ -10,8 +10,8 @@
#include "listfiles.h"
-char alldirfiles[300][70];
-char filename[80];
+static char alldirfiles[300][70];
+char filenames[80];
bool findfile(const char * filename, const char * path)
{
@@ -35,6 +35,10 @@ while ((file = readdir(dir)))
return false;
}
+char * GetFileName(int i)
+{
+ return alldirfiles[i];
+}
s32 filenamescmp(const void *a, const void *b)
{
@@ -42,7 +46,7 @@ s32 filenamescmp(const void *a, const void *b)
return stricmp((char *)a, (char *)b);
}
-int GetFiles(char * filespath)
+int GetAllDirFiles(char * filespath)
{
int countfiles = 0;
@@ -57,12 +61,12 @@ if (dir == NULL) //If empty
}
else
{
- while (dirnext(dir,filename,&st) == 0)
+ while (dirnext(dir,filenames,&st) == 0)
{
if ((st.st_mode & S_IFDIR) == 0)
{
// st.st_mode & S_IFDIR indicates a directory
- snprintf(alldirfiles[countfiles], 70, "%s", filename);
+ snprintf(alldirfiles[countfiles], 70, "%s", filenames);
countfiles++;
}
}
diff --git a/source/listfiles.h b/source/listfiles.h
index 58c9522c..7281c05b 100644
--- a/source/listfiles.h
+++ b/source/listfiles.h
@@ -7,7 +7,8 @@ extern "C"
#endif
bool findfile(const char * filename, const char * path);
-int GetFiles(char * filespath);
+char * GetFileName(int i);
+int GetAllDirFiles(char * filespath);
#ifdef __cplusplus
diff --git a/source/menu.cpp b/source/menu.cpp
index 91961697..f5465cf6 100644
--- a/source/menu.cpp
+++ b/source/menu.cpp
@@ -1,6 +1,8 @@
/****************************************************************************
+ * USB Loader GX Team
+ *
* libwiigui Template
- * Tantric 2009
+ * by Tantric 2009
*
* menu.cpp
* Menu flow routines - handles all menu logic
@@ -40,7 +42,6 @@ GuiImageData * pointer[4];
GuiImage * bgImg = NULL;
GuiImageData * background = NULL;
GuiSound * bgMusic = NULL;
-int vol = Settings.volume;
float gamesize;
/*** Variables used only in menu.cpp ***/
@@ -57,8 +58,6 @@ static char gameregion[7];
extern FreeTypeGX *fontClock;
extern u8 shutdown;
extern u8 reset;
-extern char alldirfiles[300][70];
-extern char missingFiles[500][12];
extern int cntMissFiles;
extern int networkisinitialized;
extern struct discHdr * gameList;
@@ -203,8 +202,8 @@ static int MenuDiscList()
nolist = 1;
}
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
snprintf(imgPath, sizeof(imgPath), "%sbutton_install.png", CFG.theme_path);
GuiImageData btnInstall(imgPath, button_install_png);
@@ -609,7 +608,7 @@ static int MenuDiscList()
bgMusic->PlayOggFile(Settings.ogg_path);
}
bgMusic->SetPlayTime(thetimeofbg);
- SetVolumeOgg(255*(vol/100.0));
+ SetVolumeOgg(255*(Settings.volume/100.0));
if(choice == 3)
{
@@ -695,7 +694,7 @@ static int MenuDiscList()
if (netcheck)
{
- if (missingFiles != NULL && cntMissFiles > 0)
+ if (GetMissingFiles() != NULL && cntMissFiles > 0)
{
char tempCnt[40];
@@ -1389,7 +1388,7 @@ static int MenuInstall()
char *name;
static char buffer[MAX_CHARACTERS + 4];
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
char imgPath[100];
@@ -1572,8 +1571,8 @@ static int MenuFormat()
options.length = cnt;
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
+ GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
+ GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
snprintf(imgPath, sizeof(imgPath), "%swiimote_poweroff.png", CFG.theme_path);
GuiImageData btnpwroff(imgPath, wiimote_poweroff_png);
snprintf(imgPath, sizeof(imgPath), "%swiimote_poweroff_over.png", CFG.theme_path);
@@ -1802,333 +1801,6 @@ static int MenuCheck()
return menu;
}
-/****************************************************************************
- * MenuOGG
- ***************************************************************************/
-int MenuOGG()
-{
- int menu = MENU_NONE, cnt = 0;
- int ret = 0, choice = 0;
- int scrollon, nothingchanged = 0;
-
- GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
- GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
-
- char imgPath[100];
-
- snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
- GuiImageData btnOutline(imgPath, button_dialogue_box_png);
- snprintf(imgPath, sizeof(imgPath), "%ssettings_background.png", CFG.theme_path);
- GuiImageData settingsbg(imgPath, settings_background_png);
-
- GuiTrigger trigA;
- trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
- GuiTrigger trigB;
- trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
- GuiTrigger trigMinus;
- trigMinus.SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0);
- GuiTrigger trigPlus;
- trigPlus.SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0);
-
- char fullpath[150];
- char shortpath[35];
- int countoggs = GetFiles(Settings.oggload_path);
-
- if(!strcmp("", Settings.oggload_path)) {
- sprintf(shortpath, "%s", LANGUAGE.Standard);
- } else if (strlen(Settings.oggload_path) < (27 + 3)) {
- sprintf(shortpath, "%s", Settings.oggload_path);
- }
- else {
- strncpy(shortpath, Settings.oggload_path, 27);
- shortpath[27] = '\0';
- strncat(shortpath, "...", 3);
- }
-
- GuiText titleTxt(shortpath, 24, (GXColor){0, 0, 0, 255});
- titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
- titleTxt.SetPosition(0,0);
- GuiButton pathBtn(300, 50);
- pathBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- pathBtn.SetPosition(0,28);
- pathBtn.SetLabel(&titleTxt);
- pathBtn.SetSoundOver(&btnSoundOver);
- pathBtn.SetSoundClick(&btnClick);
- pathBtn.SetTrigger(&trigA);
- pathBtn.SetEffectGrow();
-
- GuiImage oggmenubackground(&settingsbg);
- oggmenubackground.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
- oggmenubackground.SetPosition(0, 0);
-
- GuiText backBtnTxt(LANGUAGE.Back , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
- backBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
- GuiImage backBtnImg(&btnOutline);
- if (Settings.wsprompt == yes){
- backBtnTxt.SetWidescreen(CFG.widescreen);
- backBtnImg.SetWidescreen(CFG.widescreen);
- }
- GuiButton backBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
- backBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- backBtn.SetPosition(-180, 400);
- backBtn.SetLabel(&backBtnTxt);
- backBtn.SetImage(&backBtnImg);
- backBtn.SetSoundOver(&btnSoundOver);
- backBtn.SetSoundClick(&btnClick);
- backBtn.SetTrigger(&trigA);
- backBtn.SetTrigger(&trigB);
- backBtn.SetEffectGrow();
-
- customOptionList options2(countoggs);
-
- for (cnt = 0; cnt < countoggs; cnt++) {
- char tmp[30];
- snprintf(tmp , 30, "%s", alldirfiles[cnt]);
- options2.SetValue(cnt, "%s", tmp);
- options2.SetName(cnt,"%i.", cnt+1);
- }
- // options2.length = cnt;
-
- if(cnt < 9) {
- scrollon = 0;
- } else {
- scrollon = 1;
- }
-
- GuiCustomOptionBrowser optionBrowser4(396, 280, &options2, CFG.theme_path, "bg_options_settings.png", bg_options_settings_png, scrollon, 55);
- optionBrowser4.SetPosition(0, 90);
- optionBrowser4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
-
- int songPlaying=0;
-
- snprintf(imgPath, sizeof(imgPath), "%sarrow_next.png", CFG.theme_path);
- GuiImageData next(imgPath, arrow_next_png);
- snprintf(imgPath, sizeof(imgPath), "%sarrow_previous.png", CFG.theme_path);
- GuiImageData prev(imgPath, arrow_previous_png);
- snprintf(imgPath, sizeof(imgPath), "%smp3_stop.png", CFG.theme_path);
- GuiImageData stop(imgPath, mp3_stop_png);
- snprintf(imgPath, sizeof(imgPath), "%smp3_pause.png", CFG.theme_path);
- GuiImageData pause(imgPath, mp3_pause_png);
- snprintf(imgPath, sizeof(imgPath), "%sstartgame_arrow_right.png", CFG.theme_path);
- GuiImageData play(imgPath, startgame_arrow_right_png);
-
- GuiImage nextBtnImg(&next);
- GuiButton nextBtn(next.GetWidth(), next.GetHeight());
- nextBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- nextBtn.SetPosition(130, 400);
- nextBtn.SetImage(&nextBtnImg);
- nextBtn.SetSoundOver(&btnSoundOver);
- nextBtn.SetSoundClick(&btnClick);
- nextBtn.SetTrigger(&trigA);
- nextBtn.SetEffectGrow();
-
- GuiImage prevBtnImg(&prev);
- prevBtnImg.SetWidescreen(CFG.widescreen);
- GuiButton prevBtn(prev.GetWidth(), prev.GetHeight());
- prevBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- prevBtn.SetPosition(-60, 400);
- prevBtn.SetImage(&prevBtnImg);
- prevBtn.SetSoundOver(&btnSoundOver);
- prevBtn.SetSoundClick(&btnClick);
- prevBtn.SetTrigger(&trigA);
- prevBtn.SetEffectGrow();
-
- GuiImage playBtnImg(&play);
- playBtnImg.SetWidescreen(CFG.widescreen);
- GuiButton playBtn(play.GetWidth(), play.GetHeight());
- playBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- playBtn.SetPosition(72, 400);
- playBtn.SetImage(&playBtnImg);
- playBtn.SetSoundOver(&btnSoundOver);
- playBtn.SetSoundClick(&btnClick);
- playBtn.SetTrigger(&trigA);
- playBtn.SetTrigger(&trigPlus);
- playBtn.SetEffectGrow();
-
- GuiImage stopBtnImg(&stop);
- stopBtnImg.SetWidescreen(CFG.widescreen);
- GuiButton stopBtn(stop.GetWidth(), stop.GetHeight());
- stopBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
- stopBtn.SetPosition(17, 400);
- stopBtn.SetImage(&stopBtnImg);
- stopBtn.SetSoundOver(&btnSoundOver);
- stopBtn.SetSoundClick(&btnClick);
- stopBtn.SetTrigger(&trigA);
- stopBtn.SetTrigger(&trigMinus);
- stopBtn.SetEffectGrow();
-
- HaltGui();
- GuiWindow w(screenwidth, screenheight);
- w.Append(&oggmenubackground);
- w.Append(&pathBtn);
- w.Append(&backBtn);
- w.Append(&playBtn);
- w.Append(&nextBtn);
- w.Append(&prevBtn);
- w.Append(&stopBtn);
- mainWindow->Append(&w);
- mainWindow->Append(&optionBrowser4);
-
- ResumeGui();
-
- while(menu == MENU_NONE)
- {
-
- if (backBtn.GetState() == STATE_CLICKED) {
- if(nothingchanged == 1 && countoggs > 0) {
- if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
- bgMusic->Play();
- } else {
- bgMusic->PlayOggFile(Settings.ogg_path);
- }
- }
- menu = MENU_SETTINGS;
- break;
- }
-
- if (pathBtn.GetState() == STATE_CLICKED) {
- mainWindow->Remove(&optionBrowser4);
- w.Remove(&backBtn);
- w.Remove(&pathBtn);
- w.Remove(&playBtn);
- w.Remove(&nextBtn);
- w.Remove(&prevBtn);
- w.Remove(&stopBtn);
- char entered[43] = "";
- strncpy(entered, Settings.oggload_path, sizeof(entered));
- int result = OnScreenKeyboard(entered,43,0);
- mainWindow->Append(&optionBrowser4);
- w.Append(&pathBtn);
- w.Append(&backBtn);
- w.Append(&playBtn);
- w.Append(&nextBtn);
- w.Append(&prevBtn);
- w.Append(&stopBtn);
- if ( result == 1 ) {
- int len = (strlen(entered)-1);
- if(entered[len] !='/')
- strncat (entered, "/", 1);
- strncpy(Settings.oggload_path, entered, sizeof(Settings.oggload_path));
- WindowPrompt(LANGUAGE.Backgroundmusicpath,0,LANGUAGE.ok,0,0,0);
- if(isSdInserted()) {
- if(!strcmp("", Settings.oggload_path)) {
- sprintf(Settings.ogg_path, "notset");
- bgMusic->Play();
- }
- cfg_save_global();
- menu = MENU_OGG;
- break;
- } else {
- WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
- }
- }
- if(countoggs > 0) {
- optionBrowser4.SetFocus(1);
- }
- pathBtn.ResetState();
- }
-
- ret = optionBrowser4.GetClickedOption();
-
- if(ret>=0) {
- choice = WindowPrompt(LANGUAGE.Setasbackgroundmusic,alldirfiles[ret],LANGUAGE.Yes,LANGUAGE.No,0,0);
- if(choice == 1) {
- snprintf(fullpath,150,"%s%s",Settings.oggload_path,alldirfiles[ret]);
- choice = bgMusic->PlayOggFile(fullpath);
- if(choice < 0) {
- WindowPrompt(LANGUAGE.Notasupportedformat, LANGUAGE.Loadingstandardmusic, LANGUAGE.ok, 0,0,0);
- sprintf(Settings.ogg_path, "notset");
- bgMusic->Play();
- SetVolumeOgg(255*(vol/100.0));
- } else {
- snprintf(Settings.ogg_path, sizeof(Settings.ogg_path), "%s", fullpath);
- cfg_save_global();
- SetVolumeOgg(255*(vol/100.0));
- nothingchanged = 0;
- }
- }
- optionBrowser4.SetFocus(1);
- }
-
- if (playBtn.GetState() == STATE_CLICKED && countoggs > 0) {
- if(countoggs > 0) {
- ret = optionBrowser4.GetSelectedOption();
- songPlaying=ret;
- snprintf(fullpath, 150,"%s%s", Settings.oggload_path,alldirfiles[ret]);
- choice = bgMusic->PlayOggFile(fullpath);
- if(choice < 0) {
- WindowPrompt(LANGUAGE.Notasupportedformat, LANGUAGE.Loadingstandardmusic, LANGUAGE.ok, 0,0,0);
- if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
- bgMusic->Play();
- } else {
- bgMusic->PlayOggFile(Settings.ogg_path);
- }
- }
- SetVolumeOgg(255*(vol/100.0));
- songPlaying=ret;
- nothingchanged = 1;
- optionBrowser4.SetFocus(1);
- }
- playBtn.ResetState();
- }
-
- if(nextBtn.GetState() == STATE_CLICKED){
- if(countoggs > 0) {
- songPlaying++;
- if (songPlaying>(countoggs - 1)){songPlaying=0;}
- snprintf(fullpath,150,"%s%s", Settings.oggload_path,alldirfiles[songPlaying]);
- choice = bgMusic->PlayOggFile(fullpath);
- if(choice < 0) {
- WindowPrompt(LANGUAGE.Notasupportedformat, LANGUAGE.Loadingstandardmusic, LANGUAGE.ok, 0,0,0);
- if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
- bgMusic->Play();
- } else {
- bgMusic->PlayOggFile(Settings.ogg_path);
- }
- }
- nothingchanged = 1;
- optionBrowser4.SetFocus(1);
- }
- SetVolumeOgg(255*(vol/100.0));
- nextBtn.ResetState();
- }
- if(prevBtn.GetState() == STATE_CLICKED) {
- if(countoggs > 0) {
- songPlaying--;
- if (songPlaying<0){songPlaying=(countoggs - 1);}
- snprintf(fullpath,150,"%s%s", Settings.oggload_path,alldirfiles[songPlaying]);
- choice = bgMusic->PlayOggFile(fullpath);
- if(choice < 0) {
- WindowPrompt(LANGUAGE.Notasupportedformat, LANGUAGE.Loadingstandardmusic, LANGUAGE.ok, 0,0,0);
- if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
- bgMusic->Play();
- } else {
- bgMusic->PlayOggFile(Settings.ogg_path);
- }
- }
- nothingchanged = 1;
- optionBrowser4.SetFocus(1);
- }
- SetVolumeOgg(255*(vol/100.0));
- prevBtn.ResetState();
- }
- if(stopBtn.GetState() == STATE_CLICKED) {
- if(countoggs > 0) {
- StopOgg();
- nothingchanged = 1;
- optionBrowser4.SetFocus(1);
- }
- stopBtn.ResetState();
- }
- }
-
- HaltGui();
- mainWindow->Remove(&optionBrowser4);
- mainWindow->Remove(&w);
- ResumeGui();
-
- return menu;
-}
/****************************************************************************
* MainMenu
@@ -2164,8 +1836,8 @@ int MainMenu(int menu)
ResumeGui();
- bgMusic = new GuiSound(bg_music_ogg, bg_music_ogg_size, SOUND_OGG, vol);
- bgMusic->SetVolume(vol);
+ bgMusic = new GuiSound(bg_music_ogg, bg_music_ogg_size, SOUND_OGG, Settings.volume);
+ bgMusic->SetVolume(Settings.volume);
bgMusic->SetLoop(1); //loop music
// startup music
if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
@@ -2176,7 +1848,7 @@ int MainMenu(int menu)
while(currentMenu != MENU_EXIT)
{
- SetVolumeOgg(255*(vol/100.0));
+ SetVolumeOgg(255*(Settings.volume/100.0));
switch (currentMenu)
{
@@ -2195,53 +1867,10 @@ int MainMenu(int menu)
case MENU_DISCLIST:
currentMenu = MenuDiscList();
break;
- case MENU_OGG:
- currentMenu = MenuOGG();
- break;
default: // unrecognized menu
currentMenu = MenuCheck();
break;
}
-
- switch (Settings.volume)
- {
- case v10:
- vol = 10;
- break;
- case v20:
- vol = 20;
- break;
- case v30:
- vol = 30;
- break;
- case v40:
- vol = 40;
- break;
- case v50:
- vol = 50;
- break;
- case v60:
- vol = 60;
- break;
- case v70:
- vol = 70;
- break;
- case v80:
- vol = 80;
- break;
- case v90:
- vol = 90;
- break;
- case v100:
- vol = 100;
- break;
- case v0:
- vol = 0;
- break;
- default:
- vol = 80;
- break;
- }
}
ExitGUIThreads();
@@ -2276,6 +1905,7 @@ int MainMenu(int menu)
languageChoice = game_cfg->language;
ocarinaChoice = game_cfg->ocarina;
viChoice = game_cfg->vipatch;
+ fix002 = game_cfg->errorfix002;
} else {
@@ -2283,8 +1913,19 @@ int MainMenu(int menu)
languageChoice = Settings.language;
ocarinaChoice = Settings.ocarina;
viChoice = Settings.vpatch;
+ fix002 = off;
}
+ u8 errorfixer002 = 0;
+ switch(fix002)
+ {
+ case on:
+ errorfixer002 = 1;
+ break;
+ case off:
+ errorfixer002 = 0;
+ break;
+ }
switch(languageChoice)
{
@@ -2405,7 +2046,7 @@ int MainMenu(int menu)
}
int ret = 0;
- ret = Disc_WiiBoot(videoselected, cheat, vipatch, Settings.patchcountrystrings);
+ ret = Disc_WiiBoot(videoselected, cheat, vipatch, Settings.patchcountrystrings, errorfixer002);
if (ret < 0) {
Sys_LoadMenu();
}
diff --git a/source/menu.h b/source/menu.h
index ae5dba76..bbe4734c 100644
--- a/source/menu.h
+++ b/source/menu.h
@@ -27,8 +27,7 @@ enum
MENU_FORMAT,
MENU_INSTALL,
MENU_CHECK,
- MENU_GAME_SETTINGS,
- MENU_OGG
+ MENU_GAME_SETTINGS
};
#endif