*threw out mxml because it is pissed on every little crap that is wrong in the xml and stops parsing the whole xml. Changed everything to use official TinyXML now (nice C++ classes). A lot of problems with categories and probably Wiinnertag now should be solved.

*fixed Theme Downloader to actually list the themes (wonder why no one reported that its broken)
*fixed freeze on 0 games and gameGrid
*added a "Sneek Video Patch" mode. According to WiiPower it can come in handy for some games. (Thanks to WiiPower)
*made showing categories on game details screen limited by the space available
*removed alt dol prompt on "default" setting for d2x users
*Added a Block SD Reload option
This commit is contained in:
dimok321 2011-06-25 19:50:57 +00:00
parent ac1c249bf3
commit 53574d6bc5
65 changed files with 6042 additions and 797 deletions

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>2.1 r1095</version> <version>2.1 r1096</version>
<release_date>201106241911</release_date> <release_date>201106241934</release_date>
<no_ios_reload/> <no_ios_reload/>
<short_description>Loads games from USB-devices</short_description> <short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times. <long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: David Jelinek (djelinek@hotmail.com) e->e,r->r,u->u, c->c \n" "Last-Translator: David Jelinek (djelinek@hotmail.com) e->e,r->r,u->u, c->c \n"
"Language-Team: r1056 - last version on http://djelinek.sweb.cz/_USBLoderGX/czech.lang \n" "Language-Team: r1056 - last version on http://djelinek.sweb.cz/_USBLoderGX/czech.lang \n"
@ -246,6 +246,9 @@ msgstr "Zablokovat rodičovskou kontrolu"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "Zablokovat původní nastavení" msgstr "Zablokovat původní nastavení"
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "Zablokovat nastavení zvuku" msgstr "Zablokovat nastavení zvuku"
@ -1269,6 +1272,9 @@ msgstr "Ukoncit systém"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "Vypnout Wii" msgstr "Vypnout Wii"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Trídení dle abecedy" msgstr "Trídení dle abecedy"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Fox888[dk]\n" "Last-Translator: Fox888[dk]\n"
"Language-Team: [dk]\n" "Language-Team: [dk]\n"
@ -246,6 +246,9 @@ msgstr "Bloker forældre indstillinger"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "Bloker nulstils indstillinger" msgstr "Bloker nulstils indstillinger"
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "Bloker lyd indstillinger" msgstr "Bloker lyd indstillinger"
@ -1269,6 +1272,9 @@ msgstr "Sluk (rødt lys)"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "Sluk Wii" msgstr "Sluk Wii"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Sortér alfabetisk" msgstr "Sortér alfabetisk"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2011-06-20 07:25+0100\n" "PO-Revision-Date: 2011-06-20 07:25+0100\n"
"Last-Translator: glowy\n" "Last-Translator: glowy\n"
"Language-Team: tj_cool, glowy\n" "Language-Team: tj_cool, glowy\n"
@ -246,6 +246,9 @@ msgstr "Blokkeer Ouderlijk toezicht"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "Blokkeer Reset Instellingen" msgstr "Blokkeer Reset Instellingen"
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "Blokkeer Geluid Instellingen" msgstr "Blokkeer Geluid Instellingen"
@ -1269,6 +1272,9 @@ msgstr "Systeem uitzetten"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "Wii uitzetten" msgstr "Wii uitzetten"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Alfabetisch sorteren" msgstr "Alfabetisch sorteren"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr ""
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "" msgstr ""

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: c64rmx\n" "Last-Translator: c64rmx\n"
"Language-Team: \n" "Language-Team: \n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "Sammuta järjestelmä"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Järjestä aakkosittain" msgstr "Järjestä aakkosittain"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Kin8\n" "Last-Translator: Kin8\n"
"Language-Team: Badablek, Amour, ikya, Cyan & Kin8\n" "Language-Team: Badablek, Amour, ikya, Cyan & Kin8\n"
@ -246,6 +246,9 @@ msgstr "Bloquer Contrôle parental"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "Bloquer Réinit. paramètres" msgstr "Bloquer Réinit. paramètres"
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "Bloquer Sons" msgstr "Bloquer Sons"
@ -1269,6 +1272,9 @@ msgstr "Arrêt"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "Éteindre la Wii" msgstr "Éteindre la Wii"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Ordre alphabétique" msgstr "Ordre alphabétique"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2010-07-03 17:35-0800\n" "PO-Revision-Date: 2010-07-03 17:35-0800\n"
"Last-Translator: TheRealVisitor\n" "Last-Translator: TheRealVisitor\n"
"Language-Team: Bertilax, Snoozer, wishmasterf, ZEN.13, TheRealVisitor\n" "Language-Team: Bertilax, Snoozer, wishmasterf, ZEN.13, TheRealVisitor\n"
@ -246,6 +246,9 @@ msgstr "Blocke Altersoptionen"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "Blocke Resetoptionen" msgstr "Blocke Resetoptionen"
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "Blocke Soundoptionen" msgstr "Blocke Soundoptionen"
@ -1269,6 +1272,9 @@ msgstr "System herunterfahren"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "Wii ausschalten" msgstr "Wii ausschalten"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Alphabetisch ordnen" msgstr "Alphabetisch ordnen"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-12-29 11:05+0100\n" "PO-Revision-Date: 2009-12-29 11:05+0100\n"
"Last-Translator: Springdale\n" "Last-Translator: Springdale\n"
"Language-Team: Tusk, Springdale\n" "Language-Team: Tusk, Springdale\n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "Leállítás"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Rendezés ABC-sorrendben" msgstr "Rendezés ABC-sorrendben"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2011-03-10 21:00+0200\n" "PO-Revision-Date: 2011-03-10 21:00+0200\n"
"Last-Translator: Cambo \n" "Last-Translator: Cambo \n"
"Language-Team: Cambo\n" "Language-Team: Cambo\n"
@ -246,6 +246,9 @@ msgstr "Blocca Contr. Genitori"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "Blocca Impost. Predef." msgstr "Blocca Impost. Predef."
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "Blocca Impost. Audio" msgstr "Blocca Impost. Audio"
@ -1269,6 +1272,9 @@ msgstr "Spegnimento"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "Spegni Wii" msgstr "Spegni Wii"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Ordine Alfabetico" msgstr "Ordine Alfabetico"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: hosigumayuugi\n" "Last-Translator: hosigumayuugi\n"
"Language-Team: hosigumayuugi, papa, ichiroling\n" "Language-Team: hosigumayuugi, papa, ichiroling\n"
@ -246,6 +246,9 @@ msgstr "使用制限設定を制限"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "設定の初期化を制限" msgstr "設定の初期化を制限"
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "サウンド設定を制限" msgstr "サウンド設定を制限"
@ -1269,6 +1272,9 @@ msgstr "シャットダウン"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "シャットダウン" msgstr "シャットダウン"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "名前順に並び替え" msgstr "名前順に並び替え"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: nextos@korea.com\n" "Last-Translator: nextos@korea.com\n"
"Language-Team: \n" "Language-Team: \n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "시스템 종료"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "알파벳순으로 정렬" msgstr "알파벳순으로 정렬"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: raschi\n" "Last-Translator: raschi\n"
"Language-Team: raschi\n" "Language-Team: raschi\n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "Skru helt av"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "Skru av Wii" msgstr "Skru av Wii"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Sortér alfabetisk" msgstr "Sortér alfabetisk"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: ziom666 (zadania_prog@vp.pl)\n" "Last-Translator: ziom666 (zadania_prog@vp.pl)\n"
"Language-Team: \n" "Language-Team: \n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "Wylacz"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Sortuj alfabetycznie" msgstr "Sortuj alfabetycznie"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-23 18:52+0200\n" "PO-Revision-Date: 2009-10-23 18:52+0200\n"
"Last-Translator: aniemotion\n" "Last-Translator: aniemotion\n"
"Language-Team: boto12, aniemotion\n" "Language-Team: boto12, aniemotion\n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "Desligar"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Ordenar por ordem alfabética" msgstr "Ordenar por ordem alfabética"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2011-06-14 00:00-0000\n" "PO-Revision-Date: 2011-06-14 00:00-0000\n"
"Last-Translator: pplucky <pplucky@gmail.com>\n" "Last-Translator: pplucky <pplucky@gmail.com>\n"
"Language-Team: Sky8000, pplucky\n" "Language-Team: Sky8000, pplucky\n"
@ -246,6 +246,9 @@ msgstr "Bloquear Config. Parental"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "Bloquear Reinicialização Config." msgstr "Bloquear Reinicialização Config."
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "Bloquear Config. Som" msgstr "Bloquear Config. Som"
@ -1269,6 +1272,9 @@ msgstr "Desligar"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "Desligar Wii" msgstr "Desligar Wii"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Ordenar por ordem alfabética" msgstr "Ordenar por ordem alfabética"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: nikolai_ca\n" "Last-Translator: nikolai_ca\n"
"Language-Team: Kir, alendit, nikolai_ca\n" "Language-Team: Kir, alendit, nikolai_ca\n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "Выключить систему"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Сортировать по алфавиту" msgstr "Сортировать по алфавиту"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: knife.hu kavid emul8ion\n" "Last-Translator: knife.hu kavid emul8ion\n"
"Language-Team: kavid\n" "Language-Team: kavid\n"
@ -246,6 +246,9 @@ msgstr "家长控制设置"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "重置设置" msgstr "重置设置"
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "声音设置" msgstr "声音设置"
@ -1269,6 +1272,9 @@ msgstr "关闭系统"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "关闭 Wii" msgstr "关闭 Wii"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "按字母排序" msgstr "按字母排序"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: SirPalax\n" "Last-Translator: SirPalax\n"
"Language-Team: Penn, SirPalax\n" "Language-Team: Penn, SirPalax\n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "Apagar Sistema"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Ordenar alfabéticamente" msgstr "Ordenar alfabéticamente"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2010-01-19 17:39+0200\n" "PO-Revision-Date: 2010-01-19 17:39+0200\n"
"Last-Translator: Katsurou\n" "Last-Translator: Katsurou\n"
"Language-Team: Katsurou, pirateX\n" "Language-Team: Katsurou, pirateX\n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "Stäng av helt"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Sortera alfabetiskt" msgstr "Sortera alfabetiskt"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2010-02-15 21:00+0800\n" "PO-Revision-Date: 2010-02-15 21:00+0800\n"
"Last-Translator: Jane.H\n" "Last-Translator: Jane.H\n"
"Language-Team: kyogc, Miller, Mika Li, Jane.H\n" "Language-Team: kyogc, Miller, Mika Li, Jane.H\n"
@ -246,6 +246,9 @@ msgstr "封鎖親子設定"
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "封鎖重置設定" msgstr "封鎖重置設定"
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "封鎖音效設定" msgstr "封鎖音效設定"
@ -1269,6 +1272,9 @@ msgstr "關閉系統"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "關閉Wii主機" msgstr "關閉Wii主機"
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "以字母順序排序" msgstr "以字母順序排序"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Nitro_subzero \n" "Last-Translator: Nitro_subzero \n"
"Language-Team: Nitro_subzero\n" "Language-Team: Nitro_subzero\n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "ปิดระบบ"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "เรียงตามตัวอักษร" msgstr "เรียงตามตัวอักษร"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-24 21:05+0200\n" "POT-Creation-Date: 2011-06-25 21:43+0200\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: omercigingelini\n" "Last-Translator: omercigingelini\n"
"Language-Team: omercigingelini\n" "Language-Team: omercigingelini\n"
@ -246,6 +246,9 @@ msgstr ""
msgid "Block Reset Settings" msgid "Block Reset Settings"
msgstr "" msgstr ""
msgid "Block SD Reload Button"
msgstr ""
msgid "Block Sound Settings" msgid "Block Sound Settings"
msgstr "" msgstr ""
@ -1269,6 +1272,9 @@ msgstr "Sistemi Kapat"
msgid "Shutdown Wii" msgid "Shutdown Wii"
msgstr "" msgstr ""
msgid "Sneek Video Patch"
msgstr ""
msgid "Sort alphabetically" msgid "Sort alphabetically"
msgstr "Alfabetik Diz" msgstr "Alfabetik Diz"

