When wiitdb.zip is updated the file is now checked and titles/infos are reloaded. Made browser theme friendly (changes by virale in issue 905). Fixed alt-dol for SSX Blur (issue 865, thanks LoudBob11). Australian covers may be able to be downloaded now.

This commit is contained in:
lustar.mii 2009-09-07 01:47:13 +00:00
parent d9cc4ecd83
commit c1f16850f9
7 changed files with 67 additions and 32 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="true"></e><e p="gui\source\images" x="false"></e><e p="gui\source\prompts" x="true"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="true"></e><e p="gui\source\network" x="false"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="true"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\ramdisc" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="false"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="true"></e><e p="gui\source\language" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="true"></e><e p="gui\source\patches" x="false"></e></ViewState></pd> <pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="true"></e><e p="gui\source\images" x="false"></e><e p="gui\source\prompts" x="true"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="true"></e><e p="gui\source\network" x="false"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="true"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\ramdisc" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="false"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="true"></e><e p="gui\source\language" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="false"></e><e p="gui\source\patches" x="false"></e></ViewState></pd>

View File

@ -10,6 +10,8 @@
#include "gui.h" #include "gui.h"
#include "prompts/filebrowser.h" #include "prompts/filebrowser.h"
#include "../settings/cfg.h"
#define FILEBROWSERSIZE 8 #define FILEBROWSERSIZE 8
/** /**
@ -34,26 +36,33 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM); btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM); btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
bgFileSelection = new GuiImageData(bg_browser_png); char imgPath[100];
snprintf(imgPath, sizeof(imgPath), "%sbg_browser.png", CFG.theme_path);
bgFileSelection = new GuiImageData(imgPath, bg_browser_png);
bgFileSelectionImg = new GuiImage(bgFileSelection); bgFileSelectionImg = new GuiImage(bgFileSelection);
bgFileSelectionImg->SetParent(this); bgFileSelectionImg->SetParent(this);
bgFileSelectionImg->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); bgFileSelectionImg->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
bgFileSelectionEntry = new GuiImageData(bg_browser_selection_png); snprintf(imgPath, sizeof(imgPath), "%sbg_browser_selection.png", CFG.theme_path);
bgFileSelectionEntry = new GuiImageData(imgPath, bg_browser_selection_png);
fileFolder = new GuiImageData(folder_png); fileFolder = new GuiImageData(folder_png);
scrollbar = new GuiImageData(scrollbar_png); snprintf(imgPath, sizeof(imgPath), "%sscrollbar.png", CFG.theme_path);
scrollbar = new GuiImageData(imgPath, scrollbar_png);
scrollbarImg = new GuiImage(scrollbar); scrollbarImg = new GuiImage(scrollbar);
scrollbarImg->SetParent(this); scrollbarImg->SetParent(this);
scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
scrollbarImg->SetPosition(0, 2); scrollbarImg->SetPosition(0, 2);
scrollbarImg->SetSkew(0,0,0,0,0,-30,0,-30); scrollbarImg->SetSkew(0,0,0,0,0,-30,0,-30);
arrowDown = new GuiImageData(scrollbar_arrowdown_png); snprintf(imgPath, sizeof(imgPath), "%sscrollbar_arrowdown.png", CFG.theme_path);
arrowDown = new GuiImageData(imgPath, scrollbar_arrowdown_png);
arrowDownImg = new GuiImage(arrowDown); arrowDownImg = new GuiImage(arrowDown);
arrowUp = new GuiImageData(scrollbar_arrowup_png); snprintf(imgPath, sizeof(imgPath), "%sscrollbar_arrowup.png", CFG.theme_path);
arrowUp = new GuiImageData(imgPath, scrollbar_arrowup_png);
arrowUpImg = new GuiImage(arrowUp); arrowUpImg = new GuiImage(arrowUp);
scrollbarBox = new GuiImageData(scrollbar_box_png); snprintf(imgPath, sizeof(imgPath), "%sscrollbar_box.png", CFG.theme_path);
scrollbarBox = new GuiImageData(imgPath, scrollbar_box_png);
scrollbarBoxImg = new GuiImage(scrollbarBox); scrollbarBoxImg = new GuiImage(scrollbarBox);
arrowUpBtn = new GuiButton(arrowUpImg->GetWidth(), arrowUpImg->GetHeight()); arrowUpBtn = new GuiButton(arrowUpImg->GetWidth(), arrowUpImg->GetHeight());

View File

@ -244,8 +244,8 @@ int autoSelectDol(const char *id) {
if (strcmp(id,"REDP41") == 0) return 1957;//from isostar if (strcmp(id,"REDP41") == 0) return 1957;//from isostar
if (strcmp(id,"REDE41") == 0) return 1957;//starstremr if (strcmp(id,"REDE41") == 0) return 1957;//starstremr
if (strcmp(id,"RSXP69") == 0) return 337;//from isostar if (strcmp(id,"RSXP69") == 0) return 377;//previous value was 337
if (strcmp(id,"RSXE69") == 0) return 337;//starstremr if (strcmp(id,"RSXE69") == 0) return 377;//previous value was 337
if (strcmp(id,"RNBX69") == 0) return 964;//from isostar if (strcmp(id,"RNBX69") == 0) return 964;//from isostar

View File

@ -2015,7 +2015,7 @@ ProgressDownloadWindow(int choice2) {
if (cntMissFiles - i>1)msgTxt.SetTextf("%i %s", cntMissFiles - i, tr("files left")); if (cntMissFiles - i>1)msgTxt.SetTextf("%i %s", cntMissFiles - i, tr("files left"));
else msgTxt.SetTextf("%i %s", cntMissFiles - i, tr("file left")); else msgTxt.SetTextf("%i %s", cntMissFiles - i, tr("file left"));
msg2Txt.SetTextf("%s", missingFiles[i]); msg2Txt.SetTextf("http://wiitdb.com : %s", missingFiles[i]);
//download boxart image //download boxart image
@ -2591,14 +2591,26 @@ int ProgressUpdateWindow() {
free(file.data); free(file.data);
} }
msgTxt.SetTextf("%s", tr("Updating WiiTDB.zip")); msgTxt.SetTextf("%s", tr("Updating WiiTDB.zip"));
char wiitdbpath[200];
char wiitdbpathtmp[200];
file = downloadfile(XMLurl); file = downloadfile(XMLurl);
if (file.data != NULL) { if (file.data != NULL) {
sprintf(xmliconpath, "%swiitdb.zip", Settings.titlestxt_path); subfoldercreate(Settings.titlestxt_path);
subfoldercreate(xmliconpath); snprintf(wiitdbpath, sizeof(wiitdbpath), "%swiitdb.zip", Settings.titlestxt_path);
pfile = fopen(xmliconpath, "wb"); snprintf(wiitdbpathtmp, sizeof(wiitdbpathtmp), "%swiitmp.zip", Settings.titlestxt_path);
rename(wiitdbpath,wiitdbpathtmp);
pfile = fopen(wiitdbpath, "wb");
fwrite(file.data,1,file.size,pfile); fwrite(file.data,1,file.size,pfile);
fclose(pfile); fclose(pfile);
free(file.data); free(file.data);
CloseXMLDatabase();
if (OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true)) { // open file, reload titles, keep in memory
remove(wiitdbpathtmp);
} else {
remove(wiitdbpath);
rename(wiitdbpathtmp,wiitdbpath);
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true); // open file, reload titles, keep in memory
}
} }
msgTxt.SetTextf("%s", tr("Updating Language Files:")); msgTxt.SetTextf("%s", tr("Updating Language Files:"));
updateLanguageFiles(); updateLanguageFiles();
@ -2616,16 +2628,27 @@ int ProgressUpdateWindow() {
} }
} else if(updatemode == 2) { } else if(updatemode == 2) {
char wiitdbpath[200];
msgTxt.SetTextf("%s", tr("Updating WiiTDB.zip")); msgTxt.SetTextf("%s", tr("Updating WiiTDB.zip"));
char wiitdbpath[200];
char wiitdbpathtmp[200];
struct block file = downloadfile(XMLurl); struct block file = downloadfile(XMLurl);
if (file.data != NULL) { if (file.data != NULL) {
subfoldercreate(Settings.titlestxt_path);
snprintf(wiitdbpath, sizeof(wiitdbpath), "%swiitdb.zip", Settings.titlestxt_path); snprintf(wiitdbpath, sizeof(wiitdbpath), "%swiitdb.zip", Settings.titlestxt_path);
subfoldercreate(wiitdbpath); snprintf(wiitdbpathtmp, sizeof(wiitdbpathtmp), "%swiitmp.zip", Settings.titlestxt_path);
rename(wiitdbpath,wiitdbpathtmp);
FILE *pfile = fopen(wiitdbpath, "wb"); FILE *pfile = fopen(wiitdbpath, "wb");
fwrite(file.data,1,file.size,pfile); fwrite(file.data,1,file.size,pfile);
fclose(pfile); fclose(pfile);
free(file.data); free(file.data);
CloseXMLDatabase();
if (OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true)) { // open file, reload titles, keep in memory
remove(wiitdbpathtmp);
} else {
remove(wiitdbpath);
rename(wiitdbpathtmp,wiitdbpath);
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true); // open file, reload titles, keep in memory
}
} }
ret = 1; ret = 1;
} else if(updatemode == 3) { } else if(updatemode == 3) {

View File

@ -761,15 +761,16 @@ int showGameInfo(char *ID) {
} }
//don't bother us txt //don't bother us txt
snprintf(linebuf, sizeof(linebuf), tr("Don't bother the USB Loader GX Team about errors in this file.")); snprintf(linebuf, sizeof(linebuf), "http://wiitdb.com");
betaTxt = new GuiText(linebuf, 14, (GXColor) {0,0,0, 255}); //snprintf(linebuf, sizeof(linebuf), tr("Don't bother the USB Loader GX Team about errors in this file."));
betaTxt->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); betaTxt = new GuiText(linebuf, 17, (GXColor) {0,0,0, 255});
betaTxt->SetPosition(-17,-20); betaTxt->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
betaTxt->SetPosition(40,-15);
gameinfoWindow.Append(betaTxt); gameinfoWindow.Append(betaTxt);
snprintf(linebuf, sizeof(linebuf), tr("If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip")); snprintf(linebuf, sizeof(linebuf), tr("If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip"));
beta1Txt = new GuiText(linebuf, 14, (GXColor) {0,0,0, 255}); beta1Txt = new GuiText(linebuf, 14, (GXColor) {0,0,0, 255});
beta1Txt->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); beta1Txt->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
beta1Txt->SetPosition(-17,-10); beta1Txt->SetPosition(-17,-15);
gameinfoWindow.Append(beta1Txt); gameinfoWindow.Append(beta1Txt);
gameinfoWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 100); gameinfoWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 100);

View File

@ -1709,11 +1709,13 @@ void CFG_Load(void) {
} }
GetLanguageToLangCode(&mainlangid, Settings.db_language); GetLanguageToLangCode(&mainlangid, Settings.db_language);
// set language code for languages that are not available on the Wii // set language code for countries that don't have a language setting on the Wii
if (!strcmp(Settings.db_language,"")) { if (!strcmp(Settings.db_language,"")) {
if (strstr(languagefile, "portuguese") != NULL) if (strstr(languagefile, "portuguese") != NULL)
strcpy(Settings.db_language,"PT"); strcpy(Settings.db_language,"PT");
} }
if (CONF_GetArea() == CONF_AREA_AUS)
strcpy(Settings.db_language,"AU");
// open database if needed, load titles if needed // 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); OpenXMLDatabase(Settings.titlestxt_path,Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true);