diff --git a/gui.pnproj b/gui.pnproj
index 878bfd6b..8178b615 100644
--- a/gui.pnproj
+++ b/gui.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/gui.pnps b/gui.pnps
index 91ed5adf..a7b6fcb2 100644
--- a/gui.pnps
+++ b/gui.pnps
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/source/filelist.h b/source/filelist.h
index 355025a5..38da34d1 100644
--- a/source/filelist.h
+++ b/source/filelist.h
@@ -353,6 +353,9 @@ extern const u32 Wiimote1_png_size;
extern const u8 Wiimote2_png[];
extern const u32 Wiimote2_png_size;
+extern const u8 Wiimote4_png[];
+extern const u32 Wiimote4_png_size;
+
extern const u8 wifi1_png[];
extern const u32 wifi1_png_size;
@@ -365,11 +368,20 @@ extern const u32 wifi3_png_size;
extern const u8 wifi4_png[];
extern const u32 wifi4_png_size;
+//extern const u8 wifi6_png[];
+//extern const u32 wifi6_png_size;
+
extern const u8 wifi8_png[];
extern const u32 wifi8_png_size;
-extern const u8 Wiimote4_png[];
-extern const u32 Wiimote4_png_size;
+extern const u8 wifi12_png[];
+extern const u32 wifi12_png_size;
+
+extern const u8 wifi16_png[];
+extern const u32 wifi16_png_size;
+
+extern const u8 wifi32_png[];
+extern const u32 wifi32_png_size;
extern const u8 norating_png[];
extern const u32 norating_png_size;
@@ -424,6 +436,26 @@ extern const u32 wheel_png_size;
extern const u8 wheelR_png[];
extern const u32 wheelR_png_size;
+extern const u8 zapper_png[];
+extern const u32 zapper_png_size;
+extern const u8 zapperR_png[];
+extern const u32 zapperR_png_size;
+
+extern const u8 wiispeak_png[];
+extern const u32 wiispeak_png_size;
+extern const u8 wiispeakR_png[];
+extern const u32 wiispeakR_png_size;
+
+extern const u8 nintendods_png[];
+extern const u32 nintendods_png_size;
+extern const u8 nintendodsR_png[];
+extern const u32 nintendodsR_png_size;
+/*
+extern const u8 vitalitysensor_png[];
+extern const u32 vitalitysensor_png_size;
+extern const u8 vitalitysensor_png[];
+extern const u32 vitalitysensorR_png_size;
+*/
extern const u8 esrb_ec_png[];
extern const u32 esrb_ec_png_size;
diff --git a/source/homebrewboot/HomebrewBrowse.cpp b/source/homebrewboot/HomebrewBrowse.cpp
index 5c7e503b..04eb3f39 100644
--- a/source/homebrewboot/HomebrewBrowse.cpp
+++ b/source/homebrewboot/HomebrewBrowse.cpp
@@ -337,16 +337,16 @@ int MenuHomebrewBrowse() {
MainButton4.StopEffect();
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);
+ MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 60);
+ MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 60);
+ MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 60);
+ MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 60);
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);
+ MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 60);
+ MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 60);
+ MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 60);
+ MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 60);
while (MainButton1.GetEffect()>0) usleep(50);
}
@@ -590,15 +590,15 @@ int MenuHomebrewBrowse() {
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);
+ MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 60);
+ MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 60);
+ MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 60);
+ MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 60);
} 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);
+ MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 60);
+ MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 60);
+ MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 60);
+ MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 60);
}
mainWindow->Append(&w);
diff --git a/source/images/balanceboard.png b/source/images/balanceboard.png
index 25bff1f8..d713380b 100644
Binary files a/source/images/balanceboard.png and b/source/images/balanceboard.png differ
diff --git a/source/images/balanceboardR.png b/source/images/balanceboardR.png
index c8c26012..ee2de742 100644
Binary files a/source/images/balanceboardR.png and b/source/images/balanceboardR.png differ
diff --git a/source/images/cero_a.png b/source/images/cero_a.png
index 3b555402..31d989fa 100644
Binary files a/source/images/cero_a.png and b/source/images/cero_a.png differ
diff --git a/source/images/cero_b.png b/source/images/cero_b.png
index 001f557a..3358e0aa 100644
Binary files a/source/images/cero_b.png and b/source/images/cero_b.png differ
diff --git a/source/images/cero_c.png b/source/images/cero_c.png
index a3582a4d..b0248697 100644
Binary files a/source/images/cero_c.png and b/source/images/cero_c.png differ
diff --git a/source/images/cero_d.png b/source/images/cero_d.png
index 9871289f..6eb1b4b3 100644
Binary files a/source/images/cero_d.png and b/source/images/cero_d.png differ
diff --git a/source/images/cero_z.png b/source/images/cero_z.png
index 07f86d14..6b5a48cd 100644
Binary files a/source/images/cero_z.png and b/source/images/cero_z.png differ
diff --git a/source/images/classiccontroller.png b/source/images/classiccontroller.png
index b3a7e6f5..92f81dfe 100644
Binary files a/source/images/classiccontroller.png and b/source/images/classiccontroller.png differ
diff --git a/source/images/classiccontrollerR.png b/source/images/classiccontrollerR.png
index 00884bd4..e3d051d0 100644
Binary files a/source/images/classiccontrollerR.png and b/source/images/classiccontrollerR.png differ
diff --git a/source/images/drums.png b/source/images/drums.png
index 12d367bb..ee2e000b 100644
Binary files a/source/images/drums.png and b/source/images/drums.png differ
diff --git a/source/images/drumsR.png b/source/images/drumsR.png
index 9c020add..01836925 100644
Binary files a/source/images/drumsR.png and b/source/images/drumsR.png differ
diff --git a/source/images/gcncontroller.png b/source/images/gcncontroller.png
index 96036145..244bb56b 100644
Binary files a/source/images/gcncontroller.png and b/source/images/gcncontroller.png differ
diff --git a/source/images/gcncontrollerR.png b/source/images/gcncontrollerR.png
index bb428e12..b8213715 100644
Binary files a/source/images/gcncontrollerR.png and b/source/images/gcncontrollerR.png differ
diff --git a/source/images/guitar.png b/source/images/guitar.png
index 07846e33..cbb9a836 100644
Binary files a/source/images/guitar.png and b/source/images/guitar.png differ
diff --git a/source/images/guitarR.png b/source/images/guitarR.png
index 47c64a4a..7d763b5f 100644
Binary files a/source/images/guitarR.png and b/source/images/guitarR.png differ
diff --git a/source/images/nintendods.png b/source/images/nintendods.png
index 3f36f9a7..c22cf42a 100644
Binary files a/source/images/nintendods.png and b/source/images/nintendods.png differ
diff --git a/source/images/nintendodsR.png b/source/images/nintendodsR.png
index df01fedf..0cad10c7 100644
Binary files a/source/images/nintendodsR.png and b/source/images/nintendodsR.png differ
diff --git a/source/images/wiispeak.png b/source/images/wiispeak.png
index 4b1ca6cc..24a8e250 100644
Binary files a/source/images/wiispeak.png and b/source/images/wiispeak.png differ
diff --git a/source/images/wiispeakR.png b/source/images/wiispeakR.png
index 5151f0f8..272eb49a 100644
Binary files a/source/images/wiispeakR.png and b/source/images/wiispeakR.png differ
diff --git a/source/images/zapper.png b/source/images/zapper.png
index ae65245c..2a6ac6e8 100644
Binary files a/source/images/zapper.png and b/source/images/zapper.png differ
diff --git a/source/images/zapperR.png b/source/images/zapperR.png
index b8459bb7..504f802a 100644
Binary files a/source/images/zapperR.png and b/source/images/zapperR.png differ
diff --git a/source/menu.cpp b/source/menu.cpp
index ddea99c9..76e562a4 100644
--- a/source/menu.cpp
+++ b/source/menu.cpp
@@ -1069,6 +1069,7 @@ int MenuDiscList() {
break;
case 'J':
+ case 'W':
sprintf(gameregion,"NTSC J");
break;
@@ -1076,12 +1077,13 @@ int MenuDiscList() {
sprintf(gameregion,"NTSC K");
break;
-
case 'P':
case 'D':
case 'F':
- case 'X':
+ case 'I':
case 'S':
+ case 'H':
+ case 'X':
case 'Y':
sprintf(gameregion," PAL ");
break;
@@ -1275,7 +1277,9 @@ int MenuDiscList() {
//re-evaluate header now in case they changed games while on the game prompt
header = &gameList[gameSelected];
int settret = GameSettings(header);
- menu = MENU_DISCLIST; // refresh titles (needed if the language setting has changed)
+ /* unneeded for now, kept in case database gets a separate language setting
+ //menu = MENU_DISCLIST; // refresh titles (needed if the language setting has changed)
+ */
HaltGui();
if (Settings.gameDisplay==list) mainWindow->Append(gameBrowser);
else if (Settings.gameDisplay==grid) mainWindow->Append(gameGrid);
@@ -1648,8 +1652,6 @@ static int MenuCheck() {
partitionEntry partitions[MAX_PARTITIONS];
VIDEO_WaitVSync ();
- OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true);
-
wbfsinit = WBFS_Init(WBFS_DEVICE_USB);
if (wbfsinit < 0) {
diff --git a/source/prompts/PromptWindows.cpp b/source/prompts/PromptWindows.cpp
index 9d79f585..bac8340b 100644
--- a/source/prompts/PromptWindows.cpp
+++ b/source/prompts/PromptWindows.cpp
@@ -1991,10 +1991,6 @@ ProgressDownloadWindow(int choice2) {
}
}
- // get Wii's language setting
- char sysLanguage[3];
- GetLanguageToLangCode(sysLanguage);
-
//int server = 1;
while (i < cntMissFiles) {
tries=0;
@@ -2025,6 +2021,7 @@ ProgressDownloadWindow(int choice2) {
//Creates URL depending from which Country the game is
switch (missingFiles[i][3]) {
case 'J':
+ case 'W':
sprintf(URLFile,"%sJA/%s",server3d,missingFiles[i]);
break;
case 'K':
@@ -2040,7 +2037,7 @@ ProgressDownloadWindow(int choice2) {
case 'H':
case 'X':
case 'Y':
- sprintf(URLFile,"%s%s/%s",server3d,sysLanguage,missingFiles[i]);
+ sprintf(URLFile,"%s%s/%s",server3d,Settings.db_language,missingFiles[i]);
break;
case 'E':
sprintf(URLFile,"%sUS/%s",server3d,missingFiles[i]);
@@ -2069,6 +2066,7 @@ ProgressDownloadWindow(int choice2) {
//Creates URL depending from which Country the game is
switch (missingFiles[i][3]) {
case 'J':
+ case 'W':
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
break;
case 'K':
@@ -2084,7 +2082,7 @@ ProgressDownloadWindow(int choice2) {
case 'H':
case 'X':
case 'Y':
- sprintf(URLFile,"%s%s/%s",serverDisc,sysLanguage,missingFiles[i]);
+ sprintf(URLFile,"%s%s/%s",serverDisc,Settings.db_language,missingFiles[i]);
break;
case 'E':
sprintf(URLFile,"%sUS/%s",serverDisc,missingFiles[i]);
@@ -2111,6 +2109,7 @@ ProgressDownloadWindow(int choice2) {
//Creates URL depending from which Country the game is
switch (missingFiles[i][3]) {
case 'J':
+ case 'W':
sprintf(URLFile,"%sJA/%s",server2d,missingFiles[i]);
break;
case 'K':
@@ -2126,7 +2125,7 @@ ProgressDownloadWindow(int choice2) {
case 'H':
case 'X':
case 'Y':
- sprintf(URLFile,"%s%s/%s",server2d,sysLanguage,missingFiles[i]);
+ sprintf(URLFile,"%s%s/%s",server2d,Settings.db_language,missingFiles[i]);
break;
case 'E':
sprintf(URLFile,"%sUS/%s",server2d,missingFiles[i]);
@@ -2395,15 +2394,11 @@ int ProgressUpdateWindow() {
}
}
- // get Wii's language setting
- char sysLanguage[3];
- GetLanguageToLangCode(sysLanguage);
-
//make the URL to get XML based on our games
char XMLurl[2040];
char filename[10];
__Menu_GetEntries(1);
- snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s?ID=",sysLanguage);
+ snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s?ID=",Settings.db_language);
unsigned int i;
for (i = 0; i < gameCnt ; i++) {
struct discHdr* header = &gameList[i];
@@ -2664,15 +2659,11 @@ int ProgressUpdateWindow() {
}
}
- // get Wii's language setting
- char sysLanguage[3];
- GetLanguageToLangCode(sysLanguage);
-
//make the URL to get XML based on our games
char XMLurl[2040];
char filename[10];
__Menu_GetEntries(1);
- snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s?ID=",sysLanguage);
+ snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s?ID=",Settings.db_language);
unsigned int i;
for (i = 0; i < gameCnt ; i++) {
struct discHdr* header = &gameList[i];
@@ -3002,47 +2993,6 @@ char * GetMissingFiles() {
-/* get the language setting from the Wii settings and return a language code */
-void GetLanguageToLangCode(char *langcode) {
-
- switch (CONF_GetLanguage()) {
- case CONF_LANG_JAPANESE:
- sprintf(langcode, "JA");
- break;
- case CONF_LANG_ENGLISH:
- sprintf(langcode, "EN");
- break;
- case CONF_LANG_GERMAN:
- sprintf(langcode, "DE");
- break;
- case CONF_LANG_FRENCH:
- sprintf(langcode, "FR");
- break;
- case CONF_LANG_SPANISH:
- sprintf(langcode, "ES");
- break;
- case CONF_LANG_ITALIAN:
- sprintf(langcode, "IT");
- break;
- case CONF_LANG_DUTCH:
- sprintf(langcode, "NL");
- break;
- /*
- case CONF_LANG_PORTUGUESE:
- sprintf(langcode, "PO");
- break;
- */
- case CONF_LANG_SIMP_CHINESE:
- sprintf(langcode, "EN"); // default to EN for chinese
- break;
- case CONF_LANG_TRAD_CHINESE:
- sprintf(langcode, "EN"); // default to EN for chinese
- break;
- case CONF_LANG_KOREAN:
- sprintf(langcode, "KO");
- break;
- }
-}
/****************************************************************************
* HBCWindowPrompt
diff --git a/source/prompts/PromptWindows.h b/source/prompts/PromptWindows.h
index 6cb525c5..b908cf00 100644
--- a/source/prompts/PromptWindows.h
+++ b/source/prompts/PromptWindows.h
@@ -28,7 +28,6 @@ bool NetworkInitPrompt();
char * GetMissingFiles();
int WindowScreensaver();
int CodeDownload(const char *id);
-void GetLanguageToLangCode(char *langcode);
int HBCWindowPrompt(const char *name, const char *coder, const char *version,
const char *release_date, const char *long_description,
const char *iconPath, u64 filesize);
diff --git a/source/prompts/gameinfo.cpp b/source/prompts/gameinfo.cpp
index 81be03fb..60594f80 100644
--- a/source/prompts/gameinfo.cpp
+++ b/source/prompts/gameinfo.cpp
@@ -59,15 +59,19 @@ int showGameInfo(char *ID) {
int wifiY=0;
int intputX=200, inputY=-30, txtXOffset=90;
u8 nunchuk=0,
- classiccontroller=0,
- balanceboard=0,
- dancepad=0,
- guitar=0,
- gamecube=0,
- wheel=0,
- motionplus=0,
- drums=0,
- microphone=0;
+ classiccontroller=0,
+ balanceboard=0,
+ dancepad=0,
+ guitar=0,
+ gamecube=0,
+ wheel=0,
+ motionplus=0,
+ drums=0,
+ microphone=0,
+ zapper=0,
+ nintendods=0,
+ wiispeak=0,
+ vitalitysensor=0;
int newline=1;
u8 page=1;
@@ -87,6 +91,10 @@ int showGameInfo(char *ID) {
GuiImage * wheelImg = NULL;
GuiImage * balanceboardImg = NULL;
GuiImage * microphoneImg = NULL;
+ GuiImage * zapperImg = NULL;
+ GuiImage * nintendodsImg = NULL;
+ GuiImage * wiispeakImg = NULL;
+ GuiImage * vitalitysensorImg = NULL;
GuiImage * gcImg = NULL;
GuiImage * dialogBoxImg1 = NULL;
GuiImage * dialogBoxImg2 = NULL;
@@ -108,6 +116,10 @@ int showGameInfo(char *ID) {
GuiImageData * balanceboardImgData = NULL;
GuiImageData * dancepadImgData = NULL;
GuiImageData * microphoneImgData = NULL;
+ GuiImageData * zapperImgData = NULL;
+ GuiImageData * nintendodsImgData = NULL;
+ GuiImageData * wiispeakImgData = NULL;
+ GuiImageData * vitalitysensorImgData = NULL;
GuiImageData * gamecubeImgData = NULL;
GuiImageData * ratingImgData = NULL;
GuiImageData * cover = NULL;
@@ -213,8 +225,16 @@ int showGameInfo(char *ID) {
wheel=1;
if (strcmp(gameinfo.accessoriesReq[i],"balanceboard")==0)
balanceboard=1;
- if (strcmp(gameinfo.accessoriesReq[i],"microphone")==0)
+ if (strcmp(gameinfo.accessoriesReq[i],"microphone")==0)
microphone=1;
+ if (strcmp(gameinfo.accessoriesReq[i],"zapper")==0)
+ zapper=1;
+ if (strcmp(gameinfo.accessoriesReq[i],"nintendods")==0)
+ nintendods=1;
+ if (strcmp(gameinfo.accessoriesReq[i],"wiispeak")==0)
+ wiispeak=1;
+ if (strcmp(gameinfo.accessoriesReq[i],"vitalitysensor")==0)
+ vitalitysensor=1;
if (strcmp(gameinfo.accessoriesReq[i],"gamecube")==0)
gamecube=1;
}
@@ -244,6 +264,18 @@ int showGameInfo(char *ID) {
if (microphone) microphoneImgData = new GuiImageData(microphoneR_png);
else microphoneImgData = new GuiImageData(microphone_png);
+ if (zapper) zapperImgData = new GuiImageData(zapperR_png);
+ else zapperImgData = new GuiImageData(zapper_png);
+
+ if (wiispeak) wiispeakImgData = new GuiImageData(wiispeakR_png);
+ else wiispeakImgData = new GuiImageData(wiispeak_png);
+
+ if (nintendods) nintendodsImgData = new GuiImageData(nintendodsR_png);
+ else nintendodsImgData = new GuiImageData(nintendods_png);
+
+ //if (vitalitysensor) vitalitysensorImgData = new GuiImageData(vitalitysensorR_png);
+ //else vitalitysensorImgData = new GuiImageData(vitalitysensor_png);
+
if (balanceboard) balanceboardImgData = new GuiImageData(balanceboardR_png);
else balanceboardImgData = new GuiImageData(balanceboard_png);
@@ -270,6 +302,14 @@ int showGameInfo(char *ID) {
balanceboard=1;
if (strcmp(gameinfo.accessories[i],"microphone")==0)
microphone=1;
+ if (strcmp(gameinfo.accessories[i],"zapper")==0)
+ zapper=1;
+ if (strcmp(gameinfo.accessories[i],"nintendods")==0)
+ nintendods=1;
+ if (strcmp(gameinfo.accessories[i],"wiispeak")==0)
+ wiispeak=1;
+ if (strcmp(gameinfo.accessories[i],"vitalitysensor")==0)
+ vitalitysensor=1;
if (strcmp(gameinfo.accessories[i],"gamecube")==0)
gamecube=1;
}
@@ -393,6 +433,40 @@ int showGameInfo(char *ID) {
gameinfoWindow.Append(microphoneImg);
intputX += (CFG.widescreen ? microphoneImg->GetWidth() * .8 : microphoneImg->GetWidth())+5;
}
+ if (zapper==1) {
+ zapperImg = new GuiImage( zapperImgData);
+ zapperImg->SetWidescreen(CFG.widescreen);
+ zapperImg->SetPosition(intputX , inputY);
+ zapperImg->SetAlignment(0,4);
+ gameinfoWindow.Append(zapperImg);
+ intputX += (CFG.widescreen ? zapperImg->GetWidth() * .8 : zapperImg->GetWidth())+5;
+ }
+ if (wiispeak==1) {
+ wiispeakImg = new GuiImage(wiispeakImgData);
+ wiispeakImg->SetWidescreen(CFG.widescreen);
+ wiispeakImg->SetPosition(intputX , inputY);
+ wiispeakImg->SetAlignment(0,4);
+ gameinfoWindow.Append(wiispeakImg);
+ intputX += (CFG.widescreen ? wiispeakImg->GetWidth() * .8 : wiispeakImg->GetWidth())+5;
+ }
+ if (nintendods==1) {
+ nintendodsImg = new GuiImage(nintendodsImgData);
+ nintendodsImg->SetWidescreen(CFG.widescreen);
+ nintendodsImg->SetPosition(intputX , inputY);
+ nintendodsImg->SetAlignment(0,4);
+ gameinfoWindow.Append(nintendodsImg);
+ intputX += (CFG.widescreen ? nintendodsImg->GetWidth() * .8 : nintendodsImg->GetWidth())+5;
+ }
+ /*
+ if (vitalitysensor==1) {
+ vitalitysensorImg = new GuiImage(vitalitysensorImgData);
+ vitalitysensorImg->SetWidescreen(CFG.widescreen);
+ vitalitysensorImg->SetPosition(intputX , inputY);
+ vitalitysensorImg->SetAlignment(0,4);
+ gameinfoWindow.Append(vitalitysensorImg);
+ intputX += (CFG.widescreen ? vitalitysensorImg->GetWidth() * .8 : vitalitysensorImg->GetWidth())+5;
+ }
+ */
if (dancepad==1) {
dancepadImg = new GuiImage(dancepadImgData);
dancepadImg->SetWidescreen(CFG.widescreen);
@@ -420,14 +494,23 @@ int showGameInfo(char *ID) {
wifiplayersImgData= new GuiImageData(wifi4_png);
}
if (atoi(gameinfo.wifiplayers)>4) {
+ //wifiplayersImgData= new GuiImageData(wifi6_png);
wifiplayersImgData= new GuiImageData(wifi8_png);
}
- /*if (atoi(gameinfo.wifiplayers)>8){ uncomment this when we actually have these images and it is needed
- wifiplayersImgData= new GuiImageData(wifi12_png);}
- if (atoi(gameinfo.wifiplayers)>12){
- wifiplayersImgData= new GuiImageData(wifi16_png);}
- if (atoi(gameinfo.wifiplayers)>16){
- wifiplayersImgData= new GuiImageData(wifi32_png);}*/
+ /*
+ if (atoi(gameinfo.wifiplayers)>6) {
+ wifiplayersImgData= new GuiImageData(wifi8_png);
+ }
+ */
+ if (atoi(gameinfo.wifiplayers)>8) {
+ wifiplayersImgData= new GuiImageData(wifi12_png);
+ }
+ if (atoi(gameinfo.wifiplayers)>12) {
+ wifiplayersImgData= new GuiImageData(wifi16_png);
+ }
+ if (atoi(gameinfo.wifiplayers)>16) {
+ wifiplayersImgData= new GuiImageData(wifi32_png);
+ }
wifiplayersImg = new GuiImage(wifiplayersImgData);
wifiplayersImg->SetWidescreen(CFG.widescreen);
wifiplayersImg->SetPosition(intputX , inputY);
@@ -821,6 +904,10 @@ int showGameInfo(char *ID) {
delete wheelImg;
delete balanceboardImg;
delete microphoneImg;
+ delete zapperImg;
+ delete wiispeakImg;
+ delete nintendodsImg;
+ delete vitalitysensorImg;
delete gcImg;
delete dialogBoxImg1;
delete dialogBoxImg2;
@@ -842,6 +929,10 @@ int showGameInfo(char *ID) {
delete balanceboardImgData;
delete dancepadImgData;
delete microphoneImgData;
+ delete zapperImgData;
+ delete wiispeakImgData;
+ delete nintendodsImgData;
+ delete vitalitysensorImgData;
delete gamecubeImgData;
delete ratingImgData;
delete cover;
@@ -899,11 +990,8 @@ bool save_XML_URL() { // save xml url as as txt file for people without wifi
char XMLurl[2040];
char filename[10];
- // get Wii's language setting
- char sysLanguage[3];
- GetLanguageToLangCode(sysLanguage);
- snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s?ID=",sysLanguage);
+ snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s?ID=", Settings.db_language);
unsigned int i;
for (i = 0; i < gameCnt ; i++) {
struct discHdr* header = &gameList[i];
diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp
index d16210bd..4327fea4 100644
--- a/source/settings/Settings.cpp
+++ b/source/settings/Settings.cpp
@@ -16,12 +16,14 @@
#include "filelist.h"
#include "listfiles.h"
#include "sys.h"
+#include "cfg.h"
#define MAXOPTIONS 12
/*** Extern functions ***/
extern void ResumeGui();
extern void HaltGui();
-extern bool OpenXMLDatabase(bool openfile, bool loadtitles, bool freemem);
+extern bool OpenXMLDatabase(char* xmlfilepath, char* argdblang, bool argJPtoEN, bool openfile, bool loadtitles, bool keepopen);
+extern void title_set(char *id, char *title);
/*** Extern variables ***/
extern GuiWindow * mainWindow;
@@ -31,6 +33,9 @@ extern GuiImageData * pointer[4];
extern GuiImageData * background;
extern u8 shutdown;
extern u8 reset;
+extern struct discHdr * gameList;
+extern u32 gameCnt;
+
/****************************************************************************
* MenuSettings
@@ -42,8 +47,10 @@ int MenuSettings() {
bool exit = false;
// backup game language setting
- int opt_lang = 0;
- opt_lang = Settings.language;
+ char opt_lang[100];
+ strcpy(opt_lang,Settings.language_path);
+ // backup title override setting
+ int opt_override = Settings.titlesOverride;
enum {
FADE,
@@ -1563,7 +1570,6 @@ int MenuSettings() {
remove(GXGlobal_cfg);
}
gettextCleanUp();
- //lang_default();
CFG_Load();
menu = MENU_SETTINGS;
pageToDisplay = 0;
@@ -1686,11 +1692,11 @@ int MenuSettings() {
// if language has changed, reload titles
- int opt_langnew = 0;
- opt_langnew = Settings.language;
- if (Settings.titlesOverride==1 && opt_lang != opt_langnew) {
- OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, reload titles, do not keep in memory
- menu = MENU_DISCLIST;
+ char opt_langnew[100];
+ strcpy(opt_langnew,Settings.language_path);
+ int opt_overridenew = Settings.titlesOverride;
+ if (strcmp(opt_lang,opt_langnew) || (opt_override != opt_overridenew && Settings.titlesOverride==1)) {
+ OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, false, Settings.titlesOverride==1?true:false, true); // open file, reload titles, keep in memory
}
HaltGui();
@@ -1856,7 +1862,7 @@ int GameSettings(struct discHdr * header) {
optionBrowser2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
GuiWindow w(screenwidth, screenheight);
- int opt_lang = languageChoice; // backup language setting
+ //int opt_lang = languageChoice; // backup language setting
struct Game_CFG* game_cfg = CFG_get_game_opt(header->id);
int pageToDisplay = 1;
@@ -2200,13 +2206,15 @@ int GameSettings(struct discHdr * header) {
if (isInserted(bootDevice)) {
if (CFG_save_game_opt(header->id)) {
- // if language has changed, reload titles
+ /* commented because the database language now depends on the main language setting, this could be enabled again if there is a separate language setting for the database
+ // if game language has changed when saving game settings, reload titles
int opt_langnew = 0;
game_cfg = CFG_get_game_opt(header->id);
if (game_cfg) opt_langnew = game_cfg->language;
if (Settings.titlesOverride==1 && opt_lang != opt_langnew)
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, reload titles, do not keep in memory
// titles are refreshed in menu.cpp as soon as this function returns
+ */
WindowPrompt(tr("Successfully Saved"), 0, tr("OK"));
} else {
WindowPrompt(tr("Save Failed"), 0, tr("OK"));
@@ -2404,12 +2412,14 @@ int GameSettings(struct discHdr * header) {
parentalcontrolChoice = 0;
sprintf(alternatedname, " ");
CFG_forget_game_opt(header->id);
+ /* commented because the database language now depends on the main language setting, this could be enabled again if there is a separate language setting for the database
// if default language is different than language from main settings, reload titles
int opt_langnew = 0;
opt_langnew = Settings.language;
if (Settings.titlesOverride==1 && opt_lang != opt_langnew)
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, reload titles, do not keep in memory
// titles are refreshed in menu.cpp as soon as this function returns
+ */
}
pageToDisplay = 1;
@@ -2435,7 +2445,16 @@ int GameSettings(struct discHdr * header) {
s32 thetimeofbg = bgMusic->GetPlayTime();
bgMusic->Stop();
choice = WindowExitPrompt(tr("Exit USB Loader GX?"),0, tr("Back to Loader"),tr("Wii Menu"),tr("Back"),0);
- if (!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
+ /*
+ // if language has changed, reload titles
+ int opt_langnew = 0;
+ game_cfg = CFG_get_game_opt(header->id);
+ if (game_cfg) opt_langnew = game_cfg->language;
+ if (Settings.titlesOverride==1 && opt_lang != opt_langnew)
+ OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, false, Settings.titlesOverride==1?true:false, true); // open file, reload titles, keep in memory
+ // titles are refreshed in menu.cpp as soon as this function returns
+ */
+ if (!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
bgMusic->Play();
} else {
bgMusic->PlayOggFile(Settings.ogg_path);
diff --git a/source/settings/SettingsPrompts.cpp b/source/settings/SettingsPrompts.cpp
index eb787d42..63ff4b51 100644
--- a/source/settings/SettingsPrompts.cpp
+++ b/source/settings/SettingsPrompts.cpp
@@ -576,7 +576,6 @@ int MenuLanguageSelect() {
WindowPrompt(tr("File not found."),tr("Loading standard language."),tr("OK"));
}
gettextCleanUp();
- //lang_default();
CFG_Load();
returnhere = 2;
break;
diff --git a/source/settings/cfg.c b/source/settings/cfg.c
index 71ef066b..90aab710 100644
--- a/source/settings/cfg.c
+++ b/source/settings/cfg.c
@@ -8,6 +8,7 @@
#include
#include "language/gettext.h"
+#include "listfiles.h"
#include "xml/xml.h" /* XML - Lustar*/
#include "cfg.h"
@@ -1644,9 +1645,22 @@ void CFG_Load(void) {
snprintf(pathname, sizeof(pathname), "%sGXtheme.cfg", CFG.theme_path);
cfg_parsefile(pathname, &theme_set); //finally set theme information
-
- snprintf(pathname, sizeof(pathname), Settings.language_path);
- gettextLoadLanguage(pathname);
+
+ // set GUI language, use Wii's language setting if language is set to default
+ int wiilang;
+ bool langisdefault = false;
+ wiilang = CONF_GetLanguage();
+ if (!strcmp("notset", Settings.language_path)) {
+ snprintf(Settings.language_path, sizeof(Settings.language_path), "%s%s.lang", Settings.languagefiles_path, map_get_name(map_language, wiilang + 1)); // + 1 because because CONF_LANG starts at 0
+ if (!checkfile(Settings.language_path)) {
+ sprintf(Settings.language_path, "notset");
+ }
+ gettextLoadLanguage(Settings.language_path);
+ langisdefault = true;
+ }
+ snprintf(pathname, sizeof(pathname), Settings.language_path);
+ gettextLoadLanguage(pathname);
+
// cfg_parsefile(pathname, &language_set);
snprintf(pathname, sizeof(pathname), "%s/config/GXGameSettings.cfg", bootDevice);
@@ -1658,16 +1672,39 @@ void CFG_Load(void) {
Global_Default(); //global default depends on theme information
CFG_LoadGlobal();
+
+ // use GUI language for the database (Settings.db_language is used for game info/titles and covers)
+ char * languagefile;
+ languagefile = strrchr(Settings.language_path, '/')+1;
+ int mainlangid = -1;
+ int i;
+ for (i=0; map_language[i].name != NULL; i++) {
+ if (strstr(languagefile, map_language[i].name) != NULL) {
+ mainlangid = i - 1; // - 1 because CONF_LANG starts at 0
+ break;
+ }
+ }
+ GetLanguageToLangCode(&mainlangid, Settings.db_language);
+
+ // set language code for languages that are not available on the Wii
+ if (!strcmp(Settings.db_language,"")) {
+ if (strstr(languagefile, "portuguese") != NULL)
+ strcpy(Settings.db_language,"PO");
+ }
+
+ // open database if needed, load titles if needed
+ OpenXMLDatabase(Settings.titlestxt_path,Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true);
- //moved this to the HDD wait screen to avoid the garbled green screen while it is loading *maybe*
- //OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true);
- // loaded after database to override database titles with custom titles
-
+ // titles.txt loaded after database to override database titles with custom titles
//took out this titles.txt shit because it is useless now. teh xml has all the titles in it
//snprintf(pathname, sizeof(pathname), "%stitles.txt", Settings.titlestxt_path);
//cfg_parsefile(pathname, &title_set);
// cfg_parsearg(argc, argv);
+
+ // if GUI language is set to default Settings.language_path needs to remain "notset" (if the detected setting was kept detection wouldn't work next time)
+ if (langisdefault)
+ sprintf(Settings.language_path, "notset");
}
void CFG_LoadGlobal(void) {
@@ -1682,3 +1719,44 @@ void CFG_Cleanup(void) {
cfg_title = NULL;
}
}
+
+
+/* map language id (or Wii language settting if langid is set to -1) to language code. CONF_LANG_JAPANESE = 0, not 1 */
+void GetLanguageToLangCode(int *langid, char *langcode) {
+
+ if (langid < 0)
+ *langid = CONF_GetLanguage();
+
+ switch (*langid) {
+ case CONF_LANG_JAPANESE:
+ sprintf(langcode, "JA");
+ break;
+ case CONF_LANG_ENGLISH:
+ sprintf(langcode, "EN");
+ break;
+ case CONF_LANG_GERMAN:
+ sprintf(langcode, "DE");
+ break;
+ case CONF_LANG_FRENCH:
+ sprintf(langcode, "FR");
+ break;
+ case CONF_LANG_SPANISH:
+ sprintf(langcode, "ES");
+ break;
+ case CONF_LANG_ITALIAN:
+ sprintf(langcode, "IT");
+ break;
+ case CONF_LANG_DUTCH:
+ sprintf(langcode, "NL");
+ break;
+ case CONF_LANG_SIMP_CHINESE:
+ sprintf(langcode, "EN"); // default to EN for chinese
+ break;
+ case CONF_LANG_TRAD_CHINESE:
+ sprintf(langcode, "EN"); // default to EN for chinese
+ break;
+ case CONF_LANG_KOREAN:
+ sprintf(langcode, "KO");
+ break;
+ }
+}
diff --git a/source/settings/cfg.h b/source/settings/cfg.h
index 806fd451..9e2657fe 100644
--- a/source/settings/cfg.h
+++ b/source/settings/cfg.h
@@ -191,7 +191,6 @@ extern "C" {
void CFG_Default(int widescreen); // -1 = non forced mode
void CFG_Load(void);
- void lang_defualt();
struct Game_CFG* CFG_get_game_opt(u8 *id);
struct Game_NUM* CFG_get_game_num(u8 *id);
bool CFG_save_game_opt(u8 *id);
@@ -369,9 +368,12 @@ extern "C" {
void CFG_LoadGlobal(void);
bool cfg_save_global(void);
+ void GetLanguageToLangCode(int *langid, char *langcode);
bool OpenXMLDatabase(char* xmlfilepath, char* argdblang, bool argJPtoEN, bool openfile, bool loadtitles, bool freemem);
char *get_title(struct discHdr *header);
+ char *cfg_get_title(u8 *id) ;
+ void title_set(char *id, char *title);
u8 get_block(struct discHdr *header);
void CFG_Cleanup(void);
diff --git a/source/xml/xml.c b/source/xml/xml.c
index 3ba965bc..4e5b2621 100644
--- a/source/xml/xml.c
+++ b/source/xml/xml.c
@@ -12,14 +12,17 @@ Load game information from XML - Lustar
//#include "xml.h"
-
/* config */
static bool xmldebug = false;
static char xmlcfg_filename[100] = "wiitdb.zip";
static int xmlmaxsize = 1572864;
+
extern struct SSettings Settings; // for loader GX
+extern void title_set(char *id, char *title);
+extern char* trimcopy(char *dest, char *src, int size);
+
struct gameXMLinfo gameinfo;
struct gameXMLinfo gameinfo_reset;
@@ -75,13 +78,16 @@ bool OpenXMLDatabase(char* xmlfilepath, char* argdblang, bool argJPtoEN, bool op
snprintf(pathname, sizeof(pathname), "%swiitdb.zip", pathname);
if (openfile) opensuccess = OpenXMLFile(pathname);
}
- if (!opensuccess) {
+ if (!opensuccess && openfile) {
CloseXMLDatabase();
return false;
}
if (loadtitles) LoadTitlesFromXML(argdblang, argJPtoEN);
if (!keepopen) CloseXMLDatabase();
- }
+ } else {
+ if (loadtitles) LoadTitlesFromXML(argdblang, argJPtoEN);
+ if (!keepopen) CloseXMLDatabase();
+ }
return true;
}
@@ -200,6 +206,9 @@ char *GetLangSettingFromGame(char *gameid) {
/* convert language text into ISO 639 two-letter language code */
char *ConvertLangTextToCode(char *languagetxt) {
+ // do not convert if languagetext seems to be a two-letter language code
+ if (strlen(languagetxt) == 2)
+ return languagetxt;
int i;
for (i=0;i<=10;i++) {
if (!strcasecmp(languagetxt,langlist[i])) // case insensitive comparison
@@ -566,15 +575,16 @@ bool LoadGameInfoFromXML(char* gameid, char* langtxt)
if (!strcmp(gameinfo.region,"")) {
if (gameid[3] == 'E') strlcpy(gameinfo.region,"NTSC-U",sizeof(gameinfo.region));
if (gameid[3] == 'J') strlcpy(gameinfo.region,"NTSC-J",sizeof(gameinfo.region));
+ if (gameid[3] == 'W') strlcpy(gameinfo.region,"NTSC-J",sizeof(gameinfo.region));
if (gameid[3] == 'K') strlcpy(gameinfo.region,"NTSC-K",sizeof(gameinfo.region));
if (gameid[3] == 'P') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
- if (gameid[3] == 'X') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
- if (gameid[3] == 'Y') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
if (gameid[3] == 'D') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
if (gameid[3] == 'F') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
- if (gameid[3] == 'S') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
if (gameid[3] == 'I') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
+ if (gameid[3] == 'S') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
if (gameid[3] == 'H') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
+ if (gameid[3] == 'X') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
+ if (gameid[3] == 'Y') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
}
// free memory
diff --git a/source/xml/xml.h b/source/xml/xml.h
index bcf6b4f5..89a8406d 100644
--- a/source/xml/xml.h
+++ b/source/xml/xml.h
@@ -64,10 +64,6 @@ extern "C" {
char *MemInfo();
void GetTextFromNode(mxml_node_t *currentnode, mxml_node_t *topnode, char *nodename,
char *attributename, char *value, int descend, char *dest, int destsize);
-
- void title_set(char *id, char *title);
- char* trimcopy(char *dest, char *src, int size);
-
#ifdef __cplusplus
}
#endif