View File

@ -75,7 +75,7 @@ endif
# any extra libraries we wish to link with the project # any extra libraries we wish to link with the project
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
LIBS := -lpngu -lpng -lgd -lm -lz -lwiiuse -lbte -lasnd -logc -lfreetype -lvorbisidec \ LIBS := -lpngu -lpng -lgd -lm -lz -lwiiuse -lbte -lasnd -logc -lfreetype -lvorbisidec \
-lmad -lmxml -ljpeg -lzip -lcustomfat -lcustomntfs -lcustomext2fs -lmad -ljpeg -lzip -lcustomfat -lcustomntfs -lcustomext2fs
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing # list of directories containing libraries, this must be the top level containing
# include and lib # include and lib

File diff suppressed because one or more lines are too long

View File

@ -471,7 +471,7 @@ void GuiElement::SetEffect(int eff, int speed, f32 circles, int r, f32 startdegr
xoffsetDyn = 0; //!position of circle in x xoffsetDyn = 0; //!position of circle in x
yoffsetDyn = 0; //!position of circle in y yoffsetDyn = 0; //!position of circle in y
Radius = r; //!radius of the circle Radius = r; //!radius of the circle
degree = startdegree; //!for example -90 (<EFBFBD>) to start at top of circle degree = startdegree; //!for example -90 (°) to start at top of circle
circleamount = circles; //!circleamoutn in degrees for example 360 for 1 circle circleamount = circles; //!circleamoutn in degrees for example 360 for 1 circle
angleDyn = 0.0f; //!this is used by the code to calc the angle angleDyn = 0.0f; //!this is used by the code to calc the angle
anglespeed = anglespeedset; //!This is anglespeed depending on circle speed 1 is same speed and 0.5 half speed anglespeed = anglespeedset; //!This is anglespeed depending on circle speed 1 is same speed and 0.5 half speed
@ -814,7 +814,7 @@ void GuiElement::UnlockElement()
// LWP_MutexUnlock(mutex); // LWP_MutexUnlock(mutex);
LWP_MutexLock(_lock_mutex); LWP_MutexLock(_lock_mutex);
// only the thread was locked this element, can call unlock // only the thread was locked this element, can call unlock
if (_lock_thread == LWP_GetSelf()) // but we check it here <EFBFBD> safe is safe if (_lock_thread == LWP_GetSelf()) // but we check it here safe is safe
{ {
if (--_lock_count == 0) // dec count of locks and check if it last lock; if (--_lock_count == 0) // dec count of locks and check if it last lock;
{ {

View File

@ -53,7 +53,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, const char *themePath, int offset
width = w; width = w;
height = h; height = h;
pagesize = (gameList.size() < 11) ? gameList.size() : 11; pagesize = (gameList.size() < 11) ? gameList.size() : 11;
listOffset = (gameList.size() < 11) ? MIN(offset, gameList.size()-1) : MIN(offset, gameList.size())-2; listOffset = (gameList.size() < 11) ? LIMIT(offset, 0, MAX(0, gameList.size()-1)) : LIMIT(offset, 0, MAX(0, gameList.size()-1))-2;
selectable = true; selectable = true;
selectedItem = -1; selectedItem = -1;
focus = 1; // allow focus focus = 1; // allow focus

View File

@ -205,7 +205,7 @@ GuiGameGrid::GuiGameGrid(int w, int h, const char *themePath, int offset) :
{ {
width = w; width = w;
height = h; height = h;
listOffset = MIN(offset, gameList.size()-1); listOffset = LIMIT(offset, 0, MAX(0, gameList.size()-1));
theme_posX = thInt("0 - game grid layout pos x"); theme_posX = thInt("0 - game grid layout pos x");
theme_posY = thInt("20 - game grid layout pos y"); theme_posY = thInt("20 - game grid layout pos y");
@ -261,9 +261,6 @@ GuiGameGrid::GuiGameGrid(int w, int h, const char *themePath, int offset) :
btnRowDown->SetPosition(0, 0); btnRowDown->SetPosition(0, 0);
btnRowDown->SetTrigger(trig1); btnRowDown->SetTrigger(trig1);
// Page-Stuff
gameIndex = NULL;
Reload(Settings.gridRows, listOffset); Reload(Settings.gridRows, listOffset);
} }
@ -297,24 +294,23 @@ GuiGameGrid::~GuiGameGrid()
for (u32 i = 0; i < titleTT.size(); ++i) for (u32 i = 0; i < titleTT.size(); ++i)
delete titleTT[i]; delete titleTT[i];
if(gameIndex)
delete [] gameIndex;
game.clear(); game.clear();
coverImg.clear(); coverImg.clear();
titleTT.clear(); titleTT.clear();
gameIndex.clear();
} }
void GuiGameGrid::SetFocus(int f) void GuiGameGrid::SetFocus(int f)
{ {
LOCK( this ); LOCK( this );
if (!gameList.size()) return;
focus = f; focus = f;
for (int i = 0; i < pagesize; i++) for (u32 i = 0; i < game.size(); i++)
game[i]->ResetState(); game[i]->ResetState();
if (f == 1 && selectedItem >= 0) game[selectedItem]->SetState(STATE_SELECTED); if (f == 1 && selectedItem >= 0 && selectedItem < (int) game.size())
game[selectedItem]->SetState(STATE_SELECTED);
} }
void GuiGameGrid::ResetState() void GuiGameGrid::ResetState()
@ -326,7 +322,7 @@ void GuiGameGrid::ResetState()
stateChan = -1; stateChan = -1;
} }
for (int i = 0; i < pagesize; i++) for (u32 i = 0; i < game.size(); i++)
{ {
game[i]->ResetState(); game[i]->ResetState();
} }
@ -336,7 +332,7 @@ int GuiGameGrid::GetClickedOption()
{ {
LOCK( this ); LOCK( this );
int found = -1; int found = -1;
if (clickedItem >= 0) if (clickedItem >= 0 && clickedItem < (int) game.size())
{ {
game[clickedItem]->SetState(STATE_SELECTED); game[clickedItem]->SetState(STATE_SELECTED);
found = gameIndex[clickedItem]; found = gameIndex[clickedItem];
@ -349,7 +345,7 @@ int GuiGameGrid::GetSelectedOption()
{ {
LOCK( this ); LOCK( this );
int found = -1; int found = -1;
for (int i = 0; i < pagesize; i++) for (u32 i = 0; i < game.size(); i++)
{ {
if (game[i]->GetState() == STATE_SELECTED) if (game[i]->GetState() == STATE_SELECTED)
{ {
@ -426,7 +422,8 @@ void GuiGameGrid::Draw()
btnRowUp->Draw(); btnRowUp->Draw();
btnRowDown->Draw(); btnRowDown->Draw();
if (focus && Settings.tooltips == ON) for (int i = 0; i < pagesize; i++) if (focus && Settings.tooltips == ON)
for (int i = 0; i < pagesize; i++)
game[i]->DrawTooltip(); game[i]->DrawTooltip();
this->UpdateEffects(); this->UpdateEffects();
@ -442,9 +439,9 @@ void GuiGameGrid::ChangeRows(int n)
void GuiGameGrid::Update(GuiTrigger * t) void GuiGameGrid::Update(GuiTrigger * t)
{ {
LOCK( this );
if (state == STATE_DISABLED || !t || !gameList.size()) return; if (state == STATE_DISABLED || !t || !gameList.size()) return;
LOCK( this );
if (!(game[0]->GetEffect() || game[0]->GetEffectOnOver())) if (!(game[0]->GetEffect() || game[0]->GetEffectOnOver()))
{ {
for (int i = 0; i < pagesize; i++) for (int i = 0; i < pagesize; i++)
@ -683,7 +680,8 @@ void GuiGameGrid::Update(GuiTrigger * t)
{ {
if ((rows == 1) && (gameList.size() >= 18)) if ((rows == 1) && (gameList.size() >= 18))
this->ChangeRows(2); this->ChangeRows(2);
else if ((rows == 2) && (gameList.size() >= 45)) this->ChangeRows(3); else if ((rows == 2) && (gameList.size() >= 45))
this->ChangeRows(3);
btnRowUp->ResetState(); btnRowUp->ResetState();
return; return;
} }
@ -692,12 +690,15 @@ void GuiGameGrid::Update(GuiTrigger * t)
{ {
if (rows == 3) if (rows == 3)
this->ChangeRows(2); this->ChangeRows(2);
else if (rows == 2) this->ChangeRows(1); else if (rows == 2)
this->ChangeRows(1);
btnRowDown->ResetState(); btnRowDown->ResetState();
return; return;
} }
if (updateCB) updateCB(this); if (updateCB)
updateCB(this);
} }
void GuiGameGrid::Reload(int Rows, int ListOffset) void GuiGameGrid::Reload(int Rows, int ListOffset)
@ -717,11 +718,10 @@ void GuiGameGrid::Reload(int Rows, int ListOffset)
for (u32 i = 0; i < titleTT.size(); ++i) for (u32 i = 0; i < titleTT.size(); ++i)
delete titleTT[i]; delete titleTT[i];
if(gameIndex)
delete [] gameIndex;
game.clear(); game.clear();
coverImg.clear(); coverImg.clear();
titleTT.clear(); titleTT.clear();
gameIndex.clear();
goLeft = 0; goLeft = 0;
goRight = 0; goRight = 0;
@ -739,8 +739,14 @@ void GuiGameGrid::Reload(int Rows, int ListOffset)
pagesize = ROWS2PAGESIZE( rows ); pagesize = ROWS2PAGESIZE( rows );
if(gameList.size() == 0)
{
pagesize = 0;
return;
}
// Page-Stuff // Page-Stuff
gameIndex = new int[pagesize]; gameIndex.resize(pagesize);
titleTT.resize(pagesize); titleTT.resize(pagesize);
coverImg.resize(pagesize); coverImg.resize(pagesize);
game.resize(pagesize); game.resize(pagesize);

View File

@ -35,7 +35,7 @@ class GuiGameGrid : public GuiGameBrowser
int theme_posX; int theme_posX;
int theme_posY; int theme_posY;
int * gameIndex; std::vector<int> gameIndex;
std::vector<GuiButton *> game; std::vector<GuiButton *> game;
std::vector<GuiTooltip *> titleTT; std::vector<GuiTooltip *> titleTT;
std::vector<GuiImageAsync *> coverImg; std::vector<GuiImageAsync *> coverImg;

View File

@ -7,7 +7,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "FileOperations/fileops.h" #include "FileOperations/fileops.h"
#include "xml/xml.h" #include "xml/tinyxml.h"
#include "gecko.h" #include "gecko.h"
#include "HomebrewXML.h" #include "HomebrewXML.h"
@ -24,74 +24,65 @@ int HomebrewXML::LoadHomebrewXMLData(const char* filename)
LongDescription.clear(); LongDescription.clear();
Releasedate.clear(); Releasedate.clear();
/* Load XML file */ TiXmlDocument xmlDoc(filename);
u8 * xmlbuffer = NULL; if(!xmlDoc.LoadFile())
u64 size = 0; return false;
LoadFileToMem(filename, &xmlbuffer, &size);
if(!xmlbuffer) TiXmlElement *appNode = xmlDoc.FirstChildElement("app");
return -1;
mxml_node_t * nodetree = mxmlLoadString(NULL, (const char *) xmlbuffer, MXML_OPAQUE_CALLBACK); TiXmlElement *node = NULL;
if (!nodetree) node = appNode->FirstChildElement("name");
return -2; if(node && node->FirstChild() && node->FirstChild()->Value())
Name = node->FirstChild()->Value();
mxml_node_t * node = mxmlFindElement(nodetree, nodetree, "app", NULL, NULL, MXML_DESCEND_FIRST); node = appNode->FirstChildElement("coder");
if (!node) if(node && node->FirstChild() && node->FirstChild()->Value())
return -5; Coder = node->FirstChild()->Value();
char * Entrie = new char[ENTRIE_SIZE]; node = appNode->FirstChildElement("version");
if(node && node->FirstChild() && node->FirstChild()->Value())
Version = node->FirstChild()->Value();
Entrie[0] = '\0'; node = appNode->FirstChildElement("short_description");
GetTextFromNode(node, nodetree, (char*) "name", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); if(node && node->FirstChild() && node->FirstChild()->Value())
Name = Entrie; ShortDescription = node->FirstChild()->Value();
Entrie[0] = '\0'; node = appNode->FirstChildElement("long_description");
GetTextFromNode(node, nodetree, (char*) "coder", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); if(node && node->FirstChild() && node->FirstChild()->Value())
Coder = Entrie; LongDescription = node->FirstChild()->Value();
Entrie[0] = '\0'; char ReleaseText[200];
GetTextFromNode(node, nodetree, (char*) "version", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); memset(ReleaseText, 0, sizeof(ReleaseText));
Version = Entrie;
Entrie[0] = '\0'; node = appNode->FirstChildElement("release_date");
GetTextFromNode(node, nodetree, (char*) "short_description", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); if(node && node->FirstChild() && node->FirstChild()->Value())
ShortDescription = Entrie; snprintf(ReleaseText, sizeof(ReleaseText), node->FirstChild()->Value());
Entrie[0] = '\0'; int len = (strlen(ReleaseText) - 6); //length of the date string without the 200000 at the end
GetTextFromNode(node, nodetree, (char*) "long_description", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE);
LongDescription = Entrie;
Entrie[0] = '\0';
GetTextFromNode(node, nodetree, (char*) "release_date", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE);
int len = (strlen(Entrie) - 6); //length of the date string without the 200000 at the end
if (len == 8) if (len == 8)
snprintf(Entrie, ENTRIE_SIZE, "%c%c/%c%c/%c%c%c%c", Entrie[4], Entrie[5], Entrie[6], Entrie[7], Entrie[0], snprintf(ReleaseText, sizeof(ReleaseText), "%c%c/%c%c/%c%c%c%c", ReleaseText[4], ReleaseText[5], ReleaseText[6], ReleaseText[7], ReleaseText[0], ReleaseText[1], ReleaseText[2], ReleaseText[3]);
Entrie[1], Entrie[2], Entrie[3]);
else if (len == 6) else if (len == 6)
snprintf(Entrie, ENTRIE_SIZE, "%c%c/%c%c%c%c", Entrie[4], Entrie[5], Entrie[0], Entrie[1], Entrie[2], Entrie[3]); snprintf(ReleaseText, sizeof(ReleaseText), "%c%c/%c%c%c%c", ReleaseText[4], ReleaseText[5], ReleaseText[0], ReleaseText[1], ReleaseText[2], ReleaseText[3]);
else snprintf(Entrie, ENTRIE_SIZE, "%s", Entrie); else
snprintf(ReleaseText, sizeof(ReleaseText), "%s", ReleaseText);
Releasedate = Entrie; Releasedate = ReleaseText;
node = mxmlFindElement(node, nodetree, "arguments", NULL, NULL, MXML_DESCEND_FIRST); node = appNode->FirstChildElement("arguments");
if(!node)
return 1;
while(node) TiXmlElement *argNode = node->FirstChildElement("arg");
while(argNode)
{ {
Entrie[0] = '\0'; if(argNode->FirstChild() && argNode->FirstChild()->Value())
node = GetTextFromNode(node, nodetree, (char*) "arg", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); Arguments.push_back(std::string(argNode->FirstChild()->Value()));
if(node)
Arguments.push_back(std::string(Entrie)); argNode = argNode->NextSiblingElement();
} }
delete[] Entrie;
mxmlDelete(node);
mxmlDelete(nodetree);
free(xmlbuffer);
return 1; return 1;
} }

View File

@ -28,7 +28,6 @@
#include "usbloader/GameList.h" #include "usbloader/GameList.h"
#include "usbloader/MountGamePartition.h" #include "usbloader/MountGamePartition.h"
#include "mload/mload_modules.h" #include "mload/mload_modules.h"
#include "xml/xml.h"
#include "audio.h" #include "audio.h"
#include "gecko.h" #include "gecko.h"
#include "menu.h" #include "menu.h"

View File

@ -25,6 +25,7 @@
#include "settings/CGameStatistics.h" #include "settings/CGameStatistics.h"
#include "settings/CGameSettings.h" #include "settings/CGameSettings.h"
#include "settings/GameTitles.h" #include "settings/GameTitles.h"
#include "system/IosLoader.h"
#include "utils/StringTools.h" #include "utils/StringTools.h"
#include "utils/rockout.h" #include "utils/rockout.h"
#include "utils/ShowError.h" #include "utils/ShowError.h"
@ -614,6 +615,7 @@ void GameBrowseMenu::ReloadBrowser()
if (Settings.gameDisplay == LIST_MODE) if (Settings.gameDisplay == LIST_MODE)
{ {
if(gameList.size() > 0)
Append(gameCoverImg); Append(gameCoverImg);
DownloadBtn->SetSize(160, 224); DownloadBtn->SetSize(160, 224);
listBtn->SetImage(listBtnImg); listBtn->SetImage(listBtnImg);
@ -721,6 +723,7 @@ void GameBrowseMenu::ReloadBrowser()
Append(usedSpaceTxt); Append(usedSpaceTxt);
if (thInt("1 - show game count: 1 for on and 0 for off") == 1) //force show game cnt info if (thInt("1 - show game count: 1 for on and 0 for off") == 1) //force show game cnt info
Append(gamecntBtn); Append(gamecntBtn);
if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_SD_RELOAD_BUTTON))
Append(sdcardBtn); Append(sdcardBtn);
Append(poweroffBtn); Append(poweroffBtn);
Append(gameInfo); Append(gameInfo);
@ -1354,7 +1357,11 @@ int GameBrowseMenu::OpenClickedGame()
returnHere = true; returnHere = true;
} }
else if(game_cfg->loadalternatedol == 4) else if(game_cfg->loadalternatedol == 4)
{
iosinfo_t *info = IosLoader::GetIOSInfo(game_cfg->ios == INHERIT ? Settings.cios : game_cfg->ios);
if(!info || info->version < 6)
defaultDolPrompt((char *) header->id); defaultDolPrompt((char *) header->id);
}
if (RunGame && (game_cfg->ocarina == ON || (game_cfg->ocarina == INHERIT && Settings.ocarina == ON))) if (RunGame && (game_cfg->ocarina == ON || (game_cfg->ocarina == INHERIT && Settings.ocarina == ON)))
CheckOcarina(IDfull); CheckOcarina(IDfull);

View File

@ -26,6 +26,7 @@
#include "settings/CSettings.h" #include "settings/CSettings.h"
#include "network/networkops.h" #include "network/networkops.h"
#include "utils/StringTools.h" #include "utils/StringTools.h"
#include "xml/tinyxml.h"
#include "gecko.h" #include "gecko.h"
Wiinnertag::Wiinnertag(const string &filepath) Wiinnertag::Wiinnertag(const string &filepath)
@ -35,27 +36,16 @@ Wiinnertag::Wiinnertag(const string &filepath)
bool Wiinnertag::ReadXML(const string &filepath) bool Wiinnertag::ReadXML(const string &filepath)
{ {
u8 *buffer = NULL; TiXmlDocument xmlDoc(filepath.c_str());
u64 filesize = 0; if(!xmlDoc.LoadFile())
LoadFileToMem(filepath.c_str(), &buffer, &filesize);
if(!buffer)
return false; return false;
mxml_node_t *xmlfile = mxmlLoadString(NULL, (const char *) buffer, MXML_OPAQUE_CALLBACK); TiXmlElement * node = xmlDoc.FirstChildElement("Tag");
if(!xmlfile)
{
free(buffer);
return false;
}
mxml_node_t *node = mxmlFindElement(xmlfile, xmlfile, "Tag", NULL, NULL, MXML_DESCEND_FIRST);
while(node != NULL) while(node != NULL)
{ {
const char * URL = mxmlElementGetAttr(node, "URL"); const char * URL = node->Attribute("URL");
const char * Key = mxmlElementGetAttr(node, "Key"); const char * Key = node->Attribute("Key");
if(URL && Key) if(URL && Key)
{ {
@ -65,12 +55,9 @@ bool Wiinnertag::ReadXML(const string &filepath)
tagList[size].second = Key; tagList[size].second = Key;
} }
node = mxmlFindElement(node, xmlfile, "Tag", NULL, NULL, MXML_DESCEND); node = node->NextSiblingElement();
} }
mxmlDelete(xmlfile);
free(buffer);
return true; return true;
} }
@ -109,43 +96,29 @@ bool Wiinnertag::TagGame(const char *gameID)
return Tag.Send(gameID); return Tag.Send(gameID);
} }
static const char * XMLSaveCallback(mxml_node_t *node, int where)
{
const char *name = node->value.element.name;
if (where == MXML_WS_BEFORE_OPEN)
{
if(!strcmp(name, "Tag"))
return "\n";
}
return (NULL);
}
bool Wiinnertag::CreateExample(const string &filepath) bool Wiinnertag::CreateExample(const string &filepath)
{ {
if(filepath.size() == 0) if(filepath.size() == 0)
return false; return false;
CreateSubfolder(filepath.c_str());
string fullpath = filepath; string fullpath = filepath;
if(fullpath[fullpath.size()-1] != '/') if(fullpath[fullpath.size()-1] != '/')
fullpath += '/'; fullpath += '/';
fullpath += "Wiinnertag.xml"; fullpath += "Wiinnertag.xml";
FILE * f = fopen(fullpath.c_str(), "wb"); TiXmlDocument xmlDoc;
if(!f)
return false;
mxml_node_t *xmlfile = mxmlNewXML("1.0"); TiXmlDeclaration declaration("1.0", "UTF-8", "");
mxmlSetWrapMargin(0); xmlDoc.InsertEndChild(declaration);
mxml_node_t *node = mxmlNewElement(xmlfile, "Tag"); TiXmlElement Tag("Tag");
mxmlElementSetAttr(node, "URL", "http://www.wiinnertag.com/wiinnertag_scripts/update_sign.php?key={KEY}&game_id={ID6}"); Tag.SetAttribute("URL", "http://www.wiinnertag.com/wiinnertag_scripts/update_sign.php?key={KEY}&game_id={ID6}");
mxmlElementSetAttr(node, "Key", "1234567890"); Tag.SetAttribute("Key", "1234567890");
xmlDoc.InsertEndChild(Tag);
mxmlSaveFile(xmlfile, f, XMLSaveCallback); xmlDoc.SaveFile(fullpath);
fclose(f);
mxmlDelete(xmlfile);
return true; return true;
} }

View File

@ -27,7 +27,6 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <gctypes.h> #include <gctypes.h>
#include <mxml.h>
using namespace std; using namespace std;

View File

@ -213,8 +213,7 @@ struct block downloadfile(const char *url)
u32 i; u32 i;
for (i = 3; i < response.size; i++) for (i = 3; i < response.size; i++)
{ {
if (response.data[i] == '\n' && response.data[i - 1] == '\r' && response.data[i - 2] == '\n' && response.data[i if (response.data[i] == '\n' && response.data[i - 1] == '\r' && response.data[i - 2] == '\n' && response.data[i - 3] == '\r')
- 3] == '\r')
{ {
filestart = response.data + i + 1; filestart = response.data + i + 1;
filesize = response.size - i - 1; filesize = response.size - i - 1;

View File

@ -103,6 +103,9 @@ char * GetIncommingIP(void)
s32 network_request(s32 connect, const char * request, char * filename) s32 network_request(s32 connect, const char * request, char * filename)
{ {
if(connect == NET_DEFAULT_SOCK)
connect = connection;
char buf[1024]; char buf[1024];
char *ptr = NULL; char *ptr = NULL;
@ -139,10 +142,10 @@ s32 network_request(s32 connect, const char * request, char * filename)
} }
} }
} }
gprintf("%s\n", (char*) buf);
/* Retrieve content size */ /* Retrieve content size */
ptr = strstr(buf, "Content-Length:"); ptr = strstr(buf, "Content-Length:");
if (!ptr) return -1; if (!ptr) return NET_SIZE_UNKNOWN;
sscanf(ptr, "Content-Length: %u", &size); sscanf(ptr, "Content-Length: %u", &size);
return size; return size;
@ -150,6 +153,9 @@ s32 network_request(s32 connect, const char * request, char * filename)
s32 network_read(s32 connect, u8 *buf, u32 len) s32 network_read(s32 connect, u8 *buf, u32 len)
{ {
if(connect == NET_DEFAULT_SOCK)
connect = connection;
u32 read = 0; u32 read = 0;
s32 ret = -1; s32 ret = -1;
@ -175,7 +181,6 @@ s32 network_read(s32 connect, u8 *buf, u32 len)
***************************************************************************/ ***************************************************************************/
s32 download_request(const char * url, char * filename) s32 download_request(const char * url, char * filename)
{ {
//Check if the url starts with "http://", if not it is not considered a valid url //Check if the url starts with "http://", if not it is not considered a valid url
if (strncmp(url, "http://", strlen("http://")) != 0) if (strncmp(url, "http://", strlen("http://")) != 0)
{ {
@ -352,6 +357,102 @@ bool CheckConnection(const char *url, float timeout)
return !(res < 0 && res != -127); return !(res < 0 && res != -127);
} }
/****************************************************************************
* Download request
***************************************************************************/
s32 DownloadWithResponse(const char * url, u8 **outbuffer, u32 *outsize)
{
//Check if the url starts with "http://", if not it is not considered a valid url
if (strncmp(url, "http://", strlen("http://")) != 0)
return -1;
//Locate the path part of the url by searching for '/' past "http://"
char *path = strchr(url + strlen("http://"), '/');
//At the very least the url has to end with '/', ending with just a domain is invalid
if (path == NULL)
return -1;
//Extract the domain part out of the url
int domainlength = path - url - strlen("http://");
if (domainlength == 0)
return -1;
char domain[domainlength + 1];
strlcpy(domain, url + strlen("http://"), domainlength + 1);
int connect = GetConnection(domain);
if (connection < 0)
return -1;
//Form a nice request header to send to the webserver
char header[strlen(path) + strlen(domain) + strlen(url) + 100];
sprintf(header, "GET %s HTTP/1.1\r\nHost: %s\r\nReferer: %s\r\nUser-Agent: USBLoaderGX\r\nConnection: close\r\n\r\n", path, domain, url);
int ret = net_send(connect, header, strlen(header), 0);
if(ret < 0)
{
net_close(connect);
return ret;
}
int blocksize = 4096;
u8 *buffer = (u8 *) malloc(blocksize);
if(!buffer)
{
net_close(connect);
return -1;
}
int done = 0;
while(1)
{
int ret = network_read(connect, buffer+done, blocksize);
if(ret < 0)
{
free(buffer);
net_close(connect);
return -1;
}
else if(ret == 0)
break;
done += ret;
u8 *tmp = (u8 *) realloc(buffer, done+blocksize);
if(!tmp)
{
free(buffer);
net_close(connect);
return -1;
}
buffer = tmp;
}
net_close(connect);
u8 *tmp = (u8 *) realloc(buffer, done+1);
if(!tmp)
{
free(buffer);
return -1;
}
buffer = tmp;
buffer[done] = 0;
*outbuffer = buffer;
*outsize = done;
return done;
}
/**************************************************************************** /****************************************************************************
* NetworkWait * NetworkWait
***************************************************************************/ ***************************************************************************/

View File

@ -9,6 +9,9 @@
#define _NETWORKOPS_H_ #define _NETWORKOPS_H_
#define NETWORKBLOCKSIZE 5*1024 //5KB #define NETWORKBLOCKSIZE 5*1024 //5KB
#define NET_SIZE_UNKNOWN -0xFFFFFFF
#define NET_DEFAULT_SOCK -0xFFFFFFE
void Initialize_Network(void); void Initialize_Network(void);
void DeinitNetwork(void); void DeinitNetwork(void);
bool IsNetworkInit(void); bool IsNetworkInit(void);
@ -19,6 +22,7 @@ bool CheckConnection(const char *url, float timeout = 5.0f);
s32 network_request(s32 connection, const char * request, char * filename); s32 network_request(s32 connection, const char * request, char * filename);
s32 network_read(s32 connection, u8 *buf, u32 len); s32 network_read(s32 connection, u8 *buf, u32 len);
s32 download_request(const char * url, char * filename = NULL); s32 download_request(const char * url, char * filename = NULL);
s32 DownloadWithResponse(const char * url, u8 **outbuffer, u32 *outsize);
void CloseConnection(); void CloseConnection();
char * HEAD_Request(const char * url); char * HEAD_Request(const char * url);
void HaltNetworkThread(); void HaltNetworkThread();

View File

@ -50,7 +50,7 @@ void ClearDOLList()
dolCount = 0; dolCount = 0;
} }
void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u8 blockiosreloadselect, u8 gameIOS, u64 returnTo) void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 sneekVideoPatch, u8 cheat, u8 fix002, u8 blockiosreloadselect, u8 gameIOS, u64 returnTo)
{ {
es_fd = IOS_Open(es_fs, 0); es_fd = IOS_Open(es_fs, 0);
int i; int i;
@ -76,6 +76,9 @@ void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8
if (vipatch) if (vipatch)
vidolpatcher(dst, len); vidolpatcher(dst, len);
if(sneekVideoPatch)
sneek_video_patch(dst, len);
/*LANGUAGE PATCH - FISHEARS*/ /*LANGUAGE PATCH - FISHEARS*/
langpatcher(dst, len, languageChoice); langpatcher(dst, len, languageChoice);
@ -410,6 +413,24 @@ void VideoModePatcher(u8 * dst, int len, u8 videoSelected)
} }
} }
void sneek_video_patch(void *addr, u32 len)
{
u8 *addr_start = addr;
u8 *addr_end = addr+len;
while(addr_start < addr_end)
{
if(*(vu32*)(addr_start) == 0x3C608000)
{
if( ((*(vu32*)(addr_start+4) & 0xFC1FFFFF ) == 0x800300CC) && ((*(vu32*)(addr_start+8) >> 24) == 0x54 ) )
{
*(vu32*)(addr_start+4) = 0x5400F0BE | ((*(vu32*)(addr_start+4) & 0x3E00000) >> 5);
}
}
addr_start += 4;
}
}
//giantpune's magic super patch to return to channels //giantpune's magic super patch to return to channels
static u32 ad[ 4 ] = { 0, 0, 0, 0 };//these variables are global on the off chance the different parts needed static u32 ad[ 4 ] = { 0, 0, 0, 0 };//these variables are global on the off chance the different parts needed

View File

@ -9,11 +9,12 @@ extern "C" {
void RegisterDOL(u8 *dst, int len); void RegisterDOL(u8 *dst, int len);
void ClearDOLList(); void ClearDOLList();
void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u8 blockiosreloadselect, u8 gameIOS, u64 returnTo); void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 sneekVideoPatch, u8 cheat, u8 fix002, u8 blockiosreloadselect, u8 gameIOS, u64 returnTo);
bool Anti_002_fix(u8 * Address, int Size); bool Anti_002_fix(u8 * Address, int Size);
bool NSMBPatch(); bool NSMBPatch();
bool PoPPatch(); bool PoPPatch();
void VideoModePatcher(u8 * dst, int len, u8 videoSelected); void VideoModePatcher(u8 * dst, int len, u8 videoSelected);
void sneek_video_patch(void *addr, u32 len);
bool PatchReturnTo(void *Address, int Size, u32 id); bool PatchReturnTo(void *Address, int Size, u32 id);
int PatchNewReturnTo(u64 title); int PatchNewReturnTo(u64 title);
bool BlockIOSReload(u8 gameIOS); bool BlockIOSReload(u8 gameIOS);

View File

@ -37,7 +37,6 @@
#include "zlib.h" #include "zlib.h"
#include "svnrev.h" #include "svnrev.h"
#include "audio.h" #include "audio.h"
#include "xml/xml.h"
#include "language/UpdateLanguage.h" #include "language/UpdateLanguage.h"
#include "system/IosLoader.h" #include "system/IosLoader.h"
#include "gecko.h" #include "gecko.h"

View File

@ -10,7 +10,6 @@
#include "language/gettext.h" #include "language/gettext.h"
#include "GUI/gui.h" #include "GUI/gui.h"
#include "GUI/Text.hpp" #include "GUI/Text.hpp"
#include "xml/xml.h"
#include "menu.h" #include "menu.h"
#include "menu/menus.h" #include "menu/menus.h"
#include "sys.h" #include "sys.h"
@ -739,7 +738,7 @@ static int InternalShowGameInfo(char *ID)
if(gameCategories[i] == 0) if(gameCategories[i] == 0)
continue; continue;
if(categoriesTxt.size() >= 2 && gameCategories.size() > i+1) if(indexy > 170 && gameCategories.size() > i+1)
{ {
categoriesTxt.push_back(new GuiText("...", 16, ( GXColor ) {0, 0, 0, 255})); categoriesTxt.push_back(new GuiText("...", 16, ( GXColor ) {0, 0, 0, 255}));
categoriesTxt[categoriesTxt.size()-1]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); categoriesTxt[categoriesTxt.size()-1]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
@ -752,6 +751,7 @@ static int InternalShowGameInfo(char *ID)
categoriesTxt.push_back(new GuiText(GameCategories.CategoryList[gameCategories[i]], 16, ( GXColor ) {0, 0, 0, 255})); categoriesTxt.push_back(new GuiText(GameCategories.CategoryList[gameCategories[i]], 16, ( GXColor ) {0, 0, 0, 255}));
categoriesTxt[categoriesTxt.size()-1]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); categoriesTxt[categoriesTxt.size()-1]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
categoriesTxt[categoriesTxt.size()-1]->SetPosition(515, 12 + indexy); categoriesTxt[categoriesTxt.size()-1]->SetPosition(515, 12 + indexy);
categoriesTxt[categoriesTxt.size()-1]->SetMaxWidth(74, DOTTED);
indexy += 20; indexy += 20;
InfoWindow.Append(categoriesTxt[categoriesTxt.size()-1]); InfoWindow.Append(categoriesTxt[categoriesTxt.size()-1]);
} }

View File

@ -31,7 +31,7 @@
#include "language/gettext.h" #include "language/gettext.h"
#include "FileOperations/fileops.h" #include "FileOperations/fileops.h"
#include "xml/WiiTDB.hpp" #include "xml/WiiTDB.hpp"
#include "xml/xml.h" #include "utils/StringTools.h"
#include "svnrev.h" #include "svnrev.h"
#define VALID_CONFIG_REV 1084 #define VALID_CONFIG_REV 1084
@ -56,31 +56,6 @@ const vector<unsigned int> &CGameCategories::operator[](const char *id) const
return defaultCategory; return defaultCategory;
} }
static const char * XMLSaveCallback(mxml_node_t *node, int where)
{
const char *name = node->value.element.name;
if(!name)
return NULL;
if (where == MXML_WS_BEFORE_OPEN)
{
if(!strcmp(name, "Revision") || !strcmp(name, "Categories") || !strcmp(name, "GameCategories"))
return "\n";
else if(!strcmp(name, "Game"))
return "\n\t";
else if(!strcmp(name, "Category"))
return "\n\t\t";
}
else if(where == MXML_WS_BEFORE_CLOSE)
{
if(!strcmp(name, "Categories") || !strcmp(name, "GameCategories"))
return "\n";
else if(!strcmp(name, "Game"))
return "\n\t";
}
return NULL;
}
bool CGameCategories::Load(string filepath) bool CGameCategories::Load(string filepath)
{ {
if(filepath.size() == 0) if(filepath.size() == 0)
@ -92,76 +67,56 @@ bool CGameCategories::Load(string filepath)
filepath += "GXGameCategories.xml"; filepath += "GXGameCategories.xml";
configPath = filepath; configPath = filepath;
u8 *buffer = NULL;
u64 filesize = 0;
LoadFileToMem(filepath.c_str(), &buffer, &filesize);
if(!buffer)
return false;
clear(); clear();
mxml_node_t *xmlfile = mxmlLoadString(NULL, (const char *) buffer, MXML_OPAQUE_CALLBACK); TiXmlDocument xmlDoc(filepath.c_str());
if(!xmlDoc.LoadFile())
if(!ValidVersion(xmlfile))
{
mxmlDelete(xmlfile);
free(buffer);
return false; return false;
}
mxml_node_t *node = mxmlFindElement(xmlfile, xmlfile, "Categories", NULL, NULL, MXML_DESCEND_FIRST); if(!ValidVersion(xmlDoc.FirstChildElement("Revision")))
return false;
TiXmlElement * node = xmlDoc.FirstChildElement("Categories");
if(!node) if(!node)
{
mxmlDelete(xmlfile);
free(buffer);
return false; return false;
}
node = mxmlFindElement(node, xmlfile, "Category", NULL, NULL, MXML_DESCEND_FIRST); node = node->FirstChildElement("Category");
while(node != NULL) while(node != NULL)
{ {
const char * ID = mxmlElementGetAttr(node, "ID"); const char * ID = node->Attribute("ID");
const char * Name = mxmlElementGetAttr(node, "Name"); const char * Name = node->Attribute("Name");
if(ID && Name) if(ID && Name)
CategoryList.SetCategory(atoi(ID), Name); CategoryList.SetCategory(atoi(ID), Name);
node = mxmlFindElement(node, xmlfile, "Category", NULL, NULL, MXML_NO_DESCEND); node = node->NextSiblingElement();
} }
node = mxmlFindElement(xmlfile, xmlfile, "GameCategories", NULL, NULL, MXML_DESCEND_FIRST); node = xmlDoc.FirstChildElement("GameCategories");
if(!node) if(!node)
{
mxmlDelete(xmlfile);
free(buffer);
return false; return false;
}
node = mxmlFindElement(node, xmlfile, "Game", NULL, NULL, MXML_DESCEND_FIRST); node = node->FirstChildElement("Game");
while(node != NULL) while(node != NULL)
{ {
const char * gameID = mxmlElementGetAttr(node, "ID"); const char * gameID = node->Attribute("ID");
mxml_node_t *category = mxmlFindElement(node, xmlfile, "Category", NULL, NULL, MXML_DESCEND_FIRST); TiXmlElement * category = node->FirstChildElement("Category");
while(category != NULL) while(category != NULL)
{ {
const char * categoryID = mxmlElementGetAttr(category, "ID"); const char * categoryID = category->Attribute("ID");
if(gameID && categoryID) if(gameID && categoryID)
SetCategory(gameID, atoi(categoryID)); SetCategory(gameID, atoi(categoryID));
category = mxmlFindElement(category, xmlfile, "Category", NULL, NULL, MXML_NO_DESCEND);
category = category->NextSiblingElement();
} }
node = mxmlFindElement(node, xmlfile, "Game", NULL, NULL, MXML_NO_DESCEND); node = node->NextSiblingElement();
} }
mxmlDelete(xmlfile);
free(buffer);
CategoryList.goToFirst(); CategoryList.goToFirst();
return true; return true;
@ -178,60 +133,72 @@ bool CGameCategories::Save()
CreateSubfolder(filepath); CreateSubfolder(filepath);
FILE * f = fopen(configPath.c_str(), "wb"); TiXmlDocument xmlDoc;
if(!f)
return false;
mxml_node_t *xmlfile = mxmlNewXML("1.0"); TiXmlDeclaration declaration("1.0", "UTF-8", "");
mxmlSetWrapMargin(0); xmlDoc.InsertEndChild(declaration);
mxml_node_t *node = mxmlNewElement(xmlfile, "Revision"); TiXmlElement Revision("Revision");
mxmlNewInteger(node, atoi(GetRev())); TiXmlText revText(GetRev());
Revision.InsertEndChild(revText);
xmlDoc.InsertEndChild(Revision);
node = mxmlNewElement(xmlfile, "Categories"); //! Add all categories as an ID map
{
TiXmlElement Categories("Categories");
CategoryList.goToFirst(); CategoryList.goToFirst();
do do
{ {
mxml_node_t *category = mxmlNewElement(node, "Category"); TiXmlElement Category("Category");
mxmlElementSetAttrf(category, "ID", "%02u", CategoryList.getCurrentID()); Category.SetAttribute("ID", fmt("%02i", CategoryList.getCurrentID()));
mxmlElementSetAttr(category, "Name", CategoryList.getCurrentName().c_str()); Category.SetAttribute("Name", CategoryList.getCurrentName().c_str());
Categories.InsertEndChild(Category);
} }
while(CategoryList.goToNext()); while(CategoryList.goToNext());
node = mxmlNewElement(xmlfile, "GameCategories"); xmlDoc.InsertEndChild(Categories);
}
//! Add game specific categories now
{
TiXmlElement GameCategories("GameCategories");
for(map<string, vector<unsigned int> >::iterator itr = List.begin(); itr != List.end(); itr++) for(map<string, vector<unsigned int> >::iterator itr = List.begin(); itr != List.end(); itr++)
{ {
mxml_node_t *game = mxmlNewElement(node, "Game"); TiXmlElement Game("Game");
mxmlElementSetAttr(game, "ID", itr->first.c_str()); Game.SetAttribute("ID", itr->first.c_str());
mxmlElementSetAttr(game, "Title", GameTitles.GetTitle(itr->first.c_str())); Game.SetAttribute("Title", GameTitles.GetTitle(itr->first.c_str()));
for(u32 i = 0; i < itr->second.size(); ++i) for(u32 i = 0; i < itr->second.size(); ++i)
{ {
mxml_node_t *category = mxmlNewElement(game, "Category"); TiXmlElement Category("Category");
mxmlElementSetAttrf(category, "ID", "%02u", itr->second[i]); Category.SetAttribute("ID", fmt("%02i", itr->second[i]));
mxmlElementSetAttr(category, "Name", CategoryList[itr->second[i]]); Category.SetAttribute("Name", CategoryList[itr->second[i]]);
}
Game.InsertEndChild(Category);
} }
mxmlSaveFile(xmlfile, f, XMLSaveCallback); GameCategories.InsertEndChild(Game);
fclose(f); }
mxmlDelete(xmlfile); xmlDoc.InsertEndChild(GameCategories);
}
xmlDoc.SaveFile(configPath);
return true; return true;
} }
bool CGameCategories::ValidVersion(mxml_node_t *xmlfile) bool CGameCategories::ValidVersion(TiXmlElement *revisionNode)
{ {
if(!xmlfile) return false; if(!revisionNode) return false;
mxml_node_t *node = mxmlFindElement(xmlfile, xmlfile, "Revision", NULL, NULL, MXML_DESCEND_FIRST); if(!revisionNode->FirstChild() || !revisionNode->FirstChild()->Value())
if(!node || !node->child || !node->child->value.opaque)
return false; return false;
return atoi(node->child->value.opaque) >= VALID_CONFIG_REV; return atoi(revisionNode->FirstChild()->Value()) >= VALID_CONFIG_REV;
} }
bool CGameCategories::SetCategory(const char *gameID, unsigned int id) bool CGameCategories::SetCategory(const char *gameID, unsigned int id)

