From a8cde609133ab5a1c48d03143f7241a097df00c2 Mon Sep 17 00:00:00 2001 From: dimok321 <15055714+dimok789@users.noreply.github.com> Date: Sun, 5 Jul 2009 06:39:56 +0000 Subject: [PATCH] *A few cleanups --- Languages/danish.lang | 5 +- Languages/dutch.lang | 5 +- Languages/english.lang | 5 +- Languages/finnish.lang | 5 +- Languages/french.lang | 5 +- Languages/german.lang | 5 +- Languages/italian.lang | 5 +- Languages/japanese.lang | 5 +- Languages/korean.lang | 5 +- Languages/norwegian.lang | 5 +- Languages/portuguese_br.lang | 5 +- Languages/portuguese_pt.lang | 5 +- Languages/russian.lang | 5 +- Languages/schinese.lang | 5 +- Languages/spanish.lang | 5 +- Languages/swedish.lang | 5 +- Languages/tchinese.lang | 5 +- Languages/turkish.lang | 5 +- source/cheatmenu.cpp | 123 +++-- source/fatmounter.c | 8 +- source/gct.cpp | 28 +- source/gct.h | 21 +- source/libwiigui/gui_gamegrid.cpp | 685 ++++++++++++++-------------- source/listfiles.c | 1 - source/main.cpp | 53 ++- source/menu.cpp | 179 ++++---- source/network/networkops.cpp | 2 +- source/prompts/PromptWindows.cpp | 118 ++--- source/prompts/PromptWindows.h | 5 +- source/settings/Settings.cpp | 100 ++-- source/settings/SettingsPrompts.cpp | 24 +- source/sys.cpp | 34 -- source/sys.h | 12 +- 33 files changed, 713 insertions(+), 770 deletions(-) diff --git a/Languages/danish.lang b/Languages/danish.lang index 8b74dd4f..c3c1652c 100644 --- a/Languages/danish.lang +++ b/Languages/danish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "Filerne blev ikke fundet på serveren!" msgid "for" msgstr "for" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "" diff --git a/Languages/dutch.lang b/Languages/dutch.lang index 00ea0b4a..7a557572 100644 --- a/Languages/dutch.lang +++ b/Languages/dutch.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "Bestanden niet gevonden op server!" msgid "for" msgstr "voor" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "voor vele correcties" diff --git a/Languages/english.lang b/Languages/english.lang index 98de18e4..49950f11 100644 --- a/Languages/english.lang +++ b/Languages/english.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "" msgid "for" msgstr "" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "" diff --git a/Languages/finnish.lang b/Languages/finnish.lang index 59b141b3..0b44171b 100644 --- a/Languages/finnish.lang +++ b/Languages/finnish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "tiedostoja ei löytynyt serveriltä!" msgid "for" msgstr "" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "" diff --git a/Languages/french.lang b/Languages/french.lang index 4619d877..200542ac 100644 --- a/Languages/french.lang +++ b/Languages/french.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "fichiers introuvables sur le serveur !" msgid "for" msgstr "pour" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "pour les divers patchs" diff --git a/Languages/german.lang b/Languages/german.lang index f9ada1d9..c3f704ff 100644 --- a/Languages/german.lang +++ b/Languages/german.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "Datei(en) konnte(n) auf dem Server nicht gefunden werden!" msgid "for" msgstr "für" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "für diverse Patch´s" diff --git a/Languages/italian.lang b/Languages/italian.lang index bf7af8d9..4386ae11 100644 --- a/Languages/italian.lang +++ b/Languages/italian.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "file non trovato/i sul server!" msgid "for" msgstr "per" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "diversepatches" diff --git a/Languages/japanese.lang b/Languages/japanese.lang index ed11150d..0d654751 100644 --- a/Languages/japanese.lang +++ b/Languages/japanese.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "サーバーにファイルがありません!" msgid "for" msgstr "for" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "1月" diff --git a/Languages/korean.lang b/Languages/korean.lang index a6459b3a..5efdbb7d 100644 --- a/Languages/korean.lang +++ b/Languages/korean.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "파일이 서버에 없습니다!" msgid "for" msgstr "for" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "" diff --git a/Languages/norwegian.lang b/Languages/norwegian.lang index 82077fbd..78c532c8 100644 --- a/Languages/norwegian.lang +++ b/Languages/norwegian.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "filer ikke funnet på serveren!" msgid "for" msgstr "for" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "for diverse patcher" diff --git a/Languages/portuguese_br.lang b/Languages/portuguese_br.lang index 002007bc..7edc977b 100644 --- a/Languages/portuguese_br.lang +++ b/Languages/portuguese_br.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "arquivos não encontrados no servidor!" msgid "for" msgstr "com" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "pelas diversas correções" diff --git a/Languages/portuguese_pt.lang b/Languages/portuguese_pt.lang index b2e6ce20..bbf79ae2 100644 --- a/Languages/portuguese_pt.lang +++ b/Languages/portuguese_pt.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "ficheiros não encontrados no servidor!" msgid "for" msgstr "pelo" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "por diversos patches" diff --git a/Languages/russian.lang b/Languages/russian.lang index 48606354..cd1b7a4a 100644 --- a/Languages/russian.lang +++ b/Languages/russian.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "файлы не найдены на сервере!" msgid "for" msgstr "за" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "" diff --git a/Languages/schinese.lang b/Languages/schinese.lang index 7ac681d6..02134925 100644 --- a/Languages/schinese.lang +++ b/Languages/schinese.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "服务器中无此文件!" msgid "for" msgstr "的" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "" diff --git a/Languages/spanish.lang b/Languages/spanish.lang index f256b31d..4ec81219 100644 --- a/Languages/spanish.lang +++ b/Languages/spanish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "archivo(s) no encontrado(s) en el servidor." msgid "for" msgstr "por" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "por diversos parches" diff --git a/Languages/swedish.lang b/Languages/swedish.lang index 3634e9a4..8136c1e3 100644 --- a/Languages/swedish.lang +++ b/Languages/swedish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "Filerna hittades inte på servern!" msgid "for" msgstr "för" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "" diff --git a/Languages/tchinese.lang b/Languages/tchinese.lang index 1206c850..8e32fae6 100644 --- a/Languages/tchinese.lang +++ b/Languages/tchinese.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "伺服器中無此檔案!" msgid "for" msgstr "的" +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "" diff --git a/Languages/turkish.lang b/Languages/turkish.lang index 6f671ce2..63814639 100644 --- a/Languages/turkish.lang +++ b/Languages/turkish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-06-30 20:33-0400\n" +"POT-Creation-Date: 2009-07-05 08:32+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -747,6 +747,9 @@ msgstr "dosyalar sunucuda bulunamadi!" msgid "for" msgstr "," +msgid "for WiiTDB" +msgstr "" + msgid "for diverse patches" msgstr "" diff --git a/source/cheatmenu.cpp b/source/cheatmenu.cpp index 51ac81cb..659e09f3 100644 --- a/source/cheatmenu.cpp +++ b/source/cheatmenu.cpp @@ -63,15 +63,14 @@ int CheatMenu(const char * gameID) snprintf(txtfilename,sizeof(txtfilename),"%s%s.txt",Settings.TxtCheatcodespath,gameID); int check = c.openTxtfile(txtfilename); - + switch(check) { - case -1: WindowPrompt(tr("Error"),tr("Cheatfile is blank"),tr("OK"),NULL,NULL,NULL,-1); + case -1: WindowPrompt(tr("Error"),tr("Cheatfile is blank"),tr("OK")); break; - case 0: WindowPrompt(tr("Error"),tr("No Cheatfile found"),tr("OK"),NULL,NULL,NULL,-1); + case 0: WindowPrompt(tr("Error"),tr("No Cheatfile found"),tr("OK")); break; - case 1: - //WindowPrompt("Opened File","File found for Game","Okay",NULL,NULL,NULL); + case 1: int cntcheats = c.getCnt(); customOptionList cheatslst(cntcheats); GuiCustomOptionBrowser chtBrowser(400, 280, &cheatslst, CFG.theme_path, "bg_options_settings.png", bg_options_settings_png, 1, 90); @@ -83,8 +82,8 @@ int CheatMenu(const char * gameID) titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); titleTxt.SetMaxWidth(350, GuiText::SCROLL); titleTxt.SetPosition(12,40); - - for(int i = 0; i <= cntcheats; i++) + + for(int i = 0; i <= cntcheats; i++) { cheatslst.SetValue(i, "%s",c.getCheatName(i).c_str()); cheatslst.SetName(i, "OFF"); @@ -99,65 +98,65 @@ int CheatMenu(const char * gameID) w.Append(&chtBrowser); mainWindow->Append(&w); ResumeGui(); - + while(!exit) { - VIDEO_WaitVSync (); + VIDEO_WaitVSync (); - ret = chtBrowser.GetClickedOption(); - if (ret != -1) - { - const char *strCheck = cheatslst.GetName(ret); - if (strncmp(strCheck,"ON",2) == 0) - { - cheatslst.SetName(ret,"%s","OFF"); - } - else if (strncmp(strCheck,"OFF",3) == 0) - { - cheatslst.SetName(ret,"%s","ON"); - } - } + ret = chtBrowser.GetClickedOption(); + if (ret != -1) + { + const char *strCheck = cheatslst.GetName(ret); + if (strncmp(strCheck,"ON",2) == 0) + { + cheatslst.SetName(ret,"%s","OFF"); + } + else if (strncmp(strCheck,"OFF",3) == 0) + { + cheatslst.SetName(ret,"%s","ON"); + } + } - if(createBtn.GetState() == STATE_CLICKED) - { - createBtn.ResetState(); - if (cntcheats > 0) - { - int selectednrs[30]; - int x = 0; - for(int i = 0; i <= cntcheats; i++) - { - const char *strCheck = cheatslst.GetName(i); - if (strncmp(strCheck,"ON",2) == 0) - { - selectednrs[x] = i; - x++; - } - } + if(createBtn.GetState() == STATE_CLICKED) + { + createBtn.ResetState(); + if (cntcheats > 0) + { + int selectednrs[30]; + int x = 0; + for(int i = 0; i <= cntcheats; i++) + { + const char *strCheck = cheatslst.GetName(i); + if (strncmp(strCheck,"ON",2) == 0) + { + selectednrs[x] = i; + x++; + } + } - string chtpath = Settings.Cheatcodespath; - string gctfname = chtpath + c.getGameID() + ".gct"; - c.createGCT(selectednrs,x,gctfname.c_str()); - WindowPrompt(tr("GCT File created"),NULL,tr("OK"),NULL,NULL,NULL,-1); - exit = true; - break; - } else WindowPrompt(tr("Error"),tr("Could not create GCT file"),tr("OK"),NULL,NULL,NULL,-1); - - } + string chtpath = Settings.Cheatcodespath; + string gctfname = chtpath + c.getGameID() + ".gct"; + c.createGCT(selectednrs,x,gctfname.c_str()); + WindowPrompt(tr("GCT File created"),NULL,tr("OK")); + exit = true; + break; + } else WindowPrompt(tr("Error"),tr("Could not create GCT file"),tr("OK")); - if(backBtn.GetState() == STATE_CLICKED) - { - backBtn.ResetState(); - exit = true; - break; - } -} -HaltGui(); -mainWindow->Remove(&w); -ResumeGui(); - -break; -} - -return choice; + } + + if(backBtn.GetState() == STATE_CLICKED) + { + backBtn.ResetState(); + exit = true; + break; + } + } + HaltGui(); + mainWindow->Remove(&w); + ResumeGui(); + + break; + } + + return choice; } diff --git a/source/fatmounter.c b/source/fatmounter.c index 1d55c943..4c8788e5 100644 --- a/source/fatmounter.c +++ b/source/fatmounter.c @@ -1,7 +1,5 @@ #include #include -#include -#include #include #include #include @@ -40,14 +38,12 @@ int isSdInserted() return __io_wiisd.isInserted(); } -DISC_INTERFACE **_FAT_partition_getPartitionFromPath (const char* path); int isInserted(const char *path) { if(!strncmp(path, "USB:", 4)) return 1; -// if(!strncmp(path, "SD:", 3)) - return __io_wiisd.isInserted(); - return 0; + + return __io_wiisd.isInserted(); } int SDCard_Init() { diff --git a/source/gct.cpp b/source/gct.cpp index 1ade4a7c..28e80fbb 100644 --- a/source/gct.cpp +++ b/source/gct.cpp @@ -1,5 +1,9 @@ +#include +#include #include "gct.h" +#define OUTOFRANGE "Error:Range" + GCTCheats::GCTCheats(void) { iCntCheats = 0; @@ -26,7 +30,7 @@ string GCTCheats::getGameID(void) string GCTCheats::getCheat(int nr) { - if (nr <= (iCntCheats-1)) + if (nr <= (iCntCheats-1)) { return sCheats[nr]; } @@ -38,7 +42,7 @@ string GCTCheats::getCheat(int nr) string GCTCheats::getCheatName(int nr) { - if (nr <= (iCntCheats-1)) + if (nr <= (iCntCheats-1)) { return sCheatName[nr]; } @@ -50,7 +54,7 @@ string GCTCheats::getCheatName(int nr) string GCTCheats::getCheatComment(int nr) { - if (nr <= (iCntCheats-1)) + if (nr <= (iCntCheats-1)) { return sCheatComment[nr]; } @@ -67,7 +71,7 @@ int GCTCheats::createGCT(int nr,const char * filename) if (filestr.fail()) return 0; - + //Reversed Header and Footer char header[] = { 0x00, 0xd0, 0xc0, 0xde, 0x00, 0xd0, 0xc0, 0xde}; char footer[] = { 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; @@ -124,7 +128,7 @@ int GCTCheats::createGCT(const char * chtbuffer,const char * filename) filestr.write(footer,sizeof(footer)); filestr.close(); - + return 1; } @@ -136,7 +140,7 @@ int GCTCheats::createGCT(int nr[],int cnt,const char * filename) if (filestr.fail()) return 0; - + //Reversed Header and Footer char header[] = { 0x00, 0xd0, 0xc0, 0xde, 0x00, 0xd0, 0xc0, 0xde}; char footer[] = { 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; @@ -151,7 +155,7 @@ int GCTCheats::createGCT(int nr[],int cnt,const char * filename) long int li; int len = buf.size(); int x = 0; - + while (x < len) { string temp = buf.substr(x,2); @@ -164,7 +168,7 @@ int GCTCheats::createGCT(int nr[],int cnt,const char * filename) } filestr.write(footer,sizeof(footer)); -filestr.close(); +filestr.close(); return 1; } @@ -182,7 +186,7 @@ int GCTCheats::openTxtfile(const char * filename) int size = filestr.tellg(); if (size <= 0) return -1; filestr.seekg(0,ios_base::beg); - + getline(filestr,sGameID); getline(filestr,sGameTitle); filestr.ignore(); @@ -211,12 +215,12 @@ int GCTCheats::openTxtfile(const char * filename) printf ("%i",str.size()); } - if (!isComment) + if (!isComment) { cheatdata.append(str); size_t found=cheatdata.find(' '); cheatdata.replace(found,1,""); - } else + } else { sCheatComment[i] = str; } @@ -247,7 +251,7 @@ return 1; int size = filestr.tellg(); if (size <= 0) return -1; filestr.seekg(0,ios_base::beg); - + getline(filestr,sGameID); getline(filestr,sGameTitle); filestr.ignore(); diff --git a/source/gct.h b/source/gct.h index 53b141e8..c19fc6f0 100644 --- a/source/gct.h +++ b/source/gct.h @@ -1,26 +1,21 @@ /* * gct.h * Class to handle Ocarina TXT Cheatfiles - * WIP: Actually its needed to call fatInitDefault() or the file will not be found + * WIP: Actually its needed to call fatInitDefault() or the file will not be found * and no Comments supported for now */ - + #ifndef _GCT_H #define _GCT_H - -#include -#include + #include -#define OUTOFRANGE "Error:Range" #define MAXCHEATS 40 -#define GCT_PATH "sd:/codes/" -#define GECKOSITE "http://www.usbgecko.com/codes/codes/" using namespace std; struct chtentrie -{ +{ string sGameID; string sGameTitle; string sCheatName[MAXCHEATS]; @@ -29,7 +24,7 @@ struct chtentrie int iCntCheats; }; -//!Handles Ocarina TXT Cheatfiles +//!Handles Ocarina TXT Cheatfiles class GCTCheats { private: @@ -40,11 +35,11 @@ private: string sCheats[MAXCHEATS]; string sCheatComment[MAXCHEATS]; int iCntCheats; - + public: struct chtentries -{ +{ string sGameID; string sGameTitle; string sCheatName[MAXCHEATS]; @@ -104,7 +99,7 @@ struct chtentries //!\param filename name of TXT file //!\return struct chtentries struct chtentries getCheatList(const char * filename); - + int download_txtcheat(int id); }; diff --git a/source/libwiigui/gui_gamegrid.cpp b/source/libwiigui/gui_gamegrid.cpp index 8eaac03c..e9fe2db0 100644 --- a/source/libwiigui/gui_gamegrid.cpp +++ b/source/libwiigui/gui_gamegrid.cpp @@ -35,7 +35,7 @@ extern const int vol; -int mover=0, mover2=0; +int mover=0, mover2=0; u8 goback=0; int goLeft = 0, goRight=0; char debugbuffer[100]; @@ -64,18 +64,18 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char char imgPath[100]; rows =3; drawTTs=0; - - - + + + if ((count<42)&&(rows==3))rows=2; if ((count<16)&&(rows==2))rows=1; if (gameCnt<6)gameCnt=6; - + if (rows==1)pagesize = 6; else if (rows==2)pagesize = 16; else if (rows==3)pagesize = 42; - - + + //if (realCntSetTrigger(trigL); btnLeft->SetTrigger(trigMinus); btnLeft->SetEffectGrow(); - + /*debugTxt = new GuiText("fag", 14, (GXColor){0,0,0, 255}); debugTxt->SetParent(this); - debugTxt->SetAlignment(2,5); - debugTxt->SetPosition(0,180);*/ - + debugTxt->SetAlignment(2,5); + debugTxt->SetPosition(0,180);*/ + btnRightImg = new GuiImage(imgRight); btnRight = new GuiButton(0,0); @@ -132,31 +132,31 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char btnRight->SetTrigger(trigR); btnRight->SetTrigger(trigPlus); btnRight->SetEffectGrow(); - + btnRowUp = new GuiButton(0,0); btnRowUp->SetParent(this); btnRowUp->SetAlignment(ALIGN_LEFT, ALIGN_TOP); btnRowUp->SetPosition(0,0); btnRowUp->SetTrigger(trig2); - + btnRowDown = new GuiButton(0,0); btnRowDown->SetParent(this); btnRowDown->SetAlignment(ALIGN_LEFT, ALIGN_TOP); btnRowDown->SetPosition(0,0); btnRowDown->SetTrigger(trig1); - - + + // titleTxt = new GuiText("test"); - + titleTT = new GuiTooltip("test"); titleTT->SetAlignment(ALIGN_LEFT, ALIGN_TOP); titleTT->SetPosition(-100,0); titleTT->SetAlpha(THEME.tooltipAlpha); - + // if (Settings.wsprompt == yes) // installBtnTT.SetWidescreen(CFG.widescreen); - - + + //if (count>0){ gameIndex = new int[pagesize]; @@ -197,12 +197,12 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char coverImg[i]->SetWidescreen(CFG.widescreen); if (Settings.gridRows==2)coverImg[i]->SetScale(.6);//these are the numbers for 2 rows else if (Settings.gridRows==3)coverImg[i]->SetScale(.26);//these are the numbers for 3 rows - + //titleTxt[i] = new GuiText(get_title(&gameList[i]), 20, (GXColor){0,0,0, 0xff}); - - + + } - + for(int i=0; i < pagesize; i++) { game[i] = new GuiButton(160,224);//for 1 row if (Settings.gridRows==2)game[i]->SetSize(75,133);//these are the numbers for 2 rows @@ -219,29 +219,29 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char game[i]->SetClickable(true); game[i]->SetVisible(true); //coverImg[i]->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - + } - for (int i=gameCnt-1;iSetVisible(false); game[i]->SetClickable(false); game[i]->RemoveSoundOver();} - + //if(CFG.widescreen){ - + rows =Settings.gridRows; if ((count<42)&&(rows==3))rows=2; if ((count<16)&&(rows==2))rows=1; if (gameCnt<6)gameCnt=6; - + if (rows==1)pagesize = 6; else if (rows==2)pagesize = 16; else if (rows==3)pagesize = 42; - + Settings.gridRows = rows; if(isInserted(bootDevice)) { cfg_save_global(); } - + if (rows==1) { if(CFG.widescreen){ @@ -256,7 +256,7 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char game[bob[2]]->SetPosition(239,74); game[bob[3]]->SetPosition(420,74); game[bob[4]]->SetPosition(612,74); - } + } game[0]->SetSkew(-10,-44,10,-26,10,26,-10,44); game[1]->SetSkew(-6,-22,6,-14,6,14,-6,22); game[2]->SetSkew(0,-11,0,-11,0,11,0,11); @@ -315,58 +315,58 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char game[12]->SetSkew(-4.5,-27,4.5,-49,4.5,0,-4.5,0); game[13]->SetSkew(-4.5,0,4.5,0,4.5,49,-4.5,27); } - + else if (rows==3) { if(CFG.widescreen){ game[0]->SetPosition(13,58); game[1]->SetPosition(13,153); game[2]->SetPosition(13,250); - + game[3]->SetPosition(68,67); game[4]->SetPosition(68,153); game[5]->SetPosition(68,239); - + game[6]->SetPosition(120,74); game[7]->SetPosition(120,153); game[8]->SetPosition(120,232); - + game[9]->SetPosition(170,78); game[10]->SetPosition(170,153); game[11]->SetPosition(170,228); - + game[12]->SetPosition(214,80); game[13]->SetPosition(214,153); game[14]->SetPosition(214,226); - + game[15]->SetPosition(258,81); game[16]->SetPosition(258,153); game[17]->SetPosition(258,224); - + game[18]->SetPosition(302,81); game[19]->SetPosition(302,153); game[20]->SetPosition(302,223); - + game[21]->SetPosition(346,81); game[22]->SetPosition(346,153); game[23]->SetPosition(346,223); - + game[24]->SetPosition(390,80); game[25]->SetPosition(390,153); game[26]->SetPosition(390,225); - + game[27]->SetPosition(434,77); game[28]->SetPosition(434,153); game[29]->SetPosition(434,227); - + game[30]->SetPosition(484,73); game[31]->SetPosition(484,153); game[32]->SetPosition(484,231); - + game[33]->SetPosition(537,67); game[34]->SetPosition(537,153); game[35]->SetPosition(537,239); - + game[36]->SetPosition(591,58); game[37]->SetPosition(591,153); game[38]->SetPosition(591,250); @@ -375,51 +375,51 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char game[0]->SetPosition(-29,58); game[1]->SetPosition(-29,153); game[2]->SetPosition(-29,250); - + game[3]->SetPosition(33,67); game[4]->SetPosition(33,153); game[5]->SetPosition(33,239); - + game[6]->SetPosition(92,74); game[7]->SetPosition(92,153); game[8]->SetPosition(92,232); - + game[9]->SetPosition(149,78); game[10]->SetPosition(149,153); game[11]->SetPosition(149,228); - + game[12]->SetPosition(200,80); game[13]->SetPosition(200,153); game[14]->SetPosition(200,226); - + game[15]->SetPosition(251,81); game[16]->SetPosition(251,153); game[17]->SetPosition(251,224); - + game[18]->SetPosition(302,81); game[19]->SetPosition(302,153); game[20]->SetPosition(302,223); - + game[21]->SetPosition(353,81); game[22]->SetPosition(353,153); game[23]->SetPosition(353,223); - + game[24]->SetPosition(404,80); game[25]->SetPosition(404,153); game[26]->SetPosition(404,225); - + game[27]->SetPosition(457,77); game[28]->SetPosition(457,153); game[29]->SetPosition(457,227); - + game[30]->SetPosition(512,73); game[31]->SetPosition(512,153); game[32]->SetPosition(512,231); - + game[33]->SetPosition(572,67); game[34]->SetPosition(572,153); game[35]->SetPosition(572,239); - + game[36]->SetPosition(633,58); game[37]->SetPosition(633,153); game[38]->SetPosition(633,250); @@ -427,64 +427,55 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char game[0]->SetSkew(-38,-110,15,-42,15,65,-38,32); game[1]->SetSkew(-38,-75,15,-48,15,45,-38,72); game[2]->SetSkew(-38,-52,15,-70,15,27,-38,100); - + game[3]->SetSkew(-38,-70,15,-24,15,40,-38,27); game[4]->SetSkew(-38,-50,15,-35,15,40,-38,50); game[5]->SetSkew(-38,-34,15,-47,15,24,-38,58); - + game[6]->SetSkew(-27,-55,19,-22,19,30,-27,22); game[7]->SetSkew(-27,-40,19,-30,19,30,-27,40); game[8]->SetSkew(-27,-20,19,-30,19,20,-27,50); - + game[9]->SetSkew(-19,-28,0,-17,0,15,-19,10); game[10]->SetSkew(-19,-30,0,-20,0,12,-19,30); game[11]->SetSkew(-19,-15,0,-20,0,10,-19,24); - + game[12]->SetSkew(-10,-20,3,-13,3,14,-10,10); game[13]->SetSkew(-10,-20,3,-18,3,18,-10,20); game[14]->SetSkew(-10,-10,3,-10,3,0,-10,10); - + game[15]->SetSkew(-10,-15,3,-12,3,13,-10,13); game[16]->SetSkew(-10,-17,3,-10,3,10,-10,17); game[17]->SetSkew(-10,-10,3,-15,3,10,-10,10); - + game[18]->SetSkew(-10,-10,3,-10,3,14,-10,14); game[19]->SetSkew(-10,-10,3,-10,3,10,-10,10);//middle game[20]->SetSkew(-10,-10,3,-10,3,10,-10,10); - + game[21]->SetSkew(-14,-10,4,-20,3,10,-14,10); game[22]->SetSkew(-14,-10,4,-17,3,17,-14,10); game[23]->SetSkew(-14,-10,4,-10,3,10,-14,10); - + game[24]->SetSkew(-10,-13,3,-20,3,14,-10,10); game[25]->SetSkew(-10,-18,3,-20,3,20,-10,18); game[26]->SetSkew(-10,-10,3,-10,3,20,-10,5); - + game[27]->SetSkew(-19,-17,0,-28,0,10,-19,15); game[28]->SetSkew(-19,-20,0,-30,0,30,-19,12); game[29]->SetSkew(-19,-20,0,-15,0,30,-19,10); - + game[30]->SetSkew(-27,-22,19,-55,19,22,-27,30); game[31]->SetSkew(-27,-30,19,-40,19,40,-27,30); game[32]->SetSkew(-27,-30,19,-20,19,55,-27,20); - + game[33]->SetSkew(-38,-24,15,-70,15,27,-38,40); game[34]->SetSkew(-38,-35,15,-50,15,50,-38,40); game[35]->SetSkew(-38,-47,15,-34,15,58,-38,24); - + game[36]->SetSkew(-38,-42,15,-110,15,32,-38,60); game[37]->SetSkew(-38,-48,15,-75,15,70,-38,45); game[38]->SetSkew(-38,-70,15,-52,15,100,-38,27); } - - - - - // } - // else - // WindowPrompt("Oops","Your Wii must be in 16:9 mode to see the gamewall.",0, tr("OK"), 0,0); - - //} } @@ -618,9 +609,9 @@ void GuiGameGrid::Draw() LOCK(this); if(!this->IsVisible()) return; - + if(c>0){ - + int next = listOffset; for(int i=0; iDraw(); if ((wait>75)&&(Settings.tooltips == TooltipsOn)&&(drawTTs!=0)) titleTT->Draw(); - - - + + + this->UpdateEffects(); } @@ -651,7 +642,7 @@ void GuiGameGrid::Draw() /** - * Change the number of rows + * Change the number of rows */ void GuiGameGrid::ChangeRows(int n) { @@ -661,7 +652,7 @@ void GuiGameGrid::ChangeRows(int n) if(isInserted(bootDevice)) { cfg_save_global(); } - + for(int i=0; iSetWidescreen(CFG.widescreen); if (rows==2)coverImg[i]->SetScale(.6);//these are the numbers for 2 rows else if (rows==3)coverImg[i]->SetScale(.26);//these are the numbers for 3 rows - + } //set pagesize if (n==1)pagesize=6; else if (n==2)pagesize=16; else if (n==3)pagesize=42; - + firstPic=0; drawTTs=0; - + // create new buttons based on pagesize for(int i=0; i < pagesize; i++) { if (n==1)game[i]->SetSize(160,224);//for 1 row if (n==2)game[i]->SetSize(75,133);//these are the numbers for 2 rows else if (n==3)game[i]->SetSize(35,68);//these are the numbers for 3 rows - game[i]->SetPosition(0,740);//hide unused buttons + game[i]->SetPosition(0,740);//hide unused buttons game[i]->SetImage(listOffset+iSetPosition(0,0):coverImg[listOffset+i-gameCnt]->SetPosition(0,0);}// only for 1 row if (n==2){listOffset+iSetPosition(0,-50):coverImg[listOffset+i-gameCnt]->SetPosition(0,-50);}// only for 2 row if (n==3){listOffset+iSetPosition(0,-80):coverImg[listOffset+i-gameCnt]->SetPosition(0,-80);}// only for 3 row bob[i] = i; - - + + } //if(CFG.widescreen) //{ - + if (n==1) { if(CFG.widescreen){ @@ -708,14 +699,14 @@ void GuiGameGrid::ChangeRows(int n) game[bob[3]]->SetPosition(390,74); game[bob[4]]->SetPosition(550,74); } - else{ + else{ game[bob[0]]->SetPosition(-130,74); game[bob[1]]->SetPosition(60,74); game[bob[2]]->SetPosition(239,74); game[bob[3]]->SetPosition(420,74); game[bob[4]]->SetPosition(612,74); } - + game[bob[0]]->SetSkew(-10,-44,10,-26,10,26,-10,44); game[bob[1]]->SetSkew(-6,-22,6,-14,6,14,-6,22); game[bob[2]]->SetSkew(0,-11,0,-11,0,11,0,11); @@ -779,51 +770,51 @@ void GuiGameGrid::ChangeRows(int n) game[bob[0]]->SetPosition(13,58); game[bob[1]]->SetPosition(13,153); game[bob[2]]->SetPosition(13,250); - + game[bob[3]]->SetPosition(68,67); game[bob[4]]->SetPosition(68,153); game[bob[5]]->SetPosition(68,239); - + game[bob[6]]->SetPosition(120,74); game[bob[7]]->SetPosition(120,153); game[bob[8]]->SetPosition(120,232); - + game[bob[9]]->SetPosition(170,78); game[bob[10]]->SetPosition(170,153); game[bob[11]]->SetPosition(170,228); - + game[bob[12]]->SetPosition(214,80); game[bob[13]]->SetPosition(214,153); game[bob[14]]->SetPosition(214,226); - + game[bob[15]]->SetPosition(258,81); game[bob[16]]->SetPosition(258,153); game[bob[17]]->SetPosition(258,224); - + game[bob[18]]->SetPosition(302,81); game[bob[19]]->SetPosition(302,153); game[bob[20]]->SetPosition(302,223); - + game[bob[21]]->SetPosition(346,81); game[bob[22]]->SetPosition(346,153); game[bob[23]]->SetPosition(346,223); - + game[bob[24]]->SetPosition(390,80); game[bob[25]]->SetPosition(390,153); game[bob[26]]->SetPosition(390,225); - + game[bob[27]]->SetPosition(434,77); game[bob[28]]->SetPosition(434,153); game[bob[29]]->SetPosition(434,227); - + game[bob[30]]->SetPosition(484,73); game[bob[31]]->SetPosition(484,153); game[bob[32]]->SetPosition(484,231); - + game[bob[33]]->SetPosition(537,67); game[bob[34]]->SetPosition(537,153); game[bob[35]]->SetPosition(537,239); - + game[bob[36]]->SetPosition(591,58); game[bob[37]]->SetPosition(591,153); game[bob[38]]->SetPosition(591,250); @@ -832,109 +823,109 @@ void GuiGameGrid::ChangeRows(int n) game[bob[0]]->SetPosition(-29,58); game[bob[1]]->SetPosition(-29,153); game[bob[2]]->SetPosition(-29,250); - + game[bob[3]]->SetPosition(33,67); game[bob[4]]->SetPosition(33,153); game[bob[5]]->SetPosition(33,239); - + game[bob[6]]->SetPosition(92,74); game[bob[7]]->SetPosition(92,153); game[bob[8]]->SetPosition(92,232); - + game[bob[9]]->SetPosition(149,78); game[bob[10]]->SetPosition(149,153); game[bob[11]]->SetPosition(149,228); - + game[bob[12]]->SetPosition(200,80); game[bob[13]]->SetPosition(200,153); game[bob[14]]->SetPosition(200,226); - + game[bob[15]]->SetPosition(251,81); game[bob[16]]->SetPosition(251,153);// game[bob[17]]->SetPosition(251,224); - + game[bob[18]]->SetPosition(302,81);// game[bob[19]]->SetPosition(302,153);// game[bob[20]]->SetPosition(302,223);// - + game[bob[21]]->SetPosition(353,81); game[bob[22]]->SetPosition(353,153); game[bob[23]]->SetPosition(353,223); - + game[bob[24]]->SetPosition(404,80); game[bob[25]]->SetPosition(404,153); game[bob[26]]->SetPosition(404,225); - + game[bob[27]]->SetPosition(457,77); game[bob[28]]->SetPosition(457,153); game[bob[29]]->SetPosition(457,227); - + game[bob[30]]->SetPosition(512,73); game[bob[31]]->SetPosition(512,153); game[bob[32]]->SetPosition(512,231); - + game[bob[33]]->SetPosition(572,67); game[bob[34]]->SetPosition(572,153); game[bob[35]]->SetPosition(572,239); - + game[bob[36]]->SetPosition(633,58); game[bob[37]]->SetPosition(633,153); game[bob[38]]->SetPosition(633,250); } - + game[bob[0]]->SetSkew(-38,-110,15,-42,15,65,-38,32); game[bob[1]]->SetSkew(-38,-75,15,-48,15,45,-38,72); game[bob[2]]->SetSkew(-38,-52,15,-70,15,27,-38,100); - + game[bob[3]]->SetSkew(-38,-70,15,-24,15,40,-38,27); game[bob[4]]->SetSkew(-38,-50,15,-35,15,40,-38,50); game[bob[5]]->SetSkew(-38,-34,15,-47,15,24,-38,58); - + game[bob[6]]->SetSkew(-27,-55,19,-22,19,30,-27,22); game[bob[7]]->SetSkew(-27,-40,19,-30,19,30,-27,40); game[bob[8]]->SetSkew(-27,-20,19,-30,19,20,-27,50); - + game[bob[9]]->SetSkew(-19,-28,0,-17,0,15,-19,10); game[bob[10]]->SetSkew(-19,-30,0,-20,0,12,-19,30); game[bob[11]]->SetSkew(-19,-15,0,-20,0,10,-19,24); - + game[bob[12]]->SetSkew(-10,-20,3,-13,3,14,-10,10); game[bob[13]]->SetSkew(-10,-20,3,-18,3,18,-10,20); game[bob[14]]->SetSkew(-10,-10,3,-10,3,0,-10,10); - + game[bob[15]]->SetSkew(-10,-15,3,-12,3,13,-10,13); game[bob[16]]->SetSkew(-10,-17,3,-10,3,10,-10,17); game[bob[17]]->SetSkew(-10,-10,3,-15,3,10,-10,10); - + game[bob[18]]->SetSkew(-10,-10,3,-10,3,14,-10,14); game[bob[19]]->SetSkew(-10,-10,3,-10,3,10,-10,10);//middle game[bob[20]]->SetSkew(-10,-10,3,-10,3,10,-10,10); - + game[bob[21]]->SetSkew(-14,-10,4,-20,3,10,-14,10); game[bob[22]]->SetSkew(-14,-10,4,-17,3,17,-14,10); game[bob[23]]->SetSkew(-14,-10,4,-10,3,10,-14,10); - + game[bob[24]]->SetSkew(-10,-13,3,-20,3,14,-10,10); game[bob[25]]->SetSkew(-10,-18,3,-20,3,20,-10,18); game[bob[26]]->SetSkew(-10,-10,3,-10,3,20,-10,5); - + game[bob[27]]->SetSkew(-19,-17,0,-28,0,10,-19,15); game[bob[28]]->SetSkew(-19,-20,0,-30,0,30,-19,12); game[bob[29]]->SetSkew(-19,-20,0,-15,0,30,-19,10); - + game[bob[30]]->SetSkew(-27,-22,19,-55,19,22,-27,30); game[bob[31]]->SetSkew(-27,-30,19,-40,19,40,-27,30); game[bob[32]]->SetSkew(-27,-30,19,-20,19,55,-27,20); - + game[bob[33]]->SetSkew(-38,-24,15,-70,15,27,-38,40); game[bob[34]]->SetSkew(-38,-35,15,-50,15,50,-38,40); game[bob[35]]->SetSkew(-38,-47,15,-34,15,58,-38,24); - + game[bob[36]]->SetSkew(-38,-42,15,-110,15,32,-38,60); game[bob[37]]->SetSkew(-38,-48,15,-75,15,70,-38,45); game[bob[38]]->SetSkew(-38,-70,15,-52,15,100,-38,27); } - + //} } @@ -955,7 +946,7 @@ void GuiGameGrid::Update(GuiTrigger * t) //snprintf(debugbuffer, sizeof(debugbuffer), "count: %i listOffset: %i", count,listOffset); //debugTxt->SetText(debugbuffer); //debugTxt->Draw(); - + btnRight->Update(t); btnLeft->Update(t); btnRowUp->Update(t); @@ -993,11 +984,11 @@ void GuiGameGrid::Update(GuiTrigger * t) } } - + this->SetPosition(this->GetLeft()+mover2,this->GetTop()); if (goback==1)mover2= (mover2<0? mover2+1:mover2-1); if (mover2==0)goback=0; - + /*u16 buttons = ButtonsHold(); if(buttons & WPAD_BUTTON_B) { int x = t->wpad.ir.x; @@ -1008,8 +999,8 @@ void GuiGameGrid::Update(GuiTrigger * t) for(int i=0; iDraw();} //return; }*/ - - + + // navigation if(!focus || gameCnt < pagesize || (c==0)||(game[bob[0]]->GetEffect() && game[bob[pagesize-1]]->GetEffect())) return; // skip navigation @@ -1025,20 +1016,20 @@ void GuiGameGrid::Update(GuiTrigger * t) return; }goLeft=12; wait=0;wait1=0; - - + + } if (goLeft>0){ - - for (int i=1; iSetImage(coverImg[(listOffset + pagesize-i) % gameCnt]); if (rows==1)coverImg[(listOffset+i) % gameCnt]->SetPosition(0,0);// only for 1 row if (rows==3)coverImg[(listOffset + pagesize-i) % gameCnt]->SetPosition(0,-80);// only for 3 rows if (rows==2)coverImg[(listOffset + pagesize-i) % gameCnt]->SetPosition(0,-50);// only for 2 rows - + } if (mover<11){ - + if (rows==1){ if(CFG.widescreen) { @@ -1048,7 +1039,7 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[3]]->SetPosition(390-(mover * 15.1),74); game[bob[4]]->SetPosition(550-(mover * 16),74); game[bob[5]]->SetPosition(710-(mover * 16),74); - }else{ + }else{ game[bob[0]]->SetPosition(-130-(mover * 19),74); game[bob[1]]->SetPosition(60-(mover * 19),74); game[bob[2]]->SetPosition(239-(mover * 17.9),74); @@ -1056,25 +1047,25 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[4]]->SetPosition(612-(mover * 19.2),74); game[bob[5]]->SetPosition(772-(mover * 16),74); } - - - + + + //if (mover>5)game[bob[0]]->SetSkew(-10,-26,10,-44,10,44,-10,26); //SetSkew(-10(mover * ),-44(mover * ),10(mover * ),-26(mover * ), // 10(mover * ),26(mover * ),-10(mover * ),44(mover * )); - + game[bob[1]]->SetSkew(-6-(mover * .4),-22-(mover * 2.2),6+(mover * .4),-14-(mover * 1.2), 6+(mover * .4),14+(mover * 1.2),-6-(mover * .4),22+(mover * 2.2)); - + game[bob[2]]->SetSkew(0-(mover * .6),-11-(mover * 1.1),0+(mover * .6),-11-(mover * .3) ,0+(mover * .6),11+(mover * .3),0-(mover * .6),11+(mover * 1.1)); - + game[bob[3]]->SetSkew(-6+(mover * .6),-14+(mover * .3),6-(mover * .6),-22+(mover * 1.1), 6-(mover * .6),22-(mover * 1.1),-6+(mover * .6),14-(mover * .3)); - + game[bob[4]]->SetSkew(-10+(mover * .4),-26+(mover * 1.2),10-(mover * .4),-44+(mover * 2.2), 10-(mover * .4),44-(mover * 2.2),-10+(mover * .4),26-(mover * 1.2)); - + game[bob[5]]->SetSkew(-14+(mover * .4),-34+(mover * 1.2),14-(mover * .4),-66+(mover * 2.2), 14-(mover * .4),66-(mover * 2.2),-14+(mover * .4),34-(mover * 1.2)); } @@ -1082,7 +1073,7 @@ void GuiGameGrid::Update(GuiTrigger * t) { if(CFG.widescreen) { - + game[bob[0]]->SetPosition(3-(mover * 9.4),50); game[bob[1]]->SetPosition(3-(mover * 9.4),193); game[bob[2]]->SetPosition(97-(mover * 9.4),50); @@ -1117,43 +1108,43 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[14]]->SetPosition(700-(mover * 10.1),50); game[bob[15]]->SetPosition(700-(mover * 10.1),193); } - + game[bob[2]]->SetSkew(-4-(mover * .05),-22-(mover * 2.7),4+(mover * .05),-14-(mover * 1.3), 4+(mover * .05),0,-4-(mover * .05),0); - + game[bob[3]]->SetSkew(-4-(mover * .05),0,4+(mover * .05),0, 4+(mover * .05),14+(mover * 1.3),-4-(mover * .05),22+(mover * 2.7)); - + game[bob[4]]->SetSkew(0-(mover * .4),-9-(mover * 1.3),0+(mover * .4),-5-(mover * .9), 0+(mover * .4),0,0-(mover * .4),0); - + game[bob[5]]->SetSkew(0-(mover * .4),0,0+(mover * .4),0, 0+(mover *.4),5+(mover * .9),0-(mover * .4),9+(mover * 1.3)); - + game[bob[6]]->SetSkew(0,0-(mover * .9),0,0-(mover * .5), 0,0,0,0); - + game[bob[7]]->SetSkew(0,0,0,0, 0,0+(mover * .5),0,0+(mover * .9)); - + game[bob[8]]->SetSkew(0,-5+(mover * .5),0,-9+(mover * .9), 0,0,0,0); - + game[bob[9]]->SetSkew(0,0,0,0, 0,9-(mover * .9),0,5-(mover * .5)); - + game[bob[10]]->SetSkew(-4+(mover * .4),-14+(mover * .9),4-(mover * .4),-22+(mover *1.3), 4-(mover * .4),0,-4+(mover * .4),0); - + game[bob[11]]->SetSkew(-4+(mover * .4),0,4-(mover * .4),0, 4-(mover * .4),22-(mover * 1.3),-4+(mover * .4),14-(mover * .9)); - + game[bob[12]]->SetSkew(-4.5+(mover *.05),-27+(mover *1.3),4.5-(mover *.05),-49+(mover *2.7), 4.5-(mover *.05),0,-4.5+(mover *.05),0); - + game[bob[13]]->SetSkew(-4.5+(mover *.05),0,4.5-(mover *.05),0,4.5-(mover *.05), 49-(mover *2.7),-4.5+(mover *.05),27-(mover *1.3)); - + game[bob[14]]->SetSkew(-4.5,-27,4.5,-49,4.5,0,-4.5,0); game[bob[15]]->SetSkew(-4.5,0,4.5,0,4.5,49,-4.5,27); } @@ -1163,55 +1154,55 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[0]]->SetPosition(13-(mover * 5.5),58-(mover * .9)); game[bob[1]]->SetPosition(13-(mover * 5.5),153); game[bob[2]]->SetPosition(13-(mover * 5.5),250+(mover * 1.1)); - + game[bob[3]]->SetPosition(68-(mover * 5.5),67-(mover * .9)); game[bob[4]]->SetPosition(68-(mover * 5.5),153); game[bob[5]]->SetPosition(68-(mover * 5.5),239+(mover * 1.1)); - + game[bob[6]]->SetPosition(120-(mover * 5.2),74-(mover * .7)); game[bob[7]]->SetPosition(120-(mover * 5.2),153); game[bob[8]]->SetPosition(120-(mover * 5.2),232+(mover * .7)); - + game[bob[9]]->SetPosition(170-(mover * 5),78-(mover * .4)); game[bob[10]]->SetPosition(170-(mover * 5),153); game[bob[11]]->SetPosition(170-(mover * 5),228+(mover * .4)); - + game[bob[12]]->SetPosition(214-(mover * 4.4),80-(mover * .2)); game[bob[13]]->SetPosition(214-(mover * 4.4),153); game[bob[14]]->SetPosition(214-(mover * 4.4),226+(mover * .2)); - + game[bob[15]]->SetPosition(258-(mover * 4.4),81-(mover * .1)); game[bob[16]]->SetPosition(258-(mover * 4.4),153); game[bob[17]]->SetPosition(258-(mover * 4.4),224+(mover * .2)); - + game[bob[18]]->SetPosition(302-(mover * 4.4),81); game[bob[19]]->SetPosition(302-(mover * 4.4),153); game[bob[20]]->SetPosition(302-(mover * 4.4),223+(mover * .1)); - + game[bob[21]]->SetPosition(346-(mover * 4.4),81); game[bob[22]]->SetPosition(346-(mover * 4.4),153); game[bob[23]]->SetPosition(346-(mover * 4.4),223); - + game[bob[24]]->SetPosition(390-(mover * 4.4),80+(mover * .1)); game[bob[25]]->SetPosition(390-(mover * 4.4),153); game[bob[26]]->SetPosition(390-(mover * 4.4),225-(mover * .2)); - + game[bob[27]]->SetPosition(434-(mover * 4.4),77+(mover * .3)); game[bob[28]]->SetPosition(434-(mover * 4.4),153); game[bob[29]]->SetPosition(434-(mover * 4.4),227-(mover * .2)); - + game[bob[30]]->SetPosition(484-(mover * 5),73+(mover * .4)); game[bob[31]]->SetPosition(484-(mover * 5),153); game[bob[32]]->SetPosition(484-(mover * 5),231-(mover * .4)); - + game[bob[33]]->SetPosition(537-(mover * 5.3),67+(mover * .6)); game[bob[34]]->SetPosition(537-(mover * 5.3),153); game[bob[35]]->SetPosition(537-(mover * 5.3),239-(mover * .8)); - + game[bob[36]]->SetPosition(591-(mover * 5.4),58+(mover * .9)); game[bob[37]]->SetPosition(591-(mover * 5.4),153); game[bob[38]]->SetPosition(591-(mover * 5.4),250-(mover * 1.1)); - + game[bob[39]]->SetPosition(645-(mover * 5.4),58); game[bob[40]]->SetPosition(645-(mover * 5.4),153); game[bob[41]]->SetPosition(645-(mover * 5.4),250); @@ -1220,121 +1211,121 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[0]]->SetPosition(-29-(mover * 6.2),58-(mover * .9)); game[bob[1]]->SetPosition(-29-(mover * 6.2),153); game[bob[2]]->SetPosition(-29-(mover * 6.2),250+(mover * 1.1)); - + game[bob[3]]->SetPosition(33-(mover * 6.2),67-(mover * .9)); game[bob[4]]->SetPosition(33-(mover * 6.2),153); game[bob[5]]->SetPosition(33-(mover * 6.2),239+(mover * 1.1)); - + game[bob[6]]->SetPosition(92-(mover * 5.9),74-(mover * .7)); game[bob[7]]->SetPosition(92-(mover * 5.9),153); game[bob[8]]->SetPosition(92-(mover * 5.9),232+(mover * .7)); - + game[bob[9]]->SetPosition(149-(mover * 5.7),78-(mover * .4)); game[bob[10]]->SetPosition(149-(mover * 5.7),153); game[bob[11]]->SetPosition(149-(mover * 5.7),228+(mover * .4)); - + game[bob[12]]->SetPosition(200-(mover * 5.1),80-(mover * .2)); game[bob[13]]->SetPosition(200-(mover * 5.1),153); game[bob[14]]->SetPosition(200-(mover * 5.1),226+(mover * .2)); - + game[bob[15]]->SetPosition(251-(mover * 5.1),81-(mover * .1)); game[bob[16]]->SetPosition(251-(mover * 5.1),153);// game[bob[17]]->SetPosition(251-(mover * 5.1),224+(mover * .2)); - + game[bob[18]]->SetPosition(302-(mover * 5.1),81);// game[bob[19]]->SetPosition(302-(mover * 5.1),153);// game[bob[20]]->SetPosition(302-(mover * 5.1),223+(mover * .1));// - + game[bob[21]]->SetPosition(353-(mover * 5.1),81); game[bob[22]]->SetPosition(353-(mover * 5.1),153); game[bob[23]]->SetPosition(353-(mover * 5.1),223); - + game[bob[24]]->SetPosition(404-(mover * 5.1),80+(mover * .1)); game[bob[25]]->SetPosition(404-(mover * 5.1),153); game[bob[26]]->SetPosition(404-(mover * 5.1),225-(mover * .2)); - + game[bob[27]]->SetPosition(457-(mover * 5.3),77+(mover * .3)); game[bob[28]]->SetPosition(457-(mover * 5.3),153); game[bob[29]]->SetPosition(457-(mover * 5.3),227-(mover * .2)); - + game[bob[30]]->SetPosition(512-(mover * 5.5),73+(mover * .4)); game[bob[31]]->SetPosition(512-(mover * 5.5),153); game[bob[32]]->SetPosition(512-(mover * 5.5),231-(mover * .4)); - + game[bob[33]]->SetPosition(572-(mover * 6),67+(mover * .6)); game[bob[34]]->SetPosition(572-(mover * 6),153); game[bob[35]]->SetPosition(572-(mover * 6),239-(mover * .8)); - + game[bob[36]]->SetPosition(633-(mover * 6.1),58+(mover * .9)); game[bob[37]]->SetPosition(633-(mover * 6.1),153); game[bob[38]]->SetPosition(633-(mover * 6.1),250-(mover * 1.1)); - + game[bob[39]]->SetPosition(687-(mover * 5.4),58); game[bob[40]]->SetPosition(687-(mover * 5.4),153); game[bob[41]]->SetPosition(687-(mover * 5.4),250); } - + //game[bob[0]]->SetSkew(-38,-110,15,-42,15,65,-38,32); //game[bob[1]]->SetSkew(-38,-75,15,-48,15,45,-38,72); //game[bob[2]]->SetSkew(-38,-52,15,-70,15,27,-38,100); - + game[bob[3]]->SetSkew(-38,-70-(mover * 4),15,-24-(mover * 1.8),15,40+(mover * 1.5),-38,27+(mover * .5)); game[bob[4]]->SetSkew(-38,-50-(mover * 2.5),15,-35-(mover * .7),15,40-(mover * .5),-38,50+(mover * 1.2)); game[bob[5]]->SetSkew(-38,-34-(mover * 1.8),15,-47-(mover * 2.3),15,24+(mover * .3),-38,58+(mover * 4.2)); - + game[bob[6]]->SetSkew(-27-(mover * 1.1),-55-(mover * 1.5),19-(mover * .4),-22-(mover * .2),19-(mover * .4),30+(mover * 1),-27-(mover * 1.1),22+(mover * .5)); game[bob[7]]->SetSkew(-27-(mover * 1.1),-40-(mover * 1),19-(mover * .4),-30-(mover * .5),19-(mover * .4),30-(mover * 1),-27-(mover * 1.1),40+(mover * 1)); game[bob[8]]->SetSkew(-27-(mover * 1.1),-20-(mover * 1.4),19-(mover * .4),-30-(mover * 1.7),19-(mover * .4),20+(mover * .4),-27-(mover * 1.1),50+(mover * .8)); - + game[bob[9]]->SetSkew(-19-(mover * .8),-28-(mover * 1.7),0+(mover * 1.9),-17-(mover * .5),0+(mover * 1.9),15+(mover * 1.5),-19-(mover * .8),10+(mover * 1.2)); game[bob[10]]->SetSkew(-19-(mover * .8),-30-(mover * 1),0+(mover * 1.9),-20-(mover * 1),0+(mover * 1.9),12+(mover * 1.8),-19-(mover * .8),30+(mover * 1)); game[bob[11]]->SetSkew(-19-(mover * .8),-15-(mover * .5),0+(mover * 1.9),-20-(mover * 1),0+(mover * 1.9),10+(mover * 1),-19-(mover * .8),24+(mover * 2.2)); - + game[bob[12]]->SetSkew(-10-(mover * .9),-20-(mover * .8),3-(mover * .3),-13-(mover * .4),3-(mover * .3),14+(mover * .1),-10-(mover * .9),10); game[bob[13]]->SetSkew(-10-(mover * .9),-20-(mover * 1),3-(mover * .3),-18-(mover * .2),3-(mover * .3),18-(mover * .1),-10-(mover * .9),20+(mover * 1)); game[bob[14]]->SetSkew(-10-(mover * .9),-10-(mover * .5),3-(mover * .3),-10-(mover * 1),3-(mover * .3),0+(mover * 1),-10-(mover * .9),10+(mover * 1.4)); - + game[bob[15]]->SetSkew(-10,-15-(mover * .5),3,-12-(mover * .1),3,13+(mover * .1),-10,13-(mover * .3)); game[bob[16]]->SetSkew(-10,-17-(mover * .3),3,-10-(mover * .8),3,10+(mover * .8),-10,17+(mover * .3)); game[bob[17]]->SetSkew(-10,-10,3,-15+(mover * .5),3,10-(mover * 1),-10,10); - + game[bob[18]]->SetSkew(-10,-10-(mover * .5),3,-10-(mover * .2),3,14-(mover * .1),-10,14-(mover * .1)); game[bob[19]]->SetSkew(-10,-10-(mover * .7),3,-10,3,10,-10,10+(mover * .7));//middle game[bob[20]]->SetSkew(-10,-10,3,-10-(mover * .5),3,10,-10,10); - + game[bob[21]]->SetSkew(-14,-10,4-(mover * .1),-20+(mover * 1),3,10+(mover * .4),-14,10); game[bob[22]]->SetSkew(-14,-10,4-(mover * .1),-17+(mover * .7),3,17-(mover * .7),-14,10); game[bob[23]]->SetSkew(-14,-10,4-(mover * .1),-10,3,10,-14+(mover * .4),10); - + game[bob[24]]->SetSkew(-10-(mover * .4),-13-(mover * .3),3+(mover * .1),-20,3,14-(mover * .4),-10-(mover * .4),10); game[bob[25]]->SetSkew(-10-(mover * .4),-18-(mover * .8),3+(mover * .1),-20+(mover * .3),3,20-(mover * .3),-10-(mover * .4),18-(mover * .8)); game[bob[26]]->SetSkew(-10-(mover * .4),-10,3+(mover * .1),-10,3,20-(mover * 1),-10-(mover * .4),5+(mover * .5)); - + game[bob[27]]->SetSkew(-19+(mover * .9),-17+(mover * .4),0+(mover * .3),-28+(mover * .8),0+(mover * .3),10+(mover * .4),-19+(mover * .9),15-(mover * .5)); game[bob[28]]->SetSkew(-19+(mover * .9),-20+(mover * .2),0+(mover * .3),-30+(mover * 1),0+(mover * .3),20-(mover * 1),-19+(mover * .9),12+(mover * .6)); game[bob[29]]->SetSkew(-19+(mover * .9),-20+(mover * 1),0+(mover * .3),-15+(mover * .5),0+(mover * .3),30-(mover * 1),-19+(mover * .9),10); - + game[bob[30]]->SetSkew(-27+(mover * .8),-22+(mover * .5),19-(mover * .9),-55+(mover * 1.7),19-(mover * .9),22-(mover * 1.2),-27+(mover * .8),30-(mover * 1.5)); game[bob[31]]->SetSkew(-27+(mover * .8),-30+(mover * 1),19-(mover * .9),-40+(mover * 1),19-(mover * .9),40-(mover * 2),-27+(mover * .8),30-(mover * 1.8)); game[bob[32]]->SetSkew(-27+(mover * .8),-30+(mover * 1),19-(mover * .9),-20+(mover * .5),19-(mover * .9),55-(mover * 1.5),-27+(mover * .8),20-(mover * 1)); - + game[bob[33]]->SetSkew(-38+(mover * 1.1),-24+(mover * .2),15+(mover * .4),-70+(mover * 1.5),15+(mover * .4),27-(mover * .5),-38+(mover * 1.1),40-(mover * 1)); game[bob[34]]->SetSkew(-38+(mover * 1.1),-35+(mover * .5),15+(mover * .4),-50+(mover * 1),15+(mover * .4),50-(mover * 1),-38+(mover * 1.1),40-(mover * 1)); game[bob[35]]->SetSkew(-38+(mover * 1.1),-47+(mover * 1.7),15+(mover * .4),-34+(mover * 1.4),15+(mover * .4),58-(mover * .3),-38+(mover * 1.1),24-(mover * .4)); - + game[bob[36]]->SetSkew(-38,-42+(mover * 1.8),15,-110+(mover * 4),15,32-(mover * .5),-38,60-(mover * 2)); game[bob[37]]->SetSkew(-38,-48+(mover * 1.3),15,-75+(mover * 2.5),15,70-(mover * 2),-38,45-(mover * .5)); game[bob[38]]->SetSkew(-38,-70+(mover * 2.3),15,-52+(mover * 1.8),15,100-(mover * 4.2),-38,27-(mover * .3)); - + game[bob[39]]->SetSkew(-38,-42,15,-110,15,32,-38,60); game[bob[40]]->SetSkew(-38,-48,15,-75,15,65,-38,45); game[bob[41]]->SetSkew(-38,-70,15,-52,15,100,-38,27); } - - + + mover++; goLeft--; - + } else {goLeft=0;mover=0; listOffset = (listOffset+rows < gameCnt) ? listOffset+rows : ((listOffset+rows) - gameCnt); @@ -1343,10 +1334,10 @@ void GuiGameGrid::Update(GuiTrigger * t) for (int i=0; iRight() || btnRight->GetState() == STATE_CLICKED) { WPAD_ScanPads(); u16 buttons = 0; @@ -1359,26 +1350,26 @@ void GuiGameGrid::Update(GuiTrigger * t) } goRight=12; wait=0;wait1=0; - - - - + + + + } if (goRight>0){ if (mover<11){ - - - - for (int i=1; i<(rows+1); i++){ + + + + for (int i=1; i<(rows+1); i++){ int tmp = listOffset-i; - + if (tmp<0)tmp=(gameCnt-i); - + game[bob[pagesize-(i)]]->SetImage(coverImg[tmp]); - + if (rows==1)coverImg[tmp]->SetPosition(0,0);// only for 1 row if (rows==3)coverImg[tmp]->SetPosition(0,-80);// only for 3 rows - if (rows==2)coverImg[tmp]->SetPosition(0,-50);// only for 2 rows + if (rows==2)coverImg[tmp]->SetPosition(0,-50);// only for 2 rows } if (rows==1){ if(CFG.widescreen) @@ -1389,7 +1380,7 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[3]]->SetPosition(390+(mover * 16),74); game[bob[4]]->SetPosition(550+(mover * 16),74); game[bob[5]]->SetPosition(-230+(mover * 16),74); - }else{ + }else{ game[bob[5]]->SetPosition(-290+(mover * 16),74); game[bob[0]]->SetPosition(-130+(mover * 19),74); game[bob[1]]->SetPosition(60+(mover * 17.9),74); @@ -1397,22 +1388,22 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[3]]->SetPosition(420+(mover * 19.2),74); game[bob[4]]->SetPosition(612+(mover * 19.2),74); } - + game[bob[0]]->SetSkew(-10+(mover * .4),-44+(mover * 2.2),10-(mover * .4),-26+(mover * 1.2), 10-(mover * .4),26-(mover * 1.2),-10+(mover * .4),44-(mover * 2.2)); - + game[bob[1]]->SetSkew(-6+(mover * .6),-22+(mover * 1.1),6-(mover * .6),-14+(mover * .3), 6-(mover * .6),14-(mover * .3),-6+(mover * .6),22-(mover * 1.1)); - + game[bob[2]]->SetSkew(0-(mover * .6),-11-(mover * .3),0+(mover * .6),-11-(mover * 1.1) ,0+(mover * .6),11+(mover * 1.1),0-(mover * .6),11+(mover * .3)); - + game[bob[3]]->SetSkew(-6-(mover * .4),-14-(mover * 1.2),6+(mover * .4),-22-(mover * 2.2), 6+(mover * .4),22+(mover * 2.2),-6-(mover * .4),14+(mover * 1.2)); - + game[bob[4]]->SetSkew(-10-(mover * .4),-26+(mover * 1.2),10+(mover * .4),-44-(mover * 2.2), 10+(mover * .4),44+(mover * 2.2),-10-(mover * .4),26+(mover * 1.2)); - + game[bob[5]]->SetSkew(-10,-44,10,-26,10,26,-10,44); } else if (rows==2) @@ -1453,46 +1444,46 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[14]]->SetPosition(-155+(mover * 10.1),50); game[bob[15]]->SetPosition(-155+(mover * 10.1),193); } - - + + game[bob[0]]->SetSkew(-4.5+(mover * .05),-49+(mover * 2.7),4.5-(mover * .05),-27+(mover * 1.3), 4.5-(mover * .05),0,-4.5+(mover * .05),0); - + game[bob[1]]->SetSkew(-4.5+(mover * .05),0,4.5-(mover * .05),0, 4.5-(mover * .05),27-(mover * 1.3),-4.5+(mover * .05),49-(mover * 2.7)); - + game[bob[2]]->SetSkew(-4+(mover * .4),-22+(mover * 1.3),4-(mover * .4),-14+(mover * .9), 4-(mover * .4),0,-4+(mover * .4),0); - + game[bob[3]]->SetSkew(-4+(mover * .4),0,4-(mover * .4),0, 4-(mover * .4),14-(mover * .9),-4+(mover * .4),22-(mover * 1.3)); - + game[bob[4]]->SetSkew(0,-9+(mover * .9),0,-5+(mover * .5), 0,0,0,0); - + game[bob[5]]->SetSkew(0,0,0,0, 0,5-(mover * .5),0,9-(mover * .9)); - + game[bob[6]]->SetSkew(0,0-(mover * .5),0,0-(mover * .9), 0,0,0,0); - + game[bob[7]]->SetSkew(0,0,0,0, 0,0+(mover * .9),0,0+(mover * .5)); - + game[bob[8]]->SetSkew(0-(mover * .4),-5-(mover * .9),0+(mover * .4),-9-(mover * 1.3), 0+(mover * .4),0,0-(mover * .4),0); - + game[bob[9]]->SetSkew(0-(mover * .4),0,0+(mover * .4),0, 0+(mover * .4),9+(mover * 1.3),0-(mover * .4),5+(mover * .9)); - + game[bob[10]]->SetSkew(-4-(mover * .05),-14-(mover * 1.3),4+(mover * .05),-22-(mover * 2.7), 4+(mover * .05),0,-4-(mover * .05),0); - + game[bob[11]]->SetSkew(-4-(mover * .05),0,4+(mover * .05),0, 4+(mover * .05),22+(mover * 2.7),-4-(mover * .05),14+(mover * 1.3)); - + game[bob[12]]->SetSkew(-4.5,-27,4.5,-49,4.5,0,-4.5,0); - + game[bob[13]]->SetSkew(-4.5,0,4.5,0,4.5,49,-4.5,27); game[bob[14]]->SetSkew(-4.5,-49,4.5,-27,4.5,0,-4.5,0); game[bob[15]]->SetSkew(-4.5,0,4.5,0,4.5,27,-4.5,49); @@ -1503,113 +1494,113 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[39]]->SetPosition(-42+(mover *5.5),58); game[bob[40]]->SetPosition(-42+(mover *5.5),153); game[bob[41]]->SetPosition(-42+(mover *5.5),250); - + game[bob[0]]->SetPosition(13+(mover *5.5),58+(mover *.9)); game[bob[1]]->SetPosition(13+(mover *5.5),153); game[bob[2]]->SetPosition(13+(mover *5.5),250-(mover *1.1)); - + game[bob[3]]->SetPosition(68+(mover *5.2),67+(mover *.7)); game[bob[4]]->SetPosition(68+(mover *5.2),153); game[bob[5]]->SetPosition(68+(mover *5.2),239-(mover *.7)); - + game[bob[6]]->SetPosition(120+(mover *5),74+(mover *.4)); game[bob[7]]->SetPosition(120+(mover *5),153); game[bob[8]]->SetPosition(120+(mover *5),232-(mover *.4)); - + game[bob[9]]->SetPosition(170+(mover *4.4),78+(mover *.2)); game[bob[10]]->SetPosition(170+(mover *4.4),153); game[bob[11]]->SetPosition(170+(mover *4.4),228-(mover *.2)); - + game[bob[12]]->SetPosition(214+(mover *4.4),80+(mover *.1)); game[bob[13]]->SetPosition(214+(mover *4.4),153); game[bob[14]]->SetPosition(214+(mover *4.4),226-(mover *.2)); - + game[bob[15]]->SetPosition(258+(mover *4.4),81); game[bob[16]]->SetPosition(258+(mover *4.4),153); game[bob[17]]->SetPosition(258+(mover *4.4),224-(mover *.1)); - + game[bob[18]]->SetPosition(302+(mover *4.4),81); game[bob[19]]->SetPosition(302+(mover *4.4),153); game[bob[20]]->SetPosition(302+(mover *4.4),223); - + game[bob[21]]->SetPosition(346+(mover *4.4),81-(mover *.1)); game[bob[22]]->SetPosition(346+(mover *4.4),153); game[bob[23]]->SetPosition(346+(mover *4.4),223+(mover *.2)); - + game[bob[24]]->SetPosition(390+(mover *4.4),80-(mover *.3)); game[bob[25]]->SetPosition(390+(mover *4.4),153); game[bob[26]]->SetPosition(390+(mover *4.4),225+(mover *.2)); - + game[bob[27]]->SetPosition(434+(mover *5),77-(mover *.4)); game[bob[28]]->SetPosition(434+(mover *5),153); game[bob[29]]->SetPosition(434+(mover *5),227+(mover *.4)); - + game[bob[30]]->SetPosition(484+(mover *5.3),73-(mover *.6)); game[bob[31]]->SetPosition(484+(mover *5.3),153); game[bob[32]]->SetPosition(484+(mover *5.3),231+(mover *.8)); - + game[bob[33]]->SetPosition(537+(mover *5.4),67-(mover *.9)); game[bob[34]]->SetPosition(537+(mover *5.4),153); game[bob[35]]->SetPosition(537+(mover *5.4),239+(mover *1.1)); - + game[bob[36]]->SetPosition(591+(mover *5.4),58); game[bob[37]]->SetPosition(591+(mover *5.4),153); game[bob[38]]->SetPosition(591+(mover *5.4),250); - + } else{ game[bob[39]]->SetPosition(-84+(mover *5.5),58); game[bob[40]]->SetPosition(-84+(mover *5.5),153); game[bob[41]]->SetPosition(-84+(mover *5.5),250); - + game[bob[0]]->SetPosition(-29+(mover * 6.2),58+(mover * .9)); game[bob[1]]->SetPosition(-29+(mover * 6.2),153); game[bob[2]]->SetPosition(-29+(mover * 6.2),250-(mover * 1.1)); - + game[bob[3]]->SetPosition(33+(mover * 5.9),67+(mover * .7)); game[bob[4]]->SetPosition(33+(mover * 5.9),153); game[bob[5]]->SetPosition(33+(mover * 5.9),239-(mover * .7)); - + game[bob[6]]->SetPosition(92+(mover * 5.7),74+(mover * .4)); game[bob[7]]->SetPosition(92+(mover * 5.7),153); game[bob[8]]->SetPosition(92+(mover * 5.7),232-(mover * .4)); - + game[bob[9]]->SetPosition(149+(mover * 5.1),78+(mover * .2)); game[bob[10]]->SetPosition(149+(mover * 5.1),153); game[bob[11]]->SetPosition(149+(mover * 5.1),228-(mover * .2)); - + game[bob[12]]->SetPosition(200+(mover * 5.1),80+(mover * .1)); game[bob[13]]->SetPosition(200+(mover * 5.1),153); game[bob[14]]->SetPosition(200+(mover * 5.1),226-(mover * .2)); - + game[bob[15]]->SetPosition(251+(mover * 5.1),81); game[bob[16]]->SetPosition(251+(mover * 5.1),153);// game[bob[17]]->SetPosition(251+(mover * 5.1),224-(mover * .1)); - + game[bob[18]]->SetPosition(302+(mover * 5.2),81);// game[bob[19]]->SetPosition(302+(mover * 5.2),153);// game[bob[20]]->SetPosition(302+(mover * 5.2),223);// - + game[bob[21]]->SetPosition(353+(mover * 5.1),81-(mover * .1)); game[bob[22]]->SetPosition(353+(mover * 5.1),153); game[bob[23]]->SetPosition(353+(mover * 5.1),223+(mover * .2)); - + game[bob[24]]->SetPosition(404+(mover * 5.3),80-(mover * .3)); game[bob[25]]->SetPosition(404+(mover * 5.3),153); game[bob[26]]->SetPosition(404+(mover * 5.3),225+(mover * .2)); - + game[bob[27]]->SetPosition(457+(mover * 5.5),77-(mover * .4)); game[bob[28]]->SetPosition(457+(mover * 5.5),153); game[bob[29]]->SetPosition(457+(mover * 5.5),227+(mover * .4)); - + game[bob[30]]->SetPosition(512+(mover * 6),73-(mover * .6)); game[bob[31]]->SetPosition(512+(mover * 6),153); game[bob[32]]->SetPosition(512+(mover * 6),231+(mover * .8)); - + game[bob[33]]->SetPosition(572+(mover * 6),67-(mover * .9)); game[bob[34]]->SetPosition(572+(mover * 6),153); game[bob[35]]->SetPosition(572+(mover * 6),239+(mover * 1.1)); - + game[bob[36]]->SetPosition(633+(mover * 6),58); game[bob[37]]->SetPosition(633+(mover * 6),153); game[bob[38]]->SetPosition(633+(mover * 6),250); @@ -1617,63 +1608,63 @@ void GuiGameGrid::Update(GuiTrigger * t) game[bob[39]]->SetSkew(-38,-110,15,-42,15,65,-38,32); game[bob[40]]->SetSkew(-38,-75,15,-48,15,45,-38,72); game[bob[41]]->SetSkew(-38,-52,15,-70,15,27,-38,100); - + game[bob[0]]->SetSkew(-38,-110+(mover * .4),15,-42+(mover * 1.8),15,65-(mover * 2.5),-38,32-(mover * .5)); game[bob[1]]->SetSkew(-38,-75+(mover * 2.5),15,-48+(mover * 1.3),15,45-(mover * .5),-38,72-(mover * 2.2)); game[bob[2]]->SetSkew(-38,-52+(mover * 1.8),15,-70+(mover * 2.3),15,27+(mover * .3),-38,100-(mover * 4.2)); - + game[bob[3]]->SetSkew(-38+(mover * 1.1),-70+(mover * 1.5),15+(mover * .4),-24-(mover * .2),15+(mover * .4),40-(mover * 1),-38+(mover * 1.1),27-(mover * .5)); game[bob[4]]->SetSkew(-38+(mover * 1.1),-50+(mover * 1),15+(mover * .4),-35-(mover * .5),15+(mover * .4),40-(mover * 1),-38+(mover * 1.1),50-(mover * 1)); game[bob[5]]->SetSkew(-38+(mover * 1.1),-34+(mover * 1.4),15+(mover * .4),-47+(mover * 1.7),15+(mover * .4),24-(mover * .4),-38+(mover * 1.1),58-(mover * .8)); - + game[bob[6]]->SetSkew(-27+(mover * .8),-55+(mover * 1.7),19-(mover * .9),-22+(mover * .5),19-(mover * .9),30-(mover * 1.5),-27+(mover * .8),22-(mover * 1.2)); game[bob[7]]->SetSkew(-27+(mover * .8),-40+(mover * 1),19-(mover * .9),-30+(mover * 1),19-(mover * .9),30-(mover * 1.8),-27+(mover * .8),40-(mover * 1)); game[bob[8]]->SetSkew(-27+(mover * .8),-20+(mover * .5),19-(mover * .9),-30+(mover * 1),19-(mover * .9),20-(mover * 1),-27+(mover * .8),50-(mover * 2.6)); - + game[bob[9]]->SetSkew(-19+(mover * .9),-28+(mover * .8),0+(mover * .3),-17-(mover * .4),0+(mover * .3),15-(mover * 1),-19+(mover * .9),10); game[bob[10]]->SetSkew(-19+(mover * .9),-30+(mover * 1),0+(mover * .3),-20-(mover * .2),0+(mover * .3),12+(mover * .6),-19+(mover * .9),30-(mover * 1)); game[bob[11]]->SetSkew(-19+(mover * .9),-15+(mover * .5),0+(mover * .3),-20+(mover * 1),0+(mover * .3),10,-19+(mover * .9),24-(mover * 1.4)); - + game[bob[12]]->SetSkew(-10,-20+(mover * .5),3,-13+(mover * .1),3,14-(mover * .1),-10,10+(mover * .3)); game[bob[13]]->SetSkew(-10,-20+(mover * .3),3,-18+(mover * .8),3,18-(mover * .8),-10,20-(mover * .3)); game[bob[14]]->SetSkew(-10,-10,3,-10-(mover * .5),3,0+(mover * 1),-10,10); - + game[bob[15]]->SetSkew(-10,-15+(mover * .5),3,-12+(mover * .2),3,13+(mover * .1),-10,13+(mover * .1)); game[bob[16]]->SetSkew(-10,-17+(mover * .7),3,-10,3,10,-10,17-(mover * .7)); game[bob[17]]->SetSkew(-10,-10,3,-15+(mover * .5),3,10,-10,10); - + game[bob[18]]->SetSkew(-10,-10,3+(mover * .1),-10-(mover * 1),3,14-(mover * .4),-10-(mover * .4),14-(mover * .4)); game[bob[19]]->SetSkew(-10,-10,3+(mover * .1),-10-(mover * .7),3,10+(mover * .7),-10-(mover * .4),10);//middle game[bob[20]]->SetSkew(-10,-10,3+(mover * .1),-10,3,10,-10-(mover * .4),10); - + game[bob[21]]->SetSkew(-14+(mover * .4),-10-(mover * .3),4-(mover * .1),-20,3,10+(mover * .4),-14,10); game[bob[22]]->SetSkew(-14+(mover * .4),-10-(mover * .8),4-(mover * .1),-17-(mover * .3),3,17+(mover * .3),-14,10+(mover * .8)); game[bob[23]]->SetSkew(-14+(mover * .4),-10,4-(mover * .1),-10,3,10+(mover * 1),-14,10-(mover * .5)); - + game[bob[24]]->SetSkew(-10-(mover * .9),-13,3-(mover * .3),-20,3-(mover * .3),14,-10-(mover * .9),10); game[bob[25]]->SetSkew(-10-(mover * .9),-18,3-(mover * .3),-20,3-(mover * .3),20,-10-(mover * .9),18); game[bob[26]]->SetSkew(-10-(mover * .9),-10,3-(mover * .3),-10,3-(mover * .3),20,-10-(mover * .9),5); - + game[bob[27]]->SetSkew(-19-(mover * .8),-17,0+(mover * 1.9),-28,0+(mover * 1.9),10+(mover * 1.2),-19-(mover * .8),15+(mover * 1.5)); game[bob[28]]->SetSkew(-19-(mover * .8),-20,0+(mover * 1.9),-30,0+(mover * 1.9),30+(mover * 1),-19-(mover * .8),12+(mover * 1.8)); game[bob[29]]->SetSkew(-19-(mover * .8),-20,0+(mover * 1.9),-15,0+(mover * 1.9),30+(mover * 1.5),-19-(mover * .8),10+(mover * 1)); - + game[bob[30]]->SetSkew(-27-(mover * 1.1),-22-(mover * .2),19-(mover * .4),-55-(mover * 1.5),19-(mover * .4),22+(mover * .5),-27-(mover * 1.1),30+(mover * 1)); game[bob[31]]->SetSkew(-27-(mover * 1.1),-30-(mover * .5),19-(mover * .4),-40-(mover * 1),19-(mover * .4),40+(mover * 1),-27-(mover * 1.1),30+(mover * 1)); game[bob[32]]->SetSkew(-27-(mover * 1.1),-30-(mover * 1.7),19-(mover * .4),-20-(mover * 1.4),19-(mover * .4),55+(mover * .3),-27-(mover * 1.1),20+(mover * .4)); - + game[bob[33]]->SetSkew(-38,-24-(mover * 1.8),15,-70-(mover * 4),15,27+(mover * .5),-38,40+(mover * .2)); game[bob[34]]->SetSkew(-38,-35-(mover * 1.3),15,-50-(mover * 2.5),15,50+(mover * 2),-38,40+(mover * .5)); game[bob[35]]->SetSkew(-38,-47-(mover * 2.7),15,-34-(mover * 1.8),15,58+(mover * 4.2),-38,24+(mover * .3)); - + game[bob[36]]->SetSkew(-38,-42+(mover * 1.8),15,-110,15,32,-38,60); game[bob[37]]->SetSkew(-38,-48+(mover * 1.3),15,-75,15,70,-38,45); game[bob[38]]->SetSkew(-38,-70+(mover * 2.3),15,-52+(mover * 1.8),15,100,-38,27); - + } mover++; goRight--; - + } else {goRight=0;mover=0; listOffset = (listOffset-rows < 0) ? gameCnt-rows : listOffset-rows; @@ -1681,15 +1672,15 @@ void GuiGameGrid::Update(GuiTrigger * t) for(int i=0; iSetText(debugbuffer); - + } } } - - + + int ttoffset=0; if (rows==1)ttoffset=70; if (rows==2)ttoffset=35; @@ -1704,30 +1695,30 @@ void GuiGameGrid::Update(GuiTrigger * t) //depending on where on the screen the game is for(int i=0; i < (pagesize/3); i++) { game[i]->RemoveToolTip(); - + if (game[bob[i]]->GetState()==STATE_SELECTED) { - + game[bob[i]]->SetToolTip(titleTT,ttoffset,0,0,5); } - } + } for(int i=(pagesize/3); i < (2* pagesize/3); i++) { game[i]->RemoveToolTip(); - + if (game[bob[i]]->GetState()==STATE_SELECTED) { game[bob[i]]->SetToolTip(titleTT,0,0,2,5); isover=true; } - } + } for(int i=(2* pagesize/3); i < pagesize; i++) { game[i]->RemoveToolTip(); - + if (game[bob[i]]->GetState()==STATE_SELECTED) { game[bob[i]]->SetToolTip(titleTT,-ttoffset,0,1,5); } - } + } snprintf(titlebuffer, sizeof(titlebuffer), "%s",get_title(&gameList[this->GetSelectedOption()])); if (selected!=selectedOld){ drawTTs=1; @@ -1739,8 +1730,8 @@ void GuiGameGrid::Update(GuiTrigger * t) selectedOld=selected; if (wait1==0){wait++;if(wait>500)wait1=1;}//500 *2 is the time that the tooltips stay on screen if ((wait1==1)&&(wait>-1)){wait--;} - - + + //snprintf(debugbuffer, sizeof(debugbuffer), "faggot %i %s", GetOverImage(t),get_title(&gameList[this->GetSelectedOption()])); //debugTxt->SetText(debugbuffer); if ((btnRowUp->GetState() == STATE_CLICKED)&&(c>0)) { @@ -1790,7 +1781,7 @@ void GuiGameGrid::Reload(struct discHdr * l, int count) drawTTs=0; //speed = SHIFT_SPEED; char imgPath[100]; - + if (count<42)rows=2; if (count<16)rows=1; Settings.gridRows = rows; @@ -1801,7 +1792,7 @@ void GuiGameGrid::Reload(struct discHdr * l, int count) if (rows==1)pagesize = 6; else if (rows==2)pagesize = 16; else if (rows==3)pagesize = 42; - + game = new GuiButton * [pagesize]; //bob = new int[pagesize]; coverImg = new GuiImage * [gameCnt]; @@ -1810,7 +1801,7 @@ void GuiGameGrid::Reload(struct discHdr * l, int count) for(int i=0; iSetWidescreen(CFG.widescreen); if (rows==2)coverImg[i]->SetScale(.6);//these are the numbers for 2 rows else if (rows==3)coverImg[i]->SetScale(.26);//these are the numbers for 3 rows - + } - + for(int i=0; i < pagesize; i++) { game[i] = new GuiButton(160,224);//for 1 row if (rows==2)game[i]->SetSize(75,133);//these are the numbers for 2 rows @@ -1857,11 +1848,11 @@ void GuiGameGrid::Reload(struct discHdr * l, int count) game[i]->SetSoundClick(btnSoundClick); game[i]->SetClickable(true); } - for (int i=gameCnt-1;iSetVisible(false); game[i]->SetClickable(false); game[i]->RemoveSoundOver();} - + if (rows==1) { if(CFG.widescreen){ @@ -1871,14 +1862,14 @@ void GuiGameGrid::Reload(struct discHdr * l, int count) game[bob[3]]->SetPosition(390,74); game[bob[4]]->SetPosition(550,74); } - else{ + else{ game[bob[0]]->SetPosition(-130,74); game[bob[1]]->SetPosition(60,74); game[bob[2]]->SetPosition(239,74); game[bob[3]]->SetPosition(420,74); game[bob[4]]->SetPosition(612,74); } - + game[bob[0]]->SetSkew(-10,-44,10,-26,10,26,-10,44); game[bob[1]]->SetSkew(-6,-22,6,-14,6,14,-6,22); game[bob[2]]->SetSkew(0,-11,0,-11,0,11,0,11); @@ -1942,51 +1933,51 @@ void GuiGameGrid::Reload(struct discHdr * l, int count) game[bob[0]]->SetPosition(13,58); game[bob[1]]->SetPosition(13,153); game[bob[2]]->SetPosition(13,250); - + game[bob[3]]->SetPosition(68,67); game[bob[4]]->SetPosition(68,153); game[bob[5]]->SetPosition(68,239); - + game[bob[6]]->SetPosition(120,74); game[bob[7]]->SetPosition(120,153); game[bob[8]]->SetPosition(120,232); - + game[bob[9]]->SetPosition(170,78); game[bob[10]]->SetPosition(170,153); game[bob[11]]->SetPosition(170,228); - + game[bob[12]]->SetPosition(214,80); game[bob[13]]->SetPosition(214,153); game[bob[14]]->SetPosition(214,226); - + game[bob[15]]->SetPosition(258,81); game[bob[16]]->SetPosition(258,153); game[bob[17]]->SetPosition(258,224); - + game[bob[18]]->SetPosition(302,81); game[bob[19]]->SetPosition(302,153); game[bob[20]]->SetPosition(302,223); - + game[bob[21]]->SetPosition(346,81); game[bob[22]]->SetPosition(346,153); game[bob[23]]->SetPosition(346,223); - + game[bob[24]]->SetPosition(390,80); game[bob[25]]->SetPosition(390,153); game[bob[26]]->SetPosition(390,225); - + game[bob[27]]->SetPosition(434,77); game[bob[28]]->SetPosition(434,153); game[bob[29]]->SetPosition(434,227); - + game[bob[30]]->SetPosition(484,73); game[bob[31]]->SetPosition(484,153); game[bob[32]]->SetPosition(484,231); - + game[bob[33]]->SetPosition(537,67); game[bob[34]]->SetPosition(537,153); game[bob[35]]->SetPosition(537,239); - + game[bob[36]]->SetPosition(591,58); game[bob[37]]->SetPosition(591,153); game[bob[38]]->SetPosition(591,250); @@ -1995,109 +1986,109 @@ void GuiGameGrid::Reload(struct discHdr * l, int count) game[bob[0]]->SetPosition(-29,58); game[bob[1]]->SetPosition(-29,153); game[bob[2]]->SetPosition(-29,250); - + game[bob[3]]->SetPosition(33,67); game[bob[4]]->SetPosition(33,153); game[bob[5]]->SetPosition(33,239); - + game[bob[6]]->SetPosition(92,74); game[bob[7]]->SetPosition(92,153); game[bob[8]]->SetPosition(92,232); - + game[bob[9]]->SetPosition(149,78); game[bob[10]]->SetPosition(149,153); game[bob[11]]->SetPosition(149,228); - + game[bob[12]]->SetPosition(200,80); game[bob[13]]->SetPosition(200,153); game[bob[14]]->SetPosition(200,226); - + game[bob[15]]->SetPosition(251,81); game[bob[16]]->SetPosition(251,153);// game[bob[17]]->SetPosition(251,224); - + game[bob[18]]->SetPosition(302,81);// game[bob[19]]->SetPosition(302,153);// game[bob[20]]->SetPosition(302,223);// - + game[bob[21]]->SetPosition(353,81); game[bob[22]]->SetPosition(353,153); game[bob[23]]->SetPosition(353,223); - + game[bob[24]]->SetPosition(404,80); game[bob[25]]->SetPosition(404,153); game[bob[26]]->SetPosition(404,225); - + game[bob[27]]->SetPosition(457,77); game[bob[28]]->SetPosition(457,153); game[bob[29]]->SetPosition(457,227); - + game[bob[30]]->SetPosition(512,73); game[bob[31]]->SetPosition(512,153); game[bob[32]]->SetPosition(512,231); - + game[bob[33]]->SetPosition(572,67); game[bob[34]]->SetPosition(572,153); game[bob[35]]->SetPosition(572,239); - + game[bob[36]]->SetPosition(633,58); game[bob[37]]->SetPosition(633,153); game[bob[38]]->SetPosition(633,250); } - + game[bob[0]]->SetSkew(-38,-110,15,-42,15,65,-38,32); game[bob[1]]->SetSkew(-38,-75,15,-48,15,45,-38,72); game[bob[2]]->SetSkew(-38,-52,15,-70,15,27,-38,100); - + game[bob[3]]->SetSkew(-38,-70,15,-24,15,40,-38,27); game[bob[4]]->SetSkew(-38,-50,15,-35,15,40,-38,50); game[bob[5]]->SetSkew(-38,-34,15,-47,15,24,-38,58); - + game[bob[6]]->SetSkew(-27,-55,19,-22,19,30,-27,22); game[bob[7]]->SetSkew(-27,-40,19,-30,19,30,-27,40); game[bob[8]]->SetSkew(-27,-20,19,-30,19,20,-27,50); - + game[bob[9]]->SetSkew(-19,-28,0,-17,0,15,-19,10); game[bob[10]]->SetSkew(-19,-30,0,-20,0,12,-19,30); game[bob[11]]->SetSkew(-19,-15,0,-20,0,10,-19,24); - + game[bob[12]]->SetSkew(-10,-20,3,-13,3,14,-10,10); game[bob[13]]->SetSkew(-10,-20,3,-18,3,18,-10,20); game[bob[14]]->SetSkew(-10,-10,3,-10,3,0,-10,10); - + game[bob[15]]->SetSkew(-10,-15,3,-12,3,13,-10,13); game[bob[16]]->SetSkew(-10,-17,3,-10,3,10,-10,17); game[bob[17]]->SetSkew(-10,-10,3,-15,3,10,-10,10); - + game[bob[18]]->SetSkew(-10,-10,3,-10,3,14,-10,14); game[bob[19]]->SetSkew(-10,-10,3,-10,3,10,-10,10);//middle game[bob[20]]->SetSkew(-10,-10,3,-10,3,10,-10,10); - + game[bob[21]]->SetSkew(-14,-10,4,-20,3,10,-14,10); game[bob[22]]->SetSkew(-14,-10,4,-17,3,17,-14,10); game[bob[23]]->SetSkew(-14,-10,4,-10,3,10,-14,10); - + game[bob[24]]->SetSkew(-10,-13,3,-20,3,14,-10,10); game[bob[25]]->SetSkew(-10,-18,3,-20,3,20,-10,18); game[bob[26]]->SetSkew(-10,-10,3,-10,3,20,-10,5); - + game[bob[27]]->SetSkew(-19,-17,0,-28,0,10,-19,15); game[bob[28]]->SetSkew(-19,-20,0,-30,0,30,-19,12); game[bob[29]]->SetSkew(-19,-20,0,-15,0,30,-19,10); - + game[bob[30]]->SetSkew(-27,-22,19,-55,19,22,-27,30); game[bob[31]]->SetSkew(-27,-30,19,-40,19,40,-27,30); game[bob[32]]->SetSkew(-27,-30,19,-20,19,55,-27,20); - + game[bob[33]]->SetSkew(-38,-24,15,-70,15,27,-38,40); game[bob[34]]->SetSkew(-38,-35,15,-50,15,50,-38,40); game[bob[35]]->SetSkew(-38,-47,15,-34,15,58,-38,24); - + game[bob[36]]->SetSkew(-38,-42,15,-110,15,32,-38,60); game[bob[37]]->SetSkew(-38,-48,15,-75,15,70,-38,45); game[bob[38]]->SetSkew(-38,-70,15,-52,15,100,-38,27); } - - + + } diff --git a/source/listfiles.c b/source/listfiles.c index 7a506d4f..a619d98a 100644 --- a/source/listfiles.c +++ b/source/listfiles.c @@ -26,7 +26,6 @@ while ((file = readdir(dir))) snprintf(temp,sizeof(temp),"%s",file->d_name); if (!strncmpi(temp,filename,11)) { - //WindowPrompt(path, filename,"go" ,0); closedir(dir); return true; } diff --git a/source/main.cpp b/source/main.cpp index b01ba264..c48cd718 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -33,8 +33,6 @@ #include "wpad.h" #include "fat.h" -//#define SPECIAL_FOR_ARDI // Fix Problem with Trekstor Classic 250GB - /* Constants */ #define CONSOLE_XCOORD 260 #define CONSOLE_YCOORD 115 @@ -48,22 +46,7 @@ int main(int argc, char *argv[]) { s32 ret2; - u8 preloaded_ios = 0; -#ifdef SPECIAL_FOR_ARDI - if( (ret2 = IOS_ReloadIOS(249)) >=0 ) - preloaded_ios = 249; - else - { - if( (ret2 = IOS_ReloadIOS(222)) >=0 ) - { - load_ehc_module(); - preloaded_ios = 222; - } - } -#endif - SDCard_Init(); // mount SD for loading cfg's - USBDevice_Init(); // and mount USB:/ bool bootDevice_found=false; if(argc >= 1) { @@ -83,33 +66,49 @@ main(int argc, char *argv[]) strcpy(bootDevice, "USB:"); } + ret2 = IOS_ReloadIOS(249); + if(ret2 < 0) { + ret2 = IOS_ReloadIOS(222); + load_ehc_module(); + } + + SDCard_Init(); // mount SD for loading cfg's + USBDevice_Init(); // and mount USB:/ + gettextCleanUp(); - //lang_default(); CFG_Load(); - SDCard_deInit();// unmount SD for reloading IOS - USBDevice_deInit();// unmount USB for reloading IOS - /* Load Custom IOS */ - if(Settings.cios == ios222 && preloaded_ios != 222) { + if(Settings.cios == ios222 && IOS_GetVersion() != 222) { + SDCard_deInit();// unmount SD for reloading IOS + USBDevice_deInit();// unmount USB for reloading IOS ret2 = IOS_ReloadIOS(222); load_ehc_module(); if (ret2 < 0) { Settings.cios = ios249; ret2 = IOS_ReloadIOS(249); } - } else if(preloaded_ios != 249) { + SDCard_Init(); // now mount SD:/ + USBDevice_Init(); // and mount USB:/ + } else if(Settings.cios == ios249 && IOS_GetVersion() != 249) { + SDCard_deInit();// unmount SD for reloading IOS + USBDevice_deInit();// unmount USB for reloading IOS ret2 = IOS_ReloadIOS(249); + if(ret2 < 0) { + Settings.cios = ios222; + ret2 = IOS_ReloadIOS(222); + load_ehc_module(); + } + SDCard_Init(); // now mount SD:/ + USBDevice_Init(); // and mount USB:/ } if (ret2 < 0) { printf("ERROR: cIOS could not be loaded!"); + sleep(5); SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); } - SDCard_Init(); // now mount SD:/ - USBDevice_Init(); // and mount USB:/ - Sys_Init(); /** PAD_Init has to be before InitVideo don't move that **/ @@ -125,7 +124,7 @@ main(int argc, char *argv[]) // load main font from file, or default to built-in font fontSystem = new FreeTypeGX(); char *fontPath = NULL; - asprintf(&fontPath, "%sfont.ttf", CFG.theme_path); + asprintf(&fontPath, "%sfont.ttf", CFG.theme_path); fontSystem->loadFont(fontPath, font_ttf, font_ttf_size, 0); fontSystem->setCompatibilityMode(FTGX_COMPATIBILITY_DEFAULT_TEVOP_GX_PASSCLR | FTGX_COMPATIBILITY_DEFAULT_VTXDESC_GX_NONE); free(fontPath); diff --git a/source/menu.cpp b/source/menu.cpp index 24104dd0..9d546a7d 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -35,7 +35,7 @@ #include "sys.h" #include "wpad.h" #include "listfiles.h" -#include "fatmounter.h" +#include "fatmounter.h" #define MAX_CHARACTERS 38 #define GB_SIZE 1073741824.0 @@ -141,8 +141,8 @@ UpdateGUI (void *arg) for(int i=0; i < 4; i++) mainWindow->Update(&userInput[i]); - - + + } else { for(int a = 5; a < 255; a += 10) { @@ -155,7 +155,7 @@ UpdateGUI (void *arg) return 0; } } - + switch (Settings.screensaver) { case 1: @@ -600,12 +600,12 @@ int MenuDiscList() { VIDEO_WaitVSync (); - + if (idiotFlag==1){ char idiotBuffer[200]; snprintf(idiotBuffer, sizeof(idiotBuffer), "%s (%s). %s",tr("You have attempted to load a bad image"), idiotChar,tr("Most likely it has dimensions that are not evenly divisible by 4. Way to go dipshit.")); - - WindowPrompt(0,idiotBuffer,tr("Ok"), 0, 0,0,-1); + + WindowPrompt(0,idiotBuffer,tr("Ok")); idiotFlag=-1;} //CLOCK @@ -647,7 +647,7 @@ int MenuDiscList() if(poweroffBtn.GetState() == STATE_CLICKED) { - choice = WindowPrompt(tr("How to Shutdown?"),0,tr("Full Shutdown"), tr("Shutdown to Idle"), tr("Cancel"),0,-1); + choice = WindowPrompt(tr("How to Shutdown?"),0,tr("Full Shutdown"), tr("Shutdown to Idle"), tr("Cancel")); if(choice == 2) { Sys_ShutdownToIdel(); @@ -663,16 +663,16 @@ int MenuDiscList() } else if(homeBtn.GetState() == STATE_CLICKED) { - s32 thetimeofbg = bgMusic->GetPlayTime(); - bgMusic->Stop(); + s32 thetimeofbg = bgMusic->GetPlayTime(); + bgMusic->Stop(); choice = WindowExitPrompt(tr("Exit USB Loader GX?"),0, tr("Back to Loader"),tr("Wii Menu"),tr("Back"),0); if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) { - bgMusic->Play(); - } else { - bgMusic->PlayOggFile(Settings.ogg_path); - } - bgMusic->SetPlayTime(thetimeofbg); - SetVolumeOgg(255*(Settings.volume/100.0)); + bgMusic->Play(); + } else { + bgMusic->PlayOggFile(Settings.ogg_path); + } + bgMusic->SetPlayTime(thetimeofbg); + SetVolumeOgg(255*(Settings.volume/100.0)); if(choice == 3) { @@ -698,7 +698,7 @@ int MenuDiscList() } else if(installBtn.GetState() == STATE_CLICKED) { - choice = WindowPrompt(tr("Install a game"),0,tr("Yes"),tr("No"),0,0,-1); + choice = WindowPrompt(tr("Install a game"),0,tr("Yes"),tr("No")); if (choice == 1) { menu = MENU_INSTALL; @@ -729,8 +729,8 @@ int MenuDiscList() offset = gameCarousel->GetOffset();} //if(isSdInserted()) { if(isInserted(bootDevice)) { - CFG_Load(); - } + CFG_Load(); + } sdcardBtn.ResetState(); menu = MENU_DISCLIST; break; @@ -740,7 +740,7 @@ int MenuDiscList() { //if(isSdInserted()) { if(isInserted(bootDevice)) { - choice = WindowPrompt(tr("Cover Download"), 0, tr("Normal Covers"), tr("3D Covers"), tr("Disc Images"), tr("Back"),-1); // ask for download choice + choice = WindowPrompt(tr("Cover Download"), 0, tr("Normal Covers"), tr("3D Covers"), tr("Disc Images"), tr("Back")); // ask for download choice if (choice != 0) { @@ -750,7 +750,7 @@ int MenuDiscList() if(IsNetworkInit() == false) { - WindowPrompt(tr("Network init error"), 0, tr("OK"),0,0,0,-1); + WindowPrompt(tr("Network init error"), 0, tr("OK")); } else { @@ -760,29 +760,29 @@ int MenuDiscList() char tempCnt[40]; sprintf(tempCnt,"%i %s",cntMissFiles,tr("Missing files")); - if (choice!=3)choice = WindowPrompt(tr("Download Boxart image?"),tempCnt,tr("Yes"),tr("No"),0,0,-1); - else if (choice==3)choice = WindowPrompt(tr("Download Discart image?"),tempCnt,tr("Yes"),tr("No"),0,0,-1); + if (choice!=3)choice = WindowPrompt(tr("Download Boxart image?"),tempCnt,tr("Yes"),tr("No")); + else if (choice==3)choice = WindowPrompt(tr("Download Discart image?"),tempCnt,tr("Yes"),tr("No")); if (choice == 1) { ret = ProgressDownloadWindow(choice2); if (ret == 0) { - WindowPrompt(tr("Download finished"),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Download finished"),0,tr("OK")); } else { sprintf(tempCnt,"%i %s",ret,tr("files not found on the server!")); - WindowPrompt(tr("Download finished"),tempCnt,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Download finished"),tempCnt,tr("OK")); } } } else { - WindowPrompt(tr("No file missing!"),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("No file missing!"),0,tr("OK")); } + } } - } - } else { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to download images."), tr("OK"), 0,0,0,-1); - } - DownloadBtn.ResetState(); + } else { + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to download images."), tr("OK")); + } + DownloadBtn.ResetState(); if (Settings.gameDisplay==list){gameBrowser->SetFocus(1);} else if (Settings.gameDisplay==grid){gameGrid->SetFocus(1);} else if (Settings.gameDisplay==carousel){gameCarousel->SetFocus(1);} @@ -813,7 +813,7 @@ int MenuDiscList() __Menu_GetEntries(); menu = MENU_DISCLIST; break; - + } else if(abcBtn.GetState() == STATE_CLICKED) @@ -825,7 +825,7 @@ int MenuDiscList() cfg_save_global(); } __Menu_GetEntries(); - + menu = MENU_DISCLIST; break; } @@ -841,7 +841,7 @@ int MenuDiscList() cfg_save_global(); } __Menu_GetEntries(); - + menu = MENU_DISCLIST; break; } @@ -859,15 +859,14 @@ int MenuDiscList() listBtn.ResetState(); break; } else { - listBtn.ResetState(); - } + } } else if (gridBtn.GetState() == STATE_CLICKED) { if (Settings.gameDisplay!=grid){ - + Settings.gameDisplay=grid; menu = MENU_DISCLIST; if(isInserted(bootDevice)) { @@ -876,14 +875,13 @@ int MenuDiscList() gridBtn.ResetState(); break; } else { - gridBtn.ResetState(); } } else if (carouselBtn.GetState() == STATE_CLICKED) { if (Settings.gameDisplay!=carousel) { - + Settings.gameDisplay=carousel; menu = MENU_DISCLIST; if(isInserted(bootDevice)) { @@ -892,18 +890,15 @@ int MenuDiscList() carouselBtn.ResetState(); break; } else { - - carouselBtn.ResetState(); - } + carouselBtn.ResetState(); + } } else if (gameInfo.GetState() == STATE_CLICKED) { struct discHdr *header = &gameList[selectImg1]; snprintf (IDfull,sizeof(IDfull),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]); choice = showGameInfo(IDfull); - //if (choice>0){ - gameInfo.ResetState(); - //} - } + gameInfo.ResetState(); + } if (Settings.gameDisplay==grid){ int selectimg; @@ -1044,7 +1039,7 @@ int MenuDiscList() text[MAX_CHARACTERS] = '\0'; strncat(text, "...", 3); } - + //check if alt Dol and gct file is present FILE *exeFile = NULL; char nipple[100]; @@ -1058,7 +1053,7 @@ int MenuDiscList() alternatedol = off; ocarinaChoice = Settings.ocarina; } - + if (Settings.qboot == yes)//quickboot game { if (alternatedol != off){ @@ -1066,30 +1061,30 @@ int MenuDiscList() sprintf(nipple, "%s%s.dol",Settings.dolpath,IDfull); exeFile = fopen (nipple ,"rb"); if (exeFile==NULL) - { + { sprintf(nipple, "%s %s",nipple,tr("does not exist! You Messed something up, Idiot.")); - WindowPrompt(tr("Error"),nipple,tr("OK"),NULL,NULL,NULL,-1); - + WindowPrompt(tr("Error"),nipple,tr("OK")); + menu = MENU_CHECK; wiilight(0); break; - } + } } if (ocarinaChoice != off){ /* Open gct File and check exist */ sprintf(nipple, "%s%s.gct",Settings.Cheatcodespath,IDfull); exeFile = fopen (nipple ,"rb"); - fseek (exeFile, 0, SEEK_END); + fseek (exeFile, 0, SEEK_END); long size=ftell (exeFile); rewind (exeFile); if (size>2056){ sprintf(nipple, "%s %s",nipple,tr("contains over 255 lines of code. It will produce unexpected results.")); WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170); }if (exeFile==NULL) - { + { sprintf(nipple, "%s %s",nipple,tr("does not exist! Loading game without cheats.")); WindowPrompt(tr("Error"),nipple,tr("OK"),NULL,NULL,NULL,170); - } + } } SDCard_deInit(); wiilight(0); @@ -1111,7 +1106,7 @@ int MenuDiscList() menu = MENU_EXIT; break; - + } bool returnHere = true;// prompt to start game while (returnHere) @@ -1128,41 +1123,41 @@ int MenuDiscList() sprintf(nipple, "%s%s.dol",Settings.dolpath,IDfull); exeFile = fopen (nipple ,"rb"); if (exeFile==NULL) - { + { sprintf(nipple, "%s %s",nipple,tr("does not exist! You Messed something up, Idiot.")); - WindowPrompt(tr("Error"),nipple,tr("OK"),NULL,NULL,NULL,-1); - + WindowPrompt(tr("Error"),nipple,tr("OK")); + menu = MENU_CHECK; wiilight(0); break; - } + } } if (ocarinaChoice != off){ /* Open gct File and check exist */ sprintf(nipple, "%s%s.gct",Settings.Cheatcodespath,IDfull); exeFile = fopen (nipple ,"rb"); - fseek (exeFile, 0, SEEK_END); + fseek (exeFile, 0, SEEK_END); long size=ftell (exeFile); rewind (exeFile); if (size>2056){ sprintf(nipple, "%s %s",nipple,tr("contains over 255 lines of code. It will produce unexpected results.")); WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170); }if (exeFile==NULL) - { + { sprintf(nipple, "%s %s",nipple,tr("does not exist! Loading game without cheats.")); WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170); - } + } } SDCard_deInit(); wiilight(0); returnHere = false; menu = MENU_EXIT; - - + + } else if (choice == 2) { wiilight(0); - HaltGui(); + HaltGui(); if (Settings.gameDisplay==list) mainWindow->Remove(gameBrowser); else if (Settings.gameDisplay==grid) mainWindow->Remove(gameGrid); else if (Settings.gameDisplay==carousel) mainWindow->Remove(gameCarousel); @@ -1212,7 +1207,7 @@ int MenuDiscList() if(!IsWpadConnected() && check !=0) { check++; int screensaverIsOn=0; - if(check==100) //to allow time for the wii to turn off and not show the screensaver + if(check==100) //to allow time for the wii to turn off and not show the screensaver screensaverIsOn=WindowScreensaver(); if (screensaverIsOn==1)check=0; } @@ -1271,20 +1266,20 @@ static int MenuInstall() ret = DiscWait(tr("Insert Disk"),tr("Waiting..."),tr("Cancel"),0,0); if (ret < 0) { - WindowPrompt (tr("Error reading Disc"),0,tr("Back"),0,0,0,-1); + WindowPrompt (tr("Error reading Disc"),0,tr("Back")); menu = MENU_DISCLIST; break; } ret = Disc_Open(); if (ret < 0) { - WindowPrompt (tr("Could not open Disc"),0,tr("Back"),0,0,0,-1); + WindowPrompt (tr("Could not open Disc"),0,tr("Back")); menu = MENU_DISCLIST; break; } ret = Disc_IsWii(); if (ret < 0) { - choice = WindowPrompt (tr("Not a Wii Disc"),"Insert a Wii Disc!",tr("OK"),tr("Back"),0,0,-1); + choice = WindowPrompt (tr("Not a Wii Disc"),"Insert a Wii Disc!",tr("OK"),tr("Back")); if (choice == 1) { menu = MENU_INSTALL; @@ -1308,7 +1303,7 @@ static int MenuInstall() ret = WBFS_CheckGame(headerdisc.id); if (ret) { - WindowPrompt (tr("Game is already installed:"),name,tr("Back"),0,0,0,-1); + WindowPrompt (tr("Game is already installed:"),name,tr("Back")); menu = MENU_DISCLIST; break; } @@ -1322,7 +1317,7 @@ static int MenuInstall() sprintf(gametxt, "%s : %.2fGB", name, gamesize); wiilight(1); - choice = WindowPrompt(tr("Continue to install game?"),gametxt,tr("OK"),tr("Cancel"),0,0,-1); + choice = WindowPrompt(tr("Continue to install game?"),gametxt,tr("OK"),tr("Cancel")); if(choice == 1) { @@ -1331,18 +1326,18 @@ static int MenuInstall() if (gamesize > freespace) { char errortxt[50]; sprintf(errortxt, "%s: %.2fGB, %s: %.2fGB",tr("Game Size"), gamesize, tr("Free Space"), freespace); - choice = WindowPrompt(tr("Not enough free space!"),errortxt,tr("OK"), tr("Return"),0,0,-1); + choice = WindowPrompt(tr("Not enough free space!"),errortxt,tr("OK"), tr("Return")); if (choice == 1) { ret = ProgressWindow(gametxt, name); wiilight(0); if (ret != 0) { - WindowPrompt (tr("Install Error!"),0,tr("Back"),0,0,0,-1); + WindowPrompt (tr("Install Error!"),0,tr("Back")); menu = MENU_DISCLIST; break; } else { __Menu_GetEntries(); //get the entries again - WindowPrompt (tr("Successfully installed:"),name,tr("OK"),0,0,0,-1); + WindowPrompt (tr("Successfully installed:"),name,tr("OK")); menu = MENU_DISCLIST; break; } @@ -1356,12 +1351,12 @@ static int MenuInstall() ret = ProgressWindow(gametxt, name); wiilight(0); if (ret != 0) { - WindowPrompt (tr("Install Error!"),0,tr("Back"),0,0,0,-1); + WindowPrompt (tr("Install Error!"),0,tr("Back")); menu = MENU_DISCLIST; break; } else { __Menu_GetEntries(); //get the entries again - WindowPrompt (tr("Successfully installed:"),name,tr("OK"),0,0,0,-1); + WindowPrompt (tr("Successfully installed:"),name,tr("OK")); menu = MENU_DISCLIST; break; } @@ -1491,17 +1486,17 @@ static int MenuFormat() tr("Do you want to format:"), text, tr("Yes"), - tr("No"),0,0,-1); + tr("No")); if(choice == 1) { ret = FormatingPartition(tr("Formatting, please wait..."), entry); if (ret < 0) { - WindowPrompt(tr("Error !"),tr("Failed formating"),tr("Return"),0,0,0,-1); + WindowPrompt(tr("Error !"),tr("Failed formating"),tr("Return")); menu = MENU_SETTINGS; } else { ret = WBFS_Open(); sprintf(text, "%s %s", text,tr("formatted!")); - WindowPrompt(tr("Success:"),text,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Success:"),text,tr("OK")); menu = MENU_DISCLIST; } } @@ -1515,7 +1510,7 @@ static int MenuFormat() if(poweroffBtn.GetState() == STATE_CLICKED) { - choice = WindowPrompt (tr("Shutdown System"),tr("Are you sure?"),tr("Yes"),tr("No"),0,0,-1); + choice = WindowPrompt (tr("Shutdown System"),tr("Are you sure?"),tr("Yes"),tr("No")); if(choice == 1) { Sys_Shutdown(); @@ -1523,7 +1518,7 @@ static int MenuFormat() } else if(exitBtn.GetState() == STATE_CLICKED) { - choice = WindowPrompt (tr("Return to Wii Menu"),tr("Are you sure?"),tr("Yes"),tr("No"),0,0,-1); + choice = WindowPrompt (tr("Return to Wii Menu"),tr("Are you sure?"),tr("Yes"),tr("No")); if(choice == 1) { Sys_LoadMenu(); @@ -1562,7 +1557,7 @@ static int MenuCheck() ret2 = WindowPrompt(tr("No USB Device found."), tr("Do you want to retry for 30 secs?"), "cIOS249", "cIOS222", - tr("Back to Wii Menu"), 0,-1); + tr("Back to Wii Menu")); SDCard_deInit(); USBDevice_deInit(); WPAD_Flush(0); @@ -1581,14 +1576,14 @@ static int MenuCheck() WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR); WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight); if (ret2 < 0) { - WindowPrompt (tr("Error !"),tr("USB Device not found"), tr("OK"), 0,0,0,-1); + WindowPrompt (tr("Error !"),tr("USB Device not found"), tr("OK")); Sys_LoadMenu(); } } ret2 = Disc_Init(); if (ret2 < 0) { - WindowPrompt (tr("Error !"),tr("Could not initialize DIP module!"),tr("OK"), 0,0,0,-1); + WindowPrompt (tr("Error !"),tr("Could not initialize DIP module!"),tr("OK")); Sys_LoadMenu(); } @@ -1597,7 +1592,7 @@ static int MenuCheck() choice = WindowPrompt(tr("No WBFS partition found"), tr("You need to format a partition"), tr("Format"), - tr("Return"),0,0,-1); + tr("Return")); if(choice == 0) { Sys_LoadMenu(); @@ -1606,9 +1601,8 @@ static int MenuCheck() u32 sector_size; ret2 = Partition_GetEntries(partitions, §or_size); if (ret2 < 0) { - WindowPrompt (tr("No partitions found"),0, tr("Restart"), 0,0,0,-1); + WindowPrompt (tr("No partitions found"),0, tr("Restart")); Sys_LoadMenu(); - } menu = MENU_FORMAT; } @@ -1621,6 +1615,8 @@ static int MenuCheck() if(wbfsinit < 0) { sleep(1); + USBDevice_Init(); + SDCard_Init(); } //Spieleliste laden @@ -1629,13 +1625,6 @@ static int MenuCheck() if(menu == MENU_NONE) menu = MENU_DISCLIST; - //for HDDs with issues - if(wbfsinit < 0) { - sleep(1); - USBDevice_Init(); - SDCard_Init(); - } - return menu; } diff --git a/source/network/networkops.cpp b/source/network/networkops.cpp index f02898a2..848a8c90 100644 --- a/source/network/networkops.cpp +++ b/source/network/networkops.cpp @@ -249,7 +249,7 @@ static void * networkinitcallback(void *arg) if(CheckUpdate() > 0) { /** Here we can enter the update function later ** ** when network problem is solved **/ - WindowPrompt("Update available",0,"OK",0,0,0,-1); + WindowPrompt("Update available",0,"OK"); } updatechecked = true; } diff --git a/source/prompts/PromptWindows.cpp b/source/prompts/PromptWindows.cpp index 61b958b8..76dac086 100644 --- a/source/prompts/PromptWindows.cpp +++ b/source/prompts/PromptWindows.cpp @@ -17,6 +17,7 @@ #include "libwiigui/gui_diskcover.h" #include "network/networkops.h" #include "network/http.h" +#include "prompts/PromptWindows.h" #include "mload/mload.h" #include "fatmounter.h" #include "listfiles.h" @@ -236,7 +237,7 @@ void WindowCredits() txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); txt[i]->SetPosition(220,y); i++; y+=24;*/ - + sprintf(text, " lustar %s", tr("for WiiTDB")); txt[i] = new GuiText(text); txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); txt[i]->SetPosition(220,y); @@ -888,7 +889,7 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label, wiimoteImg.SetPosition(50,165); } else if(btn2.GetState() == STATE_CLICKED) { - ret = WindowPrompt(tr("Are you sure?"), 0, tr("Yes"), tr("No"), 0, 0,-1); + ret = WindowPrompt(tr("Are you sure?"), 0, tr("Yes"), tr("No")); if (ret == 1) { choice = 2; } @@ -900,7 +901,7 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label, btn2.ResetState(); } else if(btn3.GetState() == STATE_CLICKED) { - ret = WindowPrompt(tr("Are you sure?"), 0, tr("Yes"), tr("No"), 0, 0,-1); + ret = WindowPrompt(tr("Are you sure?"), 0, tr("Yes"), tr("No")); if (ret == 1) { choice = 3; } @@ -1734,10 +1735,10 @@ void SearchMissingImages(int choice2) snprintf (filename,sizeof(filename),"%c%c%c.png", header->id[0], header->id[1], header->id[2]); found2 = findfile(filename, Settings.covers_path); - + snprintf (filename,sizeof(filename),"%c%c%c%c.png", header->id[0], header->id[1], header->id[2], header->id[3]); found3 = findfile(filename, Settings.covers_path); - + snprintf(filename,sizeof(filename),"%c%c%c%c%c%c.png",header->id[0], header->id[1], header->id[2], header->id[3], header->id[4], header->id[5]); //full id found1 = findfile(filename, Settings.covers_path); @@ -2053,63 +2054,43 @@ ProgressDownloadWindow(int choice2) mainWindow->Append(&promptWindow); mainWindow->ChangeFocus(&promptWindow); ResumeGui(); - - int serverCnt3d=5,serverCntDisc=4,serverCnt2d=5, offset=0, tries=0, m=0; - + + int serverCnt3d=5,serverCntDisc=4,serverCnt2d=5, offset=0, tries=0, m=0; + char server3d[serverCnt3d][75]; char serverDisc[serverCntDisc][75]; char server2d[serverCnt2d][75]; - - //for testing the servers - /*char serverTEST[serverCnt2d][75]; - int * TESTfail; - int * TESTbad; - TESTfail = new int[serverCnt2d]; - TESTbad = new int[serverCnt2d];*/ - + snprintf(server3d[m], sizeof(server3d[m]), "http://gxload.joschtex.com/3d/");m++; snprintf(server3d[m], sizeof(server3d[m]), "http://wiicover.gateflorida.com/3d/");m++; snprintf(server3d[m], sizeof(server3d[m]), "http://awiibit.com/3dBoxArt176x248/");m++; snprintf(server3d[m], sizeof(server3d[m]), "http://boxart.rowdyruff.net/3d/");m++; snprintf(server3d[m], sizeof(server3d[m]), "http://wiitdb.com/wiitdb/artwork/cover3D/");m++; - + m=0; snprintf(serverDisc[m], sizeof(serverDisc[m]), "http://gxload.joschtex.com/disc/");m++; snprintf(serverDisc[m], sizeof(serverDisc[m]), "http://wiicover.gateflorida.com/disc/");m++; snprintf(serverDisc[m], sizeof(serverDisc[m]), "http://awiibit.com/WiiDiscArt/");m++; snprintf(serverDisc[m], sizeof(serverDisc[m]), "http://wiitdb.com/wiitdb/artwork/disc/");m++; - + m=0; snprintf(server2d[m], sizeof(server2d[m]), "http://gxload.joschtex.com/2d/");m++; snprintf(server2d[m], sizeof(server2d[m]), "http://wiicover.gateflorida.com/2d/");m++; snprintf(server2d[m], sizeof(server2d[m]), "http://awiibit.com/BoxArt160x224/");m++; snprintf(server2d[m], sizeof(server2d[m]), "http://boxart.rowdyruff.net/flat/");m++; snprintf(server2d[m], sizeof(server2d[m]), "http://wiitdb.com/wiitdb/artwork/cover/");m++; - - //server test shit again - /*m=0; - snprintf(serverTEST[m], sizeof(serverTEST[m]), "http://gxload.joschtex.com/");m++; - snprintf(serverTEST[m], sizeof(serverTEST[m]), "http://wiicover.gateflorida.com/");m++; - snprintf(serverTEST[m], sizeof(serverTEST[m]), "http://awiibit.com/");m++; - snprintf(serverTEST[m], sizeof(serverTEST[m]), "http://boxart.rowdyruff.net/");m++; - - for(int b=0;b1)msgTxt.SetTextf("%i %s", cntMissFiles - i, tr("files left")); else msgTxt.SetTextf("%i %s", cntMissFiles - i, tr("file left")); msg2Txt.SetTextf("%s", missingFiles[i]); - - + + //download boxart image char imgPath[100]; char URLFile[100]; @@ -2142,11 +2123,10 @@ ProgressDownloadWindow(int choice2) sprintf(tmp,"Not Found"); struct block file = downloadfile(URLFile); if (choice2 == 2) - { + { while(triesRemove(&promptWindow); mainWindow->SetState(STATE_DEFAULT); @@ -2482,7 +2440,7 @@ int ProgressUpdateWindow() struct stat st; if(stat(Settings.update_path, &st) != 0) { if(subfoldercreate(Settings.update_path) != 1) { - WindowPrompt(tr("Error !"),tr("Can't create directory"),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Error !"),tr("Can't create directory"),tr("OK")); ret = -1; failed = -1; } @@ -2520,7 +2478,7 @@ int ProgressUpdateWindow() if(newrev > 0) { sprintf(msg, "Rev%i %s.", newrev, tr("available")); - int choice = WindowPrompt(msg, tr("How do you want to update?"), tr("Update DOL"), tr("Update All"), tr("Cancel"), 0,-1); + int choice = WindowPrompt(msg, tr("How do you want to update?"), tr("Update DOL"), tr("Update All"), tr("Cancel")); if(choice == 1 || choice == 2) { titleTxt.SetTextf("%s USB Loader GX", tr("Updating")); msgTxt.SetPosition(0,100); @@ -2605,7 +2563,7 @@ int ProgressUpdateWindow() } } else { - WindowPrompt(tr("No new updates."), 0, tr("OK"), 0, 0, 0,-1); + WindowPrompt(tr("No new updates."), 0, tr("OK")); ret = -1; } @@ -2614,7 +2572,7 @@ int ProgressUpdateWindow() CloseConnection(); if(!failed && ret >= 0) { - WindowPrompt(tr("Successfully Updated") , tr("Restarting..."), tr("OK"), 0, 0, 0,-1); + WindowPrompt(tr("Successfully Updated") , tr("Restarting..."), tr("OK")); Sys_BackToLoader(); } diff --git a/source/prompts/PromptWindows.h b/source/prompts/PromptWindows.h index 2ef34704..8111b9fe 100644 --- a/source/prompts/PromptWindows.h +++ b/source/prompts/PromptWindows.h @@ -10,9 +10,12 @@ #include "usbloader/partition.h" +int WindowPrompt(const char *title, const char *msg = NULL, const char *btn1Label = NULL, + const char *btn2Label = NULL, const char *btn3Label = NULL, + const char *btn4Label = NULL, int wait = -1); + void WindowCredits(); int OnScreenKeyboard(char * var, u32 maxlen, int min); -int WindowPrompt(const char *title, const char *msg, const char *btn1Label, const char *btn2Label, const char *btn3Label, const char *btn4Label, int wait); int WindowExitPrompt(const char *title, const char *msg, const char *btn1Label, const char *btn2Label, const char *btn3Label, const char *btn4Label); int GameWindowPrompt(); int DiscWait(const char *title, const char *msg, const char *btn1Label, const char *btn2Label, int IsDeviceWait); diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp index 90d6401e..5ae2992c 100644 --- a/source/settings/Settings.cpp +++ b/source/settings/Settings.cpp @@ -641,10 +641,10 @@ int MenuSettings() while(w.GetEffect()>0) usleep(50); } } else { - WindowPrompt(tr("Language change:"),tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Language change:"),tr("Console should be unlocked to modify it."),tr("OK")); } } else { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to use this option."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to use this option."), tr("OK")); } break; case 1: @@ -746,7 +746,7 @@ int MenuSettings() Settings.language = 0; if(Settings.error002 >= settings_off_on_max+1) Settings.error002 = 0; - + if (Settings.video == discdefault) options2.SetValue(0,"%s",tr("Disc Default")); else if (Settings.video == systemdefault) options2.SetValue(0,"%s",tr("System Default")); else if (Settings.video == patch) options2.SetValue(0,"%s",tr("AutoPatch")); @@ -852,7 +852,7 @@ int MenuSettings() case 7: Settings.error002++; break; - + } } optionBrowser2.SetEffect(EFFECT_FADE, -20); @@ -974,19 +974,19 @@ int MenuSettings() if (!strcmp(entered, Settings.unlockCode)) //if password correct { if (Settings.godmode == 0) { - WindowPrompt(tr("Correct Password"),tr("All the features of USB Loader GX are unlocked."),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Correct Password"),tr("All the features of USB Loader GX are unlocked."),tr("OK")); Settings.godmode = 1; //__Menu_GetEntries(); menu = MENU_DISCLIST; } } else { - WindowPrompt(tr("Wrong Password"),tr("USB Loader GX is protected"),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Wrong Password"),tr("USB Loader GX is protected"),tr("OK")); } } } else { - int choice = WindowPrompt (tr("Lock Console"),tr("Are you sure?"),tr("Yes"),tr("No"),0,0,-1); + int choice = WindowPrompt (tr("Lock Console"),tr("Are you sure?"),tr("Yes"),tr("No")); if(choice == 1) { - WindowPrompt(tr("Console Locked"),tr("USB Loader GX is protected"),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Console Locked"),tr("USB Loader GX is protected"),tr("OK")); Settings.godmode = 0; //__Menu_GetEntries(); menu = MENU_DISCLIST; @@ -1005,10 +1005,10 @@ int MenuSettings() w.Append(&backBtn); if ( result == 1 ) { strncpy(Settings.unlockCode, entered, sizeof(Settings.unlockCode)); - WindowPrompt(tr("Password Changed"),tr("Password has been changed"),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Password Changed"),tr("Password has been changed"),tr("OK")); } } else { - WindowPrompt(tr("Password Changed"),tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Password Changed"),tr("Console should be unlocked to modify it."),tr("OK")); } break; case 2: @@ -1138,7 +1138,7 @@ int MenuSettings() while(w.GetEffect()>0) usleep(50); } else - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to use this option."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to use this option."), tr("OK")); break; case 1: Settings.volume += 10; @@ -1276,14 +1276,14 @@ int MenuSettings() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(Settings.covers_path, entered, sizeof(Settings.covers_path)); - WindowPrompt(tr("Coverpath Changed"),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Coverpath Changed"),0,tr("OK")); // if(!isSdInserted()) { if(!isInserted(bootDevice)) { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } } } else { - WindowPrompt(tr("Coverpath Changed"),tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Coverpath Changed"),tr("Console should be unlocked to modify it."),tr("OK")); } break; case 1: @@ -1302,14 +1302,14 @@ int MenuSettings() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(Settings.disc_path, entered, sizeof(Settings.disc_path)); - WindowPrompt(tr("Discpath Changed"),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Discpath Changed"),0,tr("OK")); // if(!isSdInserted()) { if(!isInserted(bootDevice)) { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } } } else { - WindowPrompt(tr("Discpath change"),tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Discpath change"),tr("Console should be unlocked to modify it."),tr("OK")); } break; case 2: @@ -1328,10 +1328,10 @@ int MenuSettings() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(CFG.theme_path, entered, sizeof(CFG.theme_path)); - WindowPrompt(tr("Themepath Changed"),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Themepath Changed"),0,tr("OK")); // if(!isSdInserted()) { if(!isInserted(bootDevice)) { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } else { cfg_save_global(); } @@ -1366,7 +1366,7 @@ int MenuSettings() w.Append(&optionBrowser2); ResumeGui(); } else { - WindowPrompt(tr("Themepath change"),tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Themepath change"),tr("Console should be unlocked to modify it."),tr("OK")); } break; case 3: @@ -1385,19 +1385,19 @@ int MenuSettings() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(Settings.titlestxt_path, entered, sizeof(Settings.titlestxt_path)); - WindowPrompt(tr("Path of titles.txt changed."),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Path of titles.txt changed."),0,tr("OK")); // if(isSdInserted()) { if(isInserted(bootDevice)) { cfg_save_global(); CFG_Load(); } else { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } } } else { - WindowPrompt(tr("Path of titles.txt change"),tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Path of titles.txt change"),tr("Console should be unlocked to modify it."),tr("OK")); } break; case 4: @@ -1416,11 +1416,11 @@ int MenuSettings() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(Settings.update_path, entered, sizeof(Settings.update_path)); - WindowPrompt(tr("Updatepath changed."),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Updatepath changed."),0,tr("OK")); } } else - WindowPrompt(0,tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(0,tr("Console should be unlocked to modify it."),tr("OK")); break; case 5: if ( Settings.godmode == 1) @@ -1438,11 +1438,11 @@ int MenuSettings() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(Settings.Cheatcodespath, entered, sizeof(Settings.Cheatcodespath)); - WindowPrompt(tr("Cheatcodes Path changed"),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Cheatcodes Path changed"),0,tr("OK")); } } else - WindowPrompt(0,tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(0,tr("Console should be unlocked to modify it."),tr("OK")); break; case 6: if ( Settings.godmode == 1) @@ -1460,11 +1460,11 @@ int MenuSettings() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(Settings.TxtCheatcodespath, entered, sizeof(Settings.TxtCheatcodespath)); - WindowPrompt("TxtCheatcodespathchanged",0,tr("OK"),0,0,0,-1); + WindowPrompt("TxtCheatcodespathchanged",0,tr("OK")); } } else - WindowPrompt(0,tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(0,tr("Console should be unlocked to modify it."),tr("OK")); break; case 7: if ( Settings.godmode == 1) @@ -1482,14 +1482,14 @@ int MenuSettings() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(Settings.dolpath, entered, sizeof(Settings.dolpath)); - WindowPrompt(tr("Dolpath Changed"),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Dolpath Changed"),0,tr("OK")); // if(!isSdInserted()) { if(!isInserted(bootDevice)) { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } } } else { - WindowPrompt(tr("Dolpath change"),tr("Console should be unlocked to modify it."),tr("OK"),0,0,0,-1); + WindowPrompt(tr("Dolpath change"),tr("Console should be unlocked to modify it."),tr("OK")); } break; @@ -1497,7 +1497,7 @@ int MenuSettings() } /** If not godmode don't let him inside **/ } else { - WindowPrompt(tr("Console Locked"), tr("Unlock console to use this option."), tr("OK"), 0, 0, 0,-1); + WindowPrompt(tr("Console Locked"), tr("Unlock console to use this option."), tr("OK")); } optionBrowser2.SetEffect(EFFECT_FADE, -20); while(optionBrowser2.GetEffect() > 0) usleep(50); @@ -1528,12 +1528,12 @@ int MenuSettings() w.Remove(&backBtn); int ret = ProgressUpdateWindow(); if(ret < 0) { - WindowPrompt(tr("Update failed"),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Update failed"),0,tr("OK")); } w.Append(&optionBrowser2); w.Append(&backBtn); } else { - WindowPrompt(tr("Console Locked"), tr("Unlock console to use this option."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("Console Locked"), tr("Unlock console to use this option."), tr("OK")); } slidedirection = FADE; pageToDisplay = 2; @@ -1558,7 +1558,7 @@ int MenuSettings() w.Remove(&backBtn); w.Remove(&optionBrowser2); if(Settings.godmode) { - int choice = WindowPrompt(tr("Are you sure?"), 0, tr("Yes"), tr("Cancel"), 0, 0,-1); + int choice = WindowPrompt(tr("Are you sure?"), 0, tr("Yes"), tr("Cancel")); if(choice == 1) { // if(isSdInserted()) if(isInserted(bootDevice)) @@ -1574,7 +1574,7 @@ int MenuSettings() pageToDisplay = 0; } } else { - WindowPrompt(tr("Console Locked"), tr("Unlock console to use this option."), tr("OK"), 0, 0, 0,-1); + WindowPrompt(tr("Console Locked"), tr("Unlock console to use this option."), tr("OK")); } w.Append(&backBtn); w.Append(&optionBrowser2); @@ -1832,7 +1832,7 @@ int GameSettings(struct discHdr * header) w.Append(&cancelBtn); w.Append(&optionBrowser3); w.Append(&GCTBtn); - + mainWindow->Append(&w); struct Game_CFG* game_cfg = CFG_get_game_opt(header->id); @@ -1923,9 +1923,9 @@ int GameSettings(struct discHdr * header) if (reloadblock == on) options3.SetValue(9,tr("ON")); else if (reloadblock == off) options3.SetValue(9,tr("OFF")); - - - + + + options3.SetValue(11, NULL); options3.SetValue(12, NULL); @@ -1971,7 +1971,7 @@ int GameSettings(struct discHdr * header) break; case 10: int result; - result = WindowPrompt(tr("Are you sure?"),0,tr("Yes"),tr("Cancel"),0,0,-1); + result = WindowPrompt(tr("Are you sure?"),0,tr("Yes"),tr("Cancel")); if(result == 1) { if(isInserted(bootDevice)) { struct Game_NUM* game_num = CFG_get_game_num(header->id); @@ -1988,7 +1988,7 @@ int GameSettings(struct discHdr * header) } break; case 11: - int choice = WindowPrompt(tr("Are you sure?"),0,tr("Yes"),tr("Cancel"),0,0,-1); + int choice = WindowPrompt(tr("Are you sure?"),0,tr("Yes"),tr("Cancel")); if(choice == 1) { videoChoice = Settings.video; viChoice = Settings.vpatch; @@ -2028,14 +2028,14 @@ int GameSettings(struct discHdr * header) if (Settings.titlesOverride==1 && opt_lang != opt_langnew) OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, reload titles, do not keep in memory // titles are refreshed in menu.cpp as soon as this function returns - WindowPrompt(tr("Successfully Saved"), 0, tr("OK"), 0,0,0,-1); + WindowPrompt(tr("Successfully Saved"), 0, tr("OK")); } else { - WindowPrompt(tr("Save Failed"), 0, tr("OK"), 0,0,0,-1); + WindowPrompt(tr("Save Failed"), 0, tr("OK")); } } else { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } saveBtn.ResetState(); @@ -2053,7 +2053,7 @@ int GameSettings(struct discHdr * header) int choice = WindowPrompt( tr("Do you really want to delete:"), gameName, - tr("Yes"),tr("Cancel"),0,0,-1); + tr("Yes"),tr("Cancel")); if (choice == 1) { @@ -2065,14 +2065,14 @@ int GameSettings(struct discHdr * header) WindowPrompt( tr("Can't delete:"), gameName, - tr("OK"),0,0,0,-1); + tr("OK")); } else { //__Menu_GetEntries(); WindowPrompt( tr("Successfully deleted:"), gameName, - tr("OK"),0,0,0,-1); + tr("OK")); retVal = 1; } break; @@ -2084,7 +2084,7 @@ int GameSettings(struct discHdr * header) } } - + if (GCTBtn.GetState() == STATE_CLICKED) { char ID[7]; snprintf (ID,sizeof(ID),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]); diff --git a/source/settings/SettingsPrompts.cpp b/source/settings/SettingsPrompts.cpp index b9c1f414..3d919064 100644 --- a/source/settings/SettingsPrompts.cpp +++ b/source/settings/SettingsPrompts.cpp @@ -198,7 +198,7 @@ bool MenuOGG() } if (defaultBtn.GetState() == STATE_CLICKED) { - choice = WindowPrompt(tr("Loading standard music."),0,tr("OK"), tr("Cancel"),0,0,-1); + choice = WindowPrompt(tr("Loading standard music."),0,tr("OK"), tr("Cancel")); if (choice == 1) { sprintf(Settings.ogg_path, "notset"); bgMusic->Play(); @@ -230,7 +230,7 @@ bool MenuOGG() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(Settings.oggload_path, entered, sizeof(Settings.oggload_path)); - WindowPrompt(tr("Backgroundmusic Path changed."),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Backgroundmusic Path changed."),0,tr("OK")); // if(isSdInserted()) { if(isInserted(bootDevice)) { if(!strcmp("", Settings.oggload_path)) { @@ -241,7 +241,7 @@ bool MenuOGG() returnhere = true; break; } else { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } } if(countoggs > 0) { @@ -253,13 +253,13 @@ bool MenuOGG() ret = optionBrowser4.GetClickedOption(); if(ret>=0) { - choice = WindowPrompt(tr("Set as backgroundmusic?"),GetFileName(ret),tr("Yes"),tr("No"),0,0,-1); + choice = WindowPrompt(tr("Set as backgroundmusic?"),GetFileName(ret),tr("Yes"),tr("No")); if(choice == 1) { StopOgg(); snprintf(fullpath,150,"%s%s",Settings.oggload_path,GetFileName(ret)); choice = bgMusic->PlayOggFile(fullpath); if(choice < 0) { - WindowPrompt(tr("Not supported format!"), tr("Loading standard music."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("Not supported format!"), tr("Loading standard music."), tr("OK")); sprintf(Settings.ogg_path, "notset"); bgMusic->Play(); SetVolumeOgg(255*(Settings.volume/100.0)); @@ -279,7 +279,7 @@ bool MenuOGG() snprintf(fullpath, 150,"%s%s", Settings.oggload_path,GetFileName(ret)); choice = bgMusic->PlayOggFile(fullpath); if(choice < 0) { - WindowPrompt(tr("Not supported format!"), tr("Loading standard music."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("Not supported format!"), tr("Loading standard music."), tr("OK")); if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) { bgMusic->Play(); } else { @@ -407,7 +407,7 @@ int MenuLanguageSelect() if(dot) *dot='\0'; options2.SetName(cnt, "%s", filename); options2.SetValue(cnt, NULL); - + } if(cnt < 9) { @@ -449,7 +449,7 @@ int MenuLanguageSelect() } if (defaultBtn.GetState() == STATE_CLICKED) { - choice = WindowPrompt(tr("Loading standard language."),0,tr("OK"), tr("Cancel"),0,0,-1); + choice = WindowPrompt(tr("Loading standard language."),0,tr("OK"), tr("Cancel")); if (choice == 1) { sprintf(Settings.language_path, "notset"); cfg_save_global(); @@ -479,14 +479,14 @@ int MenuLanguageSelect() if(entered[len] !='/') strncat (entered, "/", 1); strncpy(Settings.languagefiles_path, entered, sizeof(Settings.languagefiles_path)); - WindowPrompt(tr("Languagepath changed."),0,tr("OK"),0,0,0,-1); + WindowPrompt(tr("Languagepath changed."),0,tr("OK")); // if(isSdInserted()) { if(isInserted(bootDevice)) { cfg_save_global(); returnhere = 1; break; } else { - WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"), 0,0,0,-1); + WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } } if(countfiles > 0) { @@ -498,7 +498,7 @@ int MenuLanguageSelect() ret = optionBrowser4.GetClickedOption(); if(ret>=0) { - choice = WindowPrompt(tr("Do you want to change language?"), 0, tr("Yes"), tr("Cancel"),0,0,-1); + choice = WindowPrompt(tr("Do you want to change language?"), 0, tr("Yes"), tr("Cancel")); if(choice == 1) { // if(isSdInserted()) { if(isInserted(bootDevice)) { @@ -506,7 +506,7 @@ int MenuLanguageSelect() cfg_save_global(); if(!checkfile(Settings.language_path)) { sprintf(Settings.language_path, tr("not set")); - WindowPrompt(tr("File not found."),tr("Loading standard language."),tr("OK"),0,0,0,-1); + WindowPrompt(tr("File not found."),tr("Loading standard language."),tr("OK")); } gettextCleanUp(); //lang_default(); diff --git a/source/sys.cpp b/source/sys.cpp index 8c6b7846..6bf8197f 100644 --- a/source/sys.cpp +++ b/source/sys.cpp @@ -14,9 +14,6 @@ #include "sys.h" #include "wpad.h" -/* Constants */ -#define CERTS_LEN 0x280 - //Wiilight stuff static vu32 *_wiilight_reg = (u32*)0xCD0000C0; void wiilight(int enable) { // Toggle wiilight (thanks Bool for wiilight source) @@ -26,7 +23,6 @@ void wiilight(int enable) { // Toggle wiilight (thanks Bool for wiil } /* Variables */ -static const char certs_fs[] ATTRIBUTE_ALIGN(32) = "/sys/cert.sys"; u8 shutdown = 0; u8 reset = 0; @@ -42,7 +38,6 @@ void __Sys_PowerCallback(void) shutdown = 1; } - void Sys_Init(void) { /* Initialize video subsytem */ @@ -65,7 +60,6 @@ static void _ExitApp() mload_close(); } - void Sys_Reboot(void) { /* Restart console */ @@ -118,8 +112,6 @@ int Sys_IosReload(int IOS) return ret; } - - #define ShutdownToDefault 0 #define ShutdownToIdle 1 #define ShutdownToStandby 2 @@ -177,29 +169,3 @@ void Sys_BackToLoader(void) // Channel Version Sys_LoadMenu(); } - -s32 Sys_GetCerts(signed_blob **certs, u32 *len) -{ - static signed_blob certificates[CERTS_LEN] ATTRIBUTE_ALIGN(32); - - s32 fd, ret; - - /* Open certificates file */ - fd = IOS_Open(certs_fs, 1); - if (fd < 0) - return fd; - - /* Read certificates */ - ret = IOS_Read(fd, certificates, sizeof(certificates)); - - /* Close file */ - IOS_Close(fd); - - /* Set values */ - if (ret > 0) { - *certs = certificates; - *len = sizeof(certificates); - } - - return ret; -} diff --git a/source/sys.h b/source/sys.h index d9b67c8b..03c021e4 100644 --- a/source/sys.h +++ b/source/sys.h @@ -1,13 +1,8 @@ #ifndef _SYS_H_ #define _SYS_H_ +void wiilight(int enable); -void wiilight(int enable); - -#ifdef __cplusplus -extern "C" -//{ -#endif /* Prototypes */ void Sys_Init(void); void Sys_Reboot(void); @@ -17,10 +12,5 @@ void Sys_ShutdownToStandby(void); void Sys_LoadMenu(void); void Sys_BackToLoader(void); int Sys_IosReload(int IOS); -s32 Sys_GetCerts(signed_blob **, u32 *); - -#ifdef __cplusplus -//} -#endif #endif