Simplified Chinese/Traditional Chinese should now be detected if the GUI language is set to "default". Simplified Chinese/Traditional Chinese is now supported for titles,synopsis and artwork (http://wiitdb.com/Game/RSPW01).

This commit is contained in:
lustar.mii 2009-08-03 13:25:50 +00:00
parent c25b7cf470
commit 324358e7e1
6 changed files with 81 additions and 24 deletions

View File

@ -1061,16 +1061,15 @@ int MenuDiscList() {
case 'E':
sprintf(gameregion,"NTSC U");
break;
case 'J':
case 'W':
sprintf(gameregion,"NTSC J");
break;
case 'W':
sprintf(gameregion,"NTSC T");
break;
case 'K':
sprintf(gameregion,"NTSC K");
break;
case 'P':
case 'D':
case 'F':

View File

@ -2023,12 +2023,12 @@ 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 'W':
sprintf(URLFile,"%sZH/%s",server3d,missingFiles[i]);
break;
case 'K':
//case 'T':
//case 'Q':
sprintf(URLFile,"%sKO/%s",server3d,missingFiles[i]);
break;
case 'P':
@ -2068,7 +2068,6 @@ ProgressDownloadWindow(int choice2) {
//Creates URL depending from which Country the game is
switch (missingFiles[i][3]) {
case 'J':
case 'W':
if(Settings.discart == 0) {
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
} else if(Settings.discart == 1) {
@ -2083,6 +2082,21 @@ ProgressDownloadWindow(int choice2) {
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
}
break;
case 'W':
if(Settings.discart == 0) {
sprintf(URLFile,"%sZH/%s",serverDisc,missingFiles[i]);
} else if(Settings.discart == 1) {
sprintf(URLFile,"%sZH/%s",serverDiscCustom,missingFiles[i]);
} else if(Settings.discart == 2 && tries == 0) {
sprintf(URLFile,"%sZH/%s",serverDisc,missingFiles[i]);
} else if(Settings.discart == 2 && tries == 1) {
sprintf(URLFile,"%sZH/%s",serverDiscCustom,missingFiles[i]);
} else if(Settings.discart == 3 && tries == 0) {
sprintf(URLFile,"%sZH/%s",serverDiscCustom,missingFiles[i]);
} else if(Settings.discart == 3 && tries == 1) {
sprintf(URLFile,"%sZH/%s",serverDisc,missingFiles[i]);
}
break;
case 'K':
if(Settings.discart == 0) {
sprintf(URLFile,"%sKO/%s",serverDisc,missingFiles[i]);
@ -2169,12 +2183,12 @@ ProgressDownloadWindow(int choice2) {
//Creates URL depending from which Country the game is
switch (missingFiles[i][3]) {
case 'J':
sprintf(URLFile,"%sJA/%s",server3d,missingFiles[i]);
break;
case 'W':
sprintf(URLFile,"%sJA/%s",server2d,missingFiles[i]);
sprintf(URLFile,"%sZH/%s",server3d,missingFiles[i]);
break;
case 'K':
//case 'T':
//case 'Q':
sprintf(URLFile,"%sKO/%s",server2d,missingFiles[i]);
break;
case 'P':
@ -2234,6 +2248,50 @@ ProgressDownloadWindow(int choice2) {
}
}
/**Temporary redownloading 1st image because of a fucking corruption bug **/
char URLFile[100];
struct block file = downloadfile(URLFile);
if (choice2 == 2) {
while (tries<serverCnt3d) {
sprintf(URLFile,"%s%s",server3d,missingFiles[0]);
sprintf(imgPath,"%s%s", Settings.covers_path, missingFiles[0]);
file = downloadfile(URLFile);
if (!(file.size == 36864 || file.size <= 1024 || file.size <= 1174 || file.size == 7386 || file.size == 4446 || file.data == NULL))break;
tries++;
}
}
if (choice2 == 3) {
while (tries<serverCntDisc) {
sprintf(URLFile,"%s%s",serverDisc,missingFiles[0]);
sprintf(imgPath,"%s%s", Settings.disc_path, missingFiles[0]);
file = downloadfile(URLFile);
if (!(file.size == 36864 || file.size <= 1024 || file.size <= 1174 || file.size == 7386 || file.size == 4446 || file.data == NULL))break;
tries++;
}
}
if (choice2 == 1) {
while (tries<serverCnt2d) {
sprintf(URLFile,"%s%s",server2d,missingFiles[0]);
sprintf(imgPath,"%s%s", Settings.covers_path, missingFiles[0]);
file = downloadfile(URLFile);
if (!(file.size == 36864 || file.size <= 1024 || file.size <= 1174 || file.size == 7386 || file.size == 4446 || file.data == NULL))break;
tries++;
}
}
if (file.size == 36864 || file.size <= 1024 || file.size == 7386 || file.size <= 1174 || file.size == 4446 || file.data == NULL) {
} else {
if (file.data != NULL) {
// save png to sd card
FILE *pfile;
pfile = fopen(imgPath, "wb");
fwrite(file.data,1,file.size,pfile);
fclose (pfile);
free(file.data);
}
}
HaltGui();
mainWindow->Remove(&promptWindow);
mainWindow->SetState(STATE_DEFAULT);

View File

@ -95,8 +95,8 @@ struct TextMap map_language[] = {
{ "spanish", CFG_LANG_SPANISH },
{ "italian", CFG_LANG_ITALIAN },
{ "dutch", CFG_LANG_DUTCH },
{ "s.chinese", CFG_LANG_S_CHINESE },
{ "t.chinese", CFG_LANG_T_CHINESE },
{ "schinese", CFG_LANG_S_CHINESE }, // without a dot between s and chinese to match the language filename "schinese.lang"
{ "tchinese", CFG_LANG_T_CHINESE },
{ "korean", CFG_LANG_KOREAN },
{ NULL, -1 }
};
@ -1770,10 +1770,10 @@ void GetLanguageToLangCode(int *langid, char *langcode) {
sprintf(langcode, "NL");
break;
case CONF_LANG_SIMP_CHINESE:
sprintf(langcode, "EN"); // default to EN for chinese
sprintf(langcode, "ZHCN"); // People's Republic of China
break;
case CONF_LANG_TRAD_CHINESE:
sprintf(langcode, "EN"); // default to EN for chinese
sprintf(langcode, "ZHTW"); // Taiwan
break;
case CONF_LANG_KOREAN:
sprintf(langcode, "KO");

View File

@ -359,7 +359,7 @@ extern "C" {
short error002;
u8 titlesOverride; // db_titles
char db_url[200];
char db_language[100];
char db_language[20];
u8 db_JPtoEN;
u8 gridRows;
u8 autonetwork;

View File

@ -39,7 +39,7 @@ static char langlist[11][22] = {{"Console Default"},
{"Korean"}
};
static char langcodes[11][3] = {{""},
static char langcodes[11][5] = {{""},
{"JA"},
{"EN"},
{"DE"},
@ -47,8 +47,8 @@ static char langcodes[11][3] = {{""},
{"ES"},
{"IT"},
{"NL"},
{"ZH"},
{"ZH"},
{"ZHCN"}, // People's Republic of China
{"ZHTW"}, // Taiwan
{"KO"}
};
@ -204,10 +204,10 @@ char *GetLangSettingFromGame(char *gameid) {
}
/* convert language text into ISO 639 two-letter language code */
/* convert language text into ISO 639 two-letter language code (+ZHTW/ZHCN) */
char *ConvertLangTextToCode(char *languagetxt) {
// do not convert if languagetext seems to be a two-letter language code
if (strlen(languagetxt) == 2)
// do not convert if languagetext seems to be a language code (can be 2 or 4 letters)
if (strlen(languagetxt) <= 4)
return languagetxt;
int i;
for (i=0;i<=10;i++) {

View File

@ -24,7 +24,7 @@ extern "C" {
char synopsis[3000];
char title_EN[200];
char synopsis_EN[3000];
char locales[XML_ELEMMAX+1][3];
char locales[XML_ELEMMAX+1][5];
int localeCnt;
char developer[75];
char publisher[75];