-updated the default images and the image compression tools (thanks ayatus)

-fixed the language download crash when trying to download the languages a second time
-added a back button to the language manager
-updated german.ini
This commit is contained in:
fix94.1 2013-08-09 14:52:17 +00:00
parent 80d0815353
commit a4b1a5293e
35 changed files with 65 additions and 29 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 B

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
resources/DeflOpt.exe Normal file

Binary file not shown.

BIN
resources/advpng.exe Normal file

Binary file not shown.

View File

@ -1,2 +1,7 @@
for %%i in (..\data\images\*.png) do (pngout.exe "%%i" /ks || optipng.exe "%%i" -o7 -nb -nc)
for %%i in (..\data\images\*.png) do (
optipng.exe -o7 -nx "%%i"
pngout.exe /ks "%%i"
advpng.exe -z4 "%%i"
DeflOpt.exe "%%i"
)
pause

Binary file not shown.

View File

@ -132,6 +132,7 @@ CMenu::CMenu()
m_txt_path = NULL;
/* download stuff */
m_file = NULL;
m_buffer = NULL;
m_filesize = 0;
}

View File

@ -81,6 +81,7 @@ private:
u8 *m_wbf1_font;
u8 *m_wbf2_font;
u8 *m_file;
u8 *m_buffer;
u8 m_aa;
bool m_bnr_settings;
bool m_directLaunch;
@ -987,7 +988,7 @@ private:
};
void _cfNeedsUpdate(void);
void _game(bool launch = false);
u8 *_downloadUrl(const char *url, u8 **dl_file, u32 *dl_size);
void _downloadUrl(const char *url, u8 **dl_file, u32 *dl_size);
void _download(string gameId = string());
void _downloadBnr(const char *gameID);
bool _LangSettings(void);

View File

@ -2135,8 +2135,7 @@ void CMenu::_downloadBnr(const char *gameID)
}
const char *url_dl = NULL;
u8 *m_buffer = NULL;
u8 *CMenu::_downloadUrl(const char *url, u8 **dl_file, u32 *dl_size)
void CMenu::_downloadUrl(const char *url, u8 **dl_file, u32 *dl_size)
{
m_file = NULL;
m_filesize = 0;
@ -2208,8 +2207,6 @@ u8 *CMenu::_downloadUrl(const char *url, u8 **dl_file, u32 *dl_size)
m_file = NULL;
m_filesize = 0;
url_dl = url;
return m_buffer;
}
u32 CMenu::_downloadUrlAsync(void *obj)
@ -2231,14 +2228,14 @@ u32 CMenu::_downloadUrlAsync(void *obj)
}
u32 bufferSize = 0x400000; /* 4mb max */
u8 *buffer = (u8*)MEM2_alloc(bufferSize);
if(buffer == NULL)
m->m_buffer = (u8*)MEM2_alloc(bufferSize);
if(m->m_buffer == NULL)
{
m->m_thrdWorking = false;
return -2;
}
m_buffer = buffer;
block file = downloadfile(buffer, bufferSize, url_dl, CMenu::_downloadProgress, m);
block file = downloadfile(m->m_buffer, bufferSize, url_dl, CMenu::_downloadProgress, m);
DCFlushRange(m->m_buffer, bufferSize);
m->m_file = file.data;
m->m_filesize = file.size;
m->m_thrdWorking = false;

View File

