*probably fix the bug that caused WiiTDB.zip to not update the full

gamelist.
*rearrange the Gui_Numpad so it doesnt look like a 4yr old made it :)
*remove redundant setPostion and setAlignment in Gui_Numpad
*remove old comments
This commit is contained in:
giantpune 2009-12-11 23:07:27 +00:00
parent f364aaa964
commit 8732c83f11
7 changed files with 22 additions and 31 deletions

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>1.0 r856</version> <version>1.0 r857</version>
<release_date>200912110630</release_date> <release_date>200912112033</release_date>
<short_description>Loads games from USB-devices</short_description> <short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times. <long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller. The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.

View File

@ -21,8 +21,8 @@
GuiNumpad::GuiNumpad(char * t, u32 max) GuiNumpad::GuiNumpad(char * t, u32 max)
{ {
width = 540; width = 400;
height = 400; height = 370;
selectable = true; selectable = true;
focus = 0; // allow focus focus = 0; // allow focus
alignmentHor = ALIGN_CENTRE; alignmentHor = ALIGN_CENTRE;
@ -61,20 +61,16 @@ GuiNumpad::GuiNumpad(char * t, u32 max)
keyBackOverImg = new GuiImage(keyMediumOver); keyBackOverImg = new GuiImage(keyMediumOver);
keyBackText = new GuiText("Back", 20, (GXColor){0, 0, 0, 0xff}); keyBackText = new GuiText("Back", 20, (GXColor){0, 0, 0, 0xff});
keyBack = new GuiButton(keyBackImg, keyBackOverImg, 0, 3, 11*42+40, 0*42+120, trigA, keySoundOver, keySoundClick,1); keyBack = new GuiButton(keyBackImg, keyBackOverImg, ALIGN_CENTRE, ALIGN_MIDDLE, 90, 80, trigA, keySoundOver, keySoundClick,1);
keyBack->SetLabel(keyBackText); keyBack->SetLabel(keyBackText);
keyBack->SetTrigger(trigB); keyBack->SetTrigger(trigB);
keyBack->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
keyBack->SetPosition(50, 80);
this->Append(keyBack); this->Append(keyBack);
keyClearImg = new GuiImage(keyMedium); keyClearImg = new GuiImage(keyMedium);
keyClearOverImg = new GuiImage(keyMediumOver); keyClearOverImg = new GuiImage(keyMediumOver);
keyClearText = new GuiText("Clear", 20, (GXColor){0, 0, 0, 0xff}); keyClearText = new GuiText("Clear", 20, (GXColor){0, 0, 0, 0xff});
keyClear = new GuiButton(keyClearImg, keyClearOverImg, 0, 3, (10*42+40), 4*42+120, trigA, keySoundOver, keySoundClick,1); keyClear = new GuiButton(keyClearImg, keyClearOverImg, ALIGN_CENTRE, ALIGN_MIDDLE, -90, 80, trigA, keySoundOver, keySoundClick,1);
keyClear->SetLabel(keyClearText); keyClear->SetLabel(keyClearText);
keyClear->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
keyClear->SetPosition(-130, 80);
this->Append(keyClear); this->Append(keyClear);
char txt[2] = { 0, 0 }; char txt[2] = { 0, 0 };
@ -82,20 +78,19 @@ GuiNumpad::GuiNumpad(char * t, u32 max)
{ {
if (keys[i] != '\0') if (keys[i] != '\0')
{ {
int col = i % 3;
int row = i / 3;
keyImg[i] = new GuiImage(keyMedium); keyImg[i] = new GuiImage(keyMedium);
keyImgOver[i] = new GuiImage(keyMediumOver); keyImgOver[i] = new GuiImage(keyMediumOver);
txt[0] = keys[i]; txt[0] = keys[i];
keyTxt[i] = new GuiText(txt, 20, (GXColor){0, 0, 0, 0xff}); keyTxt[i] = new GuiText(txt, 20, (GXColor){0, 0, 0, 0xff});
keyTxt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); keyTxt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
keyTxt[i]->SetPosition(0, -10); keyTxt[i]->SetPosition(0, -10);
keyBtn[i]= new GuiButton(keyImg[i], keyImgOver[i], 0, 3, (42+21*i+40), i*42+120, trigA, keySoundOver, keySoundClick, 1); keyBtn[i]= new GuiButton(keyImg[i], keyImgOver[i], ALIGN_CENTRE, ALIGN_MIDDLE, -90 + 90 * col, -70 + 50 * row, trigA, keySoundOver, keySoundClick, 1);
keyBtn[i]->SetLabel(keyTxt[i]); keyBtn[i]->SetLabel(keyTxt[i]);
keyBtn[i]->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); keyBtn[i]->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
int col = i % 3;
int row = i / 3;
keyBtn[i]->SetPosition(-130 + 90 * col, -70 + 50 * row);
this->Append(keyBtn[i]); this->Append(keyBtn[i]);
} }
} }

View File