View File

@ -28,7 +28,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include <vector> #include <vector>
#include <mxml.h> #include "xml/tinyxml.h"
#include "CCategoryList.hpp" #include "CCategoryList.hpp"
class CGameCategories class CGameCategories
@ -56,7 +56,7 @@ class CGameCategories
CCategoryList CategoryList; CCategoryList CategoryList;
protected: protected:
bool ValidVersion(mxml_node_t *xmlfile); bool ValidVersion(TiXmlElement *xmlfile);
string configPath; string configPath;
const vector<unsigned int> defaultCategory; const vector<unsigned int> defaultCategory;

View File

@ -188,6 +188,7 @@ bool CGameSettings::Save()
fprintf(f, "alternatedolstart:%d; ", GameList[i].alternatedolstart); fprintf(f, "alternatedolstart:%d; ", GameList[i].alternatedolstart);
fprintf(f, "alternatedolname:%s; ", GameList[i].alternatedolname); fprintf(f, "alternatedolname:%s; ", GameList[i].alternatedolname);
fprintf(f, "returnTo:%d; ", GameList[i].returnTo); fprintf(f, "returnTo:%d; ", GameList[i].returnTo);
fprintf(f, "sneekVideoPatch:%d; ", GameList[i].sneekVideoPatch);
fprintf(f, "Locked:%d;\n", GameList[i].Locked); fprintf(f, "Locked:%d;\n", GameList[i].Locked);
} }
fprintf(f, "# END\n"); fprintf(f, "# END\n");
@ -301,6 +302,14 @@ bool CGameSettings::SetSetting(GameCFG & game, char *name, char *value)
} }
return true; return true;
} }
else if(strcmp(name, "sneekVideoPatch") == 0)
{
if (sscanf(value, "%d", &i) == 1)
{
game.sneekVideoPatch = i;
}
return true;
}
else if(strcmp(name, "Locked") == 0) else if(strcmp(name, "Locked") == 0)
{ {
if (sscanf(value, "%d", &i) == 1) if (sscanf(value, "%d", &i) == 1)
@ -423,6 +432,7 @@ GameCFG * CGameSettings::GetDefault()
DefaultConfig.iosreloadblock = INHERIT; DefaultConfig.iosreloadblock = INHERIT;
DefaultConfig.alternatedolname[0] = '\0'; DefaultConfig.alternatedolname[0] = '\0';
DefaultConfig.returnTo = 1; DefaultConfig.returnTo = 1;
DefaultConfig.sneekVideoPatch = INHERIT;
DefaultConfig.Locked = OFF; DefaultConfig.Locked = OFF;
return &DefaultConfig; return &DefaultConfig;

View File

@ -23,6 +23,7 @@ typedef struct _GameCFG
short patchcountrystrings; short patchcountrystrings;
char alternatedolname[40]; char alternatedolname[40];
short returnTo; short returnTo;
short sneekVideoPatch;
short Locked; short Locked;
} GameCFG; } GameCFG;

View File

@ -67,7 +67,7 @@ void CSettings::SetDefault()
snprintf(BcaCodepath, sizeof(BcaCodepath), "%s/bca/", BootDevice); snprintf(BcaCodepath, sizeof(BcaCodepath), "%s/bca/", BootDevice);
snprintf(WipCodepath, sizeof(WipCodepath), "%s/wip/", BootDevice); snprintf(WipCodepath, sizeof(WipCodepath), "%s/wip/", BootDevice);
snprintf(WDMpath, sizeof(WDMpath), "%s/wdm/", BootDevice); snprintf(WDMpath, sizeof(WDMpath), "%s/wdm/", BootDevice);
snprintf(WiinnertagPath, sizeof(WiinnertagPath), "%s/", ConfigPath); snprintf(WiinnertagPath, sizeof(WiinnertagPath), "%s", ConfigPath);
snprintf(theme_path, sizeof(theme_path), "%stheme/", ConfigPath); snprintf(theme_path, sizeof(theme_path), "%stheme/", ConfigPath);
snprintf(dolpath, sizeof(dolpath), "%s/", BootDevice); snprintf(dolpath, sizeof(dolpath), "%s/", BootDevice);
strcpy(theme, ""); strcpy(theme, "");
@ -125,6 +125,7 @@ void CSettings::SetDefault()
Wiinnertag = OFF; Wiinnertag = OFF;
SelectedGame = 0; SelectedGame = 0;
GameListOffset = 0; GameListOffset = 0;
sneekVideoPatch = OFF;
} }
bool CSettings::Load() bool CSettings::Load()
@ -283,6 +284,7 @@ bool CSettings::Save()
fprintf(file, "WiinnertagPath = %s\n", WiinnertagPath); fprintf(file, "WiinnertagPath = %s\n", WiinnertagPath);
fprintf(file, "SelectedGame = %d\n", SelectedGame); fprintf(file, "SelectedGame = %d\n", SelectedGame);
fprintf(file, "GameListOffset = %d\n", GameListOffset); fprintf(file, "GameListOffset = %d\n", GameListOffset);
fprintf(file, "sneekVideoPatch = %d\n", sneekVideoPatch);
fclose(file); fclose(file);
return true; return true;
@ -552,6 +554,10 @@ bool CSettings::SetSetting(char *name, char *value)
{ {
if (sscanf(value, "%d", &i) == 1) GameListOffset = i; if (sscanf(value, "%d", &i) == 1) GameListOffset = i;
} }
else if(strcmp(name, "sneekVideoPatch") == 0)
{
if (sscanf(value, "%d", &i) == 1) sneekVideoPatch = i;
}
else if (strcmp(name, "InstallPartitions") == 0) else if (strcmp(name, "InstallPartitions") == 0)
{ {
InstallPartitions = strtoul(value, 0, 16); InstallPartitions = strtoul(value, 0, 16);

View File

@ -123,6 +123,7 @@ class CSettings
short Wiinnertag; short Wiinnertag;
short SelectedGame; short SelectedGame;
short GameListOffset; short GameListOffset;
short sneekVideoPatch;
std::vector<u32> EnabledCategories; std::vector<u32> EnabledCategories;
protected: protected:
bool ValidVersion(FILE * file); bool ValidVersion(FILE * file);

View File

@ -2,7 +2,6 @@
#include "GameTitles.h" #include "GameTitles.h"
#include "CSettings.h" #include "CSettings.h"
#include "usbloader/GameList.h" #include "usbloader/GameList.h"
#include "xml/xml.h"
#include "xml/WiiTDB.hpp" #include "xml/WiiTDB.hpp"
CGameTitles GameTitles; CGameTitles GameTitles;
@ -254,7 +253,7 @@ void CGameTitles::LoadTitlesFromWiiTDB(const char * path, bool forceCacheReload)
if(!XML_DB.GetRatingValue(MissingTitles[i].c_str(), RatValTxt)) if(!XML_DB.GetRatingValue(MissingTitles[i].c_str(), RatValTxt))
continue; continue;
TitleList[TitleList.size()-1].ParentalRating = ConvertRating(RatValTxt.c_str(), WiiTDB::RatingToString(Rating), "PEGI"); TitleList[TitleList.size()-1].ParentalRating = WiiTDB::ConvertRating(RatValTxt.c_str(), WiiTDB::RatingToString(Rating), "PEGI");
int ret = XML_DB.GetPlayers(MissingTitles[i].c_str()); int ret = XML_DB.GetPlayers(MissingTitles[i].c_str());
if(ret > 0) if(ret > 0)
TitleList[TitleList.size()-1].PlayersCount = ret; TitleList[TitleList.size()-1].PlayersCount = ret;

View File

@ -173,6 +173,7 @@ enum
BLOCK_FEATURE_SETTINGS = 0x020000, BLOCK_FEATURE_SETTINGS = 0x020000,
BLOCK_HARD_DRIVE_SETTINGS = 0x040000, BLOCK_HARD_DRIVE_SETTINGS = 0x040000,
BLOCK_CATEGORIES_MENU = 0x080000, BLOCK_CATEGORIES_MENU = 0x080000,
BLOCK_SD_RELOAD_BUTTON = 0x100000,
BLOCK_ALL = 0xFFFFFFFF, BLOCK_ALL = 0xFFFFFFFF,
}; };

View File

@ -144,6 +144,7 @@ void GameLoadSM::SetOptionNames()
Options->SetName(Idx++, "%s", tr( "Video Mode" )); Options->SetName(Idx++, "%s", tr( "Video Mode" ));
Options->SetName(Idx++, "%s", tr( "VIDTV Patch" )); Options->SetName(Idx++, "%s", tr( "VIDTV Patch" ));
Options->SetName(Idx++, "%s", tr( "Sneek Video Patch" ));
Options->SetName(Idx++, "%s", tr( "Game Language" )); Options->SetName(Idx++, "%s", tr( "Game Language" ));
Options->SetName(Idx++, "%s", tr( "Patch Country Strings" )); Options->SetName(Idx++, "%s", tr( "Patch Country Strings" ));
Options->SetName(Idx++, "%s", tr( "Ocarina" )); Options->SetName(Idx++, "%s", tr( "Ocarina" ));
@ -173,6 +174,12 @@ void GameLoadSM::SetOptionValues()
else else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.vipatch])); Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.vipatch]));
//! Settings: Sneek Video Patch
if(GameConfig.sneekVideoPatch == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.sneekVideoPatch]));
//! Settings: Game Language //! Settings: Game Language
if(GameConfig.language == INHERIT) if(GameConfig.language == INHERIT)
Options->SetValue(Idx++, tr("Use global")); Options->SetValue(Idx++, tr("Use global"));
@ -278,6 +285,12 @@ int GameLoadSM::GetMenuInternal()
if (++GameConfig.vipatch >= MAX_ON_OFF) GameConfig.vipatch = INHERIT; if (++GameConfig.vipatch >= MAX_ON_OFF) GameConfig.vipatch = INHERIT;
} }
//! Settings: Sneek Video Patch
else if (ret == ++Idx)
{
if (++GameConfig.sneekVideoPatch >= MAX_ON_OFF) GameConfig.sneekVideoPatch = INHERIT;
}
//! Settings: Game Language //! Settings: Game Language
else if (ret == ++Idx) else if (ret == ++Idx)
{ {

View File

@ -79,6 +79,7 @@ LoaderSettings::LoaderSettings()
Options->SetName(Idx++, "%s", tr( "Video Mode" )); Options->SetName(Idx++, "%s", tr( "Video Mode" ));
Options->SetName(Idx++, "%s", tr( "VIDTV Patch" )); Options->SetName(Idx++, "%s", tr( "VIDTV Patch" ));
Options->SetName(Idx++, "%s", tr( "Sneek Video Patch" ));
Options->SetName(Idx++, "%s", tr( "Game Language" )); Options->SetName(Idx++, "%s", tr( "Game Language" ));
Options->SetName(Idx++, "%s", tr( "Patch Country Strings" )); Options->SetName(Idx++, "%s", tr( "Patch Country Strings" ));
Options->SetName(Idx++, "%s", tr( "Ocarina" )); Options->SetName(Idx++, "%s", tr( "Ocarina" ));
@ -101,6 +102,9 @@ void LoaderSettings::SetOptionValues()
//! Settings: VIDTV Patch //! Settings: VIDTV Patch
Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.videopatch] )); Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.videopatch] ));
//! Settings: Sneek Video Patch
Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.sneekVideoPatch] ));
//! Settings: Game Language //! Settings: Game Language
Options->SetValue(Idx++, "%s", tr( LanguageText[Settings.language] )); Options->SetValue(Idx++, "%s", tr( LanguageText[Settings.language] ));
@ -156,6 +160,12 @@ int LoaderSettings::GetMenuInternal()
if (++Settings.videopatch >= MAX_ON_OFF) Settings.videopatch = 0; if (++Settings.videopatch >= MAX_ON_OFF) Settings.videopatch = 0;
} }
//! Settings: Sneek Video Patch
else if (ret == ++Idx )
{
if (++Settings.sneekVideoPatch >= MAX_ON_OFF) Settings.sneekVideoPatch = 0;
}
//! Settings: Game Language //! Settings: Game Language
else if (ret == ++Idx) else if (ret == ++Idx)
{ {

View File

@ -76,6 +76,7 @@ ParentalControlSM::ParentalControlSM()
Options->SetName(Idx++, "%s", tr( "Block GameID Change" )); Options->SetName(Idx++, "%s", tr( "Block GameID Change" ));
Options->SetName(Idx++, "%s", tr( "Block Categories Menu" )); Options->SetName(Idx++, "%s", tr( "Block Categories Menu" ));
Options->SetName(Idx++, "%s", tr( "Block Categories Modify" )); Options->SetName(Idx++, "%s", tr( "Block Categories Modify" ));
Options->SetName(Idx++, "%s", tr( "Block SD Reload Button" ));
SetOptionValues(); SetOptionValues();
} }
@ -163,6 +164,9 @@ void ParentalControlSM::SetOptionValues()
//! Settings: Block Categories Modify //! Settings: Block Categories Modify
Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_CATEGORIES_MOD) != 0)])); Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_CATEGORIES_MOD) != 0)]));
//! Settings: Block SD Reload Button
Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_SD_RELOAD_BUTTON) != 0)]));
} }
int ParentalControlSM::GetMenuInternal() int ParentalControlSM::GetMenuInternal()
@ -350,6 +354,12 @@ int ParentalControlSM::GetMenuInternal()
Settings.ParentalBlocks ^= BLOCK_CATEGORIES_MOD; Settings.ParentalBlocks ^= BLOCK_CATEGORIES_MOD;
} }
//! Settings: Block SD Reload Button
else if (ret == ++Idx)
{
Settings.ParentalBlocks ^= BLOCK_SD_RELOAD_BUTTON;
}
SetOptionValues(); SetOptionValues();
return MENU_NONE; return MENU_NONE;

View File

@ -22,7 +22,6 @@
#include "menu.h" #include "menu.h"
#include "video.h" #include "video.h"
#include "gecko.h" #include "gecko.h"
#include "xml/xml.h"
#include "wad/nandtitle.h" #include "wad/nandtitle.h"
extern "C" extern "C"

View File

@ -239,6 +239,7 @@ void ThemeDownloader::SetupMainButtons()
if(!CheckConnection(ThemeListURL.c_str())) if(!CheckConnection(ThemeListURL.c_str()))
{ {
ProgressStop();
ShowError(tr("Connection to server timed out.")); ShowError(tr("Connection to server timed out."));
return; return;
} }
@ -247,9 +248,9 @@ void ThemeDownloader::SetupMainButtons()
if (ThemeList->GetThemeCount() == 0) if (ThemeList->GetThemeCount() == 0)
{ {
ProgressStop();
WindowPrompt(tr( "No themes found on the site." ), 0, "OK"); WindowPrompt(tr( "No themes found on the site." ), 0, "OK");
returnMenu = MENU_SETTINGS; returnMenu = MENU_SETTINGS;
ProgressStop();
} }
for(int i = 0; i < ThemeList->GetThemeCount(); ++i) for(int i = 0; i < ThemeList->GetThemeCount(); ++i)

View File

@ -29,79 +29,82 @@
#include <string.h> #include <string.h>
#include <gctypes.h> #include <gctypes.h>
#include "network/networkops.h"
#include "Theme_List.h" #include "Theme_List.h"
#include "xml/xml.h" #include "xml/tinyxml.h"
Theme_List::Theme_List(const char * url) Theme_List::Theme_List(const char * url)
{ {
if (!IsNetworkInit()) if (!IsNetworkInit())
return; return;
struct block file = downloadfile(url); u8 *buffer = NULL;
u32 size = 0;
if (!file.data) DownloadWithResponse(url, &buffer, &size);
if(!buffer)
return; return;
ParseXML(file.data); const char *xml = strstr((char *) buffer, "<?xml version=");
if(!xml)
{
free(buffer);
return;
}
free(file.data); ParseXML(xml);
free(buffer);
} }
Theme_List::~Theme_List() Theme_List::~Theme_List()
{ {
} }
bool Theme_List::ParseXML(const u8 * xmlfile) bool Theme_List::ParseXML(const char * xmlfile)
{ {
char element_text[1024]; TiXmlDocument xmlDoc;
memset(element_text, 0, sizeof(element_text));
mxml_node_t *nodetree = NULL;
mxml_node_t *nodedata = NULL;
mxml_node_t *nodeid = NULL;
mxml_index_t *nodeindex = NULL;
nodetree = mxmlLoadString(NULL, (const char *) xmlfile, MXML_OPAQUE_CALLBACK); if(!xmlDoc.Parse(xmlfile))
if (nodetree == NULL)
return false; return false;
nodedata = mxmlFindElement(nodetree, nodetree, "themes", NULL, NULL, MXML_DESCEND); TiXmlElement *themesNode = xmlDoc.FirstChildElement("themes");
if (nodedata == NULL) if (!themesNode)
return false; return false;
nodeindex = mxmlIndexNew(nodedata, "name", NULL); TiXmlElement *theme = themesNode->FirstChildElement("theme");
nodeid = mxmlIndexReset(nodeindex);
while((nodeid = mxmlIndexFind(nodeindex, "name", NULL)) != NULL) while(theme)
{ {
int i = ThemesList.size(); int i = ThemesList.size();
ThemesList.resize(i+1); ThemesList.resize(i+1);
element_text[0] = '\0'; TiXmlElement *node = NULL;
get_nodetext(nodeid, element_text, sizeof(element_text));
ThemesList[i].themetitle = element_text;
element_text[0] = '\0'; node = theme->FirstChildElement("name");
GetTextFromNode(nodeid, nodedata, (char *) "creator", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text)); if(node && node->FirstChild() && node->FirstChild()->Value())
ThemesList[i].author = element_text; ThemesList[i].themetitle = node->FirstChild()->Value();
element_text[0] = '\0'; node = theme->FirstChildElement("creator");
GetTextFromNode(nodeid, nodedata, (char *) "thumbpath", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text)); if(node && node->FirstChild() && node->FirstChild()->Value())
ThemesList[i].imagelink = element_text; ThemesList[i].author = node->FirstChild()->Value();
element_text[0] = '\0'; node = theme->FirstChildElement("thumbpath");
GetTextFromNode(nodeid, nodedata, (char *) "downloadpath", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text)); if(node && node->FirstChild() && node->FirstChild()->Value())
ThemesList[i].downloadlink = element_text; ThemesList[i].imagelink = node->FirstChild()->Value();
element_text[0] = '\0'; node = theme->FirstChildElement("downloadpath");
GetTextFromNode(nodeid, nodedata, (char *) "averagerating", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text)); if(node && node->FirstChild() && node->FirstChild()->Value())
ThemesList[i].rating = atoi(element_text); ThemesList[i].downloadlink = node->FirstChild()->Value();
node = theme->FirstChildElement("averagerating");
if(node && node->FirstChild() && node->FirstChild()->Value())
ThemesList[i].rating = atoi(node->FirstChild()->Value());
theme = theme->NextSiblingElement();
} }
mxmlIndexDelete(nodeindex);
mxmlDelete(nodedata);
mxmlDelete(nodetree);
return true; return true;
} }

View File

@ -44,7 +44,7 @@ class Theme_List
int GetThemeCount() const { return ThemesList.size(); }; int GetThemeCount() const { return ThemesList.size(); };
protected: protected:
//!Get Themes into a struct from the XML file amount //!Get Themes into a struct from the XML file amount
bool ParseXML(const u8 * xmlfile); bool ParseXML(const char * xmlfile);
std::vector<Theme_Info> ThemesList; std::vector<Theme_Info> ThemesList;
}; };

View File

@ -193,6 +193,7 @@ int GameBooter::BootGame(const char * gameID)
u8 languageChoice = game_cfg->language == INHERIT ? Settings.language : game_cfg->language; u8 languageChoice = game_cfg->language == INHERIT ? Settings.language : game_cfg->language;
u8 ocarinaChoice = game_cfg->ocarina == INHERIT ? Settings.ocarina : game_cfg->ocarina; u8 ocarinaChoice = game_cfg->ocarina == INHERIT ? Settings.ocarina : game_cfg->ocarina;
u8 viChoice = game_cfg->vipatch == INHERIT ? Settings.videopatch : game_cfg->vipatch; u8 viChoice = game_cfg->vipatch == INHERIT ? Settings.videopatch : game_cfg->vipatch;
u8 sneekChoice = game_cfg->sneekVideoPatch == INHERIT ? Settings.sneekVideoPatch : game_cfg->sneekVideoPatch;
u8 iosChoice = game_cfg->ios == INHERIT ? Settings.cios : game_cfg->ios; u8 iosChoice = game_cfg->ios == INHERIT ? Settings.cios : game_cfg->ios;
u8 fix002 = game_cfg->errorfix002 == INHERIT ? Settings.error002 : game_cfg->errorfix002; u8 fix002 = game_cfg->errorfix002 == INHERIT ? Settings.error002 : game_cfg->errorfix002;
u8 countrystrings = game_cfg->patchcountrystrings == INHERIT ? Settings.patchcountrystrings : game_cfg->patchcountrystrings; u8 countrystrings = game_cfg->patchcountrystrings == INHERIT ? Settings.patchcountrystrings : game_cfg->patchcountrystrings;
@ -262,7 +263,7 @@ int GameBooter::BootGame(const char * gameID)
//! Do all the game patches //! Do all the game patches
gprintf("Applying game patches...\n"); gprintf("Applying game patches...\n");
gamepatches(videoChoice, languageChoice, countrystrings, viChoice, ocarinaChoice, fix002, reloadblock, iosChoice, returnToChoice); gamepatches(videoChoice, languageChoice, countrystrings, viChoice, sneekChoice, ocarinaChoice, fix002, reloadblock, iosChoice, returnToChoice);
//! Load Ocarina codes //! Load Ocarina codes
bool enablecheat = false; bool enablecheat = false;

View File

@ -690,6 +690,86 @@ const char * WiiTDB::RatingToString(int rating)
return NULL; return NULL;
} }
int WiiTDB::StringToRating(const char *rate_string)
{
if (strcasecmp(rate_string, "CERO") == 0)
return 0;
if (strcasecmp(rate_string, "ESRB") == 0)
return 1;
if (strcasecmp(rate_string, "PEGI") == 0)
return 2;
return -1;
}
int WiiTDB::ConvertRating(const char *value, const char *from, const char *to)
{
if (strcasecmp(from, to) == 0)
{
int ret = atoi(value);
if(ret < 7)
return 0;
else if(ret < 12)
return 1;
else if(ret < 16)
return 2;
else if(ret < 18)
return 3;
else
return 4;
}
int type = -1;
int desttype = -1;
type = StringToRating(from);
desttype = StringToRating(to);
if (type == -1 || desttype == -1) return -1;
/* rating conversion table */
/* the list is ordered to pick the most likely value first: */
/* EC and AO are less likely to be used so they are moved down to only be picked up when converting ESRB to PEGI or CERO */
/* the conversion can never be perfect because ratings can differ between regions for the same game */
const int table_size = 12;
char ratingtable[table_size][3][5] =
{
{ { "A" }, { "E" }, { "3" } },
{ { "A" }, { "E" }, { "4" } },
{ { "A" }, { "E" }, { "6" } },
{ { "A" }, { "E" }, { "7" } },
{ { "A" }, { "EC" }, { "3" } },
{ { "A" }, { "E10+" }, { "7" } },
{ { "B" }, { "T" }, { "12" } },
{ { "D" }, { "M" }, { "18" } },
{ { "D" }, { "M" }, { "16" } },
{ { "C" }, { "T" }, { "16" } },
{ { "C" }, { "T" }, { "15" } },
{ { "Z" }, { "AO" }, { "18" } },
};
for (int i = 0; i < table_size; i++)
{
if (strcasecmp(ratingtable[i][type], value) == 0)
{
int res = atoi(ratingtable[i][desttype]);
if(res < 7)
return 0;
else if(res < 12)
return 1;
else if(res < 16)
return 2;
else if(res < 18)
return 3;
else
return 4;
}
}
return -1;
}
int WiiTDB::GetRating(const char * id) int WiiTDB::GetRating(const char * id)
{ {
int rating = -1; int rating = -1;

View File

@ -125,6 +125,10 @@ class WiiTDB
bool GetGameXMLInfo(const char * id, GameXMLInfo * gameInfo); bool GetGameXMLInfo(const char * id, GameXMLInfo * gameInfo);
//! Convert a specific game rating to a string //! Convert a specific game rating to a string
static const char * RatingToString(int rating); static const char * RatingToString(int rating);
//! Convert a rating string to a rating number
static int StringToRating(const char *rate_string);
//! Convert a rating to another rating
static int ConvertRating(const char *value, const char *from, const char *to);
//! Get the version of the wiitdb xml database //! Get the version of the wiitdb xml database
unsigned long long GetWiiTDBVersion(); unsigned long long GetWiiTDBVersion();
//! Get the entry count in the xml database //! Get the entry count in the xml database

1885
source/xml/tinyxml.cpp Normal file

File diff suppressed because it is too large Load Diff

1805
source/xml/tinyxml.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
/*
www.sourceforge.net/projects/tinyxml
Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
#include "tinyxml.h"
// The goal of the seperate error file is to make the first
// step towards localization. tinyxml (currently) only supports
// english error messages, but the could now be translated.
//
// It also cleans up the code a bit.
//
const char* TiXmlBase::errorString[ TiXmlBase::TIXML_ERROR_STRING_COUNT ] =
{
"No error",
"Error",
"Failed to open file",
"Error parsing Element.",
"Failed to read Element name",
"Error reading Element value.",
"Error reading Attributes.",
"Error: empty tag.",
"Error reading end tag.",
"Error parsing Unknown.",
"Error parsing Comment.",
"Error parsing Declaration.",
"Error document empty.",
"Error null (0) or unexpected EOF found in input stream.",
"Error parsing CDATA.",
"Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
};

1639
source/xml/tinyxmlparser.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,451 +0,0 @@
/*
Load game information from XML - Lustar
- Mini-XML by Michael Sweet
- MiniZip adapted by Tantric
*/
#include <malloc.h>
#include <zip/unzip.h>
#include "settings/CSettings.h"
#include "settings/CGameSettings.h"
#include "settings/GameTitles.h"
#include "xml/xml.h"
extern char game_partition[6];
/* config */
static char xmlcfg_filename[100] = "wiitdb";
static int xmlmaxsize = 1572864;
static char langlist[11][22] = { { "Console Default" }, { "Japanese" }, { "English" }, { "German" }, { "French" }, {
"Spanish" }, { "Italian" }, { "Dutch" }, { "S. Chinese" }, { "T. Chinese" }, { "Korean" } };
static char langcodes[11][5] = { { "" }, { "JA" }, { "EN" }, { "DE" }, { "FR" }, { "ES" }, { "IT" }, { "NL" },
{ "ZHCN" }, // People's Republic of China
{ "ZHTW" }, // Taiwan
{ "KO" } };
static char element_text[5000];
static mxml_node_t *nodetree = NULL;
static mxml_node_t *nodedata = NULL;
static mxml_node_t *nodeid = NULL;
static mxml_node_t *nodeidtmp = NULL;
static mxml_node_t *nodefound = NULL;
static mxml_index_t *nodeindex = NULL;
static mxml_index_t *nodeindextmp = NULL;
int xmlloadtime = 0;
char * get_nodetext(mxml_node_t *node, char *buffer, int buflen);
bool xml_loaded = false;
/* load renamed titles from proper names and game info XML, needs to be after cfg_load_games */
bool OpenXMLDatabase(char* xmlfilepath, char* argdblang, bool argJPtoEN, bool openfile, bool loadtitles, bool keepopen)
{
if (!xml_loaded)
{
bool opensuccess = false;
char pathname[200];
snprintf(pathname, sizeof(pathname), "%s", xmlfilepath);
if (xmlfilepath[strlen(xmlfilepath) - 1] != '/') snprintf(pathname, sizeof(pathname), "%s/", pathname);
snprintf(pathname, sizeof(pathname), "%s%s_%s.zip", pathname, xmlcfg_filename, game_partition);
if (openfile) opensuccess = OpenXMLFile(pathname);
if (!opensuccess)
{
snprintf(pathname, sizeof(pathname), "%s", xmlfilepath);
if (xmlfilepath[strlen(xmlfilepath) - 1] != '/') snprintf(pathname, sizeof(pathname), "%s/", pathname);
snprintf(pathname, sizeof(pathname), "%swiitdb.zip", pathname);
if (openfile) opensuccess = OpenXMLFile(pathname);
}
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;
}
void CloseXMLDatabase()
{
/* free memory */
if (xml_loaded)
{
mxmlDelete(nodedata);
mxmlDelete(nodetree);
xml_loaded = false;
}
}
mxml_node_t *GetTextFromNode(mxml_node_t *currentnode, mxml_node_t *topnode, const char *nodename, const char *attributename,
char *value, int descend, char *dest, int destsize)
{
*element_text = 0;
nodefound = mxmlFindElement(currentnode, topnode, nodename, attributename, value, descend);
if (nodefound != NULL)
{
if (attributename != NULL)
{
strlcpy(dest, mxmlElementGetAttr(nodefound, attributename), destsize);
}
else
{
get_nodetext(nodefound, element_text, sizeof(element_text));
strlcpy(dest, element_text, destsize);
}
}
else
{
strcpy(dest, "");
}
return nodefound;
}
bool OpenXMLFile(char *filename)
{
if (xml_loaded) return false;
nodedata = NULL;
nodetree = NULL;
nodeid = NULL;
nodeidtmp = NULL;
nodefound = NULL;
char* strresult = strstr(filename, ".zip");
if (strresult == NULL)
{
/* Load XML file */
FILE *filexml;
filexml = fopen(filename, "rb");
if (!filexml) return false;
nodetree = mxmlLoadFile(NULL, filexml, MXML_OPAQUE_CALLBACK);
fclose(filexml);
}
else
{
/* load zipped XML file */
unzFile unzfile = unzOpen(filename);
if (unzfile == NULL) return false;
unzOpenCurrentFile(unzfile);
unz_file_info zipfileinfo;
unzGetCurrentFileInfo(unzfile, &zipfileinfo, NULL, 0, NULL, 0, NULL, 0);
int zipfilebuffersize = zipfileinfo.uncompressed_size;
if (zipfilebuffersize >= xmlmaxsize)
{
unzCloseCurrentFile(unzfile);
unzClose(unzfile);
return false;
}
char * zipfilebuffer = (char *) malloc(zipfilebuffersize);
memset(zipfilebuffer, 0, zipfilebuffersize);
if (zipfilebuffer == NULL)
{
unzCloseCurrentFile(unzfile);
unzClose(unzfile);
return false;
}
unzReadCurrentFile(unzfile, zipfilebuffer, zipfilebuffersize);
unzCloseCurrentFile(unzfile);
unzClose(unzfile);
nodetree = mxmlLoadString(NULL, zipfilebuffer, MXML_OPAQUE_CALLBACK);
free(zipfilebuffer);
}
if (nodetree == NULL) return false;
nodedata = mxmlFindElement(nodetree, nodetree, "datafile", NULL, NULL, MXML_DESCEND);
if (nodedata == NULL)
{
return false;
}
else
{
//if (xmldebug) xmlloadtime = dbg_time2(NULL);
xml_loaded = true;
return true;
}
}
char *GetLangSettingFromGame(char *gameid)
{
int langcode;
GameCFG *game_cfg = GameSettings.GetGameCFG((u8*) gameid);
if (game_cfg)
{
langcode = game_cfg->language;
}
else
{
//langcode = CFG.language; // for Configurable Loader
langcode = Settings.language; // for Loader GX
}
char *langtxt = langlist[langcode];
return langtxt;
}
/* convert language text into ISO 639 two-letter language code (+ZHTW/ZHCN) */
const char *ConvertLangTextToCode(char *languagetxt)
{
// 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++)
{
if (!strcasecmp(languagetxt, langlist[i])) // case insensitive comparison
return langcodes[i];
}
return "";
}
char ConvertRatingToIndex(char *ratingtext)
{
int type = -1;
if (!strcmp(ratingtext, "CERO"))
{
type = 0;
}
if (!strcmp(ratingtext, "ESRB"))
{
type = 1;
}
if (!strcmp(ratingtext, "PEGI"))
{
type = 2;
}
return type;
}
int ConvertRating(const char *ratingvalue, const char *fromrating, const char *torating)
{
if (!strcmp(fromrating, torating))
{
int ret = atoi(ratingvalue);
if(ret < 7)
return 0;
else if(ret < 12)
return 1;
else if(ret < 16)
return 2;
else if(ret < 18)
return 3;
else
return 4;
}
int type = -1;
int desttype = -1;
type = ConvertRatingToIndex((char *) fromrating);
desttype = ConvertRatingToIndex((char *) torating);
if (type == -1 || desttype == -1) return -1;
/* rating conversion table */
/* the list is ordered to pick the most likely value first: */
/* EC and AO are less likely to be used so they are moved down to only be picked up when converting ESRB to PEGI or CERO */
/* the conversion can never be perfect because ratings can differ between regions for the same game */
char ratingtable[12][3][5] =
{
{ { "A" }, { "E" }, { "3" } },
{ { "A" }, { "E" }, { "4" } },
{ { "A" }, { "E" }, { "6" } },
{ { "A" }, { "E" }, { "7" } },
{ { "A" }, { "EC" }, { "3" } },
{ { "A" }, { "E10+" }, { "7" } },
{ { "B" }, { "T" }, { "12" } },
{ { "D" }, { "M" }, { "18" } },
{ { "D" }, { "M" }, { "16" } },
{ { "C" }, { "T" }, { "16" } },
{ { "C" }, { "T" }, { "15" } },
{ { "Z" }, { "AO" }, { "18" } },
};
int i;
for (i = 0; i <= 11; i++)
{
if (!strcmp(ratingtable[i][type], ratingvalue))
{
int ret = atoi(ratingtable[i][desttype]);
if(ret < 7)
return 0;
else if(ret < 12)
return 1;
else if(ret < 16)
return 2;
else if(ret < 18)
return 3;
else
return 4;
}
}
return -1;
}
void LoadTitlesFromXML(char *langtxt, bool forcejptoen)
/* langtxt: set to "English","French","German", to force language for all titles, or "" to load title depending on each game's setting */
/* forcejptoen: set to true to load English title instead of Japanese title when game is set to Japanese */
{
if (nodedata == NULL) return;
bool forcelang = false;
if (strcmp(langtxt, "")) forcelang = true;
char langcode[10] = "";
if (forcelang) strcpy(langcode, ConvertLangTextToCode(langtxt)); /* convert language text into ISO 639 two-letter language code */
/* create index of <id> elements */
nodeindex = mxmlIndexNew(nodedata, "id", NULL);
nodeid = mxmlIndexReset(nodeindex);
*element_text = 0;
char id_text[10];
char title_text[200] = "";
char title_text_EN[200] = "";
/* search index of id elements, load all id/titles text */
while (nodeid != NULL)
{
nodeid = mxmlIndexFind(nodeindex, "id", NULL);
if (nodeid != NULL)
{
strcpy(title_text, "");
strcpy(title_text_EN, "");
get_nodetext(nodeid, element_text, sizeof(element_text));
snprintf(id_text, 7, "%s", element_text);
// if language is not forced, use game language setting from config
if (!forcelang)
{
langtxt = GetLangSettingFromGame(id_text);
strcpy(langcode, ConvertLangTextToCode(langtxt));
}
/* if enabled, force English title for all games set to Japanese */
if (forcejptoen && (strcmp(langcode, "JA")) == 0) strcpy(langcode, "EN");
/* load title from nodes */
nodefound = mxmlFindElement(nodeid, nodedata, "locale", "lang", "EN", MXML_NO_DESCEND);
if (nodefound != NULL)
{
GetTextFromNode(nodefound, nodedata, "title", NULL, NULL, MXML_DESCEND, title_text_EN,
sizeof(title_text_EN));
}
nodefound = mxmlFindElement(nodeid, nodedata, "locale", "lang", langcode, MXML_NO_DESCEND);
if (nodefound != NULL)
{
GetTextFromNode(nodefound, nodedata, "title", NULL, NULL, MXML_DESCEND, title_text, sizeof(title_text));
}
/* fall back to English title if prefered language was not found */
if (!strcmp(title_text, ""))
{
strcpy(title_text, title_text_EN);
}
snprintf(id_text, 7, "%s", id_text);
GameTitles.SetGameTitle(id_text, title_text);
}
}
// free memory
mxmlIndexDelete(nodeindex);
//if (xmldebug) xmlloadtime = dbg_time2(NULL);
}
void GetPublisherFromGameid(char *idtxt, char *dest, int destsize)
{
/* guess publisher from company list using last two characters from game id */
nodeindextmp = mxmlIndexNew(nodedata, "company", NULL);
nodeidtmp = mxmlIndexReset(nodeindextmp);
*element_text = 0;
char publishercode[3];
sprintf(publishercode, "%c%c", idtxt[4], idtxt[5]);
while (strcmp(element_text, publishercode) != 0)
{
nodeidtmp = mxmlIndexFind(nodeindextmp, "company", NULL);
if (nodeidtmp != NULL)
{
strlcpy(element_text, mxmlElementGetAttr(nodeidtmp, "code"), sizeof(element_text));
}
else
{
break;
}
}
if (!strcmp(element_text, publishercode))
{
strlcpy(dest, mxmlElementGetAttr(nodeidtmp, "name"), destsize);
}
else
{
strcpy(dest, "");
}
// free memory
mxmlIndexDelete(nodeindextmp);
}
char *MemInfo()
{
char linebuf[300] = "";
char memtotal[20];
char memused[20];
char memnotinuse[20];
char memcanbefreed[20];
struct mallinfo mymallinfo = mallinfo();
sprintf(memtotal, "%d", mymallinfo.arena / 1024);
sprintf(memused, "%d", mymallinfo.uordblks / 1024);
sprintf(memnotinuse, "%d", mymallinfo.fordblks / 1024);
sprintf(memcanbefreed, "%d", mymallinfo.keepcost / 1024);
snprintf(linebuf, sizeof(linebuf), "all:%sKB used:%sKB notused:%sKB canfree:%sKB", memtotal, memused, memnotinuse,
memcanbefreed);
char *minfo[300];
*minfo = linebuf;
return *minfo;
}
/*-------------------------------------------------------------------------------------*/
/* get_nodetext() - Get the text for a node, taken from mini-mxml example mxmldoc.c */
char * get_nodetext(mxml_node_t *node, char *buffer, int buflen) /* O - Text in node, I - Node to get, I - Buffer, I - Size of buffer */
{
char *ptr, *end; /* Pointer into buffer, End of buffer */
int len; /* Length of node */
mxml_node_t *current; /* Current node */
ptr = buffer;
end = buffer + buflen - 1;
for (current = node->child; current && ptr < end; current = current->next)
{
if (current->type == MXML_TEXT)
{
if (current->value.text.whitespace) *ptr++ = ' ';
len = (int) strlen(current->value.text.string);
if (len > (int) (end - ptr)) len = (int) (end - ptr);
memcpy(ptr, current->value.text.string, len);
ptr += len;
}
else if (current->type == MXML_OPAQUE)
{
len = (int) strlen(current->value.opaque);
if (len > (int) (end - ptr)) len = (int) (end - ptr);
memcpy(ptr, current->value.opaque, len);
ptr += len;
}
}
*ptr = '\0';
return (buffer);
}

View File

@ -1,23 +0,0 @@
#ifndef _XML_H_
#define _XML_H_
#include <mxml.h>
// open database, close database, load info for a game
bool OpenXMLDatabase(char* xmlfilepath, char* argdblang, bool argJPtoEN, bool openfile, bool loadtitles, bool keepopen);
void CloseXMLDatabase();
#define XML_ELEMMAX 15
bool OpenXMLFile(char* filename);
void LoadTitlesFromXML(char *langcode, bool forcejptoen);
void GetPublisherFromGameid(char *idtxt, char *dest, int destsize);
const char *ConvertLangTextToCode(char *langtext);
int ConvertRating(const char *ratingvalue, const char *fromrating, const char *torating);
char *MemInfo();
mxml_node_t *GetTextFromNode(mxml_node_t *currentnode, mxml_node_t *topnode, const char *nodename, const char *attributename,
char *value, int descend, char *dest, int destsize);
char * get_nodetext(mxml_node_t *node, char *buffer, int buflen);
#endif