new icons, minor bugfixes
@ -35,11 +35,11 @@ int FDSSwitchRequested;
|
|||||||
/*** External 2D Video ***/
|
/*** External 2D Video ***/
|
||||||
/*** 2D Video Globals ***/
|
/*** 2D Video Globals ***/
|
||||||
static GXRModeObj *vmode; // Graphics Mode Object
|
static GXRModeObj *vmode; // Graphics Mode Object
|
||||||
unsigned int *xfb[2]; // Framebuffers
|
static unsigned int *xfb[2]; // Framebuffers
|
||||||
int whichfb = 0; // Frame buffer toggle
|
static int whichfb = 0; // Frame buffer toggle
|
||||||
int screenheight;
|
int screenheight;
|
||||||
int screenwidth;
|
int screenwidth;
|
||||||
bool progressive = FALSE;
|
bool progressive = false;
|
||||||
|
|
||||||
/*** 3D GX ***/
|
/*** 3D GX ***/
|
||||||
#define TEX_WIDTH 256
|
#define TEX_WIDTH 256
|
||||||
@ -226,7 +226,7 @@ static void SyncSpeed()
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#define TSTACK 16384
|
#define TSTACK 16384
|
||||||
static lwpq_t videoblankqueue;
|
static lwpq_t videoblankqueue;
|
||||||
static lwp_t vbthread;
|
static lwp_t vbthread = LWP_THREAD_NULL;
|
||||||
static unsigned char vbstack[TSTACK];
|
static unsigned char vbstack[TSTACK];
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -528,7 +528,7 @@ InitGCVideo ()
|
|||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
// widescreen fix
|
// widescreen fix
|
||||||
if(CONF_GetAspectRatio())
|
if(CONF_GetAspectRatio() == CONF_ASPECT_16_9)
|
||||||
{
|
{
|
||||||
vmode->viWidth = VI_MAX_WIDTH_PAL-12;
|
vmode->viWidth = VI_MAX_WIDTH_PAL-12;
|
||||||
vmode->viXOrigin = ((VI_MAX_WIDTH_PAL - vmode->viWidth) / 2) + 2;
|
vmode->viXOrigin = ((VI_MAX_WIDTH_PAL - vmode->viWidth) / 2) + 2;
|
||||||
@ -744,6 +744,7 @@ void RenderFrame(unsigned char *XBuf)
|
|||||||
// load texture into GX
|
// load texture into GX
|
||||||
DCFlushRange(texturemem, TEX_WIDTH * TEX_HEIGHT * 2);
|
DCFlushRange(texturemem, TEX_WIDTH * TEX_HEIGHT * 2);
|
||||||
GX_LoadTexObj (&texobj, GX_TEXMAP0);
|
GX_LoadTexObj (&texobj, GX_TEXMAP0);
|
||||||
|
GX_InvalidateTexAll();
|
||||||
|
|
||||||
// render textured quad
|
// render textured quad
|
||||||
draw_square(view);
|
draw_square(view);
|
||||||
|
@ -751,13 +751,13 @@ typedef struct _keytype {
|
|||||||
class GuiKeyboard : public GuiWindow
|
class GuiKeyboard : public GuiWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GuiKeyboard(char * t, u16 m);
|
GuiKeyboard(char * t, u32 m);
|
||||||
~GuiKeyboard();
|
~GuiKeyboard();
|
||||||
void Update(GuiTrigger * t);
|
void Update(GuiTrigger * t);
|
||||||
char kbtextstr[100];
|
char kbtextstr[256];
|
||||||
protected:
|
protected:
|
||||||
u16 kbtextmaxlen;
|
u32 kbtextmaxlen;
|
||||||
Key keys[4][10];
|
Key keys[4][11];
|
||||||
int shift;
|
int shift;
|
||||||
int caps;
|
int caps;
|
||||||
GuiText * kbText;
|
GuiText * kbText;
|
||||||
@ -777,10 +777,10 @@ class GuiKeyboard : public GuiWindow
|
|||||||
GuiImage * keySpaceImg;
|
GuiImage * keySpaceImg;
|
||||||
GuiImage * keySpaceOverImg;
|
GuiImage * keySpaceOverImg;
|
||||||
GuiButton * keySpace;
|
GuiButton * keySpace;
|
||||||
GuiButton * keyBtn[4][10];
|
GuiButton * keyBtn[4][11];
|
||||||
GuiImage * keyImg[4][10];
|
GuiImage * keyImg[4][11];
|
||||||
GuiImage * keyImgOver[4][10];
|
GuiImage * keyImgOver[4][11];
|
||||||
GuiText * keyTxt[4][10];
|
GuiText * keyTxt[4][11];
|
||||||
GuiImageData * keyTextbox;
|
GuiImageData * keyTextbox;
|
||||||
GuiImageData * key;
|
GuiImageData * key;
|
||||||
GuiImageData * keyOver;
|
GuiImageData * keyOver;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* Constructor for the GuiKeyboard class.
|
* Constructor for the GuiKeyboard class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GuiKeyboard::GuiKeyboard(char * t, u16 max)
|
GuiKeyboard::GuiKeyboard(char * t, u32 max)
|
||||||
{
|
{
|
||||||
width = 540;
|
width = 540;
|
||||||
height = 400;
|
height = 400;
|
||||||
@ -24,11 +24,11 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
|
|||||||
focus = 0; // allow focus
|
focus = 0; // allow focus
|
||||||
alignmentHor = ALIGN_CENTRE;
|
alignmentHor = ALIGN_CENTRE;
|
||||||
alignmentVert = ALIGN_MIDDLE;
|
alignmentVert = ALIGN_MIDDLE;
|
||||||
strncpy(kbtextstr, t, 100);
|
strncpy(kbtextstr, t, max);
|
||||||
kbtextstr[100] = 0;
|
kbtextstr[max] = 0;
|
||||||
kbtextmaxlen = max;
|
kbtextmaxlen = max;
|
||||||
|
|
||||||
Key thekeys[4][10] = {
|
Key thekeys[4][11] = {
|
||||||
{
|
{
|
||||||
{'1','!'},
|
{'1','!'},
|
||||||
{'2','@'},
|
{'2','@'},
|
||||||
@ -39,7 +39,8 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
|
|||||||
{'7','&'},
|
{'7','&'},
|
||||||
{'8','*'},
|
{'8','*'},
|
||||||
{'9','('},
|
{'9','('},
|
||||||
{'0',')'}
|
{'0',')'},
|
||||||
|
{'\0','\0'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{'q','Q'},
|
{'q','Q'},
|
||||||
@ -51,7 +52,8 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
|
|||||||
{'u','U'},
|
{'u','U'},
|
||||||
{'i','I'},
|
{'i','I'},
|
||||||
{'o','O'},
|
{'o','O'},
|
||||||
{'p','P'}
|
{'p','P'},
|
||||||
|
{'-','_'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{'a','A'},
|
{'a','A'},
|
||||||
@ -63,7 +65,8 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
|
|||||||
{'j','J'},
|
{'j','J'},
|
||||||
{'k','K'},
|
{'k','K'},
|
||||||
{'l','L'},
|
{'l','L'},
|
||||||
{':',';'}
|
{':',';'},
|
||||||
|
{'\'','"'}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -76,7 +79,8 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
|
|||||||
{'m','M'},
|
{'m','M'},
|
||||||
{',','<'},
|
{',','<'},
|
||||||
{'.','>'},
|
{'.','>'},
|
||||||
{'/','?'}
|
{'/','?'},
|
||||||
|
{'\0','\0'}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
memcpy(keys, thekeys, sizeof(thekeys));
|
memcpy(keys, thekeys, sizeof(thekeys));
|
||||||
@ -165,23 +169,26 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
|
|||||||
|
|
||||||
for(int i=0; i<4; i++)
|
for(int i=0; i<4; i++)
|
||||||
{
|
{
|
||||||
for(int j=0; j<10; j++)
|
for(int j=0; j<11; j++)
|
||||||
{
|
{
|
||||||
keyImg[i][j] = new GuiImage(key);
|
if(keys[i][j].ch != '\0')
|
||||||
keyImgOver[i][j] = new GuiImage(keyOver);
|
{
|
||||||
keyTxt[i][j] = new GuiText(NULL, 22, (GXColor){0, 0, 0, 0xff});
|
keyImg[i][j] = new GuiImage(key);
|
||||||
keyTxt[i][j]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
|
keyImgOver[i][j] = new GuiImage(keyOver);
|
||||||
keyTxt[i][j]->SetPosition(0, -10);
|
keyTxt[i][j] = new GuiText(NULL, 22, (GXColor){0, 0, 0, 0xff});
|
||||||
keyBtn[i][j] = new GuiButton(key->GetWidth(), key->GetHeight());
|
keyTxt[i][j]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
|
||||||
keyBtn[i][j]->SetImage(keyImg[i][j]);
|
keyTxt[i][j]->SetPosition(0, -10);
|
||||||
keyBtn[i][j]->SetImageOver(keyImgOver[i][j]);
|
keyBtn[i][j] = new GuiButton(key->GetWidth(), key->GetHeight());
|
||||||
keyBtn[i][j]->SetSoundOver(keySoundOver);
|
keyBtn[i][j]->SetImage(keyImg[i][j]);
|
||||||
keyBtn[i][j]->SetSoundClick(keySoundClick);
|
keyBtn[i][j]->SetImageOver(keyImgOver[i][j]);
|
||||||
keyBtn[i][j]->SetTrigger(trigA);
|
keyBtn[i][j]->SetSoundOver(keySoundOver);
|
||||||
keyBtn[i][j]->SetLabel(keyTxt[i][j]);
|
keyBtn[i][j]->SetSoundClick(keySoundClick);
|
||||||
keyBtn[i][j]->SetPosition(j*42+21*i+40, i*42+80);
|
keyBtn[i][j]->SetTrigger(trigA);
|
||||||
keyBtn[i][j]->SetEffectGrow();
|
keyBtn[i][j]->SetLabel(keyTxt[i][j]);
|
||||||
this->Append(keyBtn[i][j]);
|
keyBtn[i][j]->SetPosition(j*42+21*i+40, i*42+80);
|
||||||
|
keyBtn[i][j]->SetEffectGrow();
|
||||||
|
this->Append(keyBtn[i][j]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -221,12 +228,15 @@ GuiKeyboard::~GuiKeyboard()
|
|||||||
|
|
||||||
for(int i=0; i<4; i++)
|
for(int i=0; i<4; i++)
|
||||||
{
|
{
|
||||||
for(int j=0; j<10; j++)
|
for(int j=0; j<11; j++)
|
||||||
{
|
{
|
||||||
delete keyImg[i][j];
|
if(keys[i][j].ch != '\0')
|
||||||
delete keyImgOver[i][j];
|
{
|
||||||
delete keyTxt[i][j];
|
delete keyImg[i][j];
|
||||||
delete keyBtn[i][j];
|
delete keyImgOver[i][j];
|
||||||
|
delete keyTxt[i][j];
|
||||||
|
delete keyBtn[i][j];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -272,31 +282,34 @@ void GuiKeyboard::Update(GuiTrigger * t)
|
|||||||
|
|
||||||
for(int i=0; i<4; i++)
|
for(int i=0; i<4; i++)
|
||||||
{
|
{
|
||||||
for(int j=0; j<10; j++)
|
for(int j=0; j<11; j++)
|
||||||
{
|
{
|
||||||
if(shift || caps)
|
if(keys[i][j].ch != '\0')
|
||||||
txt[0] = keys[i][j].chShift;
|
|
||||||
else
|
|
||||||
txt[0] = keys[i][j].ch;
|
|
||||||
|
|
||||||
keyTxt[i][j]->SetText(txt);
|
|
||||||
|
|
||||||
if(keyBtn[i][j]->GetState() == STATE_CLICKED)
|
|
||||||
{
|
{
|
||||||
if(strlen(kbtextstr) < kbtextmaxlen)
|
if(shift || caps)
|
||||||
|
txt[0] = keys[i][j].chShift;
|
||||||
|
else
|
||||||
|
txt[0] = keys[i][j].ch;
|
||||||
|
|
||||||
|
keyTxt[i][j]->SetText(txt);
|
||||||
|
|
||||||
|
if(keyBtn[i][j]->GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
if(shift || caps)
|
if(strlen(kbtextstr) < kbtextmaxlen)
|
||||||
{
|
{
|
||||||
kbtextstr[strlen(kbtextstr)] = keys[i][j].chShift;
|
if(shift || caps)
|
||||||
if(shift) shift ^= 1;
|
{
|
||||||
}
|
kbtextstr[strlen(kbtextstr)] = keys[i][j].chShift;
|
||||||
else
|
if(shift) shift ^= 1;
|
||||||
{
|
}
|
||||||
kbtextstr[strlen(kbtextstr)] = keys[i][j].ch;
|
else
|
||||||
|
{
|
||||||
|
kbtextstr[strlen(kbtextstr)] = keys[i][j].ch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
kbText->SetText(kbtextstr);
|
||||||
|
keyBtn[i][j]->SetState(STATE_SELECTED);
|
||||||
}
|
}
|
||||||
kbText->SetText(kbtextstr);
|
|
||||||
keyBtn[i][j]->SetState(STATE_SELECTED);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.6 KiB |
BIN
source/ngc/images/unused/icon_game_controllers.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
source/ngc/images/unused/icon_settings_powerpad.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
@ -542,7 +542,7 @@ void AutoSave()
|
|||||||
* Opens an on-screen keyboard window, with the data entered being stored
|
* Opens an on-screen keyboard window, with the data entered being stored
|
||||||
* into the specified variable.
|
* into the specified variable.
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static void OnScreenKeyboard(char * var, u16 maxlen)
|
static void OnScreenKeyboard(char * var, u32 maxlen)
|
||||||
{
|
{
|
||||||
int save = -1;
|
int save = -1;
|
||||||
|
|
||||||
@ -3080,7 +3080,7 @@ static int MenuSettingsFile()
|
|||||||
else if (GCSettings.AutoLoad == 1) sprintf (options.value[5],"RAM");
|
else if (GCSettings.AutoLoad == 1) sprintf (options.value[5],"RAM");
|
||||||
else if (GCSettings.AutoLoad == 2) sprintf (options.value[5],"State");
|
else if (GCSettings.AutoLoad == 2) sprintf (options.value[5],"State");
|
||||||
|
|
||||||
if (GCSettings.AutoSave == 0) sprintf (options.value[5],"Off");
|
if (GCSettings.AutoSave == 0) sprintf (options.value[6],"Off");
|
||||||
else if (GCSettings.AutoSave == 1) sprintf (options.value[6],"RAM");
|
else if (GCSettings.AutoSave == 1) sprintf (options.value[6],"RAM");
|
||||||
else if (GCSettings.AutoSave == 2) sprintf (options.value[6],"State");
|
else if (GCSettings.AutoSave == 2) sprintf (options.value[6],"State");
|
||||||
else if (GCSettings.AutoSave == 3) sprintf (options.value[6],"Both");
|
else if (GCSettings.AutoSave == 3) sprintf (options.value[6],"Both");
|
||||||
@ -3100,15 +3100,15 @@ static int MenuSettingsFile()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
OnScreenKeyboard(GCSettings.LoadFolder, 256);
|
OnScreenKeyboard(GCSettings.LoadFolder, 30);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
OnScreenKeyboard(GCSettings.SaveFolder, 256);
|
OnScreenKeyboard(GCSettings.SaveFolder, 30);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
OnScreenKeyboard(GCSettings.CheatFolder, 256);
|
OnScreenKeyboard(GCSettings.CheatFolder, 30);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
@ -3414,6 +3414,8 @@ MainMenu (int menu)
|
|||||||
else
|
else
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||||
|
|
||||||
|
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
||||||
|
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||||
GuiImageData bgTop(bg_top_png);
|
GuiImageData bgTop(bg_top_png);
|
||||||
bgTopImg = new GuiImage(&bgTop);
|
bgTopImg = new GuiImage(&bgTop);
|
||||||
GuiImageData bgBottom(bg_bottom_png);
|
GuiImageData bgBottom(bg_bottom_png);
|
||||||
@ -3431,6 +3433,8 @@ MainMenu (int menu)
|
|||||||
btnLogo->SetImage(&logoImg);
|
btnLogo->SetImage(&logoImg);
|
||||||
btnLogo->SetImageOver(&logoImgOver);
|
btnLogo->SetImageOver(&logoImgOver);
|
||||||
btnLogo->SetLabel(&logoTxt);
|
btnLogo->SetLabel(&logoTxt);
|
||||||
|
btnLogo->SetSoundOver(&btnSoundOver);
|
||||||
|
btnLogo->SetSoundClick(&btnSoundClick);
|
||||||
btnLogo->SetTrigger(&trigA);
|
btnLogo->SetTrigger(&trigA);
|
||||||
btnLogo->SetUpdateCallback(WindowCredits);
|
btnLogo->SetUpdateCallback(WindowCredits);
|
||||||
|
|
||||||
|