mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-19 09:49:21 +01:00
remove "test" tooltip from gamewall
fix TXTcheatpath not being saved made prompt and call you an idiot if you try to load in image that has bad dimensions. added stuff from the cheat menu to be translatable maybe fixed an issue with cheatcode names being too long and running on/off out of site un comment sam & max fix. we were under the impression that it only worked from disc but somebody said that it is working from USB also with ios rev 10 or 13a. i have left out the ios checks to see if it works with any ios and also it is only on if the game ID matches one of the two listed on wiiboxart.com for this game. drink a beer
This commit is contained in:
parent
8b83f89c9c
commit
eea639c177
File diff suppressed because one or more lines are too long
@ -51,7 +51,7 @@ int CheatMenu(const char * gameID)
|
|||||||
backBtn.SetLabel(&backBtnTxt);
|
backBtn.SetLabel(&backBtnTxt);
|
||||||
backBtn.SetTrigger(&trigB);
|
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);
|
createBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
||||||
GuiImage createBtnImg(&btnOutline);
|
GuiImage createBtnImg(&btnOutline);
|
||||||
GuiButton createBtn(&createBtnImg,&createBtnImg, 2, 3, -140, 400, &trigA, &btnSoundOver, &btnClick,1);
|
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);
|
int check = c.openTxtfile(txtfilename);
|
||||||
switch(check)
|
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;
|
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;
|
break;
|
||||||
case 1: //WindowPrompt("Opened File","File found for Game","Okay",NULL,NULL,NULL);
|
case 1: //WindowPrompt("Opened File","File found for Game","Okay",NULL,NULL,NULL);
|
||||||
int cntcheats = c.getCnt()+1;
|
int cntcheats = c.getCnt()+1;
|
||||||
@ -139,10 +139,10 @@ int CheatMenu(const char * gameID)
|
|||||||
string chtpath = Settings.Cheatcodespath;
|
string chtpath = Settings.Cheatcodespath;
|
||||||
string gctfname = chtpath + c.getGameID() + ".gct";
|
string gctfname = chtpath + c.getGameID() + ".gct";
|
||||||
c.createGCT(selectednrs,x,gctfname.c_str());
|
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;
|
exit = true;
|
||||||
break;
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +120,7 @@ typedef struct _paddata {
|
|||||||
#define EFFECT_ROCK_VERTICLE 1024
|
#define EFFECT_ROCK_VERTICLE 1024
|
||||||
#define EFFECT_GOROUND 2048
|
#define EFFECT_GOROUND 2048
|
||||||
|
|
||||||
|
|
||||||
//!Sound conversion and playback. A wrapper for other sound libraries - ASND, libmad, ltremor, etc
|
//!Sound conversion and playback. A wrapper for other sound libraries - ASND, libmad, ltremor, etc
|
||||||
class GuiSound
|
class GuiSound
|
||||||
{
|
{
|
||||||
|
@ -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] = 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]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
optionTxt[i]->SetPosition(24,0);
|
optionTxt[i]->SetPosition(24,0);
|
||||||
|
optionVal[i]->SetMaxWidth(bgOptionsImg->GetWidth() - (coL2+24), GuiText::DOTTED);
|
||||||
|
|
||||||
optionBg[i] = new GuiImage(bgOptionsEntry);
|
optionBg[i] = new GuiImage(bgOptionsEntry);
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char
|
|||||||
speed = SHIFT_SPEED;
|
speed = SHIFT_SPEED;
|
||||||
char imgPath[100];
|
char imgPath[100];
|
||||||
rows =3;
|
rows =3;
|
||||||
|
drawTTs=0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -618,7 +619,7 @@ void GuiGameGrid::Draw()
|
|||||||
btnRowUp->Draw();
|
btnRowUp->Draw();
|
||||||
btnRowDown->Draw();
|
btnRowDown->Draw();
|
||||||
//debugTxt->Draw();
|
//debugTxt->Draw();
|
||||||
if ((wait>75)&&(Settings.tooltips == TooltipsOn))
|
if ((wait>75)&&(Settings.tooltips == TooltipsOn)&&(drawTTs!=0))
|
||||||
titleTT->Draw();
|
titleTT->Draw();
|
||||||
|
|
||||||
|
|
||||||
@ -651,6 +652,7 @@ void GuiGameGrid::ChangeRows(int n)
|
|||||||
|
|
||||||
|
|
||||||
firstPic=0;
|
firstPic=0;
|
||||||
|
drawTTs=0;
|
||||||
|
|
||||||
// create new buttons based on pagesize
|
// create new buttons based on pagesize
|
||||||
for(int i=0; i < pagesize; i++) {
|
for(int i=0; i < pagesize; i++) {
|
||||||
@ -994,6 +996,7 @@ void GuiGameGrid::Update(GuiTrigger * t)
|
|||||||
speed = SHIFT_SPEED;
|
speed = SHIFT_SPEED;
|
||||||
return;
|
return;
|
||||||
}goLeft=12;
|
}goLeft=12;
|
||||||
|
wait=0;wait1=0;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1327,6 +1330,7 @@ void GuiGameGrid::Update(GuiTrigger * t)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
goRight=12;
|
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()]));
|
snprintf(titlebuffer, sizeof(titlebuffer), "%s",get_title(&gameList[this->GetSelectedOption()]));
|
||||||
if (selected!=selectedOld){
|
if (selected!=selectedOld){
|
||||||
|
drawTTs=1;
|
||||||
delete titleTT;
|
delete titleTT;
|
||||||
titleTT = new GuiTooltip(titlebuffer);
|
titleTT = new GuiTooltip(titlebuffer);
|
||||||
titleTT->SetAlpha(THEME.tooltipAlpha);
|
titleTT->SetAlpha(THEME.tooltipAlpha);
|
||||||
@ -1754,6 +1759,7 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
|
|||||||
firstPic = 0;
|
firstPic = 0;
|
||||||
clickedItem = -1;
|
clickedItem = -1;
|
||||||
gameCnt=count;
|
gameCnt=count;
|
||||||
|
drawTTs=0;
|
||||||
//speed = SHIFT_SPEED;
|
//speed = SHIFT_SPEED;
|
||||||
char imgPath[100];
|
char imgPath[100];
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ class GuiGameGrid : public GuiElement
|
|||||||
int speed;
|
int speed;
|
||||||
int clickedItem;
|
int clickedItem;
|
||||||
int rows;
|
int rows;
|
||||||
|
int drawTTs;
|
||||||
|
|
||||||
|
|
||||||
struct discHdr * gameList;
|
struct discHdr * gameList;
|
||||||
int gameCnt;
|
int gameCnt;
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
/**
|
/**
|
||||||
* Constructor for the GuiImageData class.
|
* Constructor for the GuiImageData class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
extern int idiotFlag;
|
||||||
|
extern char idiotChar[50];
|
||||||
GuiImageData::GuiImageData(const u8 * img)
|
GuiImageData::GuiImageData(const u8 * img)
|
||||||
{
|
{
|
||||||
data = NULL;
|
data = NULL;
|
||||||
@ -28,9 +31,10 @@ GuiImageData::GuiImageData(const u8 * img)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
int res = PNGU_GetImageProperties(ctx, &imgProp);
|
int res = PNGU_GetImageProperties(ctx, &imgProp);
|
||||||
|
//if (((4%imgProp.imgWidth)!=0)||((4%imgProp.imgHeight)!=0))idiotFlag=1;
|
||||||
|
|
||||||
if(res == PNGU_OK)
|
if(res == PNGU_OK)
|
||||||
{
|
{
|
||||||
int len = imgProp.imgWidth * imgProp.imgHeight * 4;
|
int len = imgProp.imgWidth * imgProp.imgHeight * 4;
|
||||||
if(len%32) len += (32-len%32);
|
if(len%32) len += (32-len%32);
|
||||||
data = (u8 *)memalign (32, len);
|
data = (u8 *)memalign (32, len);
|
||||||
@ -49,6 +53,9 @@ GuiImageData::GuiImageData(const u8 * img)
|
|||||||
{
|
{
|
||||||
free(data);
|
free(data);
|
||||||
data = NULL;
|
data = NULL;
|
||||||
|
idiotFlag=1;
|
||||||
|
snprintf(idiotChar, sizeof(idiotChar), "%s", img);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -69,6 +76,7 @@ GuiImageData::GuiImageData(const char * imgPath, const u8 * buffer)
|
|||||||
{
|
{
|
||||||
PNGUPROP imgProp;
|
PNGUPROP imgProp;
|
||||||
IMGCTX ctx = PNGU_SelectImageFromDevice(imgPath);
|
IMGCTX ctx = PNGU_SelectImageFromDevice(imgPath);
|
||||||
|
//if (((4%imgProp.imgWidth)!=0)||((4%imgProp.imgHeight)!=0))idiotFlag=1;
|
||||||
|
|
||||||
if(ctx)
|
if(ctx)
|
||||||
{
|
{
|
||||||
@ -94,6 +102,8 @@ GuiImageData::GuiImageData(const char * imgPath, const u8 * buffer)
|
|||||||
{
|
{
|
||||||
free(data);
|
free(data);
|
||||||
data = NULL;
|
data = NULL;
|
||||||
|
idiotFlag=1;
|
||||||
|
snprintf(idiotChar, sizeof(idiotChar), "%s", imgPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,9 @@ GuiImage * bgImg = NULL;
|
|||||||
GuiImageData * background = NULL;
|
GuiImageData * background = NULL;
|
||||||
GuiSound * bgMusic = NULL;
|
GuiSound * bgMusic = NULL;
|
||||||
float gamesize;
|
float gamesize;
|
||||||
|
int currentMenu;
|
||||||
|
int idiotFlag=-1;
|
||||||
|
char idiotChar[50];
|
||||||
|
|
||||||
/*** Variables used only in menu.cpp ***/
|
/*** Variables used only in menu.cpp ***/
|
||||||
static GuiImage * coverImg = NULL;
|
static GuiImage * coverImg = NULL;
|
||||||
@ -138,7 +141,8 @@ UpdateGUI (void *arg)
|
|||||||
|
|
||||||
for(int i=0; i < 4; i++)
|
for(int i=0; i < 4; i++)
|
||||||
mainWindow->Update(&userInput[i]);
|
mainWindow->Update(&userInput[i]);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
for(int a = 5; a < 255; a += 10)
|
for(int a = 5; a < 255; a += 10)
|
||||||
{
|
{
|
||||||
@ -202,7 +206,7 @@ void ExitGUIThreads()
|
|||||||
* MenuDiscList
|
* MenuDiscList
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static int MenuDiscList()
|
int MenuDiscList()
|
||||||
{
|
{
|
||||||
|
|
||||||
int startat = 0;
|
int startat = 0;
|
||||||
@ -595,6 +599,13 @@ static int MenuDiscList()
|
|||||||
{
|
{
|
||||||
|
|
||||||
VIDEO_WaitVSync ();
|
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
|
//CLOCK
|
||||||
time_t rawtime = time(0); //this fixes code dump caused by the 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 MainMenu(int menu)
|
||||||
{
|
{
|
||||||
|
|
||||||
int currentMenu = menu;
|
currentMenu = menu;
|
||||||
char imgPath[100];
|
char imgPath[100];
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
|
@ -1236,6 +1236,7 @@ bool cfg_save_global()// save global settings
|
|||||||
fprintf(f, "language_path = %s\n ", Settings.language_path);
|
fprintf(f, "language_path = %s\n ", Settings.language_path);
|
||||||
fprintf(f, "languagefiles_path = %s\n ", Settings.languagefiles_path);
|
fprintf(f, "languagefiles_path = %s\n ", Settings.languagefiles_path);
|
||||||
fprintf(f, "oggload_path = %s\n ", Settings.oggload_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);
|
fprintf(f, "titlestxt_path = %s\n ", Settings.titlestxt_path);
|
||||||
if(!strcmp("", Settings.unlockCode)) {
|
if(!strcmp("", Settings.unlockCode)) {
|
||||||
fprintf(f, "godmode = %d\n ", Settings.godmode);
|
fprintf(f, "godmode = %d\n ", Settings.godmode);
|
||||||
|
@ -36,9 +36,16 @@ void __Disc_SetLowMem(void)
|
|||||||
*(vu32 *)0x80000060 = 0x38A00040;
|
*(vu32 *)0x80000060 = 0x38A00040;
|
||||||
*(vu32 *)0x800000E4 = 0x80431A80;
|
*(vu32 *)0x800000E4 = 0x80431A80;
|
||||||
*(vu32 *)0x800000EC = 0x81800000; // Dev Debugger Monitor Address
|
*(vu32 *)0x800000EC = 0x81800000; // Dev Debugger Monitor Address
|
||||||
*(vu32 *)0x800000F0 = 0x01800000; // Simulated Memory Size
|
*(vu32 *)0x800000F0 = 0x01800000; // Simulated Memory Size
|
||||||
|
|
||||||
//*(vu32*)0x80003184 = 0x80000000; // Game ID Address
|
//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 */
|
/* Copy disc ID */
|
||||||
memcpy((void *)0x80003180, (void *)0x80000000, 4);
|
memcpy((void *)0x80003180, (void *)0x80000000, 4);
|
||||||
|
Loading…
Reference in New Issue
Block a user