diff --git a/gui.pnproj b/gui.pnproj index 62bef5e1..572401d6 100644 --- a/gui.pnproj +++ b/gui.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/source/cheatmenu.cpp b/source/cheatmenu.cpp index 8aa84820..bcbef9e4 100644 --- a/source/cheatmenu.cpp +++ b/source/cheatmenu.cpp @@ -51,7 +51,7 @@ int CheatMenu(const char * gameID) backBtn.SetLabel(&backBtnTxt); backBtn.SetTrigger(&trigB); - GuiText createBtnTxt("Create" , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); + GuiText createBtnTxt(tr("Create") , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); createBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30); GuiImage createBtnImg(&btnOutline); GuiButton createBtn(&createBtnImg,&createBtnImg, 2, 3, -140, 400, &trigA, &btnSoundOver, &btnClick,1); @@ -65,9 +65,9 @@ int CheatMenu(const char * gameID) int check = c.openTxtfile(txtfilename); switch(check) { - case -1: WindowPrompt("Error","Cheatfile empty",tr("OK"),NULL,NULL,NULL); + case -1: WindowPrompt(tr("Error"),tr("Cheatfile is blank"),tr("OK"),NULL,NULL,NULL); break; - case 0: WindowPrompt("Error","No Cheatfile found",tr("OK"),NULL,NULL,NULL); + case 0: WindowPrompt(tr("Error"),tr("No Cheatfile found"),tr("OK"),NULL,NULL,NULL); break; case 1: //WindowPrompt("Opened File","File found for Game","Okay",NULL,NULL,NULL); int cntcheats = c.getCnt()+1; @@ -139,10 +139,10 @@ int CheatMenu(const char * gameID) string chtpath = Settings.Cheatcodespath; string gctfname = chtpath + c.getGameID() + ".gct"; c.createGCT(selectednrs,x,gctfname.c_str()); - WindowPrompt("GCT File created",NULL,tr("OK"),NULL,NULL,NULL); + WindowPrompt(tr("GCT File created"),NULL,tr("OK"),NULL,NULL,NULL); exit = true; break; - } else WindowPrompt("Error","Couldnīt create GCT file",tr("OK"),NULL,NULL,NULL); + } else WindowPrompt(tr("Error"),tr("Could not create GCT file"),tr("OK"),NULL,NULL,NULL); } diff --git a/source/libwiigui/gui.h b/source/libwiigui/gui.h index 9a0305c4..f479785f 100644 --- a/source/libwiigui/gui.h +++ b/source/libwiigui/gui.h @@ -120,6 +120,7 @@ typedef struct _paddata { #define EFFECT_ROCK_VERTICLE 1024 #define EFFECT_GOROUND 2048 + //!Sound conversion and playback. A wrapper for other sound libraries - ASND, libmad, ltremor, etc class GuiSound { diff --git a/source/libwiigui/gui_customoptionbrowser.cpp b/source/libwiigui/gui_customoptionbrowser.cpp index 89916896..4ddd773a 100644 --- a/source/libwiigui/gui_customoptionbrowser.cpp +++ b/source/libwiigui/gui_customoptionbrowser.cpp @@ -182,6 +182,7 @@ GuiCustomOptionBrowser::GuiCustomOptionBrowser(int w, int h, customOptionList * optionTxt[i] = new GuiText(options->GetName(i), 20, (GXColor){THEME.settingsTxt_r, THEME.settingsTxt_g, THEME.settingsTxt_b, 0xff}); optionTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); optionTxt[i]->SetPosition(24,0); + optionVal[i]->SetMaxWidth(bgOptionsImg->GetWidth() - (coL2+24), GuiText::DOTTED); optionBg[i] = new GuiImage(bgOptionsEntry); diff --git a/source/libwiigui/gui_gamegrid.cpp b/source/libwiigui/gui_gamegrid.cpp index 57798d4a..d361a555 100644 --- a/source/libwiigui/gui_gamegrid.cpp +++ b/source/libwiigui/gui_gamegrid.cpp @@ -62,6 +62,7 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char speed = SHIFT_SPEED; char imgPath[100]; rows =3; + drawTTs=0; @@ -618,7 +619,7 @@ void GuiGameGrid::Draw() btnRowUp->Draw(); btnRowDown->Draw(); //debugTxt->Draw(); - if ((wait>75)&&(Settings.tooltips == TooltipsOn)) + if ((wait>75)&&(Settings.tooltips == TooltipsOn)&&(drawTTs!=0)) titleTT->Draw(); @@ -651,6 +652,7 @@ void GuiGameGrid::ChangeRows(int n) firstPic=0; + drawTTs=0; // create new buttons based on pagesize for(int i=0; i < pagesize; i++) { @@ -994,6 +996,7 @@ void GuiGameGrid::Update(GuiTrigger * t) speed = SHIFT_SPEED; return; }goLeft=12; + wait=0;wait1=0; } @@ -1327,6 +1330,7 @@ void GuiGameGrid::Update(GuiTrigger * t) return; } goRight=12; + wait=0;wait1=0; @@ -1698,6 +1702,7 @@ void GuiGameGrid::Update(GuiTrigger * t) } snprintf(titlebuffer, sizeof(titlebuffer), "%s",get_title(&gameList[this->GetSelectedOption()])); if (selected!=selectedOld){ + drawTTs=1; delete titleTT; titleTT = new GuiTooltip(titlebuffer); titleTT->SetAlpha(THEME.tooltipAlpha); @@ -1754,6 +1759,7 @@ void GuiGameGrid::Reload(struct discHdr * l, int count) firstPic = 0; clickedItem = -1; gameCnt=count; + drawTTs=0; //speed = SHIFT_SPEED; char imgPath[100]; diff --git a/source/libwiigui/gui_gamegrid.h b/source/libwiigui/gui_gamegrid.h index 4b3c0933..4d742922 100644 --- a/source/libwiigui/gui_gamegrid.h +++ b/source/libwiigui/gui_gamegrid.h @@ -28,6 +28,8 @@ class GuiGameGrid : public GuiElement int speed; int clickedItem; int rows; + int drawTTs; + struct discHdr * gameList; int gameCnt; diff --git a/source/libwiigui/gui_imagedata.cpp b/source/libwiigui/gui_imagedata.cpp index 21b5f2e3..5034d9a9 100644 --- a/source/libwiigui/gui_imagedata.cpp +++ b/source/libwiigui/gui_imagedata.cpp @@ -13,6 +13,9 @@ /** * Constructor for the GuiImageData class. */ + +extern int idiotFlag; +extern char idiotChar[50]; GuiImageData::GuiImageData(const u8 * img) { data = NULL; @@ -28,9 +31,10 @@ GuiImageData::GuiImageData(const u8 * img) return; int res = PNGU_GetImageProperties(ctx, &imgProp); + //if (((4%imgProp.imgWidth)!=0)||((4%imgProp.imgHeight)!=0))idiotFlag=1; if(res == PNGU_OK) - { + { int len = imgProp.imgWidth * imgProp.imgHeight * 4; if(len%32) len += (32-len%32); data = (u8 *)memalign (32, len); @@ -49,6 +53,9 @@ GuiImageData::GuiImageData(const u8 * img) { free(data); data = NULL; + idiotFlag=1; + snprintf(idiotChar, sizeof(idiotChar), "%s", img); + } } } @@ -69,6 +76,7 @@ GuiImageData::GuiImageData(const char * imgPath, const u8 * buffer) { PNGUPROP imgProp; IMGCTX ctx = PNGU_SelectImageFromDevice(imgPath); + //if (((4%imgProp.imgWidth)!=0)||((4%imgProp.imgHeight)!=0))idiotFlag=1; if(ctx) { @@ -94,6 +102,8 @@ GuiImageData::GuiImageData(const char * imgPath, const u8 * buffer) { free(data); data = NULL; + idiotFlag=1; + snprintf(idiotChar, sizeof(idiotChar), "%s", imgPath); } } } diff --git a/source/menu.cpp b/source/menu.cpp index 8d7f3180..fd66a2d5 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -47,6 +47,9 @@ GuiImage * bgImg = NULL; GuiImageData * background = NULL; GuiSound * bgMusic = NULL; float gamesize; +int currentMenu; +int idiotFlag=-1; +char idiotChar[50]; /*** Variables used only in menu.cpp ***/ static GuiImage * coverImg = NULL; @@ -138,7 +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) { @@ -202,7 +206,7 @@ void ExitGUIThreads() * MenuDiscList ***************************************************************************/ -static int MenuDiscList() +int MenuDiscList() { int startat = 0; @@ -595,6 +599,13 @@ static 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); + idiotFlag=-1;} //CLOCK time_t rawtime = time(0); //this fixes code dump caused by the clock @@ -1758,7 +1769,7 @@ static int MenuCheck() int MainMenu(int menu) { - int currentMenu = menu; + currentMenu = menu; char imgPath[100]; #ifdef HW_RVL diff --git a/source/settings/cfg.c b/source/settings/cfg.c index 5fea6fd1..5cc213ee 100644 --- a/source/settings/cfg.c +++ b/source/settings/cfg.c @@ -1236,6 +1236,7 @@ bool cfg_save_global()// save global settings fprintf(f, "language_path = %s\n ", Settings.language_path); fprintf(f, "languagefiles_path = %s\n ", Settings.languagefiles_path); fprintf(f, "oggload_path = %s\n ", Settings.oggload_path); + fprintf(f, "TxtCheatcodespath = %s\n ", Settings.TxtCheatcodespath); fprintf(f, "titlestxt_path = %s\n ", Settings.titlestxt_path); if(!strcmp("", Settings.unlockCode)) { fprintf(f, "godmode = %d\n ", Settings.godmode); diff --git a/source/usbloader/disc.c b/source/usbloader/disc.c index 3deaa62d..08004a62 100644 --- a/source/usbloader/disc.c +++ b/source/usbloader/disc.c @@ -36,9 +36,16 @@ void __Disc_SetLowMem(void) *(vu32 *)0x80000060 = 0x38A00040; *(vu32 *)0x800000E4 = 0x80431A80; *(vu32 *)0x800000EC = 0x81800000; // Dev Debugger Monitor Address - *(vu32 *)0x800000F0 = 0x01800000; // Simulated Memory Size - - //*(vu32*)0x80003184 = 0x80000000; // Game ID Address + *(vu32 *)0x800000F0 = 0x01800000; // Simulated Memory Size + + //If the game is sam & max: season 1 put this shit in + char tempTxt[10]; + snprintf (tempTxt,sizeof(tempTxt),"%c%c%c%c%c%c", gameid[0], gameid[1], gameid[2], gameid[3], gameid[4], gameid[5]); + if ((strcmp(tempTxt,"R3XE6U")==0)|| + (strcmp(tempTxt,"R3XP6V")==0))/*&& + (IOS_GetVersion()==249)&& + ((IOS_GetRevision()==10)||(IOS_GetRevision()==13)) I left out the ios check to see if works with other ios versions.*/ + {*(vu32*)0x80003184 = 0x80000000;} // Game ID Address /* Copy disc ID */ memcpy((void *)0x80003180, (void *)0x80000000, 4);