@ -38,6 +38,8 @@ s16 m_LangSettingsBtnCurDlLangP;
s16 m_LangSettingsLblDownload;
s16 m_LangSettingsBtnDownload;
s16 m_LangSettingsBtnBack;
typedef struct {
char lang[32];
} language_list;
@ -84,6 +86,8 @@ void CMenu::_hideLangSettings(bool instant)
m_btnMgr.hide(m_LangSettingsLblDownload, instant);
m_btnMgr.hide(m_LangSettingsBtnDownload, instant);
m_btnMgr.hide(m_LangSettingsBtnBack, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_LangSettingsLblUser); ++i)
if(m_LangSettingsLblUser[i] != -1)
m_btnMgr.hide(m_LangSettingsLblUser[i], instant);
@ -98,11 +102,16 @@ void CMenu::_showLangSettings(void)
m_btnMgr.show(m_LangSettingsBtnCurLanguageM);
m_btnMgr.show(m_LangSettingsBtnCurLanguageP);
m_btnMgr.show(m_LangSettingsLblGetLanguages);
m_btnMgr.show(m_LangSettingsBtnGetLanguages);
if(lang_list_mem != NULL)
if(lang_list_mem == NULL)
{
m_btnMgr.show(m_LangSettingsLblGetLanguages);
m_btnMgr.show(m_LangSettingsBtnGetLanguages);
}
else /* with the list we dont need the get languages button */
{
m_btnMgr.hide(m_LangSettingsLblGetLanguages);
m_btnMgr.hide(m_LangSettingsBtnGetLanguages);
m_btnMgr.show(m_LangSettingsLblDlLang);
m_btnMgr.show(m_LangSettingsLblCurDLLang);
m_btnMgr.show(m_LangSettingsBtnCurDlLangM);
@ -115,6 +124,8 @@ void CMenu::_showLangSettings(void)
m_btnMgr.setText(m_LangSettingsLblCurDLLang, dl_lang_ex);
}
m_btnMgr.show(m_LangSettingsBtnBack);
for(u32 i = 0; i < ARRAY_SIZE(m_LangSettingsLblUser); ++i)
if(m_LangSettingsLblUser[i] != -1)
m_btnMgr.show(m_LangSettingsLblUser[i]);
@ -153,7 +164,9 @@ bool CMenu::_LangSettings(void)
break;
else if(BTN_A_PRESSED)
{
if(m_btnMgr.selected(m_LangSettingsBtnCurLanguageP) || m_btnMgr.selected(m_LangSettingsBtnCurLanguageM))
if(m_btnMgr.selected(m_LangSettingsBtnBack))
break;
else if(m_btnMgr.selected(m_LangSettingsBtnCurLanguageP) || m_btnMgr.selected(m_LangSettingsBtnCurLanguageM))
{
s8 direction = m_btnMgr.selected(m_LangSettingsBtnCurLanguageP) ? 1 : -1;
available_pos = loopNum(available_pos + direction, languages_available.size());
@ -172,34 +185,39 @@ bool CMenu::_LangSettings(void)
}
else if(m_btnMgr.selected(m_LangSettingsBtnGetLanguages))
{
/* reset our variables doh */
_hideLangSettings();
language_cnt = 0;
mem_pos = 0;
u8 *file = NULL;
u32 filesize = 0;
u8 *buffer = _downloadUrl(LANGUAGE_URL, &file, &filesize);
if(buffer != NULL)
_downloadUrl(LANGUAGE_URL, &file, &filesize);
if(m_buffer != NULL)
{
const char *search_char = "<li><a href=";
const char *search_char = "<li><a";
/* getting count */
char *start = (strstr((char*)file, search_char)); /* skipping the .. */
char *tmp = strstr(start, "\n")+1;
start = strstr(start, "\n") + 1; /* skipping the line */
char *tmp = start;
while((tmp = strstr(tmp, search_char)) != NULL)
{
language_cnt++;
tmp = strstr(tmp, "\n")+1;
tmp = strstr(tmp, "\n") + 1; /* next line */
}
/* creating list */
tmp = strstr(start, "\n")+1;
tmp = start;
lang_list_mem = (language_list*)MEM2_alloc(language_cnt*sizeof(language_list));
memset(lang_list_mem, 0, language_cnt*sizeof(language_list));
for(u32 i = 0; i < language_cnt; ++i)
{
tmp = strstr(tmp, search_char);
char *lang_chr = strchr(tmp, 0x22)+1;
memcpy(lang_list_mem[i].lang, lang_chr, std::min(31u, (u32)(strchr(lang_chr, '.')-lang_chr)));
tmp = strchr(tmp, '\n')+1;
char *lang_chr = strchr(tmp, 0x22) + 1; /* the " is the beginning for the name */
memcpy(lang_list_mem[i].lang, lang_chr, std::min(31u, (u32)(strchr(lang_chr, '.') - lang_chr)));
tmp = strstr(tmp, "\n") + 1; /* next line */
}
free(buffer);
free(m_buffer);
m_buffer = NULL;
}
_showLangSettings();
}
@ -216,13 +234,14 @@ bool CMenu::_LangSettings(void)
u32 filesize = 0;
const char *language_sel = lang_list_mem[mem_pos].lang;
const char *language_url_sel = fmt("%s%s.ini", LANGUAGE_URL, language_sel);
u8 *buffer = _downloadUrl(language_url_sel, &file, &filesize);
if(buffer != NULL)
_downloadUrl(language_url_sel, &file, &filesize);
if(m_buffer != NULL)
{
const char *language_ini = fmt("%s/%s.ini", m_languagesDir.c_str(), language_sel);
fsop_deleteFile(language_ini);
fsop_WriteFile(language_ini, file, filesize);
free(buffer);
free(m_buffer);
m_buffer = NULL;
}
m_loc.load(fmt("%s/%s.ini", m_languagesDir.c_str(), m_curLanguage.c_str()));
_updateText();
@ -263,6 +282,9 @@ void CMenu::_initLangSettingsMenu()
m_LangSettingsLblDownload = _addLabel("LANGUAGE/DOWNLOAD", theme.lblFont, L"", 40, 310, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_LangSettingsBtnDownload = _addButton("LANGUAGE/DOWNLOAD_BTN", theme.btnFont, L"", 330, 310, 270, 56, theme.btnFontColor);
m_LangSettingsBtnBack = _addButton("LANGUAGE/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 56, theme.btnFontColor);
_setHideAnim(m_LangSettingsLblTitle, "LANGUAGE/TITLE", 0, -200, 0.f, 1.f);
_setHideAnim(m_LangSettingsLblLanguage, "LANGUAGE/LANGUAGE", 100, 0, -2.f, 0.f);
@ -281,6 +303,8 @@ void CMenu::_initLangSettingsMenu()
_setHideAnim(m_LangSettingsLblDownload, "LANGUAGE/DOWNLOAD", 100, 0, -2.f, 0.f);
_setHideAnim(m_LangSettingsBtnDownload, "LANGUAGE/DOWNLOAD_BTN", 0, 0, 1.f, -1.f);
_setHideAnim(m_LangSettingsBtnBack, "LANGUAGE/BACK_BTN", 0, 0, -2.f, 0.f);
_hideLangSettings(true);
_textLangSettings();
}
@ -297,5 +321,7 @@ void CMenu::_textLangSettings(void)
m_btnMgr.setText(m_LangSettingsLblDlLang, _t("cfglng3", L"Select File"));
m_btnMgr.setText(m_LangSettingsLblDownload, _t("cfglng4", L"Download selected File"));
m_btnMgr.setText(m_LangSettingsBtnDownload, _t("cfgc5", L"Go"));
m_btnMgr.setText(m_LangSettingsBtnDownload, _t("cfg4", L"Download"));
m_btnMgr.setText(m_LangSettingsBtnBack, _t("cfg10", L"Back"));
}

View File

@ -57,6 +57,7 @@ cfgbnr6=Löschen
cfgbt1=Starteinstellungen
cfgbt2=Erzwinge Laden vom cIOS
cfgbt3=Erzwinge cIOS Version
cfgbt4=USB Anschluss
cfgc1=Zurück zu...
cfgc2=TV-Breite anpassen
cfgc3=TV-Höhe anpassen
@ -65,6 +66,7 @@ cfgc5=Start
cfgc6=Horizontaler Bildversatz
cfgc7=Vertikaler Bildversatz
cfgc8=Starteinstellungen
cfgc9=Verwalte Sprachen
cfgd5=Favoritenmodus merken
cfgd7=Kategorien beim Start anzeigen
cfgg1=Einstellungen
@ -103,6 +105,10 @@ cfgg4=Länder-Strings patchen
cfgg5=Ocarina
cfgg7=Video patchen
cfgg8=Zurück
cfglng1=Sprachen
cfglng2=Sprachen herunterladen
cfglng3=Wähle Sprachdatei
cfglng4=Gewählte Datei herunterladen
cfgne1=NAND Emulation
cfgne2=Entpacke Speicherstände
cfgne3=Alle