@ -18,7 +18,7 @@
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <debug.h> #include <debug.h>
extern "C" { //not sure if this is in the libogc that the buildbot is using so it isnt used yet extern "C" {
extern void __exception_setreload(int t); extern void __exception_setreload(int t);
} }
@ -179,21 +179,20 @@ void InitTextVideo () {
int int
main(int argc, char *argv[]) { main(int argc, char *argv[]) {
setlocale(LC_ALL, "en.UTF-8");
geckoinit = InitGecko();
if (hbcStubAvailable()) { if (hbcStubAvailable() || geckoinit) {
InitTextVideo(); InitTextVideo();
} }
// DEBUG_Init(GDBSTUB_DEVICE_USB, 1); // DEBUG_Init(GDBSTUB_DEVICE_USB, 1);
//_break(); //_break();
// __exception_setreload(5);//auto reset is code dump nobody gives us codedump info anyways. __exception_setreload(5);//auto reset code dump nobody gives us codedump info anyways.
setlocale(LC_ALL, "en.UTF-8");
geckoinit = InitGecko();
if (geckoinit)InitTextVideo(); gprintf("\n\n------------------");
gprintf("\x1b[2J");
gprintf("------------------");
gprintf("\nUSB Loader GX rev%s",GetRev()); gprintf("\nUSB Loader GX rev%s",GetRev());
gprintf("\nmain(%d", argc); gprintf("\nmain(%d", argc);
for (int i=0;i<argc;i++) for (int i=0;i<argc;i++)

View File

@ -46,7 +46,7 @@ void rockout(int f = 0);
***************************************************************************/ ***************************************************************************/
int MenuDiscList() { int MenuDiscList() {
gprintf("\nMenuDiscList()");//testing out the gecko stuff. this shouldn't break anything, but we'll see gprintf("\nMenuDiscList()");
int startat = 0; int startat = 0;
int offset = 0; int offset = 0;
int datag = 0; int datag = 0;
@ -68,7 +68,6 @@ int MenuDiscList() {
f32 freespace, used, size = 0.0; f32 freespace, used, size = 0.0;
wchar_t searchChar; wchar_t searchChar;
//SCREENSAVER //SCREENSAVER
//WPad_SetIdleTime(300); //needs the time in seconds
int check = 0; //to skip the first cycle when wiimote isn't completely connected int check = 0; //to skip the first cycle when wiimote isn't completely connected
datagB=0; datagB=0;

View File

@ -77,7 +77,6 @@ int OnScreenNumpad(char * var, u32 maxlen) {
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, Settings.sfxvolume); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, Settings.sfxvolume);
// because destroy GuiSound must wait while sound playing is finished, we use a global sound // because destroy GuiSound must wait while sound playing is finished, we use a global sound
if(!btnClick2) btnClick2=new GuiSound(button_click2_pcm, button_click2_pcm_size,Settings.sfxvolume); if(!btnClick2) btnClick2=new GuiSound(button_click2_pcm, button_click2_pcm_size,Settings.sfxvolume);
// GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, Settings.sfxvolume);
char imgPath[100]; char imgPath[100];
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
@ -94,7 +93,7 @@ int OnScreenNumpad(char * var, u32 maxlen) {
okBtnTxt.SetWidescreen(CFG.widescreen); okBtnTxt.SetWidescreen(CFG.widescreen);
okBtnImg.SetWidescreen(CFG.widescreen); okBtnImg.SetWidescreen(CFG.widescreen);
} }
GuiButton okBtn(&okBtnImg,&okBtnImg, 0, 4, 5, 15, &trigA, &btnSoundOver, btnClick2,1); GuiButton okBtn(&okBtnImg,&okBtnImg, 0, 4, 5, -15, &trigA, &btnSoundOver, btnClick2,1);
okBtn.SetLabel(&okBtnTxt); okBtn.SetLabel(&okBtnTxt);
GuiText cancelBtnTxt(tr("Cancel"), 22, THEME.prompttext); GuiText cancelBtnTxt(tr("Cancel"), 22, THEME.prompttext);
GuiImage cancelBtnImg(&btnOutline); GuiImage cancelBtnImg(&btnOutline);
@ -102,7 +101,7 @@ int OnScreenNumpad(char * var, u32 maxlen) {
cancelBtnTxt.SetWidescreen(CFG.widescreen); cancelBtnTxt.SetWidescreen(CFG.widescreen);
cancelBtnImg.SetWidescreen(CFG.widescreen); cancelBtnImg.SetWidescreen(CFG.widescreen);
} }
GuiButton cancelBtn(&cancelBtnImg,&cancelBtnImg, 1, 4, -5, 15, &trigA, &btnSoundOver, btnClick2,1); GuiButton cancelBtn(&cancelBtnImg,&cancelBtnImg, 1, 4, -5, -15, &trigA, &btnSoundOver, btnClick2,1);
cancelBtn.SetLabel(&cancelBtnTxt); cancelBtn.SetLabel(&cancelBtnTxt);
cancelBtn.SetTrigger(&trigB); cancelBtn.SetTrigger(&trigB);

View File

@ -507,7 +507,7 @@ int __Menu_GetGameList(int t, wchar_t* gameFilter, discHdr ** PgameList, u32 *Pg
} }
/* Other parental control method */ /* Other parental control method */
if (Settings.parentalcontrol == 0 && Settings.parental.is_unlocked == 0 && Settings.parental.enabled == 1) if (Settings.parentalcontrol == 0 && Settings.parental.is_unlocked == 0 && Settings.parental.enabled == 1&& t==0)
{ {
// Check game rating in WiiTDB, since the default Wii parental control setting is enabled // Check game rating in WiiTDB, since the default Wii parental control setting is enabled
s32 rating = GetRatingForGame((char *) header->id); s32 rating = GetRatingForGame((char *) header->id);

View File

@ -944,7 +944,6 @@ s32 getIOSrev(u64 req)
out: out:
gprintf(" = %d",ret); gprintf(" = %d",ret);
return ret; return ret;
// TITLE_ID(0x00000001,0x000000de)
} }