mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 11:19:17 +01:00
*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:
parent
ac1c249bf3
commit
53574d6bc5
@ -2,8 +2,8 @@
|
||||
<app version="1">
|
||||
<name> USB Loader GX</name>
|
||||
<coder>USB Loader GX Team</coder>
|
||||
<version>2.1 r1095</version>
|
||||
<release_date>201106241911</release_date>
|
||||
<version>2.1 r1096</version>
|
||||
<release_date>201106241934</release_date>
|
||||
<no_ios_reload/>
|
||||
<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.
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"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"
|
||||
@ -246,6 +246,9 @@ msgstr "Zablokovat rodičovskou kontrolu"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "Zablokovat původní nastavení"
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "Zablokovat nastavení zvuku"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Ukoncit systém"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "Vypnout Wii"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Trídení dle abecedy"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: Fox888[dk]\n"
|
||||
"Language-Team: [dk]\n"
|
||||
@ -246,6 +246,9 @@ msgstr "Bloker forældre indstillinger"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "Bloker nulstils indstillinger"
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "Bloker lyd indstillinger"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Sluk (rødt lys)"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "Sluk Wii"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Sortér alfabetisk"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: glowy\n"
|
||||
"Language-Team: tj_cool, glowy\n"
|
||||
@ -246,6 +246,9 @@ msgstr "Blokkeer Ouderlijk toezicht"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "Blokkeer Reset Instellingen"
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "Blokkeer Geluid Instellingen"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Systeem uitzetten"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "Wii uitzetten"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Alfabetisch sorteren"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr ""
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr ""
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: c64rmx\n"
|
||||
"Language-Team: \n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Sammuta järjestelmä"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Järjestä aakkosittain"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: Kin8\n"
|
||||
"Language-Team: Badablek, Amour, ikya, Cyan & Kin8\n"
|
||||
@ -246,6 +246,9 @@ msgstr "Bloquer Contrôle parental"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "Bloquer Réinit. paramètres"
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "Bloquer Sons"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Arrêt"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "Éteindre la Wii"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Ordre alphabétique"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: TheRealVisitor\n"
|
||||
"Language-Team: Bertilax, Snoozer, wishmasterf, ZEN.13, TheRealVisitor\n"
|
||||
@ -246,6 +246,9 @@ msgstr "Blocke Altersoptionen"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "Blocke Resetoptionen"
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "Blocke Soundoptionen"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "System herunterfahren"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "Wii ausschalten"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Alphabetisch ordnen"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: Springdale\n"
|
||||
"Language-Team: Tusk, Springdale\n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Leállítás"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Rendezés ABC-sorrendben"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: Cambo \n"
|
||||
"Language-Team: Cambo\n"
|
||||
@ -246,6 +246,9 @@ msgstr "Blocca Contr. Genitori"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "Blocca Impost. Predef."
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "Blocca Impost. Audio"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Spegnimento"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "Spegni Wii"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Ordine Alfabetico"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: hosigumayuugi\n"
|
||||
"Language-Team: hosigumayuugi, papa, ichiroling\n"
|
||||
@ -246,6 +246,9 @@ msgstr "使用制限設定を制限"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "設定の初期化を制限"
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "サウンド設定を制限"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "シャットダウン"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "シャットダウン"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "名前順に並び替え"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: nextos@korea.com\n"
|
||||
"Language-Team: \n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "시스템 종료"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "알파벳순으로 정렬"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: raschi\n"
|
||||
"Language-Team: raschi\n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Skru helt av"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "Skru av Wii"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Sortér alfabetisk"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: ziom666 (zadania_prog@vp.pl)\n"
|
||||
"Language-Team: \n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Wylacz"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Sortuj alfabetycznie"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: aniemotion\n"
|
||||
"Language-Team: boto12, aniemotion\n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Desligar"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Ordenar por ordem alfabética"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: pplucky <pplucky@gmail.com>\n"
|
||||
"Language-Team: Sky8000, pplucky\n"
|
||||
@ -246,6 +246,9 @@ msgstr "Bloquear Config. Parental"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "Bloquear Reinicialização Config."
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "Bloquear Config. Som"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Desligar"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "Desligar Wii"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Ordenar por ordem alfabética"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: nikolai_ca\n"
|
||||
"Language-Team: Kir, alendit, nikolai_ca\n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Выключить систему"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Сортировать по алфавиту"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: knife.hu kavid emul8ion\n"
|
||||
"Language-Team: kavid\n"
|
||||
@ -246,6 +246,9 @@ msgstr "家长控制设置"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "重置设置"
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "声音设置"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "关闭系统"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "关闭 Wii"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "按字母排序"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: SirPalax\n"
|
||||
"Language-Team: Penn, SirPalax\n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Apagar Sistema"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Ordenar alfabéticamente"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: Katsurou\n"
|
||||
"Language-Team: Katsurou, pirateX\n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Stäng av helt"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Sortera alfabetiskt"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: Jane.H\n"
|
||||
"Language-Team: kyogc, Miller, Mika Li, Jane.H\n"
|
||||
@ -246,6 +246,9 @@ msgstr "封鎖親子設定"
|
||||
msgid "Block Reset Settings"
|
||||
msgstr "封鎖重置設定"
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr "封鎖音效設定"
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "關閉系統"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr "關閉Wii主機"
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "以字母順序排序"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: Nitro_subzero \n"
|
||||
"Language-Team: Nitro_subzero\n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "ปิดระบบ"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "เรียงตามตัวอักษร"
|
||||
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: USB Loader GX\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"
|
||||
"Last-Translator: omercigingelini\n"
|
||||
"Language-Team: omercigingelini\n"
|
||||
@ -246,6 +246,9 @@ msgstr ""
|
||||
msgid "Block Reset Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block SD Reload Button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Block Sound Settings"
|
||||
msgstr ""
|
||||
|
||||
@ -1269,6 +1272,9 @@ msgstr "Sistemi Kapat"
|
||||
msgid "Shutdown Wii"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sneek Video Patch"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sort alphabetically"
|
||||
msgstr "Alfabetik Diz"
|
||||
|
||||
|
2
Makefile
2
Makefile
@ -75,7 +75,7 @@ endif
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
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
|
||||
# include and lib
|
||||
|
File diff suppressed because one or more lines are too long
@ -471,7 +471,7 @@ void GuiElement::SetEffect(int eff, int speed, f32 circles, int r, f32 startdegr
|
||||
xoffsetDyn = 0; //!position of circle in x
|
||||
yoffsetDyn = 0; //!position of circle in y
|
||||
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
|
||||
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
|
||||
@ -814,7 +814,7 @@ void GuiElement::UnlockElement()
|
||||
// LWP_MutexUnlock(mutex);
|
||||
LWP_MutexLock(_lock_mutex);
|
||||
// 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;
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, const char *themePath, int offset
|
||||
width = w;
|
||||
height = h;
|
||||
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;
|
||||
selectedItem = -1;
|
||||
focus = 1; // allow focus
|
||||
|
@ -205,7 +205,7 @@ GuiGameGrid::GuiGameGrid(int w, int h, const char *themePath, int offset) :
|
||||
{
|
||||
width = w;
|
||||
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_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->SetTrigger(trig1);
|
||||
|
||||
// Page-Stuff
|
||||
gameIndex = NULL;
|
||||
|
||||
Reload(Settings.gridRows, listOffset);
|
||||
}
|
||||
|
||||
@ -297,24 +294,23 @@ GuiGameGrid::~GuiGameGrid()
|
||||
for (u32 i = 0; i < titleTT.size(); ++i)
|
||||
delete titleTT[i];
|
||||
|
||||
if(gameIndex)
|
||||
delete [] gameIndex;
|
||||
game.clear();
|
||||
coverImg.clear();
|
||||
titleTT.clear();
|
||||
gameIndex.clear();
|
||||
}
|
||||
|
||||
void GuiGameGrid::SetFocus(int f)
|
||||
{
|
||||
LOCK( this );
|
||||
if (!gameList.size()) return;
|
||||
|
||||
focus = f;
|
||||
|
||||
for (int i = 0; i < pagesize; i++)
|
||||
for (u32 i = 0; i < game.size(); i++)
|
||||
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()
|
||||
@ -326,7 +322,7 @@ void GuiGameGrid::ResetState()
|
||||
stateChan = -1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < pagesize; i++)
|
||||
for (u32 i = 0; i < game.size(); i++)
|
||||
{
|
||||
game[i]->ResetState();
|
||||
}
|
||||
@ -336,7 +332,7 @@ int GuiGameGrid::GetClickedOption()
|
||||
{
|
||||
LOCK( this );
|
||||
int found = -1;
|
||||
if (clickedItem >= 0)
|
||||
if (clickedItem >= 0 && clickedItem < (int) game.size())
|
||||
{
|
||||
game[clickedItem]->SetState(STATE_SELECTED);
|
||||
found = gameIndex[clickedItem];
|
||||
@ -349,7 +345,7 @@ int GuiGameGrid::GetSelectedOption()
|
||||
{
|
||||
LOCK( this );
|
||||
int found = -1;
|
||||
for (int i = 0; i < pagesize; i++)
|
||||
for (u32 i = 0; i < game.size(); i++)
|
||||
{
|
||||
if (game[i]->GetState() == STATE_SELECTED)
|
||||
{
|
||||
@ -426,7 +422,8 @@ void GuiGameGrid::Draw()
|
||||
btnRowUp->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();
|
||||
|
||||
this->UpdateEffects();
|
||||
@ -442,9 +439,9 @@ void GuiGameGrid::ChangeRows(int n)
|
||||
|
||||
void GuiGameGrid::Update(GuiTrigger * t)
|
||||
{
|
||||
LOCK( this );
|
||||
if (state == STATE_DISABLED || !t || !gameList.size()) return;
|
||||
|
||||
LOCK( this );
|
||||
if (!(game[0]->GetEffect() || game[0]->GetEffectOnOver()))
|
||||
{
|
||||
for (int i = 0; i < pagesize; i++)
|
||||
@ -683,7 +680,8 @@ void GuiGameGrid::Update(GuiTrigger * t)
|
||||
{
|
||||
if ((rows == 1) && (gameList.size() >= 18))
|
||||
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();
|
||||
return;
|
||||
}
|
||||
@ -692,12 +690,15 @@ void GuiGameGrid::Update(GuiTrigger * t)
|
||||
{
|
||||
if (rows == 3)
|
||||
this->ChangeRows(2);
|
||||
else if (rows == 2) this->ChangeRows(1);
|
||||
else if (rows == 2)
|
||||
this->ChangeRows(1);
|
||||
|
||||
btnRowDown->ResetState();
|
||||
return;
|
||||
}
|
||||
|
||||
if (updateCB) updateCB(this);
|
||||
if (updateCB)
|
||||
updateCB(this);
|
||||
}
|
||||
|
||||
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)
|
||||
delete titleTT[i];
|
||||
|
||||
if(gameIndex)
|
||||
delete [] gameIndex;
|
||||
game.clear();
|
||||
coverImg.clear();
|
||||
titleTT.clear();
|
||||
gameIndex.clear();
|
||||
|
||||
goLeft = 0;
|
||||
goRight = 0;
|
||||
@ -739,8 +739,14 @@ void GuiGameGrid::Reload(int Rows, int ListOffset)
|
||||
|
||||
pagesize = ROWS2PAGESIZE( rows );
|
||||
|
||||
if(gameList.size() == 0)
|
||||
{
|
||||
pagesize = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// Page-Stuff
|
||||
gameIndex = new int[pagesize];
|
||||
gameIndex.resize(pagesize);
|
||||
titleTT.resize(pagesize);
|
||||
coverImg.resize(pagesize);
|
||||
game.resize(pagesize);
|
||||
|
@ -35,7 +35,7 @@ class GuiGameGrid : public GuiGameBrowser
|
||||
int theme_posX;
|
||||
int theme_posY;
|
||||
|
||||
int * gameIndex;
|
||||
std::vector<int> gameIndex;
|
||||
std::vector<GuiButton *> game;
|
||||
std::vector<GuiTooltip *> titleTT;
|
||||
std::vector<GuiImageAsync *> coverImg;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "FileOperations/fileops.h"
|
||||
#include "xml/xml.h"
|
||||
#include "xml/tinyxml.h"
|
||||
#include "gecko.h"
|
||||
|
||||
#include "HomebrewXML.h"
|
||||
@ -24,74 +24,65 @@ int HomebrewXML::LoadHomebrewXMLData(const char* filename)
|
||||
LongDescription.clear();
|
||||
Releasedate.clear();
|
||||
|
||||
/* Load XML file */
|
||||
u8 * xmlbuffer = NULL;
|
||||
u64 size = 0;
|
||||
LoadFileToMem(filename, &xmlbuffer, &size);
|
||||
TiXmlDocument xmlDoc(filename);
|
||||
if(!xmlDoc.LoadFile())
|
||||
return false;
|
||||
|
||||
if(!xmlbuffer)
|
||||
return -1;
|
||||
TiXmlElement *appNode = xmlDoc.FirstChildElement("app");
|
||||
|
||||
mxml_node_t * nodetree = mxmlLoadString(NULL, (const char *) xmlbuffer, MXML_OPAQUE_CALLBACK);
|
||||
TiXmlElement *node = NULL;
|
||||
|
||||
if (!nodetree)
|
||||
return -2;
|
||||
node = appNode->FirstChildElement("name");
|
||||
if(node && node->FirstChild() && node->FirstChild()->Value())
|
||||
Name = node->FirstChild()->Value();
|
||||
|
||||
mxml_node_t * node = mxmlFindElement(nodetree, nodetree, "app", NULL, NULL, MXML_DESCEND_FIRST);
|
||||
if (!node)
|
||||
return -5;
|
||||
node = appNode->FirstChildElement("coder");
|
||||
if(node && node->FirstChild() && node->FirstChild()->Value())
|
||||
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';
|
||||
GetTextFromNode(node, nodetree, (char*) "name", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE);
|
||||
Name = Entrie;
|
||||
node = appNode->FirstChildElement("short_description");
|
||||
if(node && node->FirstChild() && node->FirstChild()->Value())
|
||||
ShortDescription = node->FirstChild()->Value();
|
||||
|
||||
Entrie[0] = '\0';
|
||||
GetTextFromNode(node, nodetree, (char*) "coder", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE);
|
||||
Coder = Entrie;
|
||||
node = appNode->FirstChildElement("long_description");
|
||||
if(node && node->FirstChild() && node->FirstChild()->Value())
|
||||
LongDescription = node->FirstChild()->Value();
|
||||
|
||||
Entrie[0] = '\0';
|
||||
GetTextFromNode(node, nodetree, (char*) "version", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE);
|
||||
Version = Entrie;
|
||||
char ReleaseText[200];
|
||||
memset(ReleaseText, 0, sizeof(ReleaseText));
|
||||
|
||||
Entrie[0] = '\0';
|
||||
GetTextFromNode(node, nodetree, (char*) "short_description", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE);
|
||||
ShortDescription = Entrie;
|
||||
node = appNode->FirstChildElement("release_date");
|
||||
if(node && node->FirstChild() && node->FirstChild()->Value())
|
||||
snprintf(ReleaseText, sizeof(ReleaseText), node->FirstChild()->Value());
|
||||
|
||||
Entrie[0] = '\0';
|
||||
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
|
||||
int len = (strlen(ReleaseText) - 6); //length of the date string without the 200000 at the end
|
||||
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],
|
||||
Entrie[1], Entrie[2], Entrie[3]);
|
||||
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]);
|
||||
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]);
|
||||
else snprintf(Entrie, ENTRIE_SIZE, "%s", Entrie);
|
||||
snprintf(ReleaseText, sizeof(ReleaseText), "%c%c/%c%c%c%c", ReleaseText[4], ReleaseText[5], ReleaseText[0], ReleaseText[1], ReleaseText[2], ReleaseText[3]);
|
||||
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';
|
||||
node = GetTextFromNode(node, nodetree, (char*) "arg", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE);
|
||||
if(node)
|
||||
Arguments.push_back(std::string(Entrie));
|
||||
if(argNode->FirstChild() && argNode->FirstChild()->Value())
|
||||
Arguments.push_back(std::string(argNode->FirstChild()->Value()));
|
||||
|
||||
argNode = argNode->NextSiblingElement();
|
||||
}
|
||||
|
||||
delete[] Entrie;
|
||||
|
||||
mxmlDelete(node);
|
||||
mxmlDelete(nodetree);
|
||||
free(xmlbuffer);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "usbloader/GameList.h"
|
||||
#include "usbloader/MountGamePartition.h"
|
||||
#include "mload/mload_modules.h"
|
||||
#include "xml/xml.h"
|
||||
#include "audio.h"
|
||||
#include "gecko.h"
|
||||
#include "menu.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "settings/CGameStatistics.h"
|
||||
#include "settings/CGameSettings.h"
|
||||
#include "settings/GameTitles.h"
|
||||
#include "system/IosLoader.h"
|
||||
#include "utils/StringTools.h"
|
||||
#include "utils/rockout.h"
|
||||
#include "utils/ShowError.h"
|
||||
@ -614,6 +615,7 @@ void GameBrowseMenu::ReloadBrowser()
|
||||
|
||||
if (Settings.gameDisplay == LIST_MODE)
|
||||
{
|
||||
if(gameList.size() > 0)
|
||||
Append(gameCoverImg);
|
||||
DownloadBtn->SetSize(160, 224);
|
||||
listBtn->SetImage(listBtnImg);
|
||||
@ -721,6 +723,7 @@ void GameBrowseMenu::ReloadBrowser()
|
||||
Append(usedSpaceTxt);
|
||||
if (thInt("1 - show game count: 1 for on and 0 for off") == 1) //force show game cnt info
|
||||
Append(gamecntBtn);
|
||||
if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_SD_RELOAD_BUTTON))
|
||||
Append(sdcardBtn);
|
||||
Append(poweroffBtn);
|
||||
Append(gameInfo);
|
||||
@ -1354,7 +1357,11 @@ int GameBrowseMenu::OpenClickedGame()
|
||||
returnHere = true;
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
if (RunGame && (game_cfg->ocarina == ON || (game_cfg->ocarina == INHERIT && Settings.ocarina == ON)))
|
||||
CheckOcarina(IDfull);
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "settings/CSettings.h"
|
||||
#include "network/networkops.h"
|
||||
#include "utils/StringTools.h"
|
||||
#include "xml/tinyxml.h"
|
||||
#include "gecko.h"
|
||||
|
||||
Wiinnertag::Wiinnertag(const string &filepath)
|
||||
@ -35,27 +36,16 @@ Wiinnertag::Wiinnertag(const string &filepath)
|
||||
|
||||
bool Wiinnertag::ReadXML(const string &filepath)
|
||||
{
|
||||
u8 *buffer = NULL;
|
||||
u64 filesize = 0;
|
||||
|
||||
LoadFileToMem(filepath.c_str(), &buffer, &filesize);
|
||||
|
||||
if(!buffer)
|
||||
TiXmlDocument xmlDoc(filepath.c_str());
|
||||
if(!xmlDoc.LoadFile())
|
||||
return false;
|
||||
|
||||
mxml_node_t *xmlfile = mxmlLoadString(NULL, (const char *) buffer, MXML_OPAQUE_CALLBACK);
|
||||
if(!xmlfile)
|
||||
{
|
||||
free(buffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
mxml_node_t *node = mxmlFindElement(xmlfile, xmlfile, "Tag", NULL, NULL, MXML_DESCEND_FIRST);
|
||||
TiXmlElement * node = xmlDoc.FirstChildElement("Tag");
|
||||
|
||||
while(node != NULL)
|
||||
{
|
||||
const char * URL = mxmlElementGetAttr(node, "URL");
|
||||
const char * Key = mxmlElementGetAttr(node, "Key");
|
||||
const char * URL = node->Attribute("URL");
|
||||
const char * Key = node->Attribute("Key");
|
||||
|
||||
if(URL && Key)
|
||||
{
|
||||
@ -65,12 +55,9 @@ bool Wiinnertag::ReadXML(const string &filepath)
|
||||
tagList[size].second = Key;
|
||||
}
|
||||
|
||||
node = mxmlFindElement(node, xmlfile, "Tag", NULL, NULL, MXML_DESCEND);
|
||||
node = node->NextSiblingElement();
|
||||
}
|
||||
|
||||
mxmlDelete(xmlfile);
|
||||
free(buffer);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -109,43 +96,29 @@ bool Wiinnertag::TagGame(const char *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)
|
||||
{
|
||||
if(filepath.size() == 0)
|
||||
return false;
|
||||
|
||||
CreateSubfolder(filepath.c_str());
|
||||
|
||||
string fullpath = filepath;
|
||||
if(fullpath[fullpath.size()-1] != '/')
|
||||
fullpath += '/';
|
||||
fullpath += "Wiinnertag.xml";
|
||||
|
||||
FILE * f = fopen(fullpath.c_str(), "wb");
|
||||
if(!f)
|
||||
return false;
|
||||
TiXmlDocument xmlDoc;
|
||||
|
||||
mxml_node_t *xmlfile = mxmlNewXML("1.0");
|
||||
mxmlSetWrapMargin(0);
|
||||
TiXmlDeclaration declaration("1.0", "UTF-8", "");
|
||||
xmlDoc.InsertEndChild(declaration);
|
||||
|
||||
mxml_node_t *node = mxmlNewElement(xmlfile, "Tag");
|
||||
mxmlElementSetAttr(node, "URL", "http://www.wiinnertag.com/wiinnertag_scripts/update_sign.php?key={KEY}&game_id={ID6}");
|
||||
mxmlElementSetAttr(node, "Key", "1234567890");
|
||||
TiXmlElement Tag("Tag");
|
||||
Tag.SetAttribute("URL", "http://www.wiinnertag.com/wiinnertag_scripts/update_sign.php?key={KEY}&game_id={ID6}");
|
||||
Tag.SetAttribute("Key", "1234567890");
|
||||
xmlDoc.InsertEndChild(Tag);
|
||||
|
||||
mxmlSaveFile(xmlfile, f, XMLSaveCallback);
|
||||
fclose(f);
|
||||
|
||||
mxmlDelete(xmlfile);
|
||||
xmlDoc.SaveFile(fullpath);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <gctypes.h>
|
||||
#include <mxml.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -213,8 +213,7 @@ struct block downloadfile(const char *url)
|
||||
u32 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
|
||||
- 3] == '\r')
|
||||
if (response.data[i] == '\n' && response.data[i - 1] == '\r' && response.data[i - 2] == '\n' && response.data[i - 3] == '\r')
|
||||
{
|
||||
filestart = response.data + i + 1;
|
||||
filesize = response.size - i - 1;
|
||||
|
@ -103,6 +103,9 @@ char * GetIncommingIP(void)
|
||||
|
||||
s32 network_request(s32 connect, const char * request, char * filename)
|
||||
{
|
||||
if(connect == NET_DEFAULT_SOCK)
|
||||
connect = connection;
|
||||
|
||||
char buf[1024];
|
||||
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 */
|
||||
ptr = strstr(buf, "Content-Length:");
|
||||
if (!ptr) return -1;
|
||||
if (!ptr) return NET_SIZE_UNKNOWN;
|
||||
|
||||
sscanf(ptr, "Content-Length: %u", &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)
|
||||
{
|
||||
if(connect == NET_DEFAULT_SOCK)
|
||||
connect = connection;
|
||||
|
||||
u32 read = 0;
|
||||
s32 ret = -1;
|
||||
|
||||
@ -175,7 +181,6 @@ s32 network_read(s32 connect, u8 *buf, u32 len)
|
||||
***************************************************************************/
|
||||
s32 download_request(const char * url, char * filename)
|
||||
{
|
||||
|
||||
//Check if the url starts with "http://", if not it is not considered a valid url
|
||||
if (strncmp(url, "http://", strlen("http://")) != 0)
|
||||
{
|
||||
@ -352,6 +357,102 @@ bool CheckConnection(const char *url, float timeout)
|
||||
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
|
||||
***************************************************************************/
|
||||
|
@ -9,6 +9,9 @@
|
||||
#define _NETWORKOPS_H_
|
||||
|
||||
#define NETWORKBLOCKSIZE 5*1024 //5KB
|
||||
#define NET_SIZE_UNKNOWN -0xFFFFFFF
|
||||
#define NET_DEFAULT_SOCK -0xFFFFFFE
|
||||
|
||||
void Initialize_Network(void);
|
||||
void DeinitNetwork(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_read(s32 connection, u8 *buf, u32 len);
|
||||
s32 download_request(const char * url, char * filename = NULL);
|
||||
s32 DownloadWithResponse(const char * url, u8 **outbuffer, u32 *outsize);
|
||||
void CloseConnection();
|
||||
char * HEAD_Request(const char * url);
|
||||
void HaltNetworkThread();
|
||||
|
@ -50,7 +50,7 @@ void ClearDOLList()
|
||||
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);
|
||||
int i;
|
||||
@ -76,6 +76,9 @@ void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8
|
||||
if (vipatch)
|
||||
vidolpatcher(dst, len);
|
||||
|
||||
if(sneekVideoPatch)
|
||||
sneek_video_patch(dst, len);
|
||||
|
||||
/*LANGUAGE PATCH - FISHEARS*/
|
||||
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
|
||||
|
||||
static u32 ad[ 4 ] = { 0, 0, 0, 0 };//these variables are global on the off chance the different parts needed
|
||||
|
@ -9,11 +9,12 @@ extern "C" {
|
||||
|
||||
void RegisterDOL(u8 *dst, int len);
|
||||
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 NSMBPatch();
|
||||
bool PoPPatch();
|
||||
void VideoModePatcher(u8 * dst, int len, u8 videoSelected);
|
||||
void sneek_video_patch(void *addr, u32 len);
|
||||
bool PatchReturnTo(void *Address, int Size, u32 id);
|
||||
int PatchNewReturnTo(u64 title);
|
||||
bool BlockIOSReload(u8 gameIOS);
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "zlib.h"
|
||||
#include "svnrev.h"
|
||||
#include "audio.h"
|
||||
#include "xml/xml.h"
|
||||
#include "language/UpdateLanguage.h"
|
||||
#include "system/IosLoader.h"
|
||||
#include "gecko.h"
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "language/gettext.h"
|
||||
#include "GUI/gui.h"
|
||||
#include "GUI/Text.hpp"
|
||||
#include "xml/xml.h"
|
||||
#include "menu.h"
|
||||
#include "menu/menus.h"
|
||||
#include "sys.h"
|
||||
@ -739,7 +738,7 @@ static int InternalShowGameInfo(char *ID)
|
||||
if(gameCategories[i] == 0)
|
||||
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[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[categoriesTxt.size()-1]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
categoriesTxt[categoriesTxt.size()-1]->SetPosition(515, 12 + indexy);
|
||||
categoriesTxt[categoriesTxt.size()-1]->SetMaxWidth(74, DOTTED);
|
||||
indexy += 20;
|
||||
InfoWindow.Append(categoriesTxt[categoriesTxt.size()-1]);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "language/gettext.h"
|
||||
#include "FileOperations/fileops.h"
|
||||
#include "xml/WiiTDB.hpp"
|
||||
#include "xml/xml.h"
|
||||
#include "utils/StringTools.h"
|
||||
#include "svnrev.h"
|
||||
|
||||
#define VALID_CONFIG_REV 1084
|
||||
@ -56,31 +56,6 @@ const vector<unsigned int> &CGameCategories::operator[](const char *id) const
|
||||
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)
|
||||
{
|
||||
if(filepath.size() == 0)
|
||||
@ -92,76 +67,56 @@ bool CGameCategories::Load(string filepath)
|
||||
filepath += "GXGameCategories.xml";
|
||||
configPath = filepath;
|
||||
|
||||
u8 *buffer = NULL;
|
||||
u64 filesize = 0;
|
||||
|
||||
LoadFileToMem(filepath.c_str(), &buffer, &filesize);
|
||||
|
||||
if(!buffer)
|
||||
return false;
|
||||
|
||||
clear();
|
||||
|
||||
mxml_node_t *xmlfile = mxmlLoadString(NULL, (const char *) buffer, MXML_OPAQUE_CALLBACK);
|
||||
|
||||
if(!ValidVersion(xmlfile))
|
||||
{
|
||||
mxmlDelete(xmlfile);
|
||||
free(buffer);
|
||||
TiXmlDocument xmlDoc(filepath.c_str());
|
||||
if(!xmlDoc.LoadFile())
|
||||
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)
|
||||
{
|
||||
mxmlDelete(xmlfile);
|
||||
free(buffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
node = mxmlFindElement(node, xmlfile, "Category", NULL, NULL, MXML_DESCEND_FIRST);
|
||||
node = node->FirstChildElement("Category");
|
||||
|
||||
while(node != NULL)
|
||||
{
|
||||
const char * ID = mxmlElementGetAttr(node, "ID");
|
||||
const char * Name = mxmlElementGetAttr(node, "Name");
|
||||
const char * ID = node->Attribute("ID");
|
||||
const char * Name = node->Attribute("Name");
|
||||
|
||||
if(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)
|
||||
{
|
||||
mxmlDelete(xmlfile);
|
||||
free(buffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
node = mxmlFindElement(node, xmlfile, "Game", NULL, NULL, MXML_DESCEND_FIRST);
|
||||
node = node->FirstChildElement("Game");
|
||||
|
||||
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)
|
||||
{
|
||||
const char * categoryID = mxmlElementGetAttr(category, "ID");
|
||||
const char * categoryID = category->Attribute("ID");
|
||||
if(gameID && 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();
|
||||
|
||||
return true;
|
||||
@ -178,60 +133,72 @@ bool CGameCategories::Save()
|
||||
|
||||
CreateSubfolder(filepath);
|
||||
|
||||
FILE * f = fopen(configPath.c_str(), "wb");
|
||||
if(!f)
|
||||
return false;
|
||||
TiXmlDocument xmlDoc;
|
||||
|
||||
mxml_node_t *xmlfile = mxmlNewXML("1.0");
|
||||
mxmlSetWrapMargin(0);
|
||||
TiXmlDeclaration declaration("1.0", "UTF-8", "");
|
||||
xmlDoc.InsertEndChild(declaration);
|
||||
|
||||
mxml_node_t *node = mxmlNewElement(xmlfile, "Revision");
|
||||
mxmlNewInteger(node, atoi(GetRev()));
|
||||
TiXmlElement Revision("Revision");
|
||||
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();
|
||||
do
|
||||
{
|
||||
mxml_node_t *category = mxmlNewElement(node, "Category");
|
||||
mxmlElementSetAttrf(category, "ID", "%02u", CategoryList.getCurrentID());
|
||||
mxmlElementSetAttr(category, "Name", CategoryList.getCurrentName().c_str());
|
||||
TiXmlElement Category("Category");
|
||||
Category.SetAttribute("ID", fmt("%02i", CategoryList.getCurrentID()));
|
||||
Category.SetAttribute("Name", CategoryList.getCurrentName().c_str());
|
||||
|
||||
Categories.InsertEndChild(Category);
|
||||
}
|
||||
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++)
|
||||
{
|
||||
mxml_node_t *game = mxmlNewElement(node, "Game");
|
||||
mxmlElementSetAttr(game, "ID", itr->first.c_str());
|
||||
mxmlElementSetAttr(game, "Title", GameTitles.GetTitle(itr->first.c_str()));
|
||||
TiXmlElement Game("Game");
|
||||
Game.SetAttribute("ID", itr->first.c_str());
|
||||
Game.SetAttribute("Title", GameTitles.GetTitle(itr->first.c_str()));
|
||||
|
||||
for(u32 i = 0; i < itr->second.size(); ++i)
|
||||
{
|
||||
mxml_node_t *category = mxmlNewElement(game, "Category");
|
||||
mxmlElementSetAttrf(category, "ID", "%02u", itr->second[i]);
|
||||
mxmlElementSetAttr(category, "Name", CategoryList[itr->second[i]]);
|
||||
}
|
||||
TiXmlElement Category("Category");
|
||||
Category.SetAttribute("ID", fmt("%02i", itr->second[i]));
|
||||
Category.SetAttribute("Name", CategoryList[itr->second[i]]);
|
||||
|
||||
Game.InsertEndChild(Category);
|
||||
}
|
||||
|
||||
mxmlSaveFile(xmlfile, f, XMLSaveCallback);
|
||||
fclose(f);
|
||||
GameCategories.InsertEndChild(Game);
|
||||
}
|
||||
|
||||
mxmlDelete(xmlfile);
|
||||
xmlDoc.InsertEndChild(GameCategories);
|
||||
}
|
||||
|
||||
xmlDoc.SaveFile(configPath);
|
||||
|
||||
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(!node || !node->child || !node->child->value.opaque)
|
||||
if(!revisionNode->FirstChild() || !revisionNode->FirstChild()->Value())
|
||||
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)
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <mxml.h>
|
||||
#include "xml/tinyxml.h"
|
||||
#include "CCategoryList.hpp"
|
||||
|
||||
class CGameCategories
|
||||
@ -56,7 +56,7 @@ class CGameCategories
|
||||
|
||||
CCategoryList CategoryList;
|
||||
protected:
|
||||
bool ValidVersion(mxml_node_t *xmlfile);
|
||||
bool ValidVersion(TiXmlElement *xmlfile);
|
||||
|
||||
string configPath;
|
||||
const vector<unsigned int> defaultCategory;
|
||||
|
@ -188,6 +188,7 @@ bool CGameSettings::Save()
|
||||
fprintf(f, "alternatedolstart:%d; ", GameList[i].alternatedolstart);
|
||||
fprintf(f, "alternatedolname:%s; ", GameList[i].alternatedolname);
|
||||
fprintf(f, "returnTo:%d; ", GameList[i].returnTo);
|
||||
fprintf(f, "sneekVideoPatch:%d; ", GameList[i].sneekVideoPatch);
|
||||
fprintf(f, "Locked:%d;\n", GameList[i].Locked);
|
||||
}
|
||||
fprintf(f, "# END\n");
|
||||
@ -301,6 +302,14 @@ bool CGameSettings::SetSetting(GameCFG & game, char *name, char *value)
|
||||
}
|
||||
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)
|
||||
{
|
||||
if (sscanf(value, "%d", &i) == 1)
|
||||
@ -423,6 +432,7 @@ GameCFG * CGameSettings::GetDefault()
|
||||
DefaultConfig.iosreloadblock = INHERIT;
|
||||
DefaultConfig.alternatedolname[0] = '\0';
|
||||
DefaultConfig.returnTo = 1;
|
||||
DefaultConfig.sneekVideoPatch = INHERIT;
|
||||
DefaultConfig.Locked = OFF;
|
||||
|
||||
return &DefaultConfig;
|
||||
|
@ -23,6 +23,7 @@ typedef struct _GameCFG
|
||||
short patchcountrystrings;
|
||||
char alternatedolname[40];
|
||||
short returnTo;
|
||||
short sneekVideoPatch;
|
||||
short Locked;
|
||||
} GameCFG;
|
||||
|
||||
|
@ -67,7 +67,7 @@ void CSettings::SetDefault()
|
||||
snprintf(BcaCodepath, sizeof(BcaCodepath), "%s/bca/", BootDevice);
|
||||
snprintf(WipCodepath, sizeof(WipCodepath), "%s/wip/", 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(dolpath, sizeof(dolpath), "%s/", BootDevice);
|
||||
strcpy(theme, "");
|
||||
@ -125,6 +125,7 @@ void CSettings::SetDefault()
|
||||
Wiinnertag = OFF;
|
||||
SelectedGame = 0;
|
||||
GameListOffset = 0;
|
||||
sneekVideoPatch = OFF;
|
||||
}
|
||||
|
||||
bool CSettings::Load()
|
||||
@ -283,6 +284,7 @@ bool CSettings::Save()
|
||||
fprintf(file, "WiinnertagPath = %s\n", WiinnertagPath);
|
||||
fprintf(file, "SelectedGame = %d\n", SelectedGame);
|
||||
fprintf(file, "GameListOffset = %d\n", GameListOffset);
|
||||
fprintf(file, "sneekVideoPatch = %d\n", sneekVideoPatch);
|
||||
fclose(file);
|
||||
|
||||
return true;
|
||||
@ -552,6 +554,10 @@ bool CSettings::SetSetting(char *name, char *value)
|
||||
{
|
||||
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)
|
||||
{
|
||||
InstallPartitions = strtoul(value, 0, 16);
|
||||
|
@ -123,6 +123,7 @@ class CSettings
|
||||
short Wiinnertag;
|
||||
short SelectedGame;
|
||||
short GameListOffset;
|
||||
short sneekVideoPatch;
|
||||
std::vector<u32> EnabledCategories;
|
||||
protected:
|
||||
bool ValidVersion(FILE * file);
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include "GameTitles.h"
|
||||
#include "CSettings.h"
|
||||
#include "usbloader/GameList.h"
|
||||
#include "xml/xml.h"
|
||||
#include "xml/WiiTDB.hpp"
|
||||
|
||||
CGameTitles GameTitles;
|
||||
@ -254,7 +253,7 @@ void CGameTitles::LoadTitlesFromWiiTDB(const char * path, bool forceCacheReload)
|
||||
if(!XML_DB.GetRatingValue(MissingTitles[i].c_str(), RatValTxt))
|
||||
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());
|
||||
if(ret > 0)
|
||||
TitleList[TitleList.size()-1].PlayersCount = ret;
|
||||
|
@ -173,6 +173,7 @@ enum
|
||||
BLOCK_FEATURE_SETTINGS = 0x020000,
|
||||
BLOCK_HARD_DRIVE_SETTINGS = 0x040000,
|
||||
BLOCK_CATEGORIES_MENU = 0x080000,
|
||||
BLOCK_SD_RELOAD_BUTTON = 0x100000,
|
||||
BLOCK_ALL = 0xFFFFFFFF,
|
||||
};
|
||||
|
||||
|
@ -144,6 +144,7 @@ void GameLoadSM::SetOptionNames()
|
||||
|
||||
Options->SetName(Idx++, "%s", tr( "Video Mode" ));
|
||||
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( "Patch Country Strings" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Ocarina" ));
|
||||
@ -173,6 +174,12 @@ void GameLoadSM::SetOptionValues()
|
||||
else
|
||||
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
|
||||
if(GameConfig.language == INHERIT)
|
||||
Options->SetValue(Idx++, tr("Use global"));
|
||||
@ -278,6 +285,12 @@ int GameLoadSM::GetMenuInternal()
|
||||
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
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
|
@ -79,6 +79,7 @@ LoaderSettings::LoaderSettings()
|
||||
|
||||
Options->SetName(Idx++, "%s", tr( "Video Mode" ));
|
||||
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( "Patch Country Strings" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Ocarina" ));
|
||||
@ -101,6 +102,9 @@ void LoaderSettings::SetOptionValues()
|
||||
//! Settings: VIDTV Patch
|
||||
Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.videopatch] ));
|
||||
|
||||
//! Settings: Sneek Video Patch
|
||||
Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.sneekVideoPatch] ));
|
||||
|
||||
//! Settings: Game 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;
|
||||
}
|
||||
|
||||
//! Settings: Sneek Video Patch
|
||||
else if (ret == ++Idx )
|
||||
{
|
||||
if (++Settings.sneekVideoPatch >= MAX_ON_OFF) Settings.sneekVideoPatch = 0;
|
||||
}
|
||||
|
||||
//! Settings: Game Language
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
|
@ -76,6 +76,7 @@ ParentalControlSM::ParentalControlSM()
|
||||
Options->SetName(Idx++, "%s", tr( "Block GameID Change" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Block Categories Menu" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Block Categories Modify" ));
|
||||
Options->SetName(Idx++, "%s", tr( "Block SD Reload Button" ));
|
||||
|
||||
SetOptionValues();
|
||||
}
|
||||
@ -163,6 +164,9 @@ void ParentalControlSM::SetOptionValues()
|
||||
|
||||
//! Settings: Block Categories Modify
|
||||
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()
|
||||
@ -350,6 +354,12 @@ int ParentalControlSM::GetMenuInternal()
|
||||
Settings.ParentalBlocks ^= BLOCK_CATEGORIES_MOD;
|
||||
}
|
||||
|
||||
//! Settings: Block SD Reload Button
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
Settings.ParentalBlocks ^= BLOCK_SD_RELOAD_BUTTON;
|
||||
}
|
||||
|
||||
SetOptionValues();
|
||||
|
||||
return MENU_NONE;
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "menu.h"
|
||||
#include "video.h"
|
||||
#include "gecko.h"
|
||||
#include "xml/xml.h"
|
||||
#include "wad/nandtitle.h"
|
||||
|
||||
extern "C"
|
||||
|
@ -239,6 +239,7 @@ void ThemeDownloader::SetupMainButtons()
|
||||
|
||||
if(!CheckConnection(ThemeListURL.c_str()))
|
||||
{
|
||||
ProgressStop();
|
||||
ShowError(tr("Connection to server timed out."));
|
||||
return;
|
||||
}
|
||||
@ -247,9 +248,9 @@ void ThemeDownloader::SetupMainButtons()
|
||||
|
||||
if (ThemeList->GetThemeCount() == 0)
|
||||
{
|
||||
ProgressStop();
|
||||
WindowPrompt(tr( "No themes found on the site." ), 0, "OK");
|
||||
returnMenu = MENU_SETTINGS;
|
||||
ProgressStop();
|
||||
}
|
||||
|
||||
for(int i = 0; i < ThemeList->GetThemeCount(); ++i)
|
||||
|
@ -29,79 +29,82 @@
|
||||
#include <string.h>
|
||||
#include <gctypes.h>
|
||||
|
||||
#include "network/networkops.h"
|
||||
#include "Theme_List.h"
|
||||
#include "xml/xml.h"
|
||||
#include "xml/tinyxml.h"
|
||||
|
||||
Theme_List::Theme_List(const char * url)
|
||||
{
|
||||
if (!IsNetworkInit())
|
||||
return;
|
||||
|
||||
struct block file = downloadfile(url);
|
||||
u8 *buffer = NULL;
|
||||
u32 size = 0;
|
||||
|
||||
if (!file.data)
|
||||
DownloadWithResponse(url, &buffer, &size);
|
||||
|
||||
if(!buffer)
|
||||
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()
|
||||
{
|
||||
}
|
||||
|
||||
bool Theme_List::ParseXML(const u8 * xmlfile)
|
||||
bool Theme_List::ParseXML(const char * xmlfile)
|
||||
{
|
||||
char element_text[1024];
|
||||
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;
|
||||
TiXmlDocument xmlDoc;
|
||||
|
||||
nodetree = mxmlLoadString(NULL, (const char *) xmlfile, MXML_OPAQUE_CALLBACK);
|
||||
|
||||
if (nodetree == NULL)
|
||||
if(!xmlDoc.Parse(xmlfile))
|
||||
return false;
|
||||
|
||||
nodedata = mxmlFindElement(nodetree, nodetree, "themes", NULL, NULL, MXML_DESCEND);
|
||||
if (nodedata == NULL)
|
||||
TiXmlElement *themesNode = xmlDoc.FirstChildElement("themes");
|
||||
if (!themesNode)
|
||||
return false;
|
||||
|
||||
nodeindex = mxmlIndexNew(nodedata, "name", NULL);
|
||||
nodeid = mxmlIndexReset(nodeindex);
|
||||
TiXmlElement *theme = themesNode->FirstChildElement("theme");
|
||||
|
||||
while((nodeid = mxmlIndexFind(nodeindex, "name", NULL)) != NULL)
|
||||
while(theme)
|
||||
{
|
||||
int i = ThemesList.size();
|
||||
ThemesList.resize(i+1);
|
||||
|
||||
element_text[0] = '\0';
|
||||
get_nodetext(nodeid, element_text, sizeof(element_text));
|
||||
ThemesList[i].themetitle = element_text;
|
||||
TiXmlElement *node = NULL;
|
||||
|
||||
element_text[0] = '\0';
|
||||
GetTextFromNode(nodeid, nodedata, (char *) "creator", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text));
|
||||
ThemesList[i].author = element_text;
|
||||
node = theme->FirstChildElement("name");
|
||||
if(node && node->FirstChild() && node->FirstChild()->Value())
|
||||
ThemesList[i].themetitle = node->FirstChild()->Value();
|
||||
|
||||
element_text[0] = '\0';
|
||||
GetTextFromNode(nodeid, nodedata, (char *) "thumbpath", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text));
|
||||
ThemesList[i].imagelink = element_text;
|
||||
node = theme->FirstChildElement("creator");
|
||||
if(node && node->FirstChild() && node->FirstChild()->Value())
|
||||
ThemesList[i].author = node->FirstChild()->Value();
|
||||
|
||||
element_text[0] = '\0';
|
||||
GetTextFromNode(nodeid, nodedata, (char *) "downloadpath", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text));
|
||||
ThemesList[i].downloadlink = element_text;
|
||||
node = theme->FirstChildElement("thumbpath");
|
||||
if(node && node->FirstChild() && node->FirstChild()->Value())
|
||||
ThemesList[i].imagelink = node->FirstChild()->Value();
|
||||
|
||||
element_text[0] = '\0';
|
||||
GetTextFromNode(nodeid, nodedata, (char *) "averagerating", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text));
|
||||
ThemesList[i].rating = atoi(element_text);
|
||||
node = theme->FirstChildElement("downloadpath");
|
||||
if(node && node->FirstChild() && node->FirstChild()->Value())
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ class Theme_List
|
||||
int GetThemeCount() const { return ThemesList.size(); };
|
||||
protected:
|
||||
//!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;
|
||||
};
|
||||
|
||||
|
@ -193,6 +193,7 @@ int GameBooter::BootGame(const char * gameID)
|
||||
u8 languageChoice = game_cfg->language == INHERIT ? Settings.language : game_cfg->language;
|
||||
u8 ocarinaChoice = game_cfg->ocarina == INHERIT ? Settings.ocarina : game_cfg->ocarina;
|
||||
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 fix002 = game_cfg->errorfix002 == INHERIT ? Settings.error002 : game_cfg->errorfix002;
|
||||
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
|
||||
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
|
||||
bool enablecheat = false;
|
||||
|
@ -690,6 +690,86 @@ const char * WiiTDB::RatingToString(int rating)
|
||||
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 rating = -1;
|
||||
|
@ -125,6 +125,10 @@ class WiiTDB
|
||||
bool GetGameXMLInfo(const char * id, GameXMLInfo * gameInfo);
|
||||
//! Convert a specific game rating to a string
|
||||
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
|
||||
unsigned long long GetWiiTDBVersion();
|
||||
//! Get the entry count in the xml database
|
||||
|
1885
source/xml/tinyxml.cpp
Normal file
1885
source/xml/tinyxml.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1805
source/xml/tinyxml.h
Normal file
1805
source/xml/tinyxml.h
Normal file
File diff suppressed because it is too large
Load Diff
52
source/xml/tinyxmlerror.cpp
Normal file
52
source/xml/tinyxmlerror.cpp
Normal 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
1639
source/xml/tinyxmlparser.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -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);
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user