From 1913aea194816c1fd8c6f109e07042fa3fc061f8 Mon Sep 17 00:00:00 2001 From: dimok321 <15055714+dimok789@users.noreply.github.com> Date: Fri, 3 Jun 2011 20:31:09 +0000 Subject: [PATCH] *Added custom Game Categories switchable in main menu and selected/adjustable in game settings menu. Own categories can be added and applied to games. A multiple category selection is supported in showing and assigning. *Fix homebrew browser indicator counter (thx dj_skual) *Fix We Dare anti piracy protection (thx oggzee) *Fix Wip patching *IOS reload block working with d2x v6 beta1+ with all filesystems *Changed CheckBox Cross to squareroot sign *Added auto detection of the usb port on start with Hermes cIOS (allowing startup without waiting 20s for USB port 1) (was build in in rodries ehcmodule, thx!) *With new d2x v6 beta1+ sector sizes other than 512 bytes per sector should be supported on ext/ntfs (maybe fat too) (NOT TESTED, need feedback) --- HBC/META.XML | 4 +- Languages/czech.lang | 38 +- Languages/danish.lang | 38 +- Languages/dutch.lang | 38 +- Languages/english.lang | 38 +- Languages/finnish.lang | 38 +- Languages/french.lang | 38 +- Languages/german.lang | 38 +- Languages/hungarian.lang | 38 +- Languages/italian.lang | 38 +- Languages/japanese.lang | 38 +- Languages/korean.lang | 38 +- Languages/norwegian.lang | 38 +- Languages/polish.lang | 38 +- Languages/portuguese_br.lang | 38 +- Languages/portuguese_pt.lang | 38 +- Languages/russian.lang | 38 +- Languages/schinese.lang | 38 +- Languages/spanish.lang | 38 +- Languages/swedish.lang | 38 +- Languages/tchinese.lang | 38 +- Languages/thai.lang | 38 +- Languages/turkish.lang | 38 +- Themes/Default.them | 62 +- gui.pnproj | 2 +- source/StartUpProcess.cpp | 4 +- source/filelist.h | 24 + source/images/add.png | Bin 0 -> 1573 bytes source/images/back.png | Bin 0 -> 1536 bytes source/images/category.png | Bin 0 -> 3537 bytes source/images/categoryLine.png | Bin 0 -> 951 bytes source/images/categoryPrompt.png | Bin 0 -> 6411 bytes source/images/category_gray.png | Bin 0 -> 744 bytes source/images/forward.png | Bin 0 -> 1473 bytes source/images/remove.png | Bin 0 -> 1849 bytes source/libwiigui/gui.h | 45 +- source/libwiigui/gui_box.cpp | 4 +- source/libwiigui/gui_button.cpp | 33 +- source/libwiigui/gui_checkbox.cpp | 23 +- source/libwiigui/gui_checkbox.hpp | 12 +- source/libwiigui/gui_checksign.cpp | 56 + source/libwiigui/gui_checksign.hpp | 43 + source/libwiigui/gui_cross.cpp | 10 +- source/libwiigui/gui_element.cpp | 8 +- source/libwiigui/gui_window.cpp | 10 +- source/libwiigui/sigslot.h | 2748 +++++++++++++++++++ source/menu.cpp | 4 +- source/menu/GameBrowseMenu.cpp | 84 +- source/menu/GameBrowseMenu.hpp | 6 + source/patches/gamepatches.c | 12 +- source/patches/wip.h | 9 +- source/prompts/CategoryPrompt.cpp | 347 +++ source/prompts/CategoryPrompt.hpp | 87 + source/prompts/CategorySelectPrompt.cpp | 101 + source/prompts/CategorySelectPrompt.hpp | 44 + source/prompts/CategorySwitchPrompt.cpp | 81 + source/prompts/CategorySwitchPrompt.hpp | 41 + source/prompts/CheckboxPrompt.cpp | 6 + source/prompts/CheckboxPrompt.hpp | 3 +- source/prompts/GameWindow.cpp | 4 +- source/prompts/gameinfo.cpp | 42 + source/settings/CCategoryList.cpp | 105 + source/settings/CCategoryList.hpp | 60 + source/settings/CGameCategories.cpp | 358 +++ source/settings/CGameCategories.hpp | 66 + source/settings/CSettings.cpp | 29 + source/settings/CSettings.h | 2 + source/settings/Settings.cpp | 42 - source/settings/Settings.h | 14 - source/settings/SettingsEnums.h | 1 + source/settings/menus/FlyingButtonsMenu.cpp | 3 + source/settings/menus/GameSettingsMenu.cpp | 60 +- source/settings/menus/GameSettingsMenu.hpp | 5 +- source/settings/menus/GlobalSettings.cpp | 16 + source/settings/menus/GlobalSettings.hpp | 1 + source/settings/menus/ParentalControlSM.cpp | 10 + source/system/IosLoader.cpp | 2 +- source/themes/Resources.cpp | 8 + source/usbloader/GameBooter.cpp | 9 - source/usbloader/GameList.cpp | 10 + source/usbloader/apploader.c | 3 + source/usbloader/disc.c | 1 + source/usbloader/usbstorage2.c | 2 +- 83 files changed, 5418 insertions(+), 184 deletions(-) create mode 100644 source/images/add.png create mode 100644 source/images/back.png create mode 100644 source/images/category.png create mode 100644 source/images/categoryLine.png create mode 100644 source/images/categoryPrompt.png create mode 100644 source/images/category_gray.png create mode 100644 source/images/forward.png create mode 100644 source/images/remove.png create mode 100644 source/libwiigui/gui_checksign.cpp create mode 100644 source/libwiigui/gui_checksign.hpp create mode 100644 source/libwiigui/sigslot.h create mode 100644 source/prompts/CategoryPrompt.cpp create mode 100644 source/prompts/CategoryPrompt.hpp create mode 100644 source/prompts/CategorySelectPrompt.cpp create mode 100644 source/prompts/CategorySelectPrompt.hpp create mode 100644 source/prompts/CategorySwitchPrompt.cpp create mode 100644 source/prompts/CategorySwitchPrompt.hpp create mode 100644 source/settings/CCategoryList.cpp create mode 100644 source/settings/CCategoryList.hpp create mode 100644 source/settings/CGameCategories.cpp create mode 100644 source/settings/CGameCategories.hpp delete mode 100644 source/settings/Settings.cpp delete mode 100644 source/settings/Settings.h diff --git a/HBC/META.XML b/HBC/META.XML index 3df23c68..e25d65dc 100644 --- a/HBC/META.XML +++ b/HBC/META.XML @@ -2,8 +2,8 @@ USB Loader GX USB Loader GX Team - 2.1 r1084 - 201105302033 + 2.1 r1085 + 201105311715 Loads games from USB-devices 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. diff --git a/Languages/czech.lang b/Languages/czech.lang index 372c9c87..c1a88069 100644 --- a/Languages/czech.lang +++ b/Languages/czech.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+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" @@ -123,6 +123,12 @@ msgstr ">> Nacítám WAD data...Ok! " msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "Vsechny oddíly" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "Dub" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "Opravdu si prejete uzamknout USB Loader GX?" @@ -183,6 +192,9 @@ msgstr "Hudba na pozadí" msgid "Big thanks to:" msgstr "Velké díky pro:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "Zablokovat stažení obalů" @@ -268,6 +280,12 @@ msgstr "Zrušit" msgid "Cannot write to destination." msgstr "Nelze zapisovat na vybrané umístení." +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Zmena cesty prehrávání" @@ -314,6 +332,9 @@ msgstr "Konzole uzamcena" msgid "Console must be unlocked for this option." msgstr "Konzole musí být pro tuto možnost odemčena " +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Konzole musí být odemcena pro tuto zmenu" @@ -402,6 +423,9 @@ msgstr "Smazat obal krabicky" msgid "Delete Disc Artwork" msgstr "Smazat potisk DVD" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "" @@ -1176,6 +1200,9 @@ msgstr "Vyberte DOL" msgid "Select a DOL from Game" msgstr "Vybrat DOL ze hry" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "Zárí" @@ -1185,6 +1212,9 @@ msgstr "Nastavit vyhledávací filtr" msgid "Settings" msgstr "Nastavení" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "Zobrazit volné místo" @@ -1415,6 +1445,9 @@ msgstr "Cesta k WIP patchum" msgid "Waiting..." msgstr "Cekám..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "Varování:" @@ -1463,6 +1496,9 @@ msgstr "Nyní pouzíváte IOS:" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "Pokousíte se vybrat oddíl FAT32/NTFS/EXT s cIOS 249 Rev < 18. To není podporováno. Pokracujte na vasi odpovednost." +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Musíte vybrat nebo naformátovat oddíl" diff --git a/Languages/danish.lang b/Languages/danish.lang index 3b688331..09f6a354 100644 --- a/Languages/danish.lang +++ b/Languages/danish.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: Fox888[dk]\n" "Language-Team: [dk]\n" @@ -123,6 +123,12 @@ msgstr ">> Læser WAD-data...Ok!" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "Alle Partitioner" @@ -147,6 +153,9 @@ msgstr "Indlæs" msgid "Apr" msgstr "" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "Er du sikker på at du vil låse USB Loader GX?" @@ -183,6 +192,9 @@ msgstr "Baggrundsmusik" msgid "Big thanks to:" msgstr "En stor tak til:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "Bloker Cover downloads" @@ -268,6 +280,12 @@ msgstr "Annullér" msgid "Cannot write to destination." msgstr "Kan ikke skrive til destinationen." +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Ændre sti til musik" @@ -314,6 +332,9 @@ msgstr "Konsollen er låst" msgid "Console must be unlocked for this option." msgstr "Konsollen skal være låst op for denne mulighed." +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Konsollen skal være låst op for ændre dette." @@ -402,6 +423,9 @@ msgstr "Slet boxart" msgid "Delete Disc Artwork" msgstr "Slet DVD-billede" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "" @@ -1176,6 +1200,9 @@ msgstr "Vælg en DOL" msgid "Select a DOL from Game" msgstr "Vælg DOL fra spil" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "" @@ -1185,6 +1212,9 @@ msgstr "Søgefilter" msgid "Settings" msgstr "Indstillinger" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "Vis fri plads" @@ -1415,6 +1445,9 @@ msgstr "Sti til WIP patches" msgid "Waiting..." msgstr "Venter..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "Advarsel:" @@ -1463,6 +1496,9 @@ msgstr "Du brug i øjeblikket IOS" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "Du prøver at vælge en FAT32/NTFS/EXT partition med cIOS 249 Rev < 18. Dette er ikke understøttet. Fortsætte er på egen risiko" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Du skal vælge eller formattere en partition" diff --git a/Languages/dutch.lang b/Languages/dutch.lang index 88f75798..fbc95d42 100644 --- a/Languages/dutch.lang +++ b/Languages/dutch.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2011-03-16 08:16+0100\n" "Last-Translator: glowy\n" "Language-Team: tj_cool, glowy\n" @@ -123,6 +123,12 @@ msgstr ">> WAD data lezen...Ok!" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "Alle partities" @@ -147,6 +153,9 @@ msgstr "Toepassen" msgid "Apr" msgstr "" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "Weet je zeker dat je USB Loader GX wilt vergrendelen" @@ -183,6 +192,9 @@ msgstr "Achtergrondmuziek" msgid "Big thanks to:" msgstr "Grote dank aan:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "Blokkeer Downloads van Hoesjes" @@ -268,6 +280,12 @@ msgstr "Annuleren" msgid "Cannot write to destination." msgstr "Kan niet naar bestemming schrijven." +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Verander afspeel locatie" @@ -314,6 +332,9 @@ msgstr "Console vergrendeld" msgid "Console must be unlocked for this option." msgstr "Console moet ontgrendeld zijn voor deze optie." +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Console moet worden vrijgegeven om te wijzigen." @@ -402,6 +423,9 @@ msgstr "Hoesjes verwijderen" msgid "Delete Disc Artwork" msgstr "Disk labels verwijderen" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Ontwerp:" @@ -1176,6 +1200,9 @@ msgstr "Selecteer een DOL" msgid "Select a DOL from Game" msgstr "Selecteer een DOL van Spel" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "Sep" @@ -1185,6 +1212,9 @@ msgstr "Zoekfilter instellen" msgid "Settings" msgstr "Instellingen" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "Vrije ruimte weergeven" @@ -1415,6 +1445,9 @@ msgstr "Locatie WIP patches" msgid "Waiting..." msgstr "Wachten..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "Waarschuwing:" @@ -1463,6 +1496,9 @@ msgstr "Je gebruikt op dit moment IOS" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "Je probeert een FAT32/NTFS/EXT partitie te selecteren met cIOS 249 Rev < 18. Dit word niet ondersteund. Verder gaan is op eigen risico." +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Je moet een partitie selecteren of formatteren" diff --git a/Languages/english.lang b/Languages/english.lang index 2e6afa49..72611591 100644 --- a/Languages/english.lang +++ b/Languages/english.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -123,6 +123,12 @@ msgstr "" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "" msgid "Big thanks to:" msgstr "" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "" @@ -314,6 +332,9 @@ msgstr "" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "" @@ -402,6 +423,9 @@ msgstr "" msgid "Delete Disc Artwork" msgstr "" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "" @@ -1176,6 +1200,9 @@ msgstr "" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "" @@ -1185,6 +1212,9 @@ msgstr "" msgid "Settings" msgstr "" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "" msgid "Waiting..." msgstr "" +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "" diff --git a/Languages/finnish.lang b/Languages/finnish.lang index a91a343b..418d99d4 100644 --- a/Languages/finnish.lang +++ b/Languages/finnish.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: c64rmx\n" "Language-Team: \n" @@ -123,6 +123,12 @@ msgstr ">> Luetaan WAD:ia...Ok!" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "huhti" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "Taustamusiikki" msgid "Big thanks to:" msgstr "Isot kiitokset:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "Peruuta" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "" @@ -314,6 +332,9 @@ msgstr "Konsoli lukittu" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Avaa konsolin lukitus muokataksesi asetuksia." @@ -402,6 +423,9 @@ msgstr "Tuhoa kannet" msgid "Delete Disc Artwork" msgstr "Tuhoa levykuvat" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Suunnittelu" @@ -1176,6 +1200,9 @@ msgstr "Valitse DOL" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "syys" @@ -1185,6 +1212,9 @@ msgstr "" msgid "Settings" msgstr "Asetukset" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "" msgid "Waiting..." msgstr "Odottaa..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "" diff --git a/Languages/french.lang b/Languages/french.lang index 255585ff..815058f0 100644 --- a/Languages/french.lang +++ b/Languages/french.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: Cyan\n" "Language-Team: Badablek, Amour, ikya & Kin8\n" @@ -123,6 +123,12 @@ msgstr ">> Lecture données WAD...OK!" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "Toutes les partitions" @@ -147,6 +153,9 @@ msgstr "Appliquer" msgid "Apr" msgstr "Avr" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "Êtes-vous sûr de vouloir verrouiller USB loader GX ?" @@ -183,6 +192,9 @@ msgstr "Fond sonore" msgid "Big thanks to:" msgstr "Grand merci à:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "Bloquer Téléch. jaquettes" @@ -268,6 +280,12 @@ msgstr "Annuler" msgid "Cannot write to destination." msgstr "Écriture impossible." +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Changer dossier" @@ -314,6 +332,9 @@ msgstr "Console verrouillée" msgid "Console must be unlocked for this option." msgstr "La console doit être déverrouillée." +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "La console doit être déverrouillée." @@ -402,6 +423,9 @@ msgstr "Supprimer la jaquette" msgid "Delete Disc Artwork" msgstr "Supprimer le label DVD" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Graphisme:" @@ -1176,6 +1200,9 @@ msgstr "Choisir un DOL" msgid "Select a DOL from Game" msgstr "Sélectionner un DOL à partir du jeu" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "" @@ -1185,6 +1212,9 @@ msgstr "Filtre de Recherche" msgid "Settings" msgstr "Paramètres" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "Montrer l'espace libre" @@ -1415,6 +1445,9 @@ msgstr "Dossier patchs WIP" msgid "Waiting..." msgstr "En attente..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "Attention:" @@ -1463,6 +1496,9 @@ msgstr "Vous utilisez actuellement l'IOS" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "Vous essayez de sélectionner une partition FAT32/NTFS/EXT avec un cIOS 249 Rev < 18 (non supporté). Continuez à vos risques." +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Vous devez choisir ou formater une partition" diff --git a/Languages/german.lang b/Languages/german.lang index 7965096c..b5c08730 100644 --- a/Languages/german.lang +++ b/Languages/german.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+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" @@ -123,6 +123,12 @@ msgstr ">> Lese WAD Daten...OK!" msgid "AUTO" msgstr "AUTO" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "Alle Partitionen" @@ -147,6 +153,9 @@ msgstr "Anwenden" msgid "Apr" msgstr "April" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "Bist du sicher, dass du USB Loader GX sperren willst?" @@ -183,6 +192,9 @@ msgstr "Hintergrundmusik" msgid "Big thanks to:" msgstr "Großen Dank an:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "Blocke Cover-Downloads" @@ -268,6 +280,12 @@ msgstr "Abbrechen" msgid "Cannot write to destination." msgstr "Ziel kann nicht beschrieben werden." +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Pfad ändern" @@ -314,6 +332,9 @@ msgstr "Konsole gesperrt" msgid "Console must be unlocked for this option." msgstr "Gerät muss für diese Option entsperrt werden." +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Konsole muss zum Bearbeiten entsperrt werden." @@ -402,6 +423,9 @@ msgstr "Lösche Cover" msgid "Delete Disc Artwork" msgstr "Lösche Disc Cover" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Design:" @@ -1176,6 +1200,9 @@ msgstr "Wähle eine DOL" msgid "Select a DOL from Game" msgstr "Wähle eine DOL vom Spiel" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "September" @@ -1185,6 +1212,9 @@ msgstr "Setze Suchfilter" msgid "Settings" msgstr "Einstellungen" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "Zeige frei. Speicher" @@ -1415,6 +1445,9 @@ msgstr "WIP Patches" msgid "Waiting..." msgstr "Warte..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "Warnung:" @@ -1463,6 +1496,9 @@ msgstr "Du benutzt zur Zeit das IOS" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "Es wird versucht eine FAT32/NTFS/EXT Partition mit dem cIOS 249 Rev < 18 auszuwählen. Das wird nicht unterstützt. Weiter auf eigene Gefahr." +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Du must eine Partition auswählen oder formatieren." diff --git a/Languages/hungarian.lang b/Languages/hungarian.lang index fd28d909..9724a478 100644 --- a/Languages/hungarian.lang +++ b/Languages/hungarian.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-12-29 11:05+0100\n" "Last-Translator: Springdale\n" "Language-Team: Tusk, Springdale\n" @@ -123,6 +123,12 @@ msgstr ">> WAD adatok olvasása...Ok!" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "Ápr" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "Háttérzene" msgid "Big thanks to:" msgstr "Köszönet:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "Mégse" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "" @@ -314,6 +332,9 @@ msgstr "Konzol Zárolva" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "A konzol zárolva, ezért nem változtatható meg." @@ -402,6 +423,9 @@ msgstr "Borító törlése" msgid "Delete Disc Artwork" msgstr "Lemezfotó törlése" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Felület:" @@ -1176,6 +1200,9 @@ msgstr "DOL kiválasztása" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "Szep" @@ -1185,6 +1212,9 @@ msgstr "Keresés" msgid "Settings" msgstr "Beállítások" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "WIP Patch útvonal" msgid "Waiting..." msgstr "Várakozás..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Választanod vagy formáznod kell egy partíciót" diff --git a/Languages/italian.lang b/Languages/italian.lang index ac86590a..7383c86d 100644 --- a/Languages/italian.lang +++ b/Languages/italian.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:44+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2011-03-10 21:00+0200\n" "Last-Translator: Cambo \n" "Language-Team: Cambo\n" @@ -123,6 +123,12 @@ msgstr ">> Lettura dati WAD...OK!" msgid "AUTO" msgstr "Automatico" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "Tutte" @@ -147,6 +153,9 @@ msgstr "Applica" msgid "Apr" msgstr "aprile" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "Sei sicuro di voler bloccare USB Loader GX?" @@ -183,6 +192,9 @@ msgstr "Musica Sottofondo" msgid "Big thanks to:" msgstr "Grazie mille a:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "Blocca Scaricam. Copertine" @@ -268,6 +280,12 @@ msgstr "Annulla" msgid "Cannot write to destination." msgstr "Impossibile scrivere nella destinazione." +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Modifica Cartella Suoni" @@ -314,6 +332,9 @@ msgstr "Console Bloccata" msgid "Console must be unlocked for this option." msgstr "La Wii deve essere sbloccata per questa opzione." +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Sbloccare la Console per Modificarla." @@ -402,6 +423,9 @@ msgstr "Elimina la copertina" msgid "Delete Disc Artwork" msgstr "Elimina l'immagine disco" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Grafica:" @@ -1176,6 +1200,9 @@ msgstr "Seleziona un file DOL" msgid "Select a DOL from Game" msgstr "Seleziona un file DOL dal Gioco" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "settembre" @@ -1185,6 +1212,9 @@ msgstr "Cerca Gioco" msgid "Settings" msgstr "Impostazioni" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "Mostra Spazio Libero" @@ -1415,6 +1445,9 @@ msgstr "Cart. Patch WIP" msgid "Waiting..." msgstr "Caricamento..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "Attenzione:" @@ -1463,6 +1496,9 @@ msgstr "Al momento stai utilizzando l'IOS" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "Stai cercando di accedere ad una partizione FAT32/NTFS/EXT con un cIOS 249 di versione inferiore alla rev18. Ciò è non supportato. Continua a tuo rischio." +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Occorre selezionare o formattare una partizione" diff --git a/Languages/japanese.lang b/Languages/japanese.lang index 52e675c1..8f7f69cb 100644 --- a/Languages/japanese.lang +++ b/Languages/japanese.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: ichiroling\n" "Language-Team: hosigumayuugi, papa, ichiroling\n" @@ -123,6 +123,12 @@ msgstr ">> WADデータの読込 … 成功!" msgid "AUTO" msgstr "自動" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "全ての領域" @@ -147,6 +153,9 @@ msgstr "適用" msgid "Apr" msgstr "4月" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "USB Loader GXをロックしますか?" @@ -183,6 +192,9 @@ msgstr "BGM" msgid "Big thanks to:" msgstr "協力:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "カバーのダウンロードを制限" @@ -268,6 +280,12 @@ msgstr "やめる" msgid "Cannot write to destination." msgstr "出力先に書き込めません" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "パスの変更" @@ -314,6 +332,9 @@ msgstr "GXはロックされています" msgid "Console must be unlocked for this option." msgstr "変更にはロックの解除が必要です" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "変更にはロックの解除が必要です" @@ -402,6 +423,9 @@ msgstr "カバー画像を削除" msgid "Delete Disc Artwork" msgstr "ディスク画像を削除" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "デザイン:" @@ -1176,6 +1200,9 @@ msgstr "DOLを選択" msgid "Select a DOL from Game" msgstr "ゲームからDOLを選択" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "9月" @@ -1185,6 +1212,9 @@ msgstr "検索" msgid "Settings" msgstr "設定" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "空き容量の表示" @@ -1415,6 +1445,9 @@ msgstr "WIPパッチ" msgid "Waiting..." msgstr "待機中…" +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "警告:" @@ -1463,6 +1496,9 @@ msgstr "使用中のIOS:IOS" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "rev17以前のcIOS249ではFAT32/NTFS/EXTに対応していません" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "領域を選択するか初期化してください" diff --git a/Languages/korean.lang b/Languages/korean.lang index b2757ff3..fe46ce36 100644 --- a/Languages/korean.lang +++ b/Languages/korean.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: nextos@korea.com\n" "Language-Team: \n" @@ -123,6 +123,12 @@ msgstr ">> WAD 데이터 읽기...성공!" msgid "AUTO" msgstr "자동" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "4월" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "배경음악" msgid "Big thanks to:" msgstr "감사 :" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "취소" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "" @@ -314,6 +332,9 @@ msgstr "콘솔 잠김" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "변경하려면 콘솔 잠김을 해제하세요." @@ -402,6 +423,9 @@ msgstr "박스아트 삭제" msgid "Delete Disc Artwork" msgstr "삭제 Discart" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "디자인:" @@ -1176,6 +1200,9 @@ msgstr "" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "9월" @@ -1185,6 +1212,9 @@ msgstr "" msgid "Settings" msgstr "설정" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "" msgid "Waiting..." msgstr "기다리는 중..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "" diff --git a/Languages/norwegian.lang b/Languages/norwegian.lang index ace65eea..afc55e14 100644 --- a/Languages/norwegian.lang +++ b/Languages/norwegian.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: raschi\n" "Language-Team: raschi\n" @@ -123,6 +123,12 @@ msgstr ">> Leser WAD data...OK!" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "Alle partisjoner" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "Er du sikker på at du vil låse USB Loader GX?" @@ -183,6 +192,9 @@ msgstr "Bakgrunnsmusikk" msgid "Big thanks to:" msgstr "Stor takk til:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "Avbryt" msgid "Cannot write to destination." msgstr "Kan ikke skrive til mål." +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Endre spill sti" @@ -314,6 +332,9 @@ msgstr "Konsoll låst" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Konsoll må være opplåst for å modifisere." @@ -402,6 +423,9 @@ msgstr "Slett cover" msgid "Delete Disc Artwork" msgstr "Slett platebilde" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "" @@ -1176,6 +1200,9 @@ msgstr "Velg en DOL fil" msgid "Select a DOL from Game" msgstr "Velg en DOL fra spill" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "Sep" @@ -1185,6 +1212,9 @@ msgstr "Angi søkefilter" msgid "Settings" msgstr "Innstillinger" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "Vis ledig plass" @@ -1415,6 +1445,9 @@ msgstr "WIP patches sti" msgid "Waiting..." msgstr "Venter..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "Advarsel:" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "Du prøver å velge en FAT32/NTFS/EXT partisjon med cIOS 249 rev < 18. Dette er ikke støttet. Fortsett på eget ansvar." +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Du må velge en partisjon" diff --git a/Languages/polish.lang b/Languages/polish.lang index 10a7b247..bd196f83 100644 --- a/Languages/polish.lang +++ b/Languages/polish.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: ziom666 (zadania_prog@vp.pl)\n" "Language-Team: \n" @@ -123,6 +123,12 @@ msgstr ">> Odczyt danych WAD...Ok!" msgid "AUTO" msgstr "automatycznie" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "Kwiecien" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "Muzyka w tle" msgid "Big thanks to:" msgstr "Podziekowania dla" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "Anuluj" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "" @@ -314,6 +332,9 @@ msgstr "Konsola zablokowana" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Aby zmodyfikowac, odblokuj konsole" @@ -402,6 +423,9 @@ msgstr "Usun obrazki box" msgid "Delete Disc Artwork" msgstr "Usun obrazki plyt" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Projekt:" @@ -1176,6 +1200,9 @@ msgstr "Wybierz plik DOL" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "Wrzesien" @@ -1185,6 +1212,9 @@ msgstr "Ustaw filtr wyszukiwania" msgid "Settings" msgstr "Ustawienia" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "Sciezka patchy WIP" msgid "Waiting..." msgstr "Oczekiwanie..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Musisz wybrac, lub sformatowac partycje" diff --git a/Languages/portuguese_br.lang b/Languages/portuguese_br.lang index 983cf685..cfadceac 100644 --- a/Languages/portuguese_br.lang +++ b/Languages/portuguese_br.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:42+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-23 18:52+0200\n" "Last-Translator: aniemotion\n" "Language-Team: boto12, aniemotion\n" @@ -123,6 +123,12 @@ msgstr ">> Lendo arquivo WAD... Ok!" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "Abr" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "Música de fundo" msgid "Big thanks to:" msgstr "Agradecimentos:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "Cancelar" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Alterar Caminho para Play" @@ -314,6 +332,9 @@ msgstr "Configuração Bloqueada" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "É necessário desbloquear a configuração para poder modificar o parâmetro." @@ -402,6 +423,9 @@ msgstr "Eliminar Capas" msgid "Delete Disc Artwork" msgstr "Eliminar Img. Disco" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Desenho:" @@ -1176,6 +1200,9 @@ msgstr "Selecionar um DOL" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "Set" @@ -1185,6 +1212,9 @@ msgstr "Usar filtro de busca" msgid "Settings" msgstr "Configurações" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "Caminho WIP Patches" msgid "Waiting..." msgstr "Aguardando..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Você precisa selecionar ou formatar uma partição" diff --git a/Languages/portuguese_pt.lang b/Languages/portuguese_pt.lang index 25db355a..49b20011 100644 --- a/Languages/portuguese_pt.lang +++ b/Languages/portuguese_pt.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:44+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2011-03-11 20:00-0000\n" "Last-Translator: pplucky (Sky8000)\n" "Language-Team: pplucky (Sky8000 )\n" @@ -123,6 +123,12 @@ msgstr ">> Lendo ficheiro WAD... Ok!" msgid "AUTO" msgstr "AUTO" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "Todas as Partições" @@ -147,6 +153,9 @@ msgstr "Aplicar" msgid "Apr" msgstr "Abr" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "Tem a certeza que quer bloquear o USB Loader GX?" @@ -183,6 +192,9 @@ msgstr "Música de fundo" msgid "Big thanks to:" msgstr "Agradecimentos:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "Bloquear Descarregar Capas" @@ -268,6 +280,12 @@ msgstr "Cancelar" msgid "Cannot write to destination." msgstr "Não foi possível escrever no destino." +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Alterar Caminho de Músicas" @@ -314,6 +332,9 @@ msgstr "Configuração Bloqueada" msgid "Console must be unlocked for this option." msgstr "Configuração tem de estar desbloqueada para esta opção." +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Configuração tem de estar desbloqueada para modificar o parâmetro." @@ -402,6 +423,9 @@ msgstr "Eliminar Capas" msgid "Delete Disc Artwork" msgstr "Eliminar Img. Disco" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Design:" @@ -1176,6 +1200,9 @@ msgstr "Seleccionar um DOL" msgid "Select a DOL from Game" msgstr "Seleccionar um DOL do Jogo" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "Set" @@ -1185,6 +1212,9 @@ msgstr "Filtro de pesquisa" msgid "Settings" msgstr "Configurações" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "Mostrar Espaço Livre" @@ -1415,6 +1445,9 @@ msgstr "Cam. Patches WIP" msgid "Waiting..." msgstr "Aguardando..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "Aviso:" @@ -1463,6 +1496,9 @@ msgstr "Está a usar o IOS" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "Está a tentar seleccionar uma partição FAT32/NTFS/EXT com um cIOS 249 Rev < 18. Isto não é suportado. Continue por sua conta e risco." +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Necessita seleccionar ou formatar uma partição" diff --git a/Languages/russian.lang b/Languages/russian.lang index a3209ea8..9b12b7fb 100644 --- a/Languages/russian.lang +++ b/Languages/russian.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:44+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: nikolai_ca\n" "Language-Team: Kir, alendit, nikolai_ca\n" @@ -123,6 +123,12 @@ msgstr ">> Чтение данных WAD...Успешно!" msgid "AUTO" msgstr "АВТО" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "Апр" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "Фоновая музыка" msgid "Big thanks to:" msgstr "Большое спасибо:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "Отмена" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "" @@ -314,6 +332,9 @@ msgstr "Консоль заблокирована" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Для изменения консоль должна быть разблокирована." @@ -402,6 +423,9 @@ msgstr "Удалить обложку" msgid "Delete Disc Artwork" msgstr "Удалить картинку диска" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Дизайн:" @@ -1176,6 +1200,9 @@ msgstr "Выберите DOL" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "Сен" @@ -1185,6 +1212,9 @@ msgstr "Установить фильтр для поиска" msgid "Settings" msgstr "Установки" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "Путь к патчам QIP" msgid "Waiting..." msgstr "Ожидание..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "" diff --git a/Languages/schinese.lang b/Languages/schinese.lang index c3694c57..e37c3c08 100644 --- a/Languages/schinese.lang +++ b/Languages/schinese.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:44+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: knife.hu kavid emul8ion\n" "Language-Team: kavid\n" @@ -123,6 +123,12 @@ msgstr ">> 读取 WAD 数据... 成功!" msgid "AUTO" msgstr "自动" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "所有分区" @@ -147,6 +153,9 @@ msgstr "应用" msgid "Apr" msgstr "四月" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "确定要锁定USB Loader GX吗?" @@ -183,6 +192,9 @@ msgstr "背景音乐" msgid "Big thanks to:" msgstr "非常感谢:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "下载封面" @@ -268,6 +280,12 @@ msgstr "取消" msgid "Cannot write to destination." msgstr "无法写入目标." +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "更改游戏路径" @@ -314,6 +332,9 @@ msgstr "主机已锁定" msgid "Console must be unlocked for this option." msgstr "需解锁以开启设定功能." +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "需解锁以开启设定功能." @@ -402,6 +423,9 @@ msgstr "删除封面" msgid "Delete Disc Artwork" msgstr "删除光盘图片" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "设计:" @@ -1176,6 +1200,9 @@ msgstr "选择一个 DOL" msgid "Select a DOL from Game" msgstr "从游戏选择DOL" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "九月" @@ -1185,6 +1212,9 @@ msgstr "设置搜索过滤器" msgid "Settings" msgstr "设置" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "显示剩余空间" @@ -1415,6 +1445,9 @@ msgstr "WIP补丁路径" msgid "Waiting..." msgstr "等待中..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "警告:" @@ -1463,6 +1496,9 @@ msgstr "正在使用IOS" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "cIOS 249低于r18版本不支持FAT32/NTFS/EXT分区.如要继续风险自负" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "你需要选择或者格式化一个分区" diff --git a/Languages/spanish.lang b/Languages/spanish.lang index 64c94c95..b95aaada 100644 --- a/Languages/spanish.lang +++ b/Languages/spanish.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:44+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: SirPalax\n" "Language-Team: Penn, SirPalax\n" @@ -123,6 +123,12 @@ msgstr ">> Leyendo datos del WAD... ¡Correcto!" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "Abr" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "Música de fondo" msgid "Big thanks to:" msgstr "Gracias a:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "Cancelar" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Cambiar Ruta" @@ -314,6 +332,9 @@ msgstr "Consola Bloqueada" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Debes desbloquear la consola para modificar." @@ -402,6 +423,9 @@ msgstr "Borrar Carátula" msgid "Delete Disc Artwork" msgstr "Borrar Imagen Disco" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Diseño:" @@ -1176,6 +1200,9 @@ msgstr "Seleccionar DOL" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "" @@ -1185,6 +1212,9 @@ msgstr "Usar filtro de búsqueda" msgid "Settings" msgstr "Configuración" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "Ruta Parches WIP" msgid "Waiting..." msgstr "Esperando..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Necesitas seleccionar o formatear una partición" diff --git a/Languages/swedish.lang b/Languages/swedish.lang index f1e2187f..3fc6fe83 100644 --- a/Languages/swedish.lang +++ b/Languages/swedish.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:44+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2010-01-19 17:39+0200\n" "Last-Translator: Katsurou\n" "Language-Team: Katsurou, pirateX\n" @@ -123,6 +123,12 @@ msgstr ">> Läser WAD data...Ok!" msgid "AUTO" msgstr "" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "Apr" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "Bakgrundsmusik" msgid "Big thanks to:" msgstr "Stort tack till:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "Avbryt" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "Ändra spel sökväg" @@ -314,6 +332,9 @@ msgstr "Konsol låst" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Konsolen måste vara upplåst för att kunna ändra det." @@ -402,6 +423,9 @@ msgstr "Radera omslag" msgid "Delete Disc Artwork" msgstr "Radera skivbilder" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "" @@ -1176,6 +1200,9 @@ msgstr "Välj en DOL" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "" @@ -1185,6 +1212,9 @@ msgstr "Ställ in sök-filter" msgid "Settings" msgstr "Inställningar" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "WIP patchssökväg" msgid "Waiting..." msgstr "Väntar..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Du måste välja eller formatera en partition" diff --git a/Languages/tchinese.lang b/Languages/tchinese.lang index 8cd82afc..45a651b3 100644 --- a/Languages/tchinese.lang +++ b/Languages/tchinese.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:44+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+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" @@ -123,6 +123,12 @@ msgstr ">> 讀取 WAD 數據... 成功!" msgid "AUTO" msgstr "自動" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "所有磁區" @@ -147,6 +153,9 @@ msgstr "套用" msgid "Apr" msgstr "四月" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "確定要鎖上 USB Loader GX嗎?" @@ -183,6 +192,9 @@ msgstr "背景音樂" msgid "Big thanks to:" msgstr "非常感謝:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "封鎖封面下載" @@ -268,6 +280,12 @@ msgstr "取消" msgid "Cannot write to destination." msgstr "無法寫入目的地。" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "變更執行路徑" @@ -314,6 +332,9 @@ msgstr "控制台已上鎖" msgid "Console must be unlocked for this option." msgstr "控制台必須解鎖才可使用此選項。" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "控制台須解鎖才可變更設定。" @@ -402,6 +423,9 @@ msgstr "刪除封面" msgid "Delete Disc Artwork" msgstr "刪除光碟圖片" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "設計者:" @@ -1176,6 +1200,9 @@ msgstr "選擇一個 DOL" msgid "Select a DOL from Game" msgstr "從遊戲中選擇DOL" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "九月" @@ -1185,6 +1212,9 @@ msgstr "關鍵字篩選" msgid "Settings" msgstr "設定" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "顯示可用空間" @@ -1415,6 +1445,9 @@ msgstr "WIP 修正檔路徑" msgid "Waiting..." msgstr "等待中..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "警告:" @@ -1463,6 +1496,9 @@ msgstr "目前你使用中的IOS" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "你嘗試用高於 cIOS 249 版本18去選取 FAT32/NTFS/EXT 磁區。這格式不支援。繼續請自行承擔風險。" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "選擇你要格式化的磁區" diff --git a/Languages/thai.lang b/Languages/thai.lang index 38c02331..6cf4dac6 100644 --- a/Languages/thai.lang +++ b/Languages/thai.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:44+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: Nitro_subzero \n" "Language-Team: Nitro_subzero\n" @@ -123,6 +123,12 @@ msgstr ">> กำลังอ่านข้อมูล WAD...สำเร็ msgid "AUTO" msgstr "อัตโนมัติ" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "เมษ." +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "ดนตรีเบื้องหลัง" msgid "Big thanks to:" msgstr "ขอขอบคุณ:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "ยกเลิก" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "" @@ -314,6 +332,9 @@ msgstr "คอนโซลถูกล๊อค" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "ปลดล๊อคคอนโซลก่อน ถึงจะทำการเปลี่ยนแปลงได้" @@ -402,6 +423,9 @@ msgstr "ลบ ภาพกล่อง" msgid "Delete Disc Artwork" msgstr "ลบ ภาพแผ่น" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "ออกแบบ:" @@ -1176,6 +1200,9 @@ msgstr "เลือก DOL" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "กย." @@ -1185,6 +1212,9 @@ msgstr "กำหนดเงื่อนไขการค้นหา" msgid "Settings" msgstr "กำหนดค่า" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "" msgid "Waiting..." msgstr "กำลังรอ..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "" diff --git a/Languages/turkish.lang b/Languages/turkish.lang index a2234418..4f91ace1 100644 --- a/Languages/turkish.lang +++ b/Languages/turkish.lang @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-28 21:44+0200\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "Last-Translator: omercigingelini\n" "Language-Team: omercigingelini\n" @@ -123,6 +123,12 @@ msgstr ">> WAD Bilgisi okunuyor..OK!" msgid "AUTO" msgstr "OTOMATIK" +msgid "Add category" +msgstr "" + +msgid "All" +msgstr "" + msgid "All Partitions" msgstr "" @@ -147,6 +153,9 @@ msgstr "" msgid "Apr" msgstr "Nis" +msgid "Are you sure you want to delete this category?" +msgstr "" + msgid "Are you sure you want to lock USB Loader GX?" msgstr "" @@ -183,6 +192,9 @@ msgstr "Arkaplan müziği" msgid "Big thanks to:" msgstr "Teşekkürler:" +msgid "Block Categories Modify" +msgstr "" + msgid "Block Cover Downloads" msgstr "" @@ -268,6 +280,12 @@ msgstr "Iptal" msgid "Cannot write to destination." msgstr "" +msgid "Categories" +msgstr "" + +msgid "Categories:" +msgstr "" + msgid "Change Play Path" msgstr "" @@ -314,6 +332,9 @@ msgstr "Konsol Kilitli" msgid "Console must be unlocked for this option." msgstr "" +msgid "Console must be unlocked to be able to use this." +msgstr "" + msgid "Console should be unlocked to modify it." msgstr "Degiştirmek için konsolun kilidini açmalısın." @@ -402,6 +423,9 @@ msgstr "Kapak Görselini Sil" msgid "Delete Disc Artwork" msgstr "Disk Görselini Sil" +msgid "Delete category" +msgstr "" + msgid "Design:" msgstr "Tasarım:" @@ -1176,6 +1200,9 @@ msgstr "Bir DOL seç" msgid "Select a DOL from Game" msgstr "" +msgid "Select game categories" +msgstr "" + msgid "Sept" msgstr "Eyl" @@ -1185,6 +1212,9 @@ msgstr "Arama Filtresi Ayarla" msgid "Settings" msgstr "Ayarlar" +msgid "Show Categories" +msgstr "" + msgid "Show Free Space" msgstr "" @@ -1415,6 +1445,9 @@ msgstr "" msgid "Waiting..." msgstr "Beklemede..." +msgid "Warning" +msgstr "" + msgid "Warning:" msgstr "" @@ -1463,6 +1496,9 @@ msgstr "" msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." msgstr "" +msgid "You cannot delete this category." +msgstr "" + msgid "You need to select or format a partition" msgstr "Bir bölüm seçmeniz ya da formatlamanız gerekiyor" diff --git a/Themes/Default.them b/Themes/Default.them index 336e71ef..92e4ae55 100644 --- a/Themes/Default.them +++ b/Themes/Default.them @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-12 10:25+0100\n" +"POT-Creation-Date: 2011-06-03 22:18+0200\n" "PO-Revision-Date: 2009-10-01 01:00+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -163,33 +163,42 @@ msgstr "" msgid "335 - clock pos y" msgstr "" -msgid "260 - list layout favorite btn pos x" +msgid "220 - list layout favorite btn pos x" msgstr "" -msgid "288 - list layout favorite btn pos x widescreen" +msgid "256 - list layout favorite btn pos x widescreen" msgstr "" msgid "13 - list layout favorite btn pos y" msgstr "" -msgid "300 - list layout search btn pos x" +msgid "260 - list layout search btn pos x" msgstr "" -msgid "320 - list layout search btn pos x widescreen" +msgid "288 - list layout search btn pos x widescreen" msgstr "" msgid "13 - list layout search btn pos y" msgstr "" -msgid "340 - list layout abc/sort btn pos x" +msgid "300 - list layout abc/sort btn pos x" msgstr "" -msgid "352 - list layout abc/sort btn pos x widescreen" +msgid "320 - list layout abc/sort btn pos x widescreen" msgstr "" msgid "13 - list layout abc/sort btn pos y" msgstr "" +msgid "340 - list layout category btn pos x" +msgstr "" + +msgid "352 - list layout category btn pos x widescreen" +msgstr "" + +msgid "13 - list layout category btn pos y" +msgstr "" + msgid "380 - list layout list btn pos x" msgstr "" @@ -247,33 +256,42 @@ msgstr "" msgid "49 - game list layout pos y" msgstr "" -msgid "200 - grid layout favorite btn pos x" +msgid "160 - grid layout favorite btn pos x" msgstr "" -msgid "224 - grid layout favorite btn pos x widescreen" +msgid "192 - grid layout favorite btn pos x widescreen" msgstr "" msgid "13 - grid layout favorite btn pos y" msgstr "" -msgid "240 - grid layout search btn pos x" +msgid "200 - grid layout search btn pos x" msgstr "" -msgid "256 - grid layout search btn pos x widescreen" +msgid "224 - grid layout search btn pos x widescreen" msgstr "" msgid "13 - grid layout search btn pos y" msgstr "" -msgid "280 - grid layout abc/sort btn pos x" +msgid "240 - grid layout abc/sort btn pos x" msgstr "" -msgid "288 - grid layout abc/sort btn pos x widescreen" +msgid "256 - grid layout abc/sort btn pos x widescreen" msgstr "" msgid "13 - grid layout abc/sort btn pos y" msgstr "" +msgid "280 - grid layout category btn pos x" +msgstr "" + +msgid "288 - grid layout category btn pos x widescreen" +msgstr "" + +msgid "13 - grid layout category btn pos y" +msgstr "" + msgid "320 - grid layout list btn pos x" msgstr "" @@ -325,33 +343,39 @@ msgstr "" msgid "640 - game grid layout width" msgstr "" -msgid "200 - carousel layout favorite btn pos x" +msgid "160 - carousel layout favorite btn pos x" msgstr "" -msgid "224 - carousel layout favorite btn pos x widescreen" +msgid "192 - carousel layout favorite btn pos x widescreen" msgstr "" msgid "13 - carousel layout favorite btn pos y" msgstr "" -msgid "240 - carousel layout search btn pos x" +msgid "200 - carousel layout search btn pos x" msgstr "" -msgid "256 - carousel layout search btn pos x widescreen" +msgid "224 - carousel layout search btn pos x widescreen" msgstr "" msgid "13 - carousel layout search btn pos y" msgstr "" -msgid "280 - carousel layout abc/sort btn pos x" +msgid "240 - carousel layout abc/sort btn pos x" msgstr "" -msgid "288 - carousel layout abc/sort btn pos x widescreen" +msgid "256 - carousel layout abc/sort btn pos x widescreen" msgstr "" msgid "13 - carousel layout abc/sort btn pos y" msgstr "" +msgid "280 - carousel layout category btn pos x" +msgstr "" + +msgid "288 - carousel layout category btn pos x widescreen" +msgstr "" + msgid "320 - carousel layout list btn pos x" msgstr "" diff --git a/gui.pnproj b/gui.pnproj index a76c5627..68a2ffe4 100644 --- a/gui.pnproj +++ b/gui.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/source/StartUpProcess.cpp b/source/StartUpProcess.cpp index 50790798..2aeb6364 100644 --- a/source/StartUpProcess.cpp +++ b/source/StartUpProcess.cpp @@ -13,6 +13,7 @@ #include "settings/CSettings.h" #include "settings/CGameSettings.h" #include "settings/CGameStatistics.h" +#include "settings/CGameCategories.hpp" #include "usbloader/usbstorage2.h" #include "sys.h" @@ -168,7 +169,8 @@ bool StartUpProcess::Execute() DeviceHandler::Instance()->MountAllUSB(); } - gprintf("\tLoading font...%s\n", Theme::LoadFont(Settings.theme_path) ? "done" : "failed (using default)"); + gprintf("\tLoading game categories...%s\n", GameCategories.Load(Settings.ConfigPath) ? "done" : "failed"); + gprintf("\tLoading font...%s\n", Theme::LoadFont(Settings.ConfigPath) ? "done" : "failed (using default)"); gprintf("\tLoading theme...%s\n", Theme::Load(Settings.theme) ? "done" : "failed (using default)"); //! Init the rest of the System diff --git a/source/filelist.h b/source/filelist.h index 486057fb..f9e5563e 100644 --- a/source/filelist.h +++ b/source/filelist.h @@ -544,6 +544,30 @@ extern const u32 nocoverFull_png_size; extern const u8 playersSort_png[]; extern const u32 playersSort_png_size; +extern const u8 add_png[]; +extern const u32 add_png_size; + +extern const u8 back_png[]; +extern const u32 back_png_size; + +extern const u8 forward_png[]; +extern const u32 forward_png_size; + +extern const u8 categoryPrompt_png[]; +extern const u32 categoryPrompt_png_size; + +extern const u8 categoryLine_png[]; +extern const u32 categoryLine_png_size; + +extern const u8 remove_png[]; +extern const u32 remove_png_size; + +extern const u8 category_png[]; +extern const u32 category_png_size; + +extern const u8 category_gray_png[]; +extern const u32 category_gray_png_size; + extern const u8 stub_bin[]; extern const u32 stub_bin_size; diff --git a/source/images/add.png b/source/images/add.png new file mode 100644 index 0000000000000000000000000000000000000000..2be63d7db9e3fdc6239b685b403e19311aabf0aa GIT binary patch literal 1573 zcmV+=2HN?FP)LR7Dj3osZe&Zg;m>+ENpN7?GHWP*CVY-D(;V zOu!c+5s1VWUw8$fR3DlqN~{DPOtgQ15!3LZNi`-I5=tZn69}Ouq){IPVgrPdLc6^m zbFUBg?sj+YQmfH8$!}+7@A>$hGiT<`r6`KVPKy#vs{Biy}h+ZGVNiHJ55({n`B zMT7++Dl^d(FL|0cAh=4nH?&9vf zd$2YD5rK%V0etd@S4&?;Lqp*|CeYo}vw=xQiKsuHZ$YWI7f-KShqkshFcSa*Q7jup zz|71He!qDWKVH6!a=8p5nvl>QJa_Kg?|+-Xi!Z-i;t1o$nBvy%Zftw$C1f)hfPhDj z=J4CEztqV;yM8?i#UcQ}_kCQwb`6u0ldxg-&i-kh2|CLu@jKW=T;ks_M_k$osI`DnCo(s=);d&li*M%B`-rip13;CQeI=*M$ zz70zfpy6SrO!jlfaaNXkdm+NHW6!Pjp64NGM!;HlUhKTK7h&{l-;V5x6-8khU6MfG zrAzx&rElw&Ze+6=xNht)Hs&Q`7q%IJAb{sqt{g+d~|lx1hCH#C&=F2!J!G4D8&s zt520TcXoEb^F4Te9EIz7@jOYX=X(fjIs?{P_`VO{_Yx%IpfdKcs(lqyb?ZBa-r17M zfMzoN!h}M;1-|dqN6`?KZJL1qzVCyQvw`BD>W&}+^0^imRYbs>0It>(U@ke10~=VB z=gXM6e?KwAU?wngY={{TXCI~r%+Ai@_N`k$l>p*#GVkc@fEt5b&VlE78`Bw3*$@Oi z?%cftx4eL}V`B)z5Y}2)YwN}~OrNf!pMDk}0Eitg{sLhb;@I(HXj|0=Yb{jtxh4eE zAtHpKMY%i=B7%rOL{iS0wT_OCC7&;p7Z8RaLpx5uRvk!=5+xRI3=YSWFUc5fhg3-wf6_!uU^^e-UTXpiiy4;u3?PE3;^7uNSPTbie^hz zxkms1h0)16z1qp?lc&$H%6SoiR*=eoK6VM}q8F*2p4Ap%qFfHXtP8r)kY@D|hx8K> z6&s_etYv&3OlP23W@_34L~?Lw=)JmQG^KH3=)@GO>{gZeYDA(?Q5cg!F4qFbaZ=VD z$3aU=9@%WR8Ik#j!o33n1F6gDV=tv2d^Eg+iO&*fWgImllgS`sGVuHWw{P999@W-b ztX;bXCSw*~;htMDHOrvgM~@Ds?t@Db0DzH^k+mTEIS73KAR;g(gN!k8EhGm^6h*Ms zRviaHfY>gb4+Vz?4-ZZ~&c|PVm<$gOv*YOgh;bAVZLTUdRCg3bsIheggi{0WzIO(H z(U$dPRB0opKJ1Gu^%GGEh&BLl0IUEojR-f0F&Q$C9Y1{h>T+$?5g;N4U=nCeuK=V5 zoS=3)L;%7Bwgy20zoz%2C<>7n2F1DLWS*&UZjyN;vNg{sapVK=n!s-$8UhHD+6n&z XOwB)kIuvF@00000NkvXXu0mjf;~L2W literal 0 HcmV?d00001 diff --git a/source/images/back.png b/source/images/back.png new file mode 100644 index 0000000000000000000000000000000000000000..68ed8a13ebda3f72affbd4061d8225397865b3f6 GIT binary patch literal 1536 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 LNkvXXu0mjf>tb(- literal 0 HcmV?d00001 diff --git a/source/images/categoryLine.png b/source/images/categoryLine.png new file mode 100644 index 0000000000000000000000000000000000000000..768dedf9aaa233765c89c16703103be7e572f3fa GIT binary patch literal 951 zcmeAS@N?(olHy`uVBq!ia0vp^SAbZ7gAGV#-3=25QY`6?zK#qG8~bX02Tle_CVK?= zGB8xBGB7kWGcf%852Rl(Fq9fFFuY1&V6d9bz#yJKedSD`LCj8`E{-7;bCM$VmFXVd zWST88ZEbA!rmDkjman(x?cI?0`kJ;wO{Pfyqre{Fc*bW_H?KC!nZa?!`PG6NmO~7T zEa!Z@!`GMH-I{;@w)OY-f9pT~y81snKMttgri=4|`1-hi`zwEc`=7hJESCA1B6C0+ z6Nf^Z>gq7h+(9;qytlXI#qTLn zwRd1>T($DZYxDdj7$D)G?D}=_;UWOy}4zjq(XzlHyMi^&p%(+Uo4p=(w}5xsPTT!|1Tf^Z?oM!otZ`8 z@IU4D{`%kla!s6j9|iiTu|1vZA8+^n{?7XQY7GoY77V8X?DzGjtpNJzalhO82n&WtPq7S6T*eOHH`>z-ICD z|JUE#v5^fJ8`IWD3Rk^+HT8e}zkiYi?Z7a%xnl6*NyG)m>FIiLKlbIEl~Mk_eE}`1$+)d;9(De>!dhs?En7)UAIfziVdye?E545BVFp zR=aY(W>sEDWdx>wQ+VH)b*_!r h&Q~*+*P(%t!8_bW`m#CO8(_|3@O1TaS?83{1OWd|rYQgb literal 0 HcmV?d00001 diff --git a/source/images/categoryPrompt.png b/source/images/categoryPrompt.png new file mode 100644 index 0000000000000000000000000000000000000000..d999140dedeca4fbcfca4ca27ed4e0b6ba4916e7 GIT binary patch literal 6411 zcmcIn2{@Gd_kU-G!4P8~`;^GOjU-t{j3r_$$xbRu31z1kWDQxem3;)M(Y^oY`QPXM?r)xF=AC)J^PcZHpL0H+bH1^7Bi&sHUIYLDyY%(6 zO#uKh0)9`Yhl8K+L7Oe`!r-N6KXaOP5;Is;cK%Ntkb=Qqa7J-^;vso$7x>bB+v zQi^3WGT;V~q!;XS5vtjftjQ)m(*OY?=tvL;3@vmT9IAuqkKix?!y)OE*Y@@7amqePq^iD|OFj6HZF zd6)Wz)E#2x+uN#jG3^J7@0z`Jn&JFbXSiFpEv71l5mTQn#X8JZqZ22WCOLLsY|xw; z0|Pkp-MPIiWA`Yr%Et<^ecChj85q%Ha5(?|xYWog#q85`UDV_%zEzf+OF61byg!kz%{#Rr7-rc7l*4;tgXAJsEAS6D#eq17d(%= zAHoIktk%0AE67*AR&Dn30*;-rXYMXsk*-7#x};Sf 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 HP6lWjE>obx@^XPW9K&fEOrq7G_VIumIdU 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 literal 0 HcmV?d00001 diff --git a/source/libwiigui/gui.h b/source/libwiigui/gui.h index 8856a6c6..8f023288 100644 --- a/source/libwiigui/gui.h +++ b/source/libwiigui/gui.h @@ -47,6 +47,7 @@ #include "OptionList.hpp" #include "SoundOperations/gui_sound.h" #include "SoundOperations/gui_bgm.h" +#include "sigslot.h" //! Frequently used variables extern FreeTypeGX *fontSystem; @@ -88,6 +89,12 @@ enum WRAP, DOTTED, SCROLL_HORIZONTAL, SCROLL_NONE }; + +typedef struct _POINT { + s16 x; + s16 y; +} POINT; + typedef struct _paddata { u16 btns_d; @@ -362,8 +369,8 @@ class GuiElement virtual void Draw(); virtual void DrawTooltip(); protected: - void Lock(); - void Unlock(); + void LockElement(); + void UnlockElement(); // static mutex_t mutex; static mutex_t _lock_mutex; lwp_t _lock_thread; @@ -388,7 +395,7 @@ class GuiElement int yoffsetDyn; //!< Element Y offset, dynamic (added to yoffset value for animation effects) int temp_xoffset; //!< Element Temp X offset int temp_yoffset; //!< Element Temp Y offset - f32 degree; //!< Degree where to start for EFFECT_GOROUND enter it in like 60 + f32 degree; //!< Degree where to start for EFFECT_GOROUND enter it in ° like 60° f32 frequency; //!< Speed for EFFECT_GOROUND || can also be negative for other direction int Radius; //!< The radius in which the Element goes round for EFFECT_GOROUND f32 circleamount; //!< Circleamount for the EFFECT_GOROUND effect @@ -490,6 +497,9 @@ class GuiWindow: public GuiElement //!Moves the selected element to the element above or below //!\param d Direction to move (-1 = up, 1 = down) void MoveSelectionVert(int d); + //!Allow dim of screen on disable or not + void SetAllowDim(bool d) { allowDim = d; } + void SetDimScreen(bool d) { forceDim = d; } //!Draws all the elements in this GuiWindow void Draw(); void DrawTooltip(); @@ -498,6 +508,8 @@ class GuiWindow: public GuiElement //!\param t Pointer to a GuiTrigger, containing the current input data from PAD/WPAD void Update(GuiTrigger * t); protected: + bool forceDim; + bool allowDim; std::vector _elements; //!< Contains all elements within the GuiWindow }; @@ -670,31 +682,15 @@ class GuiText: public GuiElement //!Get the max textwidth int GetTextMaxWidth(); //!Gets the total line number - virtual int GetLinesCount() - { - return 1; - } - ; + virtual int GetLinesCount() { return 1; } //!Get fontsize - int GetFontSize() - { - return size; - } - ; + int GetFontSize() { return size; } //!Set max lines to draw void SetLinesToDraw(int l); - void SetWidescreen(bool b) - { - widescreen = b; - } - ; + void SetWidescreen(bool b) { widescreen = b; } //!Get current Textline (for position calculation) const wchar_t * GetDynText(int ind = 0); - virtual const wchar_t * GetTextLine(int ind) - { - return GetDynText(ind); - } - ; + virtual const wchar_t * GetTextLine(int ind) { return GetDynText(ind); } //!Change the font //!\param font bufferblock //!\param font filesize @@ -859,6 +855,9 @@ class GuiButton: public GuiElement void ScrollIsOn(int f); void SetSkew(int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4); void SetSkew(int *skew /* int skew[8] */); + virtual void SetState(int s, int c = -1); + sigslot::signal3 Clicked; + sigslot::signal3 Held; protected: GuiImage * image; //!< Button image (default) GuiImage * imageOver; //!< Button image for STATE_SELECTED diff --git a/source/libwiigui/gui_box.cpp b/source/libwiigui/gui_box.cpp index 3e6512c4..4e56770c 100644 --- a/source/libwiigui/gui_box.cpp +++ b/source/libwiigui/gui_box.cpp @@ -36,11 +36,13 @@ void GuiBox::Draw() f32 y2 = y + height; guVector v[] = { { x, y, 0.0f }, { x2, y, 0.0f }, { x2, y2, 0.0f }, { x, y2, 0.0f }, { x, y, 0.0f } }; + int alpha = GetAlpha(); + GX_Begin(filled ? GX_TRIANGLEFAN : GX_LINESTRIP, GX_VTXFMT0, n); for (u32 i = 0; i < n; i++) { GX_Position3f32(v[i].x, v[i].y, v[i].z); - GX_Color4u8(color[i].r, color[i].g, color[i].b, color[i].a); + GX_Color4u8(color[i].r, color[i].g, color[i].b, alpha); } GX_End(); GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE); diff --git a/source/libwiigui/gui_button.cpp b/source/libwiigui/gui_button.cpp index 5ea77005..c5c87944 100644 --- a/source/libwiigui/gui_button.cpp +++ b/source/libwiigui/gui_button.cpp @@ -293,6 +293,37 @@ void GuiButton::SetSkew(int *skew) if (image) image->SetSkew(skew); } +void GuiButton::SetState(int s, int c) +{ + GuiElement::SetState(s, c); + + if(c < 0 || c > 3) + return; + + if (s == STATE_CLICKED) + { + POINT p = {0, 0}; + + if (userInput[c].wpad.ir.valid) + { + p.x = userInput[c].wpad.ir.x; + p.y = userInput[c].wpad.ir.y; + } + Clicked(this, c, p); + } + else if (s == STATE_HELD) + { + POINT p = {0, 0}; + + if (userInput[c].wpad.ir.valid) + { + p.x = userInput[c].wpad.ir.x; + p.y = userInput[c].wpad.ir.y; + } + Held(this, c, p); + } +} + /** * Draw the button on screen */ @@ -329,7 +360,7 @@ void GuiButton::DrawTooltip() time(&time1); time2 = time1; } - if (time1 != 0) // timer luft + if (time1 != 0) // timer läuft time(&time1); if (time1 == 0 || difftime(time1, time2) >= 2) diff --git a/source/libwiigui/gui_checkbox.cpp b/source/libwiigui/gui_checkbox.cpp index f3ad018c..02c7698f 100644 --- a/source/libwiigui/gui_checkbox.cpp +++ b/source/libwiigui/gui_checkbox.cpp @@ -25,12 +25,15 @@ #define WHITEBOX_RED_SIZE 4 -GuiCheckbox::GuiCheckbox() +GuiCheckbox::GuiCheckbox(int s) : GuiButton(30, 30), Checked(false) { + style = s; + Checksign.SetParent(this); Cross.SetParent(this); Blackbox.SetParent(this); Whitebox.SetParent(this); + Checksign.SetColor((GXColor) {0, 0, 0, 255}); Cross.SetColor((GXColor) {0, 0, 0, 255}); Blackbox.SetColor((GXColor) {0, 0, 0, 255}); Whitebox.SetColor((GXColor) {255, 255, 255, 255}); @@ -38,12 +41,15 @@ GuiCheckbox::GuiCheckbox() SetSize(30, 30); } -GuiCheckbox::GuiCheckbox(int w, int h) +GuiCheckbox::GuiCheckbox(int w, int h, int s) : GuiButton(w, h), Checked(false) { + style = s; + Checksign.SetParent(this); Cross.SetParent(this); Blackbox.SetParent(this); Whitebox.SetParent(this); + Checksign.SetColor((GXColor) {0, 0, 0, 255}); Cross.SetColor((GXColor) {0, 0, 0, 255}); Blackbox.SetColor((GXColor) {0, 0, 0, 255}); Whitebox.SetColor((GXColor) {255, 255, 255, 255}); @@ -55,6 +61,8 @@ void GuiCheckbox::SetSize(int w, int h) { width = w; height = h; + Checksign.SetSize(w-WHITEBOX_RED_SIZE, h-WHITEBOX_RED_SIZE); + Checksign.SetPosition(WHITEBOX_RED_SIZE/2, WHITEBOX_RED_SIZE/2); Cross.SetSize(w-WHITEBOX_RED_SIZE, h-WHITEBOX_RED_SIZE); Cross.SetPosition(WHITEBOX_RED_SIZE/2, WHITEBOX_RED_SIZE/2); Blackbox.SetSize(w, h); @@ -72,8 +80,8 @@ void GuiCheckbox::SetState(int s, int c) { if(s == STATE_CLICKED) Checked = !Checked; - else - GuiButton::SetState(s, c); + + GuiButton::SetState(s, c); } void GuiCheckbox::Draw() @@ -82,5 +90,10 @@ void GuiCheckbox::Draw() Blackbox.Draw(); Whitebox.Draw(); if(Checked) - Cross.Draw(); + { + if(style == CHECKSIGN) + Checksign.Draw(); + else + Cross.Draw(); + } } diff --git a/source/libwiigui/gui_checkbox.hpp b/source/libwiigui/gui_checkbox.hpp index f44bb575..9a822b7e 100644 --- a/source/libwiigui/gui_checkbox.hpp +++ b/source/libwiigui/gui_checkbox.hpp @@ -27,22 +27,30 @@ #include "libwiigui/gui.h" #include "libwiigui/gui_box.hpp" #include "libwiigui/gui_cross.hpp" +#include "libwiigui/gui_checksign.hpp" class GuiCheckbox : public GuiButton { public: - GuiCheckbox(); - GuiCheckbox(int w, int h); + GuiCheckbox(int style = CHECKSIGN); + GuiCheckbox(int w, int h, int style = CHECKSIGN); void SetTransparent(bool b); void SetSize(int w, int h); void SetChecked(bool c) { LOCK(this); Checked = c; } bool IsChecked() const { return Checked; } virtual void SetState(int s, int c = -1); virtual void Draw(); + enum + { + CHECKSIGN, + CROSS, + }; protected: + GuiChecksign Checksign; GuiCross Cross; GuiBox Blackbox; GuiBox Whitebox; + int style; bool Checked; }; diff --git a/source/libwiigui/gui_checksign.cpp b/source/libwiigui/gui_checksign.cpp new file mode 100644 index 00000000..8cdbc34d --- /dev/null +++ b/source/libwiigui/gui_checksign.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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 "gui_checksign.hpp" + +void GuiChecksign::Draw() +{ + GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR); + GX_SetVtxDesc(GX_VA_POS, GX_DIRECT); + GX_SetVtxDesc(GX_VA_CLR0, GX_DIRECT); + GX_SetVtxDesc(GX_VA_TEX0, GX_NONE); + + f32 x1Line1 = (float) GetLeft() + width*0.1f; + f32 y1Line1 = (float) GetTop() + height*0.65f; + f32 x2Line1 = GetLeft() + width*0.3f; + f32 y2Line1 = (float) GetTop() + (float) height - height*0.1f; + + f32 x1Line2 = x2Line1; + f32 y1Line2 = y2Line1; + f32 x2Line2 = (float) GetLeft() + (float) width - width*0.1f; + f32 y2Line2 = (float) GetTop() + height*0.1f; + + int alpha = GetAlpha(); + + GX_Begin(GX_LINES, GX_VTXFMT0, 4); + GX_Position3f32(x1Line1, y1Line1, 0.0f); + GX_Color4u8(color.r, color.g, color.b, alpha); + GX_Position3f32(x2Line1, y2Line1, 0.0f); + GX_Color4u8(color.r, color.g, color.b, alpha); + GX_Position3f32(x1Line2, y1Line2, 0.0f); + GX_Color4u8(color.r, color.g, color.b, alpha); + GX_Position3f32(x2Line2, y2Line2, 0.0f); + GX_Color4u8(color.r, color.g, color.b, alpha); + GX_End(); + GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE); +} diff --git a/source/libwiigui/gui_checksign.hpp b/source/libwiigui/gui_checksign.hpp new file mode 100644 index 00000000..2127312b --- /dev/null +++ b/source/libwiigui/gui_checksign.hpp @@ -0,0 +1,43 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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. + ***************************************************************************/ +#ifndef GUICHECKSIGN_HPP_ +#define GUICHECKSIGN_HPP_ + +#include "libwiigui/gui.h" + +class GuiChecksign : public GuiElement +{ + public: + GuiChecksign() : Linewidth(2.0f) { color = (GXColor) {0, 0, 0, 255}; GX_SetLineWidth((u8) (Linewidth*6.0f), 0); } + //! Max line width is 42.5 pixel + void SetLinewidth(float w) { LOCK(this); Linewidth = w; GX_SetLineWidth((u8) (Linewidth*6.0f), 0); } + void SetColor(const GXColor c) { LOCK(this); color = c; } + void SetSize(int w, int h) { LOCK(this); width = w; height = h; } + void Draw(); + protected: + GXColor color; + float Linewidth; +}; + +#endif diff --git a/source/libwiigui/gui_cross.cpp b/source/libwiigui/gui_cross.cpp index 482edeb7..3cf8737f 100644 --- a/source/libwiigui/gui_cross.cpp +++ b/source/libwiigui/gui_cross.cpp @@ -35,15 +35,17 @@ void GuiCross::Draw() f32 y1 = GetTop(); f32 y2 = y1 + height; + int alpha = GetAlpha(); + GX_Begin(GX_LINES, GX_VTXFMT0, 4); GX_Position3f32(x1, y1, 0.0f); - GX_Color4u8(color.r, color.g, color.b, color.a); + GX_Color4u8(color.r, color.g, color.b, alpha); GX_Position3f32(x2, y2, 0.0f); - GX_Color4u8(color.r, color.g, color.b, color.a); + GX_Color4u8(color.r, color.g, color.b, alpha); GX_Position3f32(x2, y1, 0.0f); - GX_Color4u8(color.r, color.g, color.b, color.a); + GX_Color4u8(color.r, color.g, color.b, alpha); GX_Position3f32(x1, y2, 0.0f); - GX_Color4u8(color.r, color.g, color.b, color.a); + GX_Color4u8(color.r, color.g, color.b, alpha); GX_End(); GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE); } diff --git a/source/libwiigui/gui_element.cpp b/source/libwiigui/gui_element.cpp index 8c31bc6b..570150a3 100644 --- a/source/libwiigui/gui_element.cpp +++ b/source/libwiigui/gui_element.cpp @@ -759,7 +759,7 @@ bool GuiElement::IsInside(int x, int y) if (x > this->GetLeft() && x < (this->GetLeft() + width) && y > this->GetTop() && y < (this->GetTop() + height)) return true; return false; } -void GuiElement::Lock() +void GuiElement::LockElement() { // LWP_MutexLock(mutex); for (;;) // loop while element is locked by self @@ -789,7 +789,7 @@ void GuiElement::Lock() } } } -void GuiElement::Unlock() +void GuiElement::UnlockElement() { // LWP_MutexUnlock(mutex); LWP_MutexLock(_lock_mutex); @@ -812,9 +812,9 @@ void GuiElement::Unlock() SimpleLock::SimpleLock(GuiElement *e) : element(e) { - element->Lock(); + element->LockElement(); } SimpleLock::~SimpleLock() { - element->Unlock(); + element->UnlockElement(); } diff --git a/source/libwiigui/gui_window.cpp b/source/libwiigui/gui_window.cpp index d536386b..41ac8caf 100644 --- a/source/libwiigui/gui_window.cpp +++ b/source/libwiigui/gui_window.cpp @@ -14,6 +14,8 @@ GuiWindow::GuiWindow() { width = 0; height = 0; + forceDim = false; + allowDim = true; focus = 0; // allow focus } @@ -21,6 +23,8 @@ GuiWindow::GuiWindow(int w, int h) { width = w; height = h; + forceDim = false; + allowDim = true; focus = 0; // allow focus } @@ -98,10 +102,8 @@ void GuiWindow::Draw() this->UpdateEffects(); - if (parentElement && state == STATE_DISABLED) - //Menu_DrawRectangle(0,0,screenwidth,screenheight,(GXColor){0xbe, 0xca, 0xd5, 0x70},1); - Menu_DrawRectangle(0, 0, screenwidth, screenheight, ( GXColor ) - { 0, 0, 0, 0x70}, 1); + if ((parentElement && state == STATE_DISABLED && allowDim) || forceDim) + Menu_DrawRectangle(0, 0, screenwidth, screenheight, (GXColor) {0, 0, 0, 0x70}, 1); } void GuiWindow::DrawTooltip() { diff --git a/source/libwiigui/sigslot.h b/source/libwiigui/sigslot.h new file mode 100644 index 00000000..4a52c327 --- /dev/null +++ b/source/libwiigui/sigslot.h @@ -0,0 +1,2748 @@ +// sigslot.h: Signal/Slot classes +// +// Written by Sarah Thompson (sarah@telergy.com) 2002. +// +// License: Public domain. You are free to use this code however you like, with the proviso that +// the author takes on no responsibility or liability for any use. +// +// QUICK DOCUMENTATION +// +// (see also the full documentation at http://sigslot.sourceforge.net/) +// +// #define switches +// SIGSLOT_PURE_ISO - Define this to force ISO C++ compliance. This also disables +// all of the thread safety support on platforms where it is +// available. +// +// SIGSLOT_USE_POSIX_THREADS - Force use of Posix threads when using a C++ compiler other than +// gcc on a platform that supports Posix threads. (When using gcc, +// this is the default - use SIGSLOT_PURE_ISO to disable this if +// necessary) +// +// SIGSLOT_DEFAULT_MT_POLICY - Where thread support is enabled, this defaults to multi_threaded_global. +// Otherwise, the default is single_threaded. #define this yourself to +// override the default. In pure ISO mode, anything other than +// single_threaded will cause a compiler error. +// +// PLATFORM NOTES +// +// Win32 - On Win32, the WIN32 symbol must be #defined. Most mainstream +// compilers do this by default, but you may need to define it +// yourself if your build environment is less standard. This causes +// the Win32 thread support to be compiled in and used automatically. +// +// Unix/Linux/BSD, etc. - If you're using gcc, it is assumed that you have Posix threads +// available, so they are used automatically. You can override this +// (as under Windows) with the SIGSLOT_PURE_ISO switch. If you're using +// something other than gcc but still want to use Posix threads, you +// need to #define SIGSLOT_USE_POSIX_THREADS. +// +// ISO C++ - If none of the supported platforms are detected, or if +// SIGSLOT_PURE_ISO is defined, all multithreading support is turned off, +// along with any code that might cause a pure ISO C++ environment to +// complain. Before you ask, gcc -ansi -pedantic won't compile this +// library, but gcc -ansi is fine. Pedantic mode seems to throw a lot of +// errors that aren't really there. If you feel like investigating this, +// please contact the author. +// +// +// THREADING MODES +// +// single_threaded - Your program is assumed to be single threaded from the point of view +// of signal/slot usage (i.e. all objects using signals and slots are +// created and destroyed from a single thread). Behaviour if objects are +// destroyed concurrently is undefined (i.e. you'll get the occasional +// segmentation fault/memory exception). +// +// multi_threaded_global - Your program is assumed to be multi threaded. Objects using signals and +// slots can be safely created and destroyed from any thread, even when +// connections exist. In multi_threaded_global mode, this is achieved by a +// single global mutex (actually a critical section on Windows because they +// are faster). This option uses less OS resources, but results in more +// opportunities for contention, possibly resulting in more context switches +// than are strictly necessary. +// +// multi_threaded_local - Behaviour in this mode is essentially the same as multi_threaded_global, +// except that each signal, and each object that inherits has_slots, all +// have their own mutex/critical section. In practice, this means that +// mutex collisions (and hence context switches) only happen if they are +// absolutely essential. However, on some platforms, creating a lot of +// mutexes can slow down the whole OS, so use this option with care. +// +// USING THE LIBRARY +// +// See the full documentation at http://sigslot.sourceforge.net/ +// +// + +#ifndef SIGSLOT_H__ +#define SIGSLOT_H__ + +#include +#include + +#if defined(SIGSLOT_PURE_ISO) || (!defined(WIN32) && !defined(__GNUG__) && !defined(SIGSLOT_USE_POSIX_THREADS) && !defined(SIGSLOT_USE_LWP_THREADS)) +# define _SIGSLOT_SINGLE_THREADED +#elif defined(WIN32) +# define _SIGSLOT_HAS_WIN32_THREADS +# include +#elif (defined(__GNUG__) && defined(__GCCORE_H__)) || defined(SIGSLOT_USE_LWP_THREADS) +# define _SIGSLOT_SINGLE_THREADED +#elif defined(__GNUG__) || defined(SIGSLOT_USE_POSIX_THREADS) +# define _SIGSLOT_HAS_POSIX_THREADS +# include +#else +# define _SIGSLOT_SINGLE_THREADED +#endif + +#ifndef SIGSLOT_DEFAULT_MT_POLICY +# ifdef _SIGSLOT_SINGLE_THREADED +# define SIGSLOT_DEFAULT_MT_POLICY single_threaded +# else +# define SIGSLOT_DEFAULT_MT_POLICY multi_threaded_global +# endif +#endif + + +namespace sigslot { + + class single_threaded + { + public: + single_threaded() + { + ; + } + + virtual ~single_threaded() + { + ; + } + + virtual void lock() + { + ; + } + + virtual void unlock() + { + ; + } + }; + +#ifdef _SIGSLOT_HAS_WIN32_THREADS + // The multi threading policies only get compiled in if they are enabled. + class multi_threaded_global + { + public: + multi_threaded_global() + { + static bool isinitialised = false; + + if(!isinitialised) + { + InitializeCriticalSection(get_critsec()); + isinitialised = true; + } + } + + multi_threaded_global(const multi_threaded_global&) + { + ; + } + + virtual ~multi_threaded_global() + { + ; + } + + virtual void lock() + { + EnterCriticalSection(get_critsec()); + } + + virtual void unlock() + { + LeaveCriticalSection(get_critsec()); + } + + private: + CRITICAL_SECTION* get_critsec() + { + static CRITICAL_SECTION g_critsec; + return &g_critsec; + } + }; + + class multi_threaded_local + { + public: + multi_threaded_local() + { + InitializeCriticalSection(&m_critsec); + } + + multi_threaded_local(const multi_threaded_local&) + { + InitializeCriticalSection(&m_critsec); + } + + virtual ~multi_threaded_local() + { + DeleteCriticalSection(&m_critsec); + } + + virtual void lock() + { + EnterCriticalSection(&m_critsec); + } + + virtual void unlock() + { + LeaveCriticalSection(&m_critsec); + } + + private: + CRITICAL_SECTION m_critsec; + }; +#endif // _SIGSLOT_HAS_WIN32_THREADS + +#ifdef _SIGSLOT_HAS_POSIX_THREADS + // The multi threading policies only get compiled in if they are enabled. + class multi_threaded_global + { + public: + multi_threaded_global() + { + pthread_mutex_init(get_mutex(), NULL); + } + + multi_threaded_global(const multi_threaded_global&) + { + ; + } + + virtual ~multi_threaded_global() + { + ; + } + + virtual void lock() + { + pthread_mutex_lock(get_mutex()); + } + + virtual void unlock() + { + pthread_mutex_unlock(get_mutex()); + } + + private: + pthread_mutex_t* get_mutex() + { + static pthread_mutex_t g_mutex; + return &g_mutex; + } + }; + + class multi_threaded_local + { + public: + multi_threaded_local() + { + pthread_mutex_init(&m_mutex, NULL); + } + + multi_threaded_local(const multi_threaded_local&) + { + pthread_mutex_init(&m_mutex, NULL); + } + + virtual ~multi_threaded_local() + { + pthread_mutex_destroy(&m_mutex); + } + + virtual void lock() + { + pthread_mutex_lock(&m_mutex); + } + + virtual void unlock() + { + pthread_mutex_unlock(&m_mutex); + } + + private: + pthread_mutex_t m_mutex; + }; +#endif // _SIGSLOT_HAS_POSIX_THREADS + +#ifdef _SIGSLOT_HAS_LWP_THREADS + // The multi threading policies only get compiled in if they are enabled. + //!making mutex static because libogc only supports up to 64 mutex - Dimok + static mutex_t g_mutex = LWP_MUTEX_NULL; + + class multi_threaded_global + { + public: + multi_threaded_global() + { + if(g_mutex == LWP_MUTEX_NULL) + LWP_MutexInit(&g_mutex, NULL); + } + + multi_threaded_global(const multi_threaded_global&) + { + ; + } + + virtual ~multi_threaded_global() + { + ; + } + + virtual void lock() + { + LWP_MutexLock(g_mutex); + } + + virtual void unlock() + { + LWP_MutexUnlock(g_mutex); + } + }; + + class multi_threaded_local + { + public: + multi_threaded_local() + { + ; + } + + multi_threaded_local(const multi_threaded_local&) + { + ; + } + + virtual ~multi_threaded_local() + { + } + + virtual void lock() + { + ; + } + + virtual void unlock() + { + ; + } + }; + +#endif // _SIGSLOT_HAS_LWP_THREADS + + template + class lock_block + { + public: + mt_policy *m_mutex; + + lock_block(mt_policy *mtx) + : m_mutex(mtx) + { + m_mutex->lock(); + } + + ~lock_block() + { + m_mutex->unlock(); + } + }; + + template + class has_slots; + + template + class _connection_base0 + { + public: + virtual ~_connection_base0() { ; } + virtual has_slots* getdest() const = 0; + virtual void emit() = 0; + virtual _connection_base0* clone() = 0; + virtual _connection_base0* duplicate(has_slots* pnewdest) = 0; + }; + + template + class _connection_base1 + { + public: + virtual ~_connection_base1() { ; } + virtual has_slots* getdest() const = 0; + virtual void emit(arg1_type) = 0; + virtual _connection_base1* clone() = 0; + virtual _connection_base1* duplicate(has_slots* pnewdest) = 0; + }; + + template + class _connection_base2 + { + public: + virtual ~_connection_base2() { ; } + virtual has_slots* getdest() const = 0; + virtual void emit(arg1_type, arg2_type) = 0; + virtual _connection_base2* clone() = 0; + virtual _connection_base2* duplicate(has_slots* pnewdest) = 0; + }; + + template + class _connection_base3 + { + public: + virtual ~_connection_base3() { ; } + virtual has_slots* getdest() const = 0; + virtual void emit(arg1_type, arg2_type, arg3_type) = 0; + virtual _connection_base3* clone() = 0; + virtual _connection_base3* duplicate(has_slots* pnewdest) = 0; + }; + + template + class _connection_base4 + { + public: + virtual ~_connection_base4() { ; } + virtual has_slots* getdest() const = 0; + virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type) = 0; + virtual _connection_base4* clone() = 0; + virtual _connection_base4* duplicate(has_slots* pnewdest) = 0; + }; + + template + class _connection_base5 + { + public: + virtual ~_connection_base5() { ; } + virtual has_slots* getdest() const = 0; + virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, + arg5_type) = 0; + virtual _connection_base5* clone() = 0; + virtual _connection_base5* duplicate(has_slots* pnewdest) = 0; + }; + + template + class _connection_base6 + { + public: + virtual ~_connection_base6() { ; } + virtual has_slots* getdest() const = 0; + virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, + arg6_type) = 0; + virtual _connection_base6* clone() = 0; + virtual _connection_base6* duplicate(has_slots* pnewdest) = 0; + }; + + template + class _connection_base7 + { + public: + virtual ~_connection_base7() { ; } + virtual has_slots* getdest() const = 0; + virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, + arg6_type, arg7_type) = 0; + virtual _connection_base7* clone() = 0; + virtual _connection_base7* duplicate(has_slots* pnewdest) = 0; + }; + + template + class _connection_base8 + { + public: + virtual ~_connection_base8() { ; } + virtual has_slots* getdest() const = 0; + virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, + arg6_type, arg7_type, arg8_type) = 0; + virtual _connection_base8* clone() = 0; + virtual _connection_base8* duplicate(has_slots* pnewdest) = 0; + }; + + template + class _signal_base : public mt_policy + { + public: + virtual void slot_disconnect(has_slots* pslot) = 0; + virtual void slot_duplicate(const has_slots* poldslot, has_slots* pnewslot) = 0; + }; + + template + class has_slots : public mt_policy + { + private: + typedef typename std::set<_signal_base *> sender_set; + typedef typename sender_set::const_iterator const_iterator; + + public: + has_slots() + { + ; + } + + has_slots(const has_slots& hs) + : mt_policy(hs) + { + lock_block lock(this); + const_iterator it = hs.m_senders.begin(); + const_iterator itEnd = hs.m_senders.end(); + + while(it != itEnd) + { + (*it)->slot_duplicate(&hs, this); + m_senders.insert(*it); + ++it; + } + } + + void signal_connect(_signal_base* sender) + { + lock_block lock(this); + m_senders.insert(sender); + } + + void signal_disconnect(_signal_base* sender) + { + lock_block lock(this); + m_senders.erase(sender); + } + + virtual ~has_slots() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_senders.begin(); + const_iterator itEnd = m_senders.end(); + + while(it != itEnd) + { + (*it)->slot_disconnect(this); + ++it; + } + + m_senders.erase(m_senders.begin(), m_senders.end()); + } + + private: + sender_set m_senders; + }; + + template + class _signal_base0 : public _signal_base + { + public: + typedef typename std::list<_connection_base0 *> connections_list; + typedef typename connections_list::const_iterator const_iterator; + typedef typename connections_list::iterator iterator; + + _signal_base0() + { + ; + } + + _signal_base0(const _signal_base0& s) + : _signal_base(s) + { + lock_block lock(this); + const_iterator it = s.m_connected_slots.begin(); + const_iterator itEnd = s.m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_connect(this); + m_connected_slots.push_back((*it)->clone()); + + ++it; + } + } + + ~_signal_base0() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_connected_slots.begin(); + const_iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_disconnect(this); + delete *it; + + ++it; + } + + m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); + } + + void disconnect(has_slots* pclass) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == pclass) + { + delete *it; + m_connected_slots.erase(it); + pclass->signal_disconnect(this); + return; + } + + ++it; + } + } + + bool connected() + { + return m_connected_slots.size() != 0; + } + + void slot_disconnect(has_slots* pslot) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + iterator itNext = it; + ++itNext; + + if((*it)->getdest() == pslot) + { + delete *it; + m_connected_slots.erase(it); + // delete *it; + } + + it = itNext; + } + } + + void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == oldtarget) + { + m_connected_slots.push_back((*it)->duplicate(newtarget)); + } + + ++it; + } + } + + protected: + connections_list m_connected_slots; + }; + + template + class _signal_base1 : public _signal_base + { + public: + typedef typename std::list<_connection_base1 *> connections_list; + typedef typename connections_list::const_iterator const_iterator; + typedef typename connections_list::iterator iterator; + + _signal_base1() + { + ; + } + + _signal_base1(const _signal_base1& s) + : _signal_base(s) + { + lock_block lock(this); + const_iterator it = s.m_connected_slots.begin(); + const_iterator itEnd = s.m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_connect(this); + m_connected_slots.push_back((*it)->clone()); + + ++it; + } + } + + void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == oldtarget) + { + m_connected_slots.push_back((*it)->duplicate(newtarget)); + } + + ++it; + } + } + + ~_signal_base1() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_connected_slots.begin(); + const_iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_disconnect(this); + delete *it; + + ++it; + } + + m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); + } + + void disconnect(has_slots* pclass) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == pclass) + { + delete *it; + m_connected_slots.erase(it); + pclass->signal_disconnect(this); + return; + } + + ++it; + } + } + + bool connected() + { + return m_connected_slots.size() != 0; + } + + void slot_disconnect(has_slots* pslot) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + iterator itNext = it; + ++itNext; + + if((*it)->getdest() == pslot) + { + delete *it; + m_connected_slots.erase(it); + // delete *it; + } + + it = itNext; + } + } + + + protected: + connections_list m_connected_slots; + }; + + template + class _signal_base2 : public _signal_base + { + public: + typedef typename std::list<_connection_base2 *> + connections_list; + typedef typename connections_list::const_iterator const_iterator; + typedef typename connections_list::iterator iterator; + + _signal_base2() + { + ; + } + + _signal_base2(const _signal_base2& s) + : _signal_base(s) + { + lock_block lock(this); + const_iterator it = s.m_connected_slots.begin(); + const_iterator itEnd = s.m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_connect(this); + m_connected_slots.push_back((*it)->clone()); + + ++it; + } + } + + void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == oldtarget) + { + m_connected_slots.push_back((*it)->duplicate(newtarget)); + } + + ++it; + } + } + + ~_signal_base2() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_connected_slots.begin(); + const_iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_disconnect(this); + delete *it; + + ++it; + } + + m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); + } + + void disconnect(has_slots* pclass) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == pclass) + { + delete *it; + m_connected_slots.erase(it); + pclass->signal_disconnect(this); + return; + } + + ++it; + } + } + + bool connected() + { + return m_connected_slots.size() != 0; + } + + void slot_disconnect(has_slots* pslot) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + iterator itNext = it; + ++itNext; + + if((*it)->getdest() == pslot) + { + delete *it; + m_connected_slots.erase(it); + // delete *it; + } + + it = itNext; + } + } + + protected: + connections_list m_connected_slots; + }; + + template + class _signal_base3 : public _signal_base + { + public: + typedef std::list<_connection_base3 *> + connections_list; + + typedef typename connections_list::const_iterator const_iterator; + typedef typename connections_list::iterator iterator; + _signal_base3() + { + ; + } + + _signal_base3(const _signal_base3& s) + : _signal_base(s) + { + lock_block lock(this); + const_iterator it = s.m_connected_slots.begin(); + const_iterator itEnd = s.m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_connect(this); + m_connected_slots.push_back((*it)->clone()); + + ++it; + } + } + + void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == oldtarget) + { + m_connected_slots.push_back((*it)->duplicate(newtarget)); + } + + ++it; + } + } + + ~_signal_base3() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_connected_slots.begin(); + const_iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_disconnect(this); + delete *it; + + ++it; + } + + m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); + } + + void disconnect(has_slots* pclass) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == pclass) + { + delete *it; + m_connected_slots.erase(it); + pclass->signal_disconnect(this); + return; + } + + ++it; + } + } + + bool connected() + { + return m_connected_slots.size() != 0; + } + + void slot_disconnect(has_slots* pslot) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + iterator itNext = it; + ++itNext; + + if((*it)->getdest() == pslot) + { + delete *it; + m_connected_slots.erase(it); + // delete *it; + } + + it = itNext; + } + } + + protected: + connections_list m_connected_slots; + }; + + template + class _signal_base4 : public _signal_base + { + public: + typedef std::list<_connection_base4 *> connections_list; + typedef typename connections_list::const_iterator const_iterator; + typedef typename connections_list::iterator iterator; + + _signal_base4() + { + ; + } + + _signal_base4(const _signal_base4& s) + : _signal_base(s) + { + lock_block lock(this); + const_iterator it = s.m_connected_slots.begin(); + const_iterator itEnd = s.m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_connect(this); + m_connected_slots.push_back((*it)->clone()); + + ++it; + } + } + + void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == oldtarget) + { + m_connected_slots.push_back((*it)->duplicate(newtarget)); + } + + ++it; + } + } + + ~_signal_base4() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_connected_slots.begin(); + const_iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_disconnect(this); + delete *it; + + ++it; + } + + m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); + } + + void disconnect(has_slots* pclass) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == pclass) + { + delete *it; + this->m_connected_slots.erase(it); + pclass->signal_disconnect(this); + return; + } + + ++it; + } + } + + bool connected() + { + return m_connected_slots.size() != 0; + } + + void slot_disconnect(has_slots* pslot) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + iterator itNext = it; + ++itNext; + + if((*it)->getdest() == pslot) + { + delete *it; + m_connected_slots.erase(it); + // delete *it; + } + + it = itNext; + } + } + + protected: + connections_list m_connected_slots; + }; + + template + class _signal_base5 : public _signal_base + { + public: + typedef std::list<_connection_base5 *> connections_list; + typedef typename connections_list::const_iterator const_iterator; + typedef typename connections_list::iterator iterator; + + _signal_base5() + { + ; + } + + _signal_base5(const _signal_base5& s) + : _signal_base(s) + { + lock_block lock(this); + const_iterator it = s.m_connected_slots.begin(); + const_iterator itEnd = s.m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_connect(this); + m_connected_slots.push_back((*it)->clone()); + + ++it; + } + } + + void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == oldtarget) + { + m_connected_slots.push_back((*it)->duplicate(newtarget)); + } + + ++it; + } + } + + ~_signal_base5() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_connected_slots.begin(); + const_iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_disconnect(this); + delete *it; + + ++it; + } + + m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); + } + + void disconnect(has_slots* pclass) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == pclass) + { + delete *it; + m_connected_slots.erase(it); + pclass->signal_disconnect(this); + return; + } + + ++it; + } + } + + bool connected() + { + return m_connected_slots.size() != 0; + } + + void slot_disconnect(has_slots* pslot) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + iterator itNext = it; + ++itNext; + + if((*it)->getdest() == pslot) + { + delete *it; + m_connected_slots.erase(it); + // delete *it; + } + + it = itNext; + } + } + + protected: + connections_list m_connected_slots; + }; + + template + class _signal_base6 : public _signal_base + { + public: + typedef std::list<_connection_base6 *> connections_list; + typedef typename connections_list::const_iterator const_iterator; + typedef typename connections_list::iterator iterator; + + _signal_base6() + { + ; + } + + _signal_base6(const _signal_base6& s) + : _signal_base(s) + { + lock_block lock(this); + const_iterator it = s.m_connected_slots.begin(); + const_iterator itEnd = s.m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_connect(this); + m_connected_slots.push_back((*it)->clone()); + + ++it; + } + } + + void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == oldtarget) + { + m_connected_slots.push_back((*it)->duplicate(newtarget)); + } + + ++it; + } + } + + ~_signal_base6() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_connected_slots.begin(); + const_iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_disconnect(this); + delete *it; + + ++it; + } + + m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); + } + + void disconnect(has_slots* pclass) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == pclass) + { + delete *it; + m_connected_slots.erase(it); + pclass->signal_disconnect(this); + return; + } + + ++it; + } + } + + bool connected() + { + return m_connected_slots.size() != 0; + } + + void slot_disconnect(has_slots* pslot) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + iterator itNext = it; + ++itNext; + + if((*it)->getdest() == pslot) + { + delete *it; + m_connected_slots.erase(it); + // delete *it; + } + + it = itNext; + } + } + + protected: + connections_list m_connected_slots; + }; + + template + class _signal_base7 : public _signal_base + { + public: + typedef std::list<_connection_base7 *> connections_list; + typedef typename connections_list::const_iterator const_iterator; + typedef typename connections_list::iterator iterator; + + _signal_base7() + { + ; + } + + _signal_base7(const _signal_base7& s) + : _signal_base(s) + { + lock_block lock(this); + const_iterator it = s.m_connected_slots.begin(); + const_iterator itEnd = s.m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_connect(this); + m_connected_slots.push_back((*it)->clone()); + + ++it; + } + } + + void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == oldtarget) + { + m_connected_slots.push_back((*it)->duplicate(newtarget)); + } + + ++it; + } + } + + ~_signal_base7() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_connected_slots.begin(); + const_iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_disconnect(this); + delete *it; + + ++it; + } + + m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); + } + + void disconnect(has_slots* pclass) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == pclass) + { + delete *it; + m_connected_slots.erase(it); + pclass->signal_disconnect(this); + return; + } + + ++it; + } + } + + bool connected() + { + return m_connected_slots.size() != 0; + } + + void slot_disconnect(has_slots* pslot) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + iterator itNext = it; + ++itNext; + + if((*it)->getdest() == pslot) + { + delete *it; + m_connected_slots.erase(it); + // delete *it; + } + + it = itNext; + } + } + + protected: + connections_list m_connected_slots; + }; + + template + class _signal_base8 : public _signal_base + { + public: + typedef std::list<_connection_base8 *> + connections_list; + typedef typename connections_list::const_iterator const_iterator; + typedef typename connections_list::iterator iterator; + + _signal_base8() + { + ; + } + + _signal_base8(const _signal_base8& s) + : _signal_base(s) + { + lock_block lock(this); + const_iterator it = s.m_connected_slots.begin(); + const_iterator itEnd = s.m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_connect(this); + m_connected_slots.push_back((*it)->clone()); + + ++it; + } + } + + void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == oldtarget) + { + m_connected_slots.push_back((*it)->duplicate(newtarget)); + } + + ++it; + } + } + + ~_signal_base8() + { + disconnect_all(); + } + + void disconnect_all() + { + lock_block lock(this); + const_iterator it = m_connected_slots.begin(); + const_iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + (*it)->getdest()->signal_disconnect(this); + delete *it; + + ++it; + } + + m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); + } + + void disconnect(has_slots* pclass) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + if((*it)->getdest() == pclass) + { + delete *it; + m_connected_slots.erase(it); + pclass->signal_disconnect(this); + return; + } + + ++it; + } + } + + bool connected() + { + return m_connected_slots.size() != 0; + } + + void slot_disconnect(has_slots* pslot) + { + lock_block lock(this); + iterator it = m_connected_slots.begin(); + iterator itEnd = m_connected_slots.end(); + + while(it != itEnd) + { + iterator itNext = it; + ++itNext; + + if((*it)->getdest() == pslot) + { + delete *it; + m_connected_slots.erase(it); + // delete *it; + } + + it = itNext; + } + } + + protected: + connections_list m_connected_slots; + }; + + + template + class _connection0 : public _connection_base0 + { + public: + _connection0() + { + this->pobject = NULL; + this->pmemfun = NULL; + } + + _connection0(dest_type* pobject, void (dest_type::*pmemfun)()) + { + m_pobject = pobject; + m_pmemfun = pmemfun; + } + + virtual ~_connection0() + { + ; + } + + virtual _connection_base0* clone() + { + return new _connection0(*this); + } + + virtual _connection_base0* duplicate(has_slots* pnewdest) + { + return new _connection0((dest_type *)pnewdest, m_pmemfun); + } + + virtual void emit() + { + (m_pobject->*m_pmemfun)(); + } + + virtual has_slots* getdest() const + { + return m_pobject; + } + + private: + dest_type* m_pobject; + void (dest_type::* m_pmemfun)(); + }; + + template + class _connection1 : public _connection_base1 + { + public: + _connection1() + { + this->pobject = NULL; + this->pmemfun = NULL; + } + + _connection1(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type)) + { + m_pobject = pobject; + m_pmemfun = pmemfun; + } + + virtual ~_connection1() + { + ; + } + + virtual _connection_base1* clone() + { + return new _connection1(*this); + } + + virtual _connection_base1* duplicate(has_slots* pnewdest) + { + return new _connection1((dest_type *)pnewdest, m_pmemfun); + } + + virtual void emit(arg1_type a1) + { + (m_pobject->*m_pmemfun)(a1); + } + + virtual has_slots* getdest() const + { + return m_pobject; + } + + private: + dest_type* m_pobject; + void (dest_type::* m_pmemfun)(arg1_type); + }; + + template + class _connection2 : public _connection_base2 + { + public: + _connection2() + { + this->pobject = NULL; + this->pmemfun = NULL; + } + + _connection2(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, + arg2_type)) + { + m_pobject = pobject; + m_pmemfun = pmemfun; + } + + virtual ~_connection2() + { + ; + } + + + virtual _connection_base2* clone() + { + return new _connection2(*this); + } + + virtual _connection_base2* duplicate(has_slots* pnewdest) + { + return new _connection2((dest_type *)pnewdest, m_pmemfun); + } + + virtual void emit(arg1_type a1, arg2_type a2) + { + (m_pobject->*m_pmemfun)(a1, a2); + } + + virtual has_slots* getdest() const + { + return m_pobject; + } + + private: + dest_type* m_pobject; + void (dest_type::* m_pmemfun)(arg1_type, arg2_type); + }; + + template + class _connection3 : public _connection_base3 + { + public: + _connection3() + { + this->pobject = NULL; + this->pmemfun = NULL; + } + + _connection3(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, + arg2_type, arg3_type)) + { + m_pobject = pobject; + m_pmemfun = pmemfun; + } + + virtual ~_connection3() + { + ; + } + + + virtual _connection_base3* clone() + { + return new _connection3(*this); + } + + virtual _connection_base3* duplicate(has_slots* pnewdest) + { + return new _connection3((dest_type *)pnewdest, m_pmemfun); + } + + virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3) + { + (m_pobject->*m_pmemfun)(a1, a2, a3); + } + + virtual has_slots* getdest() const + { + return m_pobject; + } + + private: + dest_type* m_pobject; + void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type); + }; + + template + class _connection4 : public _connection_base4 + { + public: + _connection4() + { + this->pobject = NULL; + this->pmemfun = NULL; + } + + _connection4(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type)) + { + m_pobject = pobject; + m_pmemfun = pmemfun; + } + + virtual ~_connection4() + { + ; + } + + virtual _connection_base4* clone() + { + return new _connection4(*this); + } + + virtual _connection_base4* duplicate(has_slots* pnewdest) + { + return new _connection4((dest_type *)pnewdest, m_pmemfun); + } + + virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, + arg4_type a4) + { + (m_pobject->*m_pmemfun)(a1, a2, a3, a4); + } + + virtual has_slots* getdest() const + { + return m_pobject; + } + + private: + dest_type* m_pobject; + void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, + arg4_type); + }; + + template + class _connection5 : public _connection_base5 + { + public: + _connection5() + { + this->pobject = NULL; + this->pmemfun = NULL; + } + + _connection5(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type, arg5_type)) + { + m_pobject = pobject; + m_pmemfun = pmemfun; + } + + virtual ~_connection5() + { + ; + } + + virtual _connection_base5* clone() + { + return new _connection5(*this); + } + + virtual _connection_base5* duplicate(has_slots* pnewdest) + { + return new _connection5((dest_type *)pnewdest, m_pmemfun); + } + + virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5) + { + (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5); + } + + virtual has_slots* getdest() const + { + return m_pobject; + } + + private: + dest_type* m_pobject; + void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, + arg5_type); + }; + + template + class _connection6 : public _connection_base6 + { + public: + _connection6() + { + this->pobject = NULL; + this->pmemfun = NULL; + } + + _connection6(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type, arg5_type, arg6_type)) + { + m_pobject = pobject; + m_pmemfun = pmemfun; + } + + virtual ~_connection6() + { + ; + } + + virtual _connection_base6* clone() + { + return new _connection6(*this); + } + + virtual _connection_base6* duplicate(has_slots* pnewdest) + { + return new _connection6((dest_type *)pnewdest, m_pmemfun); + } + + virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5, arg6_type a6) + { + (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6); + } + + virtual has_slots* getdest() const + { + return m_pobject; + } + + private: + dest_type* m_pobject; + void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, + arg5_type, arg6_type); + }; + + template + class _connection7 : public _connection_base7 + { + public: + _connection7() + { + this->pobject = NULL; + this->pmemfun = NULL; + } + + _connection7(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg7_type)) + { + m_pobject = pobject; + m_pmemfun = pmemfun; + } + + virtual ~_connection7() + { + ; + } + + virtual _connection_base7* clone() + { + return new _connection7(*this); + } + + virtual _connection_base7* duplicate(has_slots* pnewdest) + { + return new _connection7((dest_type *)pnewdest, m_pmemfun); + } + + virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5, arg6_type a6, arg7_type a7) + { + (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6, a7); + } + + virtual has_slots* getdest() const + { + return m_pobject; + } + + private: + dest_type* m_pobject; + void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, + arg5_type, arg6_type, arg7_type); + }; + + template + class _connection8 : public _connection_base8 + { + public: + _connection8() + { + this->pobject = NULL; + this->pmemfun = NULL; + } + + _connection8(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, + arg7_type, arg8_type)) + { + m_pobject = pobject; + m_pmemfun = pmemfun; + } + + virtual ~_connection8() + { + ; + } + + virtual _connection_base8* clone() + { + return new _connection8(*this); + } + + virtual _connection_base8* duplicate(has_slots* pnewdest) + { + return new _connection8((dest_type *)pnewdest, m_pmemfun); + } + + virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8) + { + (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + virtual has_slots* getdest() const + { + return m_pobject; + } + + private: + dest_type* m_pobject; + void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, + arg5_type, arg6_type, arg7_type, arg8_type); + }; + + template + class signal0 : public _signal_base0 + { + public: + typedef typename _signal_base0::connections_list::const_iterator const_iterator; + signal0() + { + ; + } + + signal0(const signal0& s) + : _signal_base0(s) + { + ; + } + + virtual ~signal0() + { + ; + } + + template + void connect(desttype* pclass, void (desttype::*pmemfun)()) + { + lock_block lock(this); + _connection0* conn = + new _connection0(pclass, pmemfun); + this->m_connected_slots.push_back(conn); + pclass->signal_connect(this); + } + + void emit() + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(); + + it = itNext; + } + } + + void operator()() + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(); + + it = itNext; + } + } + }; + + template + class signal1 : public _signal_base1 + { + public: + typedef typename _signal_base1::connections_list::const_iterator const_iterator; + signal1() + { + ; + } + + signal1(const signal1& s) + : _signal_base1(s) + { + ; + } + + virtual ~signal1() + { + ; + } + + template + void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type)) + { + lock_block lock(this); + _connection1* conn = + new _connection1(pclass, pmemfun); + this->m_connected_slots.push_back(conn); + pclass->signal_connect(this); + } + + void emit(arg1_type a1) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1); + + it = itNext; + } + } + + void operator()(arg1_type a1) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1); + + it = itNext; + } + } + }; + + template + class signal2 : public _signal_base2 + { + public: + typedef typename _signal_base2::connections_list::const_iterator const_iterator; + signal2() + { + ; + } + + signal2(const signal2& s) + : _signal_base2(s) + { + ; + } + + virtual ~signal2() + { + ; + } + + template + void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, + arg2_type)) + { + lock_block lock(this); + _connection2* conn = new + _connection2(pclass, pmemfun); + this->m_connected_slots.push_back(conn); + pclass->signal_connect(this); + } + + void emit(arg1_type a1, arg2_type a2) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2); + + it = itNext; + } + } + + void operator()(arg1_type a1, arg2_type a2) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2); + + it = itNext; + } + } + }; + + template + class signal3 : public _signal_base3 + { + public: + typedef typename _signal_base3::connections_list::const_iterator const_iterator; + signal3() + { + ; + } + + signal3(const signal3& s) + : _signal_base3(s) + { + ; + } + + virtual ~signal3() + { + ; + } + + template + void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, + arg2_type, arg3_type)) + { + lock_block lock(this); + _connection3* conn = + new _connection3(pclass, + pmemfun); + this->m_connected_slots.push_back(conn); + pclass->signal_connect(this); + } + + void emit(arg1_type a1, arg2_type a2, arg3_type a3) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3); + + it = itNext; + } + } + + void operator()(arg1_type a1, arg2_type a2, arg3_type a3) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3); + + it = itNext; + } + } + }; + + template + class signal4 : public _signal_base4 + { + public: + typedef typename _signal_base4::connections_list::const_iterator const_iterator; + signal4() + { + ; + } + + signal4(const signal4& s) + : _signal_base4(s) + { + ; + } + + virtual ~signal4() + { + ; + } + + template + void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type)) + { + lock_block lock(this); + _connection4* + conn = new _connection4(pclass, pmemfun); + this->m_connected_slots.push_back(conn); + pclass->signal_connect(this); + } + + void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4); + + it = itNext; + } + } + + void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4); + + it = itNext; + } + } + }; + + template + class signal5 : public _signal_base5 + { + public: + typedef typename _signal_base5::connections_list::const_iterator const_iterator; + signal5() + { + ; + } + + signal5(const signal5& s) + : _signal_base5(s) + { + ; + } + + virtual ~signal5() + { + ; + } + + template + void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type, arg5_type)) + { + lock_block lock(this); + _connection5* conn = new _connection5(pclass, pmemfun); + this->m_connected_slots.push_back(conn); + pclass->signal_connect(this); + } + + void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4, a5); + + it = itNext; + } + } + + void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4, a5); + + it = itNext; + } + } + }; + + + template + class signal6 : public _signal_base6 + { + public: + typedef typename _signal_base6::connections_list::const_iterator const_iterator; + signal6() + { + ; + } + + signal6(const signal6& s) + : _signal_base6(s) + { + ; + } + + virtual ~signal6() + { + ; + } + + template + void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type, arg5_type, arg6_type)) + { + lock_block lock(this); + _connection6* conn = + new _connection6(pclass, pmemfun); + this->m_connected_slots.push_back(conn); + pclass->signal_connect(this); + } + + void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5, arg6_type a6) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4, a5, a6); + + it = itNext; + } + } + + void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5, arg6_type a6) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4, a5, a6); + + it = itNext; + } + } + }; + + template + class signal7 : public _signal_base7 + { + public: + typedef typename _signal_base7::connections_list::const_iterator const_iterator; + signal7() + { + ; + } + + signal7(const signal7& s) + : _signal_base7(s) + { + ; + } + + virtual ~signal7() + { + ; + } + + template + void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, + arg7_type)) + { + lock_block lock(this); + _connection7* conn = + new _connection7(pclass, pmemfun); + this->m_connected_slots.push_back(conn); + pclass->signal_connect(this); + } + + void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5, arg6_type a6, arg7_type a7) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4, a5, a6, a7); + + it = itNext; + } + } + + void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5, arg6_type a6, arg7_type a7) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4, a5, a6, a7); + + it = itNext; + } + } + }; + + template + class signal8 : public _signal_base8 + { + public: + typedef typename _signal_base8::connections_list::const_iterator const_iterator; + signal8() + { + ; + } + + signal8(const signal8& s) + : _signal_base8(s) + { + ; + } + + virtual ~signal8() + { + ; + } + + template + void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, + arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, + arg7_type, arg8_type)) + { + lock_block lock(this); + _connection8* conn = + new _connection8(pclass, pmemfun); + this->m_connected_slots.push_back(conn); + pclass->signal_connect(this); + } + + void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8); + + it = itNext; + } + } + + void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, + arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8) + { + lock_block lock(this); + const_iterator itNext, it = this->m_connected_slots.begin(); + const_iterator itEnd = this->m_connected_slots.end(); + + while(it != itEnd) + { + itNext = it; + ++itNext; + + (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8); + + it = itNext; + } + } + }; + +}; // namespace sigslot + +#endif // SIGSLOT_H__ diff --git a/source/menu.cpp b/source/menu.cpp index d4d7ee30..f6ce217b 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -19,7 +19,7 @@ #include "mload/mload_modules.h" #include "network/networkops.h" #include "patches/patchcode.h" -#include "settings/Settings.h" +#include "settings/menus/GlobalSettings.hpp" #include "settings/CGameSettings.h" #include "themes/CTheme.h" #include "themes/ThemeMenu.h" @@ -218,7 +218,7 @@ int MainMenu(int menu) currentMenu = MenuInstall(); break; case MENU_SETTINGS: - currentMenu = MenuSettings(); + currentMenu = GlobalSettings::Show(); break; case MENU_THEMEMENU: currentMenu = ThemeMenu::Run(); diff --git a/source/menu/GameBrowseMenu.cpp b/source/menu/GameBrowseMenu.cpp index 65ac17e8..fbe451ed 100644 --- a/source/menu/GameBrowseMenu.cpp +++ b/source/menu/GameBrowseMenu.cpp @@ -6,6 +6,7 @@ #include "prompts/gameinfo.h" #include "prompts/DiscBrowser.h" #include "prompts/GameWindow.hpp" +#include "prompts/CategorySwitchPrompt.hpp" #include "themes/CTheme.h" #include "language/gettext.h" #include "usbloader/wbfs.h" @@ -17,7 +18,6 @@ #include "network/update.h" #include "network/ImageDownloader.h" #include "FileOperations/fileops.h" -#include "settings/Settings.h" #include "settings/CSettings.h" #include "settings/CGameStatistics.h" #include "settings/CGameSettings.h" @@ -95,6 +95,8 @@ GameBrowseMenu::GameBrowseMenu() imgLock_gray = Resources::GetImageData("lock_gray.png"); imgUnlock = Resources::GetImageData("unlock.png"); imgUnlock_gray = Resources::GetImageData("unlock_gray.png"); + imgCategory = Resources::GetImageData("category.png"); + imgCategory_gray = Resources::GetImageData("category_gray.png"); homebrewImgData = Resources::GetImageData("browser.png"); homebrewImgDataOver = Resources::GetImageData("browser_over.png"); @@ -189,8 +191,7 @@ GameBrowseMenu::GameBrowseMenu() favoriteBtnImg->SetWidescreen(Settings.widescreen); favoriteBtnImg_g = new GuiImage(imgfavIcon_gray); favoriteBtnImg_g->SetWidescreen(Settings.widescreen); - favoriteBtn = new GuiButton(favoriteBtnImg_g, favoriteBtnImg_g, ALIGN_LEFT, ALIGN_TOP, - 0, 0, + favoriteBtn = new GuiButton(favoriteBtnImg_g, favoriteBtnImg_g, ALIGN_LEFT, ALIGN_TOP, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1, favoriteBtnTT, -15, 52, 0, 3); searchBtnTT = new GuiTooltip(tr( "Set Search-Filter" )); @@ -200,8 +201,7 @@ GameBrowseMenu::GameBrowseMenu() searchBtnImg->SetWidescreen(Settings.widescreen); searchBtnImg_g = new GuiImage(imgsearchIcon_gray); searchBtnImg_g->SetWidescreen(Settings.widescreen); - searchBtn = new GuiButton(searchBtnImg_g, searchBtnImg_g, ALIGN_LEFT, ALIGN_TOP, - 0, 0, + searchBtn = new GuiButton(searchBtnImg_g, searchBtnImg_g, ALIGN_LEFT, ALIGN_TOP, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1, searchBtnTT, -15, 52, 0, 3); sortBtnTT = new GuiTooltip(" "); @@ -212,6 +212,16 @@ GameBrowseMenu::GameBrowseMenu() sortBtnImg->SetWidescreen(Settings.widescreen); sortBtn = new GuiButton(sortBtnImg, sortBtnImg, ALIGN_LEFT, ALIGN_TOP, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1, sortBtnTT, -15, 52, 0, 3); + categBtnTT = new GuiTooltip(tr("Select game categories")); + if (Settings.wsprompt) sortBtnTT->SetWidescreen(Settings.widescreen); + categBtnTT->SetAlpha(thInt("255 - tooltip alpha")); + + categBtnImg = new GuiImage(imgCategory); + categBtnImg->SetWidescreen(Settings.widescreen); + categBtnImg_g = new GuiImage(imgCategory_gray); + categBtnImg_g->SetWidescreen(Settings.widescreen); + categBtn = new GuiButton(categBtnImg, categBtnImg, ALIGN_LEFT, ALIGN_TOP, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1, categBtnTT, -15, 52, 0, 3); + listBtnTT = new GuiTooltip(tr( "Display as a list" )); if (Settings.wsprompt) listBtnTT->SetWidescreen(Settings.widescreen); listBtnTT->SetAlpha(thInt("255 - tooltip alpha")); @@ -366,6 +376,8 @@ GameBrowseMenu::~GameBrowseMenu() delete imgLock_gray; delete imgUnlock; delete imgUnlock_gray; + delete imgCategory; + delete imgCategory_gray; delete homebrewImgData; delete homebrewImgDataOver; delete gameCover; @@ -402,6 +414,8 @@ GameBrowseMenu::~GameBrowseMenu() delete unlockBtnImg_g; delete dvdBtnImg; delete dvdBtnImg_g; + delete categBtnImg; + delete categBtnImg_g; delete homebrewImg; delete homebrewImgOver; delete gameCoverImg; @@ -428,6 +442,7 @@ GameBrowseMenu::~GameBrowseMenu() delete carouselBtn; delete lockBtn; delete dvdBtn; + delete categBtn; delete homebrewBtn; delete DownloadBtn; delete idBtn; @@ -445,6 +460,7 @@ GameBrowseMenu::~GameBrowseMenu() delete carouselBtnTT; delete lockBtnTT; delete dvdBtnTT; + delete categBtnTT; delete homebrewBtnTT; delete DownloadBtnTT; delete IDBtnTT; @@ -572,6 +588,16 @@ void GameBrowseMenu::ReloadBrowser() lockBtnTT->SetText(tr( "Unlock USB Loader GX" )); } + categBtn->SetImage(categBtnImg); + for(u32 n = 0; n < Settings.EnabledCategories.size(); ++n) + { + if(Settings.EnabledCategories[n] == 0) + { + categBtn->SetImage(categBtnImg_g); + break; + } + } + if(GetSelectedGame() >= 0) lastSelectedGame = LIMIT(GetSelectedGame(), 0, gameList.size()-1); else @@ -597,12 +623,14 @@ void GameBrowseMenu::ReloadBrowser() carouselBtn->SetImage(carouselBtnImg_g); carouselBtn->SetImageOver(carouselBtnImg_g); - favoriteBtn->SetPosition(Settings.widescreen ? thInt("288 - list layout favorite btn pos x widescreen") : thInt("260 - list layout favorite btn pos x"), + favoriteBtn->SetPosition(Settings.widescreen ? thInt("256 - list layout favorite btn pos x widescreen") : thInt("220 - list layout favorite btn pos x"), thInt("13 - list layout favorite btn pos y")); - searchBtn->SetPosition(Settings.widescreen ? thInt("320 - list layout search btn pos x widescreen") : thInt("300 - list layout search btn pos x"), + searchBtn->SetPosition(Settings.widescreen ? thInt("288 - list layout search btn pos x widescreen") : thInt("260 - list layout search btn pos x"), thInt("13 - list layout search btn pos y")); - sortBtn->SetPosition(Settings.widescreen ? thInt("352 - list layout abc/sort btn pos x widescreen") : thInt("340 - list layout abc/sort btn pos x"), + sortBtn->SetPosition(Settings.widescreen ? thInt("320 - list layout abc/sort btn pos x widescreen") : thInt("300 - list layout abc/sort btn pos x"), thInt("13 - list layout abc/sort btn pos y")); + categBtn->SetPosition(Settings.widescreen ? thInt("352 - list layout category btn pos x widescreen") : thInt("340 - list layout category btn pos x"), + thInt("13 - list layout category btn pos y")); listBtn->SetPosition(Settings.widescreen ? thInt("384 - list layout list btn pos x widescreen") : thInt("380 - list layout list btn pos x"), thInt("13 - list layout list btn pos y")); gridBtn->SetPosition(Settings.widescreen ? thInt("416 - list layout grid btn pos x widescreen") : thInt("420 - list layout grid btn pos x"), @@ -629,12 +657,14 @@ void GameBrowseMenu::ReloadBrowser() carouselBtn->SetImage(carouselBtnImg_g); carouselBtn->SetImageOver(carouselBtnImg_g); - favoriteBtn->SetPosition(Settings.widescreen ? thInt("224 - grid layout favorite btn pos x widescreen") : thInt("200 - grid layout favorite btn pos x"), + favoriteBtn->SetPosition(Settings.widescreen ? thInt("192 - grid layout favorite btn pos x widescreen") : thInt("160 - grid layout favorite btn pos x"), thInt("13 - grid layout favorite btn pos y")); - searchBtn->SetPosition(Settings.widescreen ? thInt("256 - grid layout search btn pos x widescreen") : thInt("240 - grid layout search btn pos x"), + searchBtn->SetPosition(Settings.widescreen ? thInt("224 - grid layout search btn pos x widescreen") : thInt("200 - grid layout search btn pos x"), thInt("13 - grid layout search btn pos y")); - sortBtn->SetPosition(Settings.widescreen ? thInt("288 - grid layout abc/sort btn pos x widescreen") : thInt("280 - grid layout abc/sort btn pos x"), + sortBtn->SetPosition(Settings.widescreen ? thInt("256 - grid layout abc/sort btn pos x widescreen") : thInt("240 - grid layout abc/sort btn pos x"), thInt("13 - grid layout abc/sort btn pos y")); + categBtn->SetPosition(Settings.widescreen ? thInt("288 - grid layout category btn pos x widescreen") : thInt("280 - grid layout category btn pos x"), + thInt("13 - grid layout category btn pos y")); listBtn->SetPosition(Settings.widescreen ? thInt("320 - grid layout list btn pos x widescreen") : thInt("320 - grid layout list btn pos x"), thInt("13 - grid layout list btn pos y")); gridBtn->SetPosition(Settings.widescreen ? thInt("352 - grid layout grid btn pos x widescreen") : thInt("360 - grid layout grid btn pos x"), @@ -661,11 +691,13 @@ void GameBrowseMenu::ReloadBrowser() gridBtn->SetImage(gridBtnImg_g); gridBtn->SetImageOver(gridBtnImg_g); - favoriteBtn->SetPosition(Settings.widescreen ? thInt("224 - carousel layout favorite btn pos x widescreen") : thInt("200 - carousel layout favorite btn pos x"), + favoriteBtn->SetPosition(Settings.widescreen ? thInt("192 - carousel layout favorite btn pos x widescreen") : thInt("160 - carousel layout favorite btn pos x"), thInt("13 - carousel layout favorite btn pos y")); - searchBtn->SetPosition(Settings.widescreen ? thInt("256 - carousel layout search btn pos x widescreen") : thInt("240 - carousel layout search btn pos x"), + searchBtn->SetPosition(Settings.widescreen ? thInt("224 - carousel layout search btn pos x widescreen") : thInt("200 - carousel layout search btn pos x"), thInt("13 - carousel layout search btn pos y")); - sortBtn->SetPosition(Settings.widescreen ? thInt("288 - carousel layout abc/sort btn pos x widescreen") : thInt("280 - carousel layout abc/sort btn pos x"), + sortBtn->SetPosition(Settings.widescreen ? thInt("256 - carousel layout abc/sort btn pos x widescreen") : thInt("240 - carousel layout abc/sort btn pos x"), + thInt("13 - carousel layout abc/sort btn pos y")); + categBtn->SetPosition(Settings.widescreen ? thInt("288 - carousel layout category btn pos x widescreen") : thInt("280 - carousel layout category btn pos x"), thInt("13 - carousel layout abc/sort btn pos y")); listBtn->SetPosition(Settings.widescreen ? thInt("320 - carousel layout list btn pos x widescreen") : thInt("320 - carousel layout list btn pos x"), thInt("13 - carousel layout list btn pos y")); @@ -709,6 +741,7 @@ void GameBrowseMenu::ReloadBrowser() Append(favoriteBtn); Append(searchBtn); Append(sortBtn); + Append(categBtn); Append(listBtn); Append(gridBtn); Append(carouselBtn); @@ -1103,6 +1136,29 @@ void GameBrowseMenu::CheckDiscSlotUpdate() rockout(GetSelectedGame()); } + else if(categBtn->GetState() == STATE_CLICKED) + { + SetState(STATE_DISABLED); + CategorySwitchPrompt promptMenu; + promptMenu.SetAlignment(ALIGN_CENTER, ALIGN_MIDDLE); + promptMenu.SetEffect(EFFECT_FADE, 20); + mainWindow->Append(&promptMenu); + + promptMenu.Show(); + + promptMenu.SetEffect(EFFECT_FADE, -20); + while(promptMenu.GetEffect() > 0) usleep(100); + mainWindow->Remove(&promptMenu); + categBtn->ResetState(); + SetState(STATE_DEFAULT); + if(promptMenu.categoriesChanged()) + { + wString oldFilter(gameList.GetCurrentFilter()); + gameList.FilterList(oldFilter.c_str()); + ReloadBrowser(); + } + } + if(DiscDriveCoverOld != DiscDriveCover) { if(DiscDriveCover & 0x02) diff --git a/source/menu/GameBrowseMenu.hpp b/source/menu/GameBrowseMenu.hpp index c1216730..17cbbbd1 100644 --- a/source/menu/GameBrowseMenu.hpp +++ b/source/menu/GameBrowseMenu.hpp @@ -75,6 +75,8 @@ class GameBrowseMenu : public GuiWindow GuiImageData * imgLock_gray; GuiImageData * imgUnlock; GuiImageData * imgUnlock_gray; + GuiImageData * imgCategory; + GuiImageData * imgCategory_gray; GuiImageData * homebrewImgData; GuiImageData * homebrewImgDataOver; GuiImageData * gameCover; @@ -111,6 +113,8 @@ class GameBrowseMenu : public GuiWindow GuiImage * unlockBtnImg_g; GuiImage * dvdBtnImg; GuiImage * dvdBtnImg_g; + GuiImage * categBtnImg; + GuiImage * categBtnImg_g; GuiImage * homebrewImg; GuiImage * homebrewImgOver; GuiImage * gameCoverImg; @@ -137,6 +141,7 @@ class GameBrowseMenu : public GuiWindow GuiButton * carouselBtn; GuiButton * lockBtn; GuiButton * dvdBtn; + GuiButton * categBtn; GuiButton * homebrewBtn; GuiButton * DownloadBtn; GuiButton * idBtn; @@ -154,6 +159,7 @@ class GameBrowseMenu : public GuiWindow GuiTooltip * carouselBtnTT; GuiTooltip * lockBtnTT; GuiTooltip * dvdBtnTT; + GuiTooltip * categBtnTT; GuiTooltip * homebrewBtnTT; GuiTooltip * DownloadBtnTT; GuiTooltip * IDBtnTT; diff --git a/source/patches/gamepatches.c b/source/patches/gamepatches.c index f79fa757..d0ab03ec 100644 --- a/source/patches/gamepatches.c +++ b/source/patches/gamepatches.c @@ -8,6 +8,7 @@ #include "gecko.h" #include "patchcode.h" #include "gamepatches.h" +#include "memory/memory.h" #include "settings/SettingsEnums.h" typedef struct _appDOL @@ -54,6 +55,12 @@ void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 es_fd = IOS_Open(es_fs, 0); int i; + load_wip_code((u8*) Disc_ID); + + /* If a wip file is loaded for this game this does nothing - Dimok */ + PoPPatch(); + NSMBPatch(); + int returnToPatched = PatchNewReturnTo(returnTo); for(i = 0; i < dolCount; ++i) @@ -95,9 +102,12 @@ void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 /* ERROR 002 fix (thanks to WiiPower for sharing this)*/ if (fix002 != 0) - *(u32 *) 0x80003188 = *(u32 *) 0x80003140; + *(u32 *)0x80003140 = *(u32 *)0x80003188; DCFlushRange((void*) 0x80000000, 0x3f00); + + free_wip(); + ClearDOLList(); } /** Anti 002 fix for IOS 249 rev > 12 thanks to WiiPower **/ diff --git a/source/patches/wip.h b/source/patches/wip.h index 45336fde..a3dabfff 100644 --- a/source/patches/wip.h +++ b/source/patches/wip.h @@ -4,15 +4,14 @@ #include #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif typedef struct { - u32 offset; - u32 srcaddress; - u32 dstaddress; + u32 offset; + u32 srcaddress; + u32 dstaddress; } WIP_Code; int load_wip_code(u8 *gameid); diff --git a/source/prompts/CategoryPrompt.cpp b/source/prompts/CategoryPrompt.cpp new file mode 100644 index 00000000..931106be --- /dev/null +++ b/source/prompts/CategoryPrompt.cpp @@ -0,0 +1,347 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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 +#include "CategoryPrompt.hpp" +#include "settings/CGameCategories.hpp" +#include "themes/Resources.h" +#include "language/gettext.h" +#include "menu/menus.h" + +CategoryPrompt::CategoryPrompt(const string &title) + : GuiWindow(0, 0) +{ + int posX = 15; + const int posY = 50; + const int distance = 10; + + bgImgData = Resources::GetImageData("categoryPrompt.png"); + addImgData = Resources::GetImageData("add.png"); + prevImgData = Resources::GetImageData("back.png"); + forwardImgData = Resources::GetImageData("forward.png"); + trashImgData = Resources::GetImageData("remove.png"); + lineImgData = Resources::GetImageData("categoryLine.png"); + + bgImg = new GuiImage(bgImgData); + Append(bgImg); + + width = bgImgData->GetWidth(); + height = bgImgData->GetHeight(); + + addImg = new GuiImage(addImgData); + prevImg = new GuiImage(prevImgData); + forwardImg = new GuiImage(forwardImgData); + trashImg = new GuiImage(trashImgData); + lineImg = new GuiImage(lineImgData); + + trigA = new GuiTrigger; + trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); + trigB = new GuiTrigger; + trigB->SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); + trigHome = new GuiTrigger; + trigHome->SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, PAD_BUTTON_START); + trigLeft = new GuiTrigger; + trigLeft->SetButtonOnlyTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT); + trigRight = new GuiTrigger; + trigRight->SetButtonOnlyTrigger(-1, WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT, PAD_BUTTON_RIGHT); + trigMinus = new GuiTrigger; + trigMinus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0); + trigPlus = new GuiTrigger; + trigPlus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0); + + homeButton = new GuiButton(0, 0); + homeButton->SetTrigger(trigHome); + Append(homeButton); + + backButton = new GuiButton(0, 0); + backButton->SetTrigger(trigB); + Append(backButton); + + titleTxt = new GuiText(title.c_str(), 30, (GXColor) {0, 0, 0, 255}); + titleTxt->SetAlignment(ALIGN_CENTER, ALIGN_TOP); + titleTxt->SetPosition(0, 10); + Append(titleTxt); + + previousButton = new GuiButton(prevImg->GetWidth(), prevImg->GetHeight()); + previousButton->SetImage(prevImg); + previousButton->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + previousButton->SetPosition(posX, posY); + previousButton->SetSoundOver(btnSoundOver); + previousButton->SetSoundClick(btnSoundClick); + previousButton->SetTrigger(trigA); + previousButton->SetTrigger(trigLeft); + previousButton->SetTrigger(trigMinus); + previousButton->SetEffectGrow(); + previousButton->Clicked.connect(this, &CategoryPrompt::OnPreviousButtonClick); + Append(previousButton); + posX += distance + previousButton->GetWidth(); + + categoryTxt = new GuiText((char *) NULL, 26, (GXColor) {0, 0, 0, 255}); + categoryTxt->SetAlignment(ALIGN_CENTER, ALIGN_MIDDLE); + categoryTxt->SetMaxWidth(lineImg->GetWidth()-10, DOTTED); + categoryTxt->SetPosition(0, 2); + + editButton = new GuiButton(lineImg->GetWidth(), lineImg->GetHeight()); + editButton->SetImage(lineImg); + editButton->SetLabel(categoryTxt); + editButton->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + editButton->SetPosition(posX, posY); + editButton->SetSoundOver(btnSoundOver); + editButton->SetSoundClick(btnSoundClick); + editButton->SetTrigger(trigA); + editButton->SetEffectGrow(); + Append(editButton); + posX += distance + editButton->GetWidth(); + + enabledButton = new GuiCheckbox(32, 32); + enabledButton->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + enabledButton->SetPosition(posX, posY); + enabledButton->SetSoundOver(btnSoundOver); + enabledButton->SetSoundClick(btnSoundClick); + enabledButton->SetTrigger(trigA); + enabledButton->Clicked.connect(this, &CategoryPrompt::OnEnableButtonClick); + Append(enabledButton); + posX += distance + enabledButton->GetWidth(); + + forwardButton = new GuiButton(forwardImg->GetWidth(), forwardImg->GetHeight()); + forwardButton->SetImage(forwardImg); + forwardButton->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + forwardButton->SetPosition(posX, posY); + forwardButton->SetSoundOver(btnSoundOver); + forwardButton->SetSoundClick(btnSoundClick); + forwardButton->SetTrigger(trigA); + forwardButton->SetTrigger(trigRight); + forwardButton->SetTrigger(trigPlus); + forwardButton->SetEffectGrow(); + forwardButton->Clicked.connect(this, &CategoryPrompt::OnForwardButtonClick); + Append(forwardButton); + posX += 35 + forwardImg->GetWidth(); + + posTxt = new GuiText((char *) NULL, 26, (GXColor) {0, 0, 0, 255}); + posTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + posTxt->SetPosition(posX, posY+4); + Append(posTxt); + + addTxt = new GuiText(tr("Add category"), 24, (GXColor) {0, 0, 0, 255}); + addTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + addTxt->SetMaxWidth(180, DOTTED); + addTxt->SetPosition(10+addImg->GetWidth(), 6); + + addButton = new GuiButton(addImg->GetWidth()+10+addTxt->GetTextWidth(), addImg->GetHeight()); + addButton->SetImage(addImg); + addButton->SetLabel(addTxt); + addButton->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + addButton->SetPosition(15, 100); + addButton->SetSoundOver(btnSoundOver); + addButton->SetSoundClick(btnSoundClick); + addButton->SetTrigger(trigA); + addButton->SetEffectGrow(); + Append(addButton); + + deleteTxt = new GuiText(tr("Delete category"), 24, (GXColor) {0, 0, 0, 255}); + deleteTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + deleteTxt->SetMaxWidth(180, DOTTED); + deleteTxt->SetPosition(trashImg->GetWidth()+10, 6); + + deleteButton = new GuiButton(trashImg->GetWidth()+10+deleteTxt->GetTextWidth(), trashImg->GetHeight()); + deleteButton->SetImage(trashImg); + deleteButton->SetLabel(deleteTxt); + deleteButton->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + deleteButton->SetPosition(10+180+addImg->GetWidth(), 100); + deleteButton->SetSoundOver(btnSoundOver); + deleteButton->SetSoundClick(btnSoundClick); + deleteButton->SetTrigger(trigA); + deleteButton->SetEffectGrow(); + Append(deleteButton); +} + +CategoryPrompt::~CategoryPrompt() +{ + delete bgImgData; + delete addImgData; + delete prevImgData; + delete forwardImgData; + delete trashImgData; + delete lineImgData; + + delete bgImg; + delete addImg; + delete prevImg; + delete forwardImg; + delete trashImg; + delete lineImg; + + delete addButton; + delete previousButton; + delete backButton; + delete forwardButton; + delete deleteButton; + delete editButton; + delete homeButton; + delete enabledButton; + + delete titleTxt; + delete categoryTxt; + delete posTxt; + delete addTxt; + delete deleteTxt; + + delete trigA; + delete trigB; + delete trigHome; + delete trigLeft; + delete trigRight; + delete trigPlus; + delete trigMinus; +} + +void CategoryPrompt::OnForwardButtonClick(GuiButton *sender, int chan, const POINT &pointer) +{ + nextCategory(); + categoryChanged(categoryTxt, posTxt, enabledButton); + sender->ResetState(); +} + +void CategoryPrompt::OnPreviousButtonClick(GuiButton *sender, int chan, const POINT &pointer) +{ + previousCategory(); + categoryChanged(categoryTxt, posTxt, enabledButton); + sender->ResetState(); +} + +void CategoryPrompt::OnEnableButtonClick(GuiButton *sender, int chan, const POINT &pointer) +{ + changed = true; + checkBoxClicked(enabledButton); + sender->ResetState(); +} + +int CategoryPrompt::MainLoop() +{ + categoryChanged(categoryTxt, posTxt, enabledButton); + + while(backButton->GetState() != STATE_CLICKED) + { + usleep(100); + + if (shutdown) + Sys_Shutdown(); + else if (reset) + Sys_Reboot(); + + else if (homeButton->GetState() == STATE_CLICKED) + { + gprintf("\thomeButton clicked\n"); + WindowExitPrompt(); + + homeButton->ResetState(); + } + + else if(addButton->GetState() == STATE_CLICKED) + { + if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_CATEGORIES_MOD)) + { + WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked to be able to use this." ), tr( "OK" )); + addButton->ResetState(); + continue; + } + + char entered[512] = ""; + + int result = OnScreenKeyboard(entered, sizeof(entered), 0); + if(result) + { + GameCategories.CategoryList.AddCategory(entered); + GameCategories.Save(); + GameCategories.CategoryList.findCategory(entered); + categoryChanged(categoryTxt, posTxt, enabledButton); + } + + addButton->ResetState(); + } + + else if(deleteButton->GetState() == STATE_CLICKED) + { + if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_CATEGORIES_MOD)) + { + WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked to be able to use this." ), tr( "OK" )); + deleteButton->ResetState(); + continue; + } + + if(GameCategories.CategoryList.getCurrentID() == 0) + { + WindowPrompt(tr("Error"), tr("You cannot delete this category."), tr("OK")); + deleteButton->ResetState(); + continue; + } + + int choice = WindowPrompt(tr("Warning"), tr("Are you sure you want to delete this category?"), tr("Yes"), tr("Cancel")); + if(choice) + { + int pos = GameCategories.CategoryList.pos()-1; + int categoryID = GameCategories.CategoryList.getCurrentID(); + GameCategories.CategoryList.RemoveCategory(categoryID); + GameCategories.RemoveCategory(categoryID); + GameCategories.Save(); + GameCategories.CategoryList.goToFirst(); + for(int i = 0; i < pos; ++i) + GameCategories.CategoryList.goToNext(); + + categoryChanged(categoryTxt, posTxt, enabledButton); + } + + deleteButton->ResetState(); + } + + else if(editButton->GetState() == STATE_CLICKED) + { + if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_CATEGORIES_MOD)) + { + WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked to be able to use this." ), tr( "OK" )); + editButton->ResetState(); + continue; + } + + char entered[512]; + snprintf(entered, sizeof(entered), tr(GameCategories.CategoryList.getCurrentName().c_str())); + + int result = OnScreenKeyboard(entered, sizeof(entered), 0); + if(result) + { + GameCategories.CategoryList.SetCategory(GameCategories.CategoryList.getCurrentID(), entered); + int pos = GameCategories.CategoryList.pos(); + GameCategories.Save(); + GameCategories.CategoryList.goToFirst(); + for(int i = 0; i < pos; ++i) + GameCategories.CategoryList.goToNext(); + categoryChanged(categoryTxt, posTxt, enabledButton); + } + + editButton->ResetState(); + } + } + + return 0; +} + diff --git a/source/prompts/CategoryPrompt.hpp b/source/prompts/CategoryPrompt.hpp new file mode 100644 index 00000000..95f2fa78 --- /dev/null +++ b/source/prompts/CategoryPrompt.hpp @@ -0,0 +1,87 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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. + ***************************************************************************/ +#ifndef CATEGORYPROMPT_HPP_ +#define CATEGORYPROMPT_HPP_ + +#include "libwiigui/gui.h" +#include "libwiigui/gui_checkbox.hpp" + +class CategoryPrompt : public GuiWindow, public sigslot::has_slots<> +{ + public: + CategoryPrompt(const std::string &title); + ~CategoryPrompt(); + bool categoriesChanged() const { return changed; } + protected: + int MainLoop(); + sigslot::signal3 categoryChanged; + sigslot::signal0<> nextCategory; + sigslot::signal0<> previousCategory; + sigslot::signal1 checkBoxClicked; + private: + void OnForwardButtonClick(GuiButton *sender, int chan, const POINT &pointer); + void OnPreviousButtonClick(GuiButton *sender, int chan, const POINT &pointer); + void OnEnableButtonClick(GuiButton *sender, int chan, const POINT &pointer); + + bool changed; + + GuiImageData *bgImgData; + GuiImageData *addImgData; + GuiImageData *prevImgData; + GuiImageData *forwardImgData; + GuiImageData *trashImgData; + GuiImageData *lineImgData; + + GuiImage *bgImg; + GuiImage *addImg; + GuiImage *prevImg; + GuiImage *forwardImg; + GuiImage *trashImg; + GuiImage *lineImg; + + GuiButton *addButton; + GuiButton *previousButton; + GuiButton *forwardButton; + GuiButton *backButton; + GuiButton *deleteButton; + GuiButton *editButton; + GuiButton *homeButton; + GuiCheckbox *enabledButton; + + GuiText *titleTxt; + GuiText *categoryTxt; + GuiText *posTxt; + GuiText *addTxt; + GuiText *deleteTxt; + + GuiTrigger *trigA; + GuiTrigger *trigB; + GuiTrigger *trigHome; + GuiTrigger *trigLeft; + GuiTrigger *trigRight; + GuiTrigger *trigMinus; + GuiTrigger *trigPlus; +}; + +#endif diff --git a/source/prompts/CategorySelectPrompt.cpp b/source/prompts/CategorySelectPrompt.cpp new file mode 100644 index 00000000..d20e4d62 --- /dev/null +++ b/source/prompts/CategorySelectPrompt.cpp @@ -0,0 +1,101 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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 "CategorySelectPrompt.hpp" +#include "settings/CGameCategories.hpp" +#include "settings/CSettings.h" +#include "language/gettext.h" +#include "utils/StringTools.h" + +CategorySelectPrompt::CategorySelectPrompt(struct discHdr * header) + : CategoryPrompt(fmt("%s - %s", (char *) header->id, tr("Categories"))), + gameHeader(header) +{ + categoryChanged.connect(this, &CategorySelectPrompt::OnCategoryChange); + nextCategory.connect(this, &CategorySelectPrompt::OnNextCategory); + previousCategory.connect(this, &CategorySelectPrompt::OnPreviousCategory); + checkBoxClicked.connect(this, &CategorySelectPrompt::OnCheckboxClicked); +} + +CategorySelectPrompt::~CategorySelectPrompt() +{ + int pos = GameCategories.CategoryList.pos()-1; + GameCategories.Save(); + GameCategories.CategoryList.goToFirst(); + for(int i = 0; i < pos; ++i) + GameCategories.CategoryList.goToNext(); +} + +void CategorySelectPrompt::OnNextCategory() +{ + GameCategories.CategoryList.goToNextCicle(); +} + +void CategorySelectPrompt::OnPreviousCategory() +{ + GameCategories.CategoryList.goToPreviousCicle(); +} + +void CategorySelectPrompt::OnCategoryChange(GuiText *catTxt, GuiText *positionTxt, GuiCheckbox *checkBox) +{ + catTxt->SetText(tr(GameCategories.CategoryList.getCurrentName().c_str())); + positionTxt->SetTextf("%i / %i", GameCategories.CategoryList.pos()+1, GameCategories.CategoryList.size()); + checkBox->SetChecked(false); + + const vector gameCat = GameCategories[gameHeader->id]; + for(u32 i = 0; i < gameCat.size(); ++i) + { + if(gameCat[i] == GameCategories.CategoryList.getCurrentID()) + { + checkBox->SetChecked(true); + break; + } + } +} + +void CategorySelectPrompt::OnCheckboxClicked(GuiCheckbox *checkBox) +{ + if(GameCategories.CategoryList.getCurrentID() == 0) + { + checkBox->SetChecked(true); + return; + } + + const vector gameCat = GameCategories[gameHeader->id]; + + u32 i; + for(i = 0; i < gameCat.size(); ++i) + { + if(gameCat[i] == GameCategories.CategoryList.getCurrentID()) + { + if(!checkBox->IsChecked()) + GameCategories.RemoveCategory((const char *) gameHeader->id, gameCat[i]); + break; + } + } + + if(i == gameCat.size() && checkBox->IsChecked()) + { + GameCategories.SetCategory(gameHeader->id, GameCategories.CategoryList.getCurrentID()); + } +} diff --git a/source/prompts/CategorySelectPrompt.hpp b/source/prompts/CategorySelectPrompt.hpp new file mode 100644 index 00000000..8fdb5045 --- /dev/null +++ b/source/prompts/CategorySelectPrompt.hpp @@ -0,0 +1,44 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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. + ***************************************************************************/ +#ifndef CATEGORYSELECT_PROMPT_HPP_ +#define CATEGORYSELECT_PROMPT_HPP_ + +#include "CategoryPrompt.hpp" +#include "usbloader/disc.h" + +class CategorySelectPrompt : public CategoryPrompt +{ + public: + CategorySelectPrompt(struct discHdr * header); + ~CategorySelectPrompt(); + int Show() { return CategoryPrompt::MainLoop(); }; + private: + void OnCheckboxClicked(GuiCheckbox *checkBox); + void OnCategoryChange(GuiText *categoryTxt, GuiText *posTxt, GuiCheckbox *checkBox); + void OnNextCategory(); + void OnPreviousCategory(); + struct discHdr * gameHeader; +}; + +#endif diff --git a/source/prompts/CategorySwitchPrompt.cpp b/source/prompts/CategorySwitchPrompt.cpp new file mode 100644 index 00000000..0d1aee15 --- /dev/null +++ b/source/prompts/CategorySwitchPrompt.cpp @@ -0,0 +1,81 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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 "CategorySwitchPrompt.hpp" +#include "settings/CGameCategories.hpp" +#include "settings/CSettings.h" +#include "language/gettext.h" + +CategorySwitchPrompt::CategorySwitchPrompt() + : CategoryPrompt(tr("Show Categories")) +{ + categoryChanged.connect(this, &CategorySwitchPrompt::OnCategoryChange); + nextCategory.connect(this, &CategorySwitchPrompt::OnNextCategory); + previousCategory.connect(this, &CategorySwitchPrompt::OnPreviousCategory); + checkBoxClicked.connect(this, &CategorySwitchPrompt::OnCheckboxClicked); +} + +void CategorySwitchPrompt::OnNextCategory() +{ + GameCategories.CategoryList.goToNextCicle(); +} + +void CategorySwitchPrompt::OnPreviousCategory() +{ + GameCategories.CategoryList.goToPreviousCicle(); +} + +void CategorySwitchPrompt::OnCategoryChange(GuiText *catTxt, GuiText *positionTxt, GuiCheckbox *checkBox) +{ + catTxt->SetText(tr(GameCategories.CategoryList.getCurrentName().c_str())); + positionTxt->SetTextf("%i / %i", GameCategories.CategoryList.pos()+1, GameCategories.CategoryList.size()); + checkBox->SetChecked(false); + + for(u32 i = 0; i < Settings.EnabledCategories.size(); ++i) + { + if(Settings.EnabledCategories[i] == GameCategories.CategoryList.getCurrentID()) + { + checkBox->SetChecked(true); + break; + } + } +} + +void CategorySwitchPrompt::OnCheckboxClicked(GuiCheckbox *checkBox) +{ + u32 i; + for(i = 0; i < Settings.EnabledCategories.size(); ++i) + { + if(Settings.EnabledCategories[i] == GameCategories.CategoryList.getCurrentID()) + { + if(!checkBox->IsChecked()) + Settings.EnabledCategories.erase(Settings.EnabledCategories.begin()+i); + break; + } + } + + if(i == Settings.EnabledCategories.size() && checkBox->IsChecked()) + { + Settings.EnabledCategories.push_back(GameCategories.CategoryList.getCurrentID()); + } +} diff --git a/source/prompts/CategorySwitchPrompt.hpp b/source/prompts/CategorySwitchPrompt.hpp new file mode 100644 index 00000000..ccd54161 --- /dev/null +++ b/source/prompts/CategorySwitchPrompt.hpp @@ -0,0 +1,41 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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. + ***************************************************************************/ +#ifndef CATEGORYSWITCH_PROMPT_HPP_ +#define CATEGORYSWITCH_PROMPT_HPP_ + +#include "CategoryPrompt.hpp" + +class CategorySwitchPrompt : public CategoryPrompt +{ + public: + CategorySwitchPrompt(); + int Show() { return CategoryPrompt::MainLoop(); }; + private: + void OnCheckboxClicked(GuiCheckbox *checkBox); + void OnCategoryChange(GuiText *categoryTxt, GuiText *posTxt, GuiCheckbox *checkBox); + void OnNextCategory(); + void OnPreviousCategory(); +}; + +#endif diff --git a/source/prompts/CheckboxPrompt.cpp b/source/prompts/CheckboxPrompt.cpp index dcc0107a..01312559 100644 --- a/source/prompts/CheckboxPrompt.cpp +++ b/source/prompts/CheckboxPrompt.cpp @@ -56,6 +56,11 @@ CheckboxPrompt::~CheckboxPrompt() } +void CheckboxPrompt::OnCheckBoxClick(GuiButton *sender, int chan, const POINT &pointer) +{ + sender->ResetState(); +} + void CheckboxPrompt::AddCheckBox(const char *text) { int size = Checkbox.size(); @@ -74,6 +79,7 @@ void CheckboxPrompt::AddCheckBox(const char *text) Checkbox[size]->SetSoundClick(btnSoundClick); Checkbox[size]->SetSoundOver(btnSoundOver); Checkbox[size]->SetTrigger(trigA); + Checkbox[size]->Clicked.connect(this, &CheckboxPrompt::OnCheckBoxClick); Append(Checkbox[size]); if (Settings.wsprompt && Settings.widescreen) diff --git a/source/prompts/CheckboxPrompt.hpp b/source/prompts/CheckboxPrompt.hpp index 55060f7c..029fdab6 100644 --- a/source/prompts/CheckboxPrompt.hpp +++ b/source/prompts/CheckboxPrompt.hpp @@ -37,7 +37,7 @@ enum CheckedBox6 = 0x20, }; -class CheckboxPrompt : private PromptWindow +class CheckboxPrompt : private PromptWindow, public sigslot::has_slots<> { public: //! Constructor @@ -54,6 +54,7 @@ class CheckboxPrompt : private PromptWindow const char *chbx3 = 0, const char *chbx4 = 0, const char *chbx5 = 0, const char *chbx6 = 0); protected: + void OnCheckBoxClick(GuiButton *sender, int chan, const POINT &pointer); std::vector CheckboxTxt; std::vector Checkbox; }; diff --git a/source/prompts/GameWindow.cpp b/source/prompts/GameWindow.cpp index 868c73f4..07f045ab 100644 --- a/source/prompts/GameWindow.cpp +++ b/source/prompts/GameWindow.cpp @@ -4,11 +4,11 @@ #include "usbloader/wbfs.h" #include "usbloader/GameList.h" #include "themes/CTheme.h" +#include "settings/menus/GameSettingsMenu.hpp" #include "settings/CSettings.h" #include "settings/CGameSettings.h" #include "settings/CGameStatistics.h" #include "settings/GameTitles.h" -#include "settings/Settings.h" #include "prompts/PromptWindows.h" #include "prompts/gameinfo.h" #include "language/gettext.h" @@ -486,7 +486,7 @@ int GameWindow::MainLoop() ResumeGui(); wiilight(0); - int settret = MenuGameSettings(mountMethod ? dvdheader : gameList[gameSelected]); + int settret = GameSettingsMenu::Show(browserMenu, mountMethod ? dvdheader : gameList[gameSelected]); SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); if(parentElement) diff --git a/source/prompts/gameinfo.cpp b/source/prompts/gameinfo.cpp index 735104f9..efe212db 100644 --- a/source/prompts/gameinfo.cpp +++ b/source/prompts/gameinfo.cpp @@ -6,6 +6,7 @@ #include #include "usbloader/wbfs.h" +#include "settings/CGameCategories.hpp" #include "language/gettext.h" #include "libwiigui/gui.h" #include "libwiigui/Text.hpp" @@ -716,6 +717,42 @@ static int InternalShowGameInfo(char *ID) InfoWindow.Append(developerTxt); } + GuiText *categoryTitle = NULL; + std::vector categoriesTxt; + indexy += 10; + + const std::vector gameCategories = GameCategories[ID]; + if(gameCategories.size() > 1) + { + categoryTitle = new GuiText(tr("Categories:"), 16, ( GXColor ) {0, 0, 0, 255}); + categoryTitle->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + categoryTitle->SetPosition(505, 12 + indexy); + indexy += 20; + InfoWindow.Append(categoryTitle); + } + + for (u32 i = 0; i < gameCategories.size(); ++i) + { + if(gameCategories[i] == 0) + continue; + + if(categoriesTxt.size() >= 2 && gameCategories.size() > i+1) + { + categoriesTxt.push_back(new GuiText("...", 16, ( GXColor ) {0, 0, 0, 255})); + categoriesTxt[categoriesTxt.size()-1]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); + categoriesTxt[categoriesTxt.size()-1]->SetPosition(515, 12 + indexy); + indexy += 20; + InfoWindow.Append(categoriesTxt[categoriesTxt.size()-1]); + break; + } + + 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); + indexy += 20; + InfoWindow.Append(categoriesTxt[categoriesTxt.size()-1]); + } + //genre int genreY = marginY; if(GameInfo.GenreList.size() > 0) @@ -978,12 +1015,17 @@ static int InternalShowGameInfo(char *ID) delete genreTitleTxt; delete wiitdb1Txt; delete memTxt; + delete categoryTitle; + for (u32 i = 0; i < GameInfo.GenreList.size(); ++i) delete genreTxt[i]; for (u32 i = 0; i < GameInfo.WifiFeatureList.size(); ++i) delete wifiTxt[i]; + for (u32 i = 0; i < categoriesTxt.size(); ++i) + delete categoriesTxt[i]; + delete [] genreTxt; delete [] wifiTxt; diff --git a/source/settings/CCategoryList.cpp b/source/settings/CCategoryList.cpp new file mode 100644 index 00000000..df287f92 --- /dev/null +++ b/source/settings/CCategoryList.cpp @@ -0,0 +1,105 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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 +#include +#include +#include "CCategoryList.hpp" +#include "language/gettext.h" +#include "FileOperations/fileops.h" +#include "svnrev.h" + +#define VALID_CONFIG_REV 1085 + +CCategoryList CategoryList; + +CCategoryList::CCategoryList() +{ + nameList[0] = tr("All"); + goToFirst(); +} + +const char * CCategoryList::operator[](unsigned int id) +{ + map::iterator itr = nameList.find(id); + if(itr == nameList.end()) + return NULL; + + return nameList[id].c_str(); +} + +bool CCategoryList::AddCategory(const string &name) +{ + if(findCategory(name)) + return false; + + unsigned int i = 1; + map::iterator itr; + + //! Find next free key + while((itr = nameList.find(i)) != nameList.end()) + i++; + + nameList[i] = name; + listIter = nameList.find(i); + + return true; +} + +bool CCategoryList::SetCategory(unsigned int id, const string &name) +{ + RemoveCategory(name); + nameList[id] = name; + listIter = nameList.find(id); + return true; +} + +void CCategoryList::RemoveCategory(const string &name) +{ + for (map::iterator itr = nameList.begin(); itr != nameList.end(); itr++) + { + if(name == itr->second) + { + nameList.erase(itr); + break; + } + } +} + +void CCategoryList::RemoveCategory(unsigned int id) +{ + map::iterator itr = nameList.find(id); + + if(itr != nameList.end()) + nameList.erase(itr); +} + +bool CCategoryList::findCategory(const string &name) +{ + for (listIter = nameList.begin(); listIter != nameList.end(); listIter++) + { + if(name == listIter->second) + return true; + } + return false; +} diff --git a/source/settings/CCategoryList.hpp b/source/settings/CCategoryList.hpp new file mode 100644 index 00000000..6ebc4a5a --- /dev/null +++ b/source/settings/CCategoryList.hpp @@ -0,0 +1,60 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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. + ***************************************************************************/ +#ifndef CATEGORYLIST_HPP_ +#define CATEGORYLIST_HPP_ + +#include +#include + +using namespace std; + +class CCategoryList +{ + public: + CCategoryList(); + bool Load(string filepath); + bool Save(); + bool AddCategory(const string &name); + bool SetCategory(unsigned int id, const string &name); + void RemoveCategory(unsigned int id); + void RemoveCategory(const string &name); + bool goToFirst() { listIter = nameList.begin(); return true; } + bool goToNext() { listIter++; return listIter != nameList.end(); } + unsigned int getCurrentID() const { return listIter->first; } + const string &getCurrentName() const { return listIter->second; } + const char * operator[](unsigned int id); + const char *at(unsigned int id) { return operator[](id); } + void goToNextCicle() { listIter++; if(listIter == nameList.end()) listIter = nameList.begin(); } + void goToPreviousCicle() { if(listIter == nameList.begin()) listIter = nameList.end(); listIter--; } + bool findCategory(const string &name); + bool findCategory(unsigned int id) { listIter = nameList.find(id); return listIter != nameList.end(); }; + int pos() const { return distance(nameList.begin(), listIter); } + int size() const { return nameList.size(); } + private: + string configPath; + map::const_iterator listIter; + map nameList; +}; + +#endif diff --git a/source/settings/CGameCategories.cpp b/source/settings/CGameCategories.cpp new file mode 100644 index 00000000..d9abe86c --- /dev/null +++ b/source/settings/CGameCategories.cpp @@ -0,0 +1,358 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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 +#include +#include +#include "CGameCategories.hpp" +#include "GameTitles.h" +#include "language/gettext.h" +#include "FileOperations/fileops.h" +#include "xml/xml.h" +#include "gecko.h" +#include "svnrev.h" + +#define VALID_CONFIG_REV 1084 + +CGameCategories GameCategories; + +CGameCategories::CGameCategories() + : defaultCategory(1, 0) +{ +} + +const vector &CGameCategories::operator[](const char *id) const +{ + if(!id) return defaultCategory; + + for(map >::const_iterator itr = List.begin(); itr != List.end(); itr++) + { + if(strncasecmp(itr->first.c_str(), id, 6) == 0) + return itr->second; + } + + return defaultCategory; +} + +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, "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) + return false; + + if(filepath[filepath.size()-1] != '/') + filepath += '/'; + + filepath += "GXGameCategories.xml"; + configPath = filepath; + + u8 *buffer = NULL; + u64 filesize = 0; + + LoadFileToMem(filepath.c_str(), &buffer, &filesize); + + if(!buffer) + return false; + + mxml_node_t *xmlfile = mxmlLoadString(NULL, (const char *) buffer, MXML_OPAQUE_CALLBACK); + + if(!ValidVersion(xmlfile)) + { + mxmlDelete(xmlfile); + free(buffer); + return false; + } + + mxml_node_t *node = mxmlFindElement(xmlfile, xmlfile, "Categories", NULL, NULL, MXML_DESCEND_FIRST); + if(!node) + { + mxmlDelete(xmlfile); + free(buffer); + return false; + } + + node = mxmlFindElement(node, xmlfile, "Category", NULL, NULL, MXML_DESCEND_FIRST); + + while(node != NULL) + { + const char * ID = mxmlElementGetAttr(node, "ID"); + const char * Name = mxmlElementGetAttr(node, "Name"); + + if(ID && Name) + CategoryList.SetCategory(atoi(ID), Name); + + node = mxmlFindElement(node, xmlfile, "Category", NULL, NULL, MXML_NO_DESCEND); + } + + node = mxmlFindElement(xmlfile, xmlfile, "GameCategories", NULL, NULL, MXML_DESCEND_FIRST); + if(!node) + { + mxmlDelete(xmlfile); + free(buffer); + return false; + } + + node = mxmlFindElement(node, xmlfile, "Game", NULL, NULL, MXML_DESCEND_FIRST); + + while(node != NULL) + { + const char * gameID = mxmlElementGetAttr(node, "ID"); + + mxml_node_t *category = mxmlFindElement(node, xmlfile, "Category", NULL, NULL, MXML_DESCEND_FIRST); + + while(category != NULL) + { + const char * categoryID = mxmlElementGetAttr(category, "ID"); + if(gameID && categoryID) + SetCategory(gameID, atoi(categoryID)); + category = mxmlFindElement(category, xmlfile, "Category", NULL, NULL, MXML_NO_DESCEND); + } + + node = mxmlFindElement(node, xmlfile, "Game", NULL, NULL, MXML_NO_DESCEND); + } + + mxmlDelete(xmlfile); + free(buffer); + + CategoryList.goToFirst(); + + return true; +} + +bool CGameCategories::Save() +{ + char filepath[300]; + snprintf(filepath, sizeof(filepath), configPath.c_str()); + + char * ptr = strrchr(filepath, '/'); + if(ptr) + ptr[0] = 0; + + CreateSubfolder(filepath); + + FILE * f = fopen(configPath.c_str(), "wb"); + if(!f) + return false; + + mxml_node_t *xmlfile = mxmlNewXML("1.0"); + mxmlSetWrapMargin(0); + + mxml_node_t *node = mxmlNewElement(xmlfile, "Revision"); + mxmlNewInteger(node, atoi(GetRev())); + + node = mxmlNewElement(xmlfile, "Categories"); + + CategoryList.goToFirst(); + do + { + mxml_node_t *category = mxmlNewElement(node, "Category"); + mxmlElementSetAttrf(category, "ID", "%02u", CategoryList.getCurrentID()); + mxmlElementSetAttr(category, "Name", CategoryList.getCurrentName().c_str()); + } + while(CategoryList.goToNext()); + + node = mxmlNewElement(xmlfile, "GameCategories"); + + for(map >::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())); + + 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]]); + } + } + + mxmlSaveFile(xmlfile, f, XMLSaveCallback); + fclose(f); + + mxmlDelete(xmlfile); + + return true; +} + +bool CGameCategories::ValidVersion(mxml_node_t *xmlfile) +{ + if(!xmlfile) return false; + + mxml_node_t *node = mxmlFindElement(xmlfile, xmlfile, "Revision", NULL, NULL, MXML_DESCEND_FIRST); + if(!node || !node->child || !node->child->value.opaque) + return false; + + return atoi(node->child->value.opaque) >= VALID_CONFIG_REV; +} + +bool CGameCategories::SetCategory(const char *gameID, unsigned int id) +{ + if(!gameID) return false; + + char gameID6[7]; + snprintf(gameID6, sizeof(gameID6), gameID); + + string stringGameID(gameID6); + + return SetCategory(stringGameID, id); +} + +bool CGameCategories::SetCategory(const string &gameID, unsigned int id) +{ + if(List[gameID].empty()) + List[gameID] = defaultCategory; + + vector tmpVect(List[gameID]); + + for(u32 i = 0; i < tmpVect.size(); ++i) + { + if(tmpVect[i] == id) + return false; + } + + List[gameID].push_back(id); + return true; +} + +bool CGameCategories::ReplaceCategory(const char *gameID, unsigned int id) +{ + if(!gameID) return false; + + char gameID6[7]; + snprintf(gameID6, sizeof(gameID6), gameID); + + List[string(gameID6)] = defaultCategory; + List[string(gameID6)].push_back(id); + return true; +} + + +bool CGameCategories::ReplaceCategory(const string &gameID, unsigned int id) +{ + List[gameID] = defaultCategory; + List[gameID].push_back(id); + return true; +} + +void CGameCategories::RemoveCategory(unsigned int id) +{ + for(map >::iterator itr = List.begin(); itr != List.end(); itr++) + { + for(u32 i = 0; i < itr->second.size(); ++i) + { + if(itr->second[i] == id) + itr->second.erase(itr->second.begin()+ i); + } + } +} + +void CGameCategories::RemoveGameCategories(const string &gameID) +{ + for (map >::iterator itr = List.begin(); itr != List.end(); itr++) + { + if(gameID == itr->first) + { + List.erase(itr); + } + } +} + +void CGameCategories::RemoveCategory(const char *gameID, unsigned int id) +{ + if(!gameID) return; + + string gameID6; + for(int i = 0; i < 6; ++i) + gameID6.push_back(gameID[i]); + + RemoveCategory(gameID6, id); +} + +void CGameCategories::RemoveCategory(const string &gameID, unsigned int id) +{ + for (map >::iterator itr = List.begin(); itr != List.end(); itr++) + { + if(gameID == itr->first) + { + for(u32 i = 0; i < itr->second.size(); ++i) + { + if(itr->second[i] == id) + { + itr->second.erase(itr->second.begin()+ i); + break; + } + } + break; + } + } +} + +bool CGameCategories::isInCategory(const char *gameID, unsigned int id) +{ + if(id == 0) //! ID = 0 means category 'All' so it is always true + return true; + + if(!gameID) return false; + + string gameID6; + for(int i = 0; i < 6; ++i) + gameID6.push_back(gameID[i]); + + for (map >::iterator itr = GameCategories.List.begin(); itr != GameCategories.List.end(); itr++) + { + if(itr->first == gameID6) + { + for(u32 i = 0; i < itr->second.size(); ++i) + { + if(itr->second[i] == id) + return true; + } + break; + } + } + + return false; +} diff --git a/source/settings/CGameCategories.hpp b/source/settings/CGameCategories.hpp new file mode 100644 index 00000000..b6138a5c --- /dev/null +++ b/source/settings/CGameCategories.hpp @@ -0,0 +1,66 @@ +/**************************************************************************** + * Copyright (C) 2011 + * by Dimok + * + * 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. + ***************************************************************************/ +#ifndef GAMECATEGORIES_HPP_ +#define GAMECATEGORIES_HPP_ + +#include +#include +#include +#include +#include +#include "CCategoryList.hpp" + +class CGameCategories +{ + public: + CGameCategories(); + bool Load(string filepath); + bool Save(); + bool SetCategory(const string &gameID, unsigned int id); + bool SetCategory(const char *gameID, unsigned int id); + bool SetCategory(const unsigned char *gameID, int unsigned id) { return SetCategory((const char *) gameID, id); }; + bool ReplaceCategory(const string &gameID, unsigned int id); + bool ReplaceCategory(const char *gameID, unsigned int id); + bool ReplaceCategory(const unsigned char *gameID, int unsigned id) { return SetCategory((const char *) gameID, id); }; + void RemoveCategory(unsigned int id); + void RemoveCategory(const string &gameID, unsigned int id); + void RemoveCategory(const char *gameID, unsigned int id); + void RemoveCategory(const unsigned char *gameID, unsigned int id) { RemoveCategory((const char *) gameID, id); }; + void RemoveGameCategories(const string &gameID); + const vector &operator[](const char *gameID) const; + const vector &operator[](const unsigned char *gameID) const { return operator[]((const char *) gameID); } + static bool isInCategory(const char *gameID, unsigned int id); + + CCategoryList CategoryList; + protected: + bool ValidVersion(mxml_node_t *xmlfile); + + string configPath; + const vector defaultCategory; + map > List; +}; + +extern CGameCategories GameCategories; + +#endif diff --git a/source/settings/CSettings.cpp b/source/settings/CSettings.cpp index f4467f36..19f5ad49 100644 --- a/source/settings/CSettings.cpp +++ b/source/settings/CSettings.cpp @@ -118,6 +118,8 @@ void CSettings::SetDefault() CacheTitles = ON; WSFactor = 0.8f; //actually should be 0.75 for real widescreen FontScaleFactor = 1.0f; + EnabledCategories.resize(1); + EnabledCategories[0] = 0; } bool CSettings::Load() @@ -263,6 +265,14 @@ bool CSettings::Save() fprintf(file, "CacheTitles = %d\n ", CacheTitles); fprintf(file, "WSFactor = %0.3f\n ", WSFactor); fprintf(file, "FontScaleFactor = %0.3f\n ", FontScaleFactor); + fprintf(file, "EnabledCategories = "); + for(u32 i = 0; i < EnabledCategories.size(); ++i) + { + fprintf(file, "%i", EnabledCategories[i]); + if(i+1 < EnabledCategories.size()) + fprintf(file, ","); + } + fprintf(file, "\n "); fclose(file); return true; @@ -630,6 +640,25 @@ bool CSettings::SetSetting(char *name, char *value) strcpy(returnTo, value); return true; } + else if (strcmp(name, "EnabledCategories") == 0) + { + EnabledCategories.clear(); + char * strTok = strtok(value, ","); + while (strTok != NULL) + { + u32 id = atoi(strTok); + u32 i; + for(i = 0; i < EnabledCategories.size(); ++i) + { + if(EnabledCategories[i] == id) + break; + } + if(i == EnabledCategories.size()) + EnabledCategories.push_back(id); + strTok = strtok(NULL,","); + } + return true; + } return false; } diff --git a/source/settings/CSettings.h b/source/settings/CSettings.h index 1cd3c982..26666619 100644 --- a/source/settings/CSettings.h +++ b/source/settings/CSettings.h @@ -27,6 +27,7 @@ #include #include #include +#include #include "SettingsEnums.h" class CSettings @@ -117,6 +118,7 @@ class CSettings u32 ParentalBlocks; f32 WSFactor; f32 FontScaleFactor; + std::vector EnabledCategories; protected: bool ValidVersion(FILE * file); bool SetSetting(char *name, char *value); diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp deleted file mode 100644 index c7ac0a43..00000000 --- a/source/settings/Settings.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include -#include "settings/menus/GlobalSettings.hpp" -#include "settings/menus/GameSettingsMenu.hpp" - -/**************************************************************************** - * MenuSettings - ***************************************************************************/ -int MenuSettings() -{ - GlobalSettings * Menu = new GlobalSettings(); - mainWindow->Append(Menu); - - Menu->ShowMenu(); - - int returnMenu = MENU_NONE; - - while((returnMenu = Menu->MainLoop()) == MENU_NONE); - - delete Menu; - - return returnMenu; -} - -/******************************************************************************** - *Game specific settings - *********************************************************************************/ -int MenuGameSettings(struct discHdr * header) -{ - GameSettingsMenu * Menu = new GameSettingsMenu(header); - mainWindow->Append(Menu); - - Menu->ShowMenu(); - - int returnMenu = MENU_NONE; - - while((returnMenu = Menu->MainLoop()) == MENU_NONE); - - delete Menu; - - return returnMenu; -} diff --git a/source/settings/Settings.h b/source/settings/Settings.h deleted file mode 100644 index 9eb367ec..00000000 --- a/source/settings/Settings.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - * Settings - * USB Loader GX 2009 - * - * settings.h - ***************************************************************************/ - -#ifndef _SETTINGS_H_ -#define _SETTINGS_H_ - -int MenuSettings(); -int MenuGameSettings(struct discHdr * header); - -#endif diff --git a/source/settings/SettingsEnums.h b/source/settings/SettingsEnums.h index 50528104..cf270c45 100644 --- a/source/settings/SettingsEnums.h +++ b/source/settings/SettingsEnums.h @@ -168,6 +168,7 @@ enum BLOCK_COVER_DOWNLOADS = 0x2000, BLOCK_GAME_INSTALL = 0x4000, BLOCK_GAMEID_CHANGE = 0x8000, + BLOCK_CATEGORIES_MOD = 0x010000, BLOCK_ALL = 0xFFFFFFFF, }; diff --git a/source/settings/menus/FlyingButtonsMenu.cpp b/source/settings/menus/FlyingButtonsMenu.cpp index 52f2da12..7fbd7ae7 100644 --- a/source/settings/menus/FlyingButtonsMenu.cpp +++ b/source/settings/menus/FlyingButtonsMenu.cpp @@ -158,6 +158,9 @@ void FlyingButtonsMenu::SetPageIndicators() FirstIndicator = IndicatorCount-MAX_INDICATORS; else FirstIndicator = currentPage - (int) floor(MAX_INDICATORS/2.0f); + + if(FirstIndicator < 0) + FirstIndicator = 0; } int DisplayedIndicators = IndicatorCount > MAX_INDICATORS ? MAX_INDICATORS : IndicatorCount; diff --git a/source/settings/menus/GameSettingsMenu.cpp b/source/settings/menus/GameSettingsMenu.cpp index e909e490..3252c38a 100644 --- a/source/settings/menus/GameSettingsMenu.cpp +++ b/source/settings/menus/GameSettingsMenu.cpp @@ -21,18 +21,21 @@ * 3. This notice may not be removed or altered from any source * distribution. ***************************************************************************/ +#include #include "GameSettingsMenu.hpp" #include "themes/CTheme.h" #include "prompts/PromptWindows.h" +#include "prompts/CategorySelectPrompt.hpp" #include "settings/GameTitles.h" +#include "usbloader/GameList.h" #include "language/gettext.h" #include "wad/nandtitle.h" #include "cheats/cheatmenu.h" #include "GameLoadSM.hpp" #include "UninstallSM.hpp" -GameSettingsMenu::GameSettingsMenu(struct discHdr * header) - : FlyingButtonsMenu(GameTitles.GetTitle(header)) +GameSettingsMenu::GameSettingsMenu(GameBrowseMenu *parent, struct discHdr * header) + : FlyingButtonsMenu(GameTitles.GetTitle(header)), browserMenu(parent) { DiscHeader = header; //! Don't switch menu's by default but return to disc window. @@ -43,12 +46,29 @@ GameSettingsMenu::~GameSettingsMenu() { } +int GameSettingsMenu::Show(GameBrowseMenu *parent, struct discHdr * header) +{ + GameSettingsMenu * Menu = new GameSettingsMenu(parent, header); + mainWindow->Append(Menu); + + Menu->ShowMenu(); + + int returnMenu = MENU_NONE; + + while((returnMenu = Menu->MainLoop()) == MENU_NONE); + + delete Menu; + + return returnMenu; +} + void GameSettingsMenu::SetupMainButtons() { int pos = 0; SetMainButton(pos++, tr( "Game Load" ), MainButtonImgData, MainButtonImgOverData); SetMainButton(pos++, tr( "Ocarina" ), MainButtonImgData, MainButtonImgOverData); + SetMainButton(pos++, tr( "Categories" ), MainButtonImgData, MainButtonImgOverData); SetMainButton(pos++, tr( "Uninstall Menu" ), MainButtonImgData, MainButtonImgOverData); SetMainButton(pos++, tr( "Default Gamesettings" ), MainButtonImgData, MainButtonImgOverData); } @@ -77,6 +97,42 @@ void GameSettingsMenu::CreateSettingsMenu(int menuNr) CheatMenu(ID); } + //! Categories + else if(menuNr == Idx++) + { + HideMenu(); + titleTxt = new GuiText(MenuTitle.c_str(), 28, ( GXColor ) {0, 0, 0, 255}); + titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); + titleTxt->SetPosition(0, 40); + titleTxt->SetMaxWidth(310, SCROLL_HORIZONTAL); + Append(titleTxt); + Remove(backBtn); + ResumeGui(); + SetState(STATE_DISABLED); + CategorySelectPrompt promptMenu(DiscHeader); + promptMenu.SetAlignment(ALIGN_CENTER, ALIGN_MIDDLE); + promptMenu.SetEffect(EFFECT_FADE, 20); + mainWindow->Append(&promptMenu); + + promptMenu.Show(); + + promptMenu.SetEffect(EFFECT_FADE, -20); + while(promptMenu.GetEffect() > 0) usleep(100); + mainWindow->Remove(&promptMenu); + if(promptMenu.categoriesChanged()) + { + wString oldFilter(gameList.GetCurrentFilter()); + gameList.FilterList(oldFilter.c_str()); + browserMenu->ReloadBrowser(); + } + SetState(STATE_DEFAULT); + Remove(titleTxt); + delete titleTxt; + titleTxt = NULL; + Append(backBtn); + ShowMenu(); + } + //! Uninstall Menu else if(menuNr == Idx++) { diff --git a/source/settings/menus/GameSettingsMenu.hpp b/source/settings/menus/GameSettingsMenu.hpp index 91cb6b58..919a4538 100644 --- a/source/settings/menus/GameSettingsMenu.hpp +++ b/source/settings/menus/GameSettingsMenu.hpp @@ -26,18 +26,21 @@ #include "FlyingButtonsMenu.hpp" #include "settings/CGameSettings.h" +#include "menu/GameBrowseMenu.hpp" #include "usbloader/disc.h" class GameSettingsMenu : public FlyingButtonsMenu { public: - GameSettingsMenu(struct discHdr * header); + GameSettingsMenu(GameBrowseMenu *parent, struct discHdr * header); ~GameSettingsMenu(); + static int Show(GameBrowseMenu *parent, struct discHdr *header); protected: virtual void CreateSettingsMenu(int index); virtual void DeleteSettingsMenu(); virtual void SetupMainButtons(); + GameBrowseMenu *browserMenu; struct discHdr * DiscHeader; }; diff --git a/source/settings/menus/GlobalSettings.cpp b/source/settings/menus/GlobalSettings.cpp index e0428b22..713b56a9 100644 --- a/source/settings/menus/GlobalSettings.cpp +++ b/source/settings/menus/GlobalSettings.cpp @@ -47,6 +47,22 @@ GlobalSettings::~GlobalSettings() delete creditsImgOverData; } +int GlobalSettings::Show() +{ + GlobalSettings * Menu = new GlobalSettings(); + mainWindow->Append(Menu); + + Menu->ShowMenu(); + + int returnMenu = MENU_NONE; + + while((returnMenu = Menu->MainLoop()) == MENU_NONE); + + delete Menu; + + return returnMenu; +} + void GlobalSettings::SetupMainButtons() { int pos = 0; diff --git a/source/settings/menus/GlobalSettings.hpp b/source/settings/menus/GlobalSettings.hpp index 97b9400c..98e3002d 100644 --- a/source/settings/menus/GlobalSettings.hpp +++ b/source/settings/menus/GlobalSettings.hpp @@ -31,6 +31,7 @@ class GlobalSettings : public FlyingButtonsMenu public: GlobalSettings(); ~GlobalSettings(); + static int Show(); protected: virtual void CreateSettingsMenu(int index); virtual void DeleteSettingsMenu(); diff --git a/source/settings/menus/ParentalControlSM.cpp b/source/settings/menus/ParentalControlSM.cpp index dfde31dc..4ab1a801 100644 --- a/source/settings/menus/ParentalControlSM.cpp +++ b/source/settings/menus/ParentalControlSM.cpp @@ -72,6 +72,7 @@ ParentalControlSM::ParentalControlSM() Options->SetName(Idx++, "%s", tr( "Block Cover Downloads" )); Options->SetName(Idx++, "%s", tr( "Block Game Install" )); Options->SetName(Idx++, "%s", tr( "Block GameID Change" )); + Options->SetName(Idx++, "%s", tr( "Block Categories Modify" )); SetOptionValues(); } @@ -147,6 +148,9 @@ void ParentalControlSM::SetOptionValues() //! Settings: Block GameID Change Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_GAMEID_CHANGE) != 0)])); + + //! Settings: Block Categories Modify + Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_CATEGORIES_MOD) != 0)])); } int ParentalControlSM::GetMenuInternal() @@ -310,6 +314,12 @@ int ParentalControlSM::GetMenuInternal() Settings.ParentalBlocks ^= BLOCK_GAMEID_CHANGE; } + //! Settings: Block Categories Modify + else if (ret == ++Idx) + { + Settings.ParentalBlocks ^= BLOCK_CATEGORIES_MOD; + } + SetOptionValues(); return MENU_NONE; diff --git a/source/system/IosLoader.cpp b/source/system/IosLoader.cpp index 1dcfb51e..899dc295 100644 --- a/source/system/IosLoader.cpp +++ b/source/system/IosLoader.cpp @@ -157,7 +157,7 @@ void IosLoader::LoadIOSModules(s32 ios, s32 ios_rev) //! Waninkoko IOS else if(IsWaninkokoIOS(ios)) { - if(ios_rev >= 18) + if(ios_rev >= 18 && !(ios_rev >= 21006 && ios_rev < 30000)) { if(mload_init() < 0) return; diff --git a/source/themes/Resources.cpp b/source/themes/Resources.cpp index afe9040c..3c6d4de6 100644 --- a/source/themes/Resources.cpp +++ b/source/themes/Resources.cpp @@ -174,6 +174,14 @@ RecourceFile Resources::RecourceFiles[] = {"Channel_btn.png", Channel_btn_png, Channel_btn_png_size, NULL, 0}, {"boxBorder.png", boxBorder_png, boxBorder_png_size, NULL, 0}, {"nocoverFull.png", nocoverFull_png, nocoverFull_png_size, NULL, 0}, + {"add.png", add_png, add_png_size, NULL, 0}, + {"back.png", back_png, back_png_size, NULL, 0}, + {"forward.png", forward_png, forward_png_size, NULL, 0}, + {"categoryPrompt.png", categoryPrompt_png, categoryPrompt_png_size, NULL, 0}, + {"categoryLine.png", categoryLine_png, categoryLine_png_size, NULL, 0}, + {"remove.png", remove_png, remove_png_size, NULL, 0}, + {"category.png", category_png, category_png_size, NULL, 0}, + {"category_gray.png", category_gray_png, category_gray_png_size, NULL, 0}, {"button_click.wav", button_click_wav, button_click_wav_size, NULL, 0}, {"button_click2.wav", button_click2_wav, button_click2_wav_size, NULL, 0}, {"button_over.wav", button_over_wav, button_over_wav_size, NULL, 0}, diff --git a/source/usbloader/GameBooter.cpp b/source/usbloader/GameBooter.cpp index 6231f3d8..e3d0bf87 100644 --- a/source/usbloader/GameBooter.cpp +++ b/source/usbloader/GameBooter.cpp @@ -9,7 +9,6 @@ #include "usbloader/usbstorage2.h" #include "usbloader/wdvd.h" #include "usbloader/GameList.h" -#include "settings/Settings.h" #include "settings/CGameSettings.h" #include "usbloader/frag.h" #include "usbloader/wbfs.h" @@ -61,12 +60,6 @@ u32 GameBooter::BootPartition(char * dolpath, u8 videoselected, u8 alternatedol, if (ret < 0) return 0; - load_wip_code((u8*) Disc_ID); - - /* If a wip file is loaded for this game this does nothing - Dimok */ - PoPPatch(); - NSMBPatch(); - /* Setup low memory */ Disc_SetLowMem(); @@ -79,8 +72,6 @@ u32 GameBooter::BootPartition(char * dolpath, u8 videoselected, u8 alternatedol, if (ret < 0) return 0; - free_wip(); - return (u32) p_entry; } diff --git a/source/usbloader/GameList.cpp b/source/usbloader/GameList.cpp index 9ad9b5e8..ef0b48a5 100644 --- a/source/usbloader/GameList.cpp +++ b/source/usbloader/GameList.cpp @@ -31,6 +31,7 @@ #include "settings/CGameSettings.h" #include "settings/CGameStatistics.h" #include "settings/GameTitles.h" +#include "settings/CGameCategories.hpp" #include "xml/xml.h" #include "FreeTypeGX.h" #include "GameList.h" @@ -241,6 +242,15 @@ int GameList::FilterList(const wchar_t * gameFilter) if(!Settings.godmode && GameConfig && GameConfig->Locked) continue; + //! Category filter + u32 n; + for(n = 0; n < Settings.EnabledCategories.size(); ++n) + { + if(GameCategories.isInCategory((char *) header->id, Settings.EnabledCategories[n])) + break; + } + if(n == Settings.EnabledCategories.size()) continue; + wchar_t *gameName = charToWideChar(GameTitles.GetTitle(header)); if (gameName && *GameFilter.c_str()) { diff --git a/source/usbloader/apploader.c b/source/usbloader/apploader.c index 4dbf1167..8cfdf702 100644 --- a/source/usbloader/apploader.c +++ b/source/usbloader/apploader.c @@ -11,6 +11,7 @@ #include "fstfile.h" #include "gecko.h" #include "patches/gamepatches.h" +#include "patches/wip.h" #include "settings/SettingsEnums.h" extern bool geckoinit; @@ -84,6 +85,7 @@ s32 Apploader_Run(entry_point *entry, char * dolpath, u8 alternatedol, u32 alter if (alternatedol == ALT_DOL_FROM_SD_USB) { ClearDOLList(); + wip_reset_counter(); void *dolbuffer = NULL; int dollen = 0; @@ -96,6 +98,7 @@ s32 Apploader_Run(entry_point *entry, char * dolpath, u8 alternatedol, u32 alter else if (alternatedol == ALT_DOL_FROM_GAME && alternatedoloffset != 0) { ClearDOLList(); + wip_reset_counter(); FST_ENTRY *fst = (FST_ENTRY *) *(u32 *) 0x80000038; //! Check if it's inside the limits diff --git a/source/usbloader/disc.c b/source/usbloader/disc.c index 207d5c85..613d24b8 100644 --- a/source/usbloader/disc.c +++ b/source/usbloader/disc.c @@ -302,6 +302,7 @@ s32 Disc_JumpToEntrypoint(bool enablecheat, u32 dolparameter) "mtlr %r3\n" "lis %r3, 0x8000\n" "ori %r3, %r3, 0x18A8\n" + "nop\n" "mtctr %r3\n" "bctr\n" ); diff --git a/source/usbloader/usbstorage2.c b/source/usbloader/usbstorage2.c index 66bbd963..58989938 100644 --- a/source/usbloader/usbstorage2.c +++ b/source/usbloader/usbstorage2.c @@ -69,7 +69,7 @@ static char fs3[] ATTRIBUTE_ALIGN(32) = "/dev/usb/ehc"; static u8 * mem2_ptr = NULL; static s32 hid = -1, fd = -1; -static u32 usb2_port = 0; //autodetect mode (works only with hermes ios & rodries ehcmodule) +static u32 usb2_port = 2; //autodetect mode (works only with hermes ios & rodries ehcmodule) u32 hdd_sector_size = 512; s32 USBStorage2_Init(void)