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:
giantpune 2009-06-25 12:47:09 +00:00
parent 8b83f89c9c
commit eea639c177
10 changed files with 53 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@ -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);
}

View File

@ -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
{

View File

@ -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);

View File

@ -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];

View File

@ -28,6 +28,8 @@ class GuiGameGrid : public GuiElement
int speed;
int clickedItem;
int rows;
int drawTTs;
struct discHdr * gameList;
int gameCnt;

View File

@ -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);
}
}
}

View File

@ -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

View File

@ -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);

View File

@ -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);