.more GUI fixes

.added credit screen
.added ROM information window
This commit is contained in:
ekeeke31 2010-05-09 00:53:19 +00:00
parent 7a827f7a71
commit 81054b0420
7 changed files with 204 additions and 279 deletions

View File

@ -138,7 +138,10 @@ int FAT_LoadFile(u8 *buffer, u32 selection)
/* Loading from history */ /* Loading from history */
if(fatType == TYPE_RECENT) if(fatType == TYPE_RECENT)
{ {
/* file browser should be reinitialized */
fatType = -1;
/* full filename */ /* full filename */
sprintf(fname,"%s%s",history.entries[selection].filepath,filelist[selection].filename); sprintf(fname,"%s%s",history.entries[selection].filepath,filelist[selection].filename);

View File

@ -857,47 +857,36 @@ int GUI_RunMenu(gui_menu *menu)
return -1; return -1;
} }
#if 0 /* Text Window */
/* Scrollable Text Window (with configurable text size) */ void GUI_TextWindow(gui_menu *parent, char *title, char items[][64], u8 nb_items, u8 fontsize)
void GUI_TextWindow(gui_menu *parent, char *title, char *items[], u8 nb_items, u8 fheight)
{ {
int i, ret, quit = 0; int i, quit = 0;
s32 selected = 0;
s32 old;
s16 p;
#ifdef HW_RVL #ifdef HW_RVL
int x,y; int x,y;
#endif #endif
/* initialize arrows */
butn_data arrow[2];
arrow[0].texture[0] = gxTextureOpenPNG(Button_up_png,0);
arrow[0].texture[1] = gxTextureOpenPNG(Button_up_over_png,0);
arrow[1].texture[0] = gxTextureOpenPNG(Button_down_png,0);
arrow[1].texture[1] = gxTextureOpenPNG(Button_down_over_png,0);
/* initialize window */ /* initialize window */
gx_texture *window = gxTextureOpenPNG(Frame_s1_png,0); gx_texture *window = gxTextureOpenPNG(Frame_s1_png,0);
gx_texture *top = gxTextureOpenPNG(Frame_s1_title_png,0); gx_texture *top = gxTextureOpenPNG(Frame_s1_title_png,0);
/* initialize text position */ /* window position */
int offset = 0; int xwindow = (640 - window->width) /2;
int pagesize = ( window->height - 2*top->height) / fheight;
/* set initial positions */
int xwindow = (640 - window->width)/2;
int ywindow = (480 - window->height)/2; int ywindow = (480 - window->height)/2;
int ypos = ywindow + top->height + fheight;
int ypos2 = ywindow + window->height - arrow[1].texture[0]->height;
/* set initial vertical offset */ /* text position */
int yoffset = ywindow + window->height; int ypos = ywindow + top->height + (window->height - top->height - fontsize*nb_items) / 2 + fontsize/2;
/* disable helper comment */ /* disable helper comment */
if (parent->helpers[1]) parent->helpers[1]->data = 0; const u8 *data = NULL;
if (parent->helpers[1])
{
data = parent->helpers[1]->data;
parent->helpers[1]->data = NULL;
}
/* slide in */ /* slide in */
int yoffset = ywindow + window->height;
while (yoffset > 0) while (yoffset > 0)
{ {
/* draw parent menu */ /* draw parent menu */
@ -911,10 +900,8 @@ void GUI_TextWindow(gui_menu *parent, char *title, char *items[], u8 nb_items, u
FONT_writeCenter(title,20,xwindow,xwindow+window->width,ywindow+(top->height-20)/2+20-yoffset,(GXColor)WHITE); FONT_writeCenter(title,20,xwindow,xwindow+window->width,ywindow+(top->height-20)/2+20-yoffset,(GXColor)WHITE);
/* draw text */ /* draw text */
for (i=0; i<max; i++) for (i=0; i<nb_items; i++)
{ FONT_writeCenter(items[i],fontsize,xwindow,xwindow+window->width,ypos+i*fontsize-yoffset,(GXColor)WHITE);
FONT_writeCenter(items[i],fheight,xwindow,xwindow+window->width,ypos+i*fheight- yoffset,(GXColor)WHITE);
}
/* update display */ /* update display */
gxSetScreen(); gxSetScreen();
@ -923,56 +910,30 @@ void GUI_TextWindow(gui_menu *parent, char *title, char *items[], u8 nb_items, u
yoffset -= 60; yoffset -= 60;
} }
/* draw menu */ /* draw menu + text window */
while (quit == 0) while (quit == 0)
{ {
/* draw parent menu (should have been initialized first) */ /* draw parent menu */
GUI_DrawMenu(parent); GUI_DrawMenu(parent);
/* draw window */ /* draw window */
gxDrawTexture(window,xwindow,ywindow,window->width,window->height,230); gxDrawTexture(window,xwindow,ywindow,window->width,window->height,230);
gxDrawTexture(top,xwindow,ywindow,top->width,top->height,255);
/* draw title */
FONT_writeCenter(title,20,xwindow,xwindow+window->width,ywindow+(top->height-20)/2+20,(GXColor)WHITE);
/* draw text */ /* draw text */
for (i=0; i<max; i++) for (i=0; i<nb_items; i++)
{ {
FONT_writeCenter(items[offset + i],fheight,xwindow,xwindow+window->width,ypos+i*fheight,(GXColor)WHITE); FONT_writeCenter(items[i],fontsize,xwindow,xwindow+window->width,ypos+i*fontsize,(GXColor)WHITE);
} }
/* down arrow */
if ((max + offset) < nb_items)
{
if (selected == 1)
gxDrawTexture(arrow[1].texture[1],xwindow,ypos2,arrow[1].texture[1]->width,arrow[1].texture[1]->height,255);
else
gxDrawTexture(arrow[1].texture[0],xwindow,ypos2,arrow[1].texture[0]->width,arrow[1].texture[0]->height,255);
}
/* up arrow */
if (offset > 0)
{
if (selected == 0)
gxDrawTexture(arrow[1].texture[1],xwindow,ywindow,arrow[1].texture[1]->width,arrow[1].texture[1]->height,255);
else
gxDrawTexture(arrow[1].texture[0],xwindow,ywindow,arrow[1].texture[1]->width,arrow[1].texture[1]->height,255);
}
else
{
gxDrawTexture(top,xwindow,ywindow,top->width,top->height,255);
FONT_writeCenter(title,20,xwindow,xwindow+window->width,ywindow+(top->height-20)/2+20,(GXColor)WHITE);
}
p = m_input.keys;
#ifdef HW_RVL #ifdef HW_RVL
if (Shutdown) if (Shutdown)
{ {
gxTextureClose(&window); gxTextureClose(&window);
gxTextureClose(&top); gxTextureClose(&top);
gxTextureClose(&arrow[0].texture[0]);
gxTextureClose(&arrow[0].texture[1]);
gxTextureClose(&arrow[1].texture[0]);
gxTextureClose(&arrow[1].texture[1]);
gxTextureClose(&w_pointer); gxTextureClose(&w_pointer);
GUI_DeleteMenu(parent); GUI_DeleteMenu(parent);
GUI_FadeOut(); GUI_FadeOut();
@ -987,93 +948,47 @@ void GUI_TextWindow(gui_menu *parent, char *title, char *items[], u8 nb_items, u
/* draw wiimote pointer */ /* draw wiimote pointer */
gxDrawTextureRotate(w_pointer, x-w_pointer->width/2, y-w_pointer->height/2, w_pointer->width, w_pointer->height,m_input.ir.angle,255); gxDrawTextureRotate(w_pointer, x-w_pointer->width/2, y-w_pointer->height/2, w_pointer->width, w_pointer->height,m_input.ir.angle,255);
/* check for valid buttons */
selected = -1;
if ((x>=xwindow)&&(x<=(xwindow+window->width))&&(y>=ypos+i*(20 + h))&&(y<=(ypos+i*(20+h)+h)))
{
selected = i;
break;
}
}
else
{
/* reinitialize selection */
if (selected == -1)
selected = 0;
} }
#endif #endif
/* update screen */ /* update screen */
gxSetScreen(); gxSetScreen();
/* update selection */ /* wait for exit buttons */
if (p&PAD_BUTTON_UP) if (m_input.keys)
{
if (selected > 0)
selected --;
}
else if (p&PAD_BUTTON_DOWN)
{
if (selected < (nb_items -1))
selected ++;
}
/* sound fx */
if (selected != old)
{
if (selected >= 0)
{
ASND_SetVoice(ASND_GetFirstUnusedVoice(),VOICE_MONO_16BIT,22050,0,(u8 *)button_over_pcm,button_over_pcm_size,
((int)config.sfx_volume * 255) / 100,((int)config.sfx_volume * 255) / 100,NULL);
}
}
if (p & PAD_BUTTON_A)
{
if (selected >= 0)
{
quit = 1;
ret = selected;
}
}
else if (p & PAD_BUTTON_B)
{
quit = 1; quit = 1;
ret = -1;
}
} }
/* reset initial vertical offset */ /* reset initial vertical offset */
yoffset = 0;
/* slide out */ /* slide out */
yoffset = 0;
while (yoffset < (ywindow + window->height)) while (yoffset < (ywindow + window->height))
{ {
/* draw parent menu */ /* draw parent menu */
GUI_DrawMenu(parent); GUI_DrawMenu(parent);
/* draw window + header */ /* draw window */
gxDrawTexture(window,xwindow,ywindow-yoffset,window->width,window->height,230); gxDrawTexture(window,xwindow,ywindow-yoffset,window->width,window->height,230);
gxDrawTexture(top,xwindow,ywindow-yoffset,top->width,top->height,255); gxDrawTexture(top,xwindow,ywindow-yoffset,top->width,top->height,255);
/* draw title */ /* draw title */
FONT_writeCenter(title,20,xwindow,xwindow+window->width,ywindow+(top->height-20)/2+20-yoffset,(GXColor)WHITE); FONT_writeCenter(title,20,xwindow,xwindow+window->width,ywindow+(top->height-20)/2+20-yoffset,(GXColor)WHITE);
/* draw buttons + text */ /* draw text */
for (i=0; i<nb_items; i++) for (i=0; i<nb_items; i++)
{ FONT_writeCenter(items[i],fontsize,xwindow,xwindow+window->width,ypos+i*fontsize-yoffset,(GXColor)WHITE);
gxDrawTexture(button.texture[0],xpos,ypos+i*(20+h)-yoffset,w,h,255);
FONT_writeCenter(items[i],18,xpos,xpos+w,ypos+i*(20+h)+(h+18)/2-yoffset,(GXColor)WHITE);
}
yoffset += 60; /* update display */
gxSetScreen(); gxSetScreen();
/* slide speed */
yoffset += 60;
} }
/* restore helper comment */ /* restore helper comment */
if (parent->helpers[1]) if (parent->helpers[1])
parent->helpers[1]->data = Key_A_png; parent->helpers[1]->data = data;
/* final position */ /* final position */
GUI_DrawMenu(parent); GUI_DrawMenu(parent);
@ -1082,22 +997,15 @@ void GUI_TextWindow(gui_menu *parent, char *title, char *items[], u8 nb_items, u
/* close textures */ /* close textures */
gxTextureClose(&window); gxTextureClose(&window);
gxTextureClose(&top); gxTextureClose(&top);
gxTextureClose(&button.texture[0]);
gxTextureClose(&button.texture[1]);
return ret;
} }
#endif
/* Option Window (returns selected item) */ /* Option Window (returns selected item) */
int GUI_OptionWindow(gui_menu *parent, char *title, char *items[], u8 nb_items) int GUI_OptionWindow(gui_menu *parent, char *title, char *items[], u8 nb_items)
{ {
int i, ret, quit = 0; int i, ret, quit = 0;
s32 selected = 0; int old, selected = 0;
s32 old;
butn_data button;
s16 p; s16 p;
butn_data button;
#ifdef HW_RVL #ifdef HW_RVL
int x,y; int x,y;
@ -1120,14 +1028,16 @@ int GUI_OptionWindow(gui_menu *parent, char *title, char *items[], u8 nb_items)
int ypos = (window->height - top->height - (h*nb_items) - (nb_items-1)*20)/2; int ypos = (window->height - top->height - (h*nb_items) - (nb_items-1)*20)/2;
ypos = ypos + ywindow + top->height; ypos = ypos + ywindow + top->height;
/* set initial vertical offset */
int yoffset = ywindow + window->height;
/* disable helper comment */ /* disable helper comment */
const u8 *data = NULL;
if (parent->helpers[1]) if (parent->helpers[1])
{
data = parent->helpers[1]->data;
parent->helpers[1]->data = 0; parent->helpers[1]->data = 0;
}
/* slide in */ /* slide in */
int yoffset = ywindow + window->height;
while (yoffset > 0) while (yoffset > 0)
{ {
/* draw parent menu */ /* draw parent menu */
@ -1266,10 +1176,8 @@ int GUI_OptionWindow(gui_menu *parent, char *title, char *items[], u8 nb_items)
} }
} }
/* reset initial vertical offset */
yoffset = 0;
/* slide out */ /* slide out */
yoffset = 0;
while (yoffset < (ywindow + window->height)) while (yoffset < (ywindow + window->height))
{ {
/* draw parent menu */ /* draw parent menu */
@ -1289,13 +1197,16 @@ int GUI_OptionWindow(gui_menu *parent, char *title, char *items[], u8 nb_items)
FONT_writeCenter(items[i],18,xpos,xpos+w,ypos+i*(20+h)+(h+18)/2-yoffset,(GXColor)WHITE); FONT_writeCenter(items[i],18,xpos,xpos+w,ypos+i*(20+h)+(h+18)/2-yoffset,(GXColor)WHITE);
} }
yoffset += 60; /* update display */
gxSetScreen(); gxSetScreen();
/* slide speed */
yoffset += 60;
} }
/* restore helper comment */ /* restore helper comment */
if (parent->helpers[1]) if (parent->helpers[1])
parent->helpers[1]->data = Key_A_png; parent->helpers[1]->data = data;
/* final position */ /* final position */
GUI_DrawMenu(parent); GUI_DrawMenu(parent);

View File

@ -221,6 +221,7 @@ extern void GUI_DrawMenuFX(gui_menu *menu, u8 speed, u8 out);
extern void GUI_SlideMenuTitle(gui_menu *m, int title_offset); extern void GUI_SlideMenuTitle(gui_menu *m, int title_offset);
extern int GUI_UpdateMenu(gui_menu *menu); extern int GUI_UpdateMenu(gui_menu *menu);
extern int GUI_RunMenu(gui_menu *menu); extern int GUI_RunMenu(gui_menu *menu);
extern void GUI_TextWindow(gui_menu *parent, char *title, char items[][64], u8 nb_items, u8 fontsize);
extern int GUI_OptionWindow(gui_menu *parent, char *title, char *items[], u8 nb_items); extern int GUI_OptionWindow(gui_menu *parent, char *title, char *items[], u8 nb_items);
extern void GUI_OptionBox(gui_menu *parent, optioncallback cb, char *title, void *option, float step, float min, float max, u8 type); extern void GUI_OptionBox(gui_menu *parent, optioncallback cb, char *title, void *option, float step, float min, float max, u8 type);
extern void GUI_OptionBox2(gui_menu *parent, char *text_1, char *text_2, s16 *option_1, s16 *option_2, s16 step, s16 min, s16 max); extern void GUI_OptionBox2(gui_menu *parent, char *text_1, char *text_2, s16 *option_1, s16 *option_2, s16 step, s16 min, s16 max);

View File

@ -68,7 +68,6 @@ void legal ()
FONT_writeCenter ("the property of their respective owners.",20,0,640,ypos,(GXColor)WHITE); FONT_writeCenter ("the property of their respective owners.",20,0,640,ypos,(GXColor)WHITE);
ypos += 38; ypos += 38;
GXColor color = {0x99,0xcc,0xff,0xff};
#ifdef HW_RVL #ifdef HW_RVL
gx_texture *button = gxTextureOpenPNG(Key_A_wii_png,0); gx_texture *button = gxTextureOpenPNG(Key_A_wii_png,0);
#else #else
@ -124,7 +123,7 @@ void legal ()
if (vis) if (vis)
{ {
FONT_writeCenter("Press button to continue.",24,0,640,ypos,color); FONT_writeCenter("Press button to continue.",24,0,640,ypos,(GXColor)SKY_BLUE);
gxDrawTexture(button, 220, ypos-24+(24-button->height)/2, button->width, button->height,255); gxDrawTexture(button, 220, ypos-24+(24-button->height)/2, button->width, button->height,255);
} }

View File

@ -2603,124 +2603,147 @@ static int loadgamemenu ()
/*************************************************************************** /***************************************************************************
* Show rom info screen * Show rom info screen
***************************************************************************/ ***************************************************************************/
static void showrominfo () static void showrominfo (void)
{ {
int ypos; char items[15][64];
u8 i,j,quit,redraw,max;
char msg[128];
short p;
char pName[14][21];
quit = 0; /* fill ROM infos */
j = 0; sprintf (items[0], "Console Type: %s", rominfo.consoletype);
redraw = 1; sprintf (items[1], "Copyright: %s", rominfo.copyright);
sprintf (items[2], "Company Name: %s", companyinfo[getcompany ()].company);
/*** Remove any still held buttons ***/ sprintf (items[3], "Domestic Name:");
while (PAD_ButtonsHeld(0)) PAD_ScanPads(); sprintf (items[4], "%s",rominfo.domestic);
#ifdef HW_RVL sprintf (items[5], "International Name:");
while (WPAD_ButtonsHeld(0)) WPAD_ScanPads(); sprintf (items[6], "%s",rominfo.international);
#endif sprintf (items[7], "Type: %s (%s)",rominfo.ROMType, strcmp(rominfo.ROMType, "AI") ? "Game" : "Educational");
sprintf (items[8], "Product ID: %s", rominfo.product);
max = 14; sprintf (items[9], "Checksum: %04x (%04x) (%s)", rominfo.checksum, realchecksum, (rominfo.checksum == realchecksum) ? "GOOD" : "BAD");
for (i = 0; i < 14; i++)
sprintf (items[10], "Supports: ");
if (peripherals & (1 << 1))
{ {
if (peripherals & (1 << i)) strcat(items[10],peripheralinfo[1].pName);
{ strcat(items[10],", ");
sprintf(pName[max-14],"%s", peripheralinfo[i].pName);
max ++;
}
} }
else if (peripherals & (1 << 0))
while (quit == 0)
{ {
if (redraw) strcat(items[10],peripheralinfo[0].pName);
{ strcat(items[10],", ");
gxClearScreen ((GXColor)BLACK);
ypos = 134;
WriteCentre(ypos, "ROM Header Information");
ypos += 2*fheight;
for (i=0; i<8; i++)
{
switch (i+j)
{
case 0:
sprintf (msg, "Console type: %s", rominfo.consoletype);
break;
case 1:
sprintf (msg, "Copyright: %s", rominfo.copyright);
break;
case 2:
sprintf (msg, "Company: %s", companyinfo[getcompany ()].company);
break;
case 3:
sprintf (msg, "Game Domestic Name:");
break;
case 4:
sprintf(msg, " %s",rominfo.domestic);
break;
case 5:
sprintf (msg, "Game International Name:");
break;
case 6:
sprintf(msg, " %s",rominfo.international);
break;
case 7:
sprintf (msg, "Type - %s : %s", rominfo.ROMType, strcmp (rominfo.ROMType, "AI") ? "Game" : "Educational");
break;
case 8:
sprintf (msg, "Product - %s", rominfo.product);
break;
case 9:
sprintf (msg, "Checksum - %04x (%04x) (%s)", rominfo.checksum, realchecksum, (rominfo.checksum == realchecksum) ? "Good" : "Bad");
break;
case 10:
sprintf (msg, "ROM end: $%06X", rominfo.romend);
break;
case 11:
if (svp) sprintf (msg, "SVP Chip detected");
else if (sram.custom) sprintf (msg, "EEPROM(%dK) - $%06X", ((eeprom.type.size_mask+1)* 8) /1024, (unsigned int)eeprom.type.sda_out_bit);
else if (sram.detected) sprintf (msg, "SRAM Start - $%06X", sram.start);
else sprintf (msg, "External RAM undetected");
break;
case 12:
if (sram.custom) sprintf (msg, "EEPROM(%dK) - $%06X", ((eeprom.type.size_mask+1)* 8) /1024, (unsigned int)eeprom.type.scl_bit);
else if (sram.detected) sprintf (msg, "SRAM End - $%06X", sram.end);
else if (sram.on) sprintf (msg, "Default SRAM activated ");
else sprintf (msg, "SRAM is disactivated ");
break;
case 13:
if (region_code == REGION_USA) sprintf (msg, "Region - %s (USA)", rominfo.country);
else if (region_code == REGION_EUROPE) sprintf (msg, "Region - %s (EUR)", rominfo.country);
else if (region_code == REGION_JAPAN_NTSC) sprintf (msg, "Region - %s (JAP)", rominfo.country);
else if (region_code == REGION_JAPAN_PAL) sprintf (msg, "Region - %s (JPAL)", rominfo.country);
break;
default:
sprintf (msg, "Supports - %s", pName[i+j-14]);
break;
}
write_font (100, ypos, msg);
ypos += fheight;
}
ypos += fheight;
WriteCentre (ypos, "Press A to Continue");
gxSetScreen();
} }
if (peripherals & (1 << 7))
p = m_input.keys; {
redraw = 0; strcat(items[10],peripheralinfo[7].pName);
strcat(items[10],", ");
if ((j<(max-8)) && (p & PAD_BUTTON_DOWN)) {redraw = 1; j++;}
if ((j>0) && (p & PAD_BUTTON_UP)) {redraw = 1; j--;}
if (p & PAD_BUTTON_A) quit = 1;
if (p & PAD_BUTTON_B) quit = 1;
} }
if (peripherals & (1 << 8))
{
strcat(items[10],peripheralinfo[8].pName);
strcat(items[10],", ");
}
if (peripherals & (1 << 11))
{
strcat(items[10],peripheralinfo[11].pName);
strcat(items[10],", ");
}
if (peripherals & (1 << 13))
{
strcat(items[10],peripheralinfo[13].pName);
strcat(items[10],", ");
}
if (strlen(items[10]) > 10)
items[10][strlen(items[10]) - 2] = 0;
sprintf (items[11], "ROM end: $%06X", rominfo.romend);
if (sram.custom)
sprintf (items[12], "EEPROM(%dK): $%06X", ((eeprom.type.size_mask+1)* 8) /1024, (unsigned int)eeprom.type.sda_out_bit);
else if (sram.detected)
sprintf (items[12], "SRAM Start: $%06X", sram.start);
else
sprintf (items[12], "No Backup Memory specified");
if (sram.custom)
sprintf (items[13], "EEPROM(%dK): $%06X", ((eeprom.type.size_mask+1)* 8) /1024, (unsigned int)eeprom.type.scl_bit);
else if (sram.detected)
sprintf (items[13], "SRAM End: $%06X", sram.end);
else if (sram.on)
sprintf (items[13], "SRAM enabled by default");
else
sprintf (items[13], "SRAM disabled by default");
if (region_code == REGION_USA)
sprintf (items[14], "Region: %s (USA)", rominfo.country);
else if (region_code == REGION_EUROPE)
sprintf (items[14], "Region: %s (EUR)", rominfo.country);
else if (region_code == REGION_JAPAN_NTSC)
sprintf (items[14], "Region: %s (JAP)", rominfo.country);
else if (region_code == REGION_JAPAN_PAL)
sprintf (items[14], "Region: %s (JAP 50Hz)", rominfo.country);
GUI_TextWindow(&menu_main, "ROM Header Infos", items, 15, 15);
} }
/***************************************************************************
* Show credits
***************************************************************************/
static void showcredits(void)
{
int offset = 0;
gx_texture *texture = gxTextureOpenPNG(Bg_credits_png,0);
s16 p = 0;
while (!p)
{
gxClearScreen ((GXColor)BLACK);
gxDrawTexture(texture, (640-texture->width)/2, (480-texture->height)/2, texture->width, texture->height,255);
FONT_writeCenter("Genesis Plus Core", 24, 0, 640, 480 - offset, (GXColor)LIGHT_BLUE);
FONT_writeCenter("original 1.2a version by Charles MacDonald", 18, 0, 640, 516 - offset, (GXColor)WHITE);
FONT_writeCenter("improved emulation core & additional features by Eke-Eke", 18, 0, 640, 534 - offset, (GXColor)WHITE);
FONT_writeCenter("original Z80 core by Juergen Buchmueller", 18, 0, 640, 552 - offset, (GXColor)WHITE);
FONT_writeCenter("original 68k core by Karl Stenerud (Musashi)", 18, 0, 640, 570 - offset, (GXColor)WHITE);
FONT_writeCenter("original YM2612 core by Jarek Burczynski & Tatsuyuki Satoh", 18, 0, 640, 588 - offset, (GXColor)WHITE);
FONT_writeCenter("SN76489 core by Maxim", 18, 0, 640, 606 - offset, (GXColor)WHITE);
FONT_writeCenter("SVP core by Gravydas Ignotas (Notaz)", 18, 0, 640, 624 - offset, (GXColor)WHITE);
FONT_writeCenter("FIR Resampler & NTSC Video Filter by Shay Green (Blargg)", 18, 0, 640, 642 - offset, (GXColor)WHITE);
FONT_writeCenter("3-Band EQ implementation by Neil C", 18, 0, 640, 660 - offset, (GXColor)WHITE);
FONT_writeCenter("Additional thanks to ...", 20, 0, 640, 700 - offset, (GXColor)LIGHT_GREEN);
FONT_writeCenter("Nemesis, Tasco Deluxe, Bart Trzynadlowski, Jorge Cwik, Haze,", 18, 0, 640, 736 - offset, (GXColor)WHITE);
FONT_writeCenter("Stef Dallongeville, AamirM, Steve Snake, Charles MacDonald", 18, 0, 640, 754 - offset, (GXColor)WHITE);
FONT_writeCenter("Spritesmind & SMS Power members for their technical help", 18, 0, 640, 772 - offset, (GXColor)WHITE);
FONT_writeCenter("Gamecube & Wii port", 24, 0, 640, 830 - offset, (GXColor)LIGHT_BLUE);
FONT_writeCenter("original Gamecube port by Softdev, Honkeykong & Markcube", 18, 0, 640, 866 - offset, (GXColor)WHITE);
FONT_writeCenter("current porting code, GUI engine & design by Eke-Eke", 18, 0, 640, 884 - offset, (GXColor)WHITE);
FONT_writeCenter("original icons, logo & button design by Low Lines", 18, 0, 640, 906 - offset, (GXColor)WHITE);
FONT_writeCenter("memory card icon design by Brakken", 18, 0, 640, 924 - offset, (GXColor)WHITE);
FONT_writeCenter("libogc by Shagkur & many others", 18, 0, 640, 942 - offset, (GXColor)WHITE);
FONT_writeCenter("libfat by Chism", 18, 0, 640, 960 - offset, (GXColor)WHITE);
FONT_writeCenter("wiiuse by Michael Laforest (Para)", 18, 0, 640, 978 - offset, (GXColor)WHITE);
FONT_writeCenter("EHCI module, asndlib & OGG player by Francisco Muñoz (Hermes)", 18, 0, 640, 996 - offset, (GXColor)WHITE);
FONT_writeCenter("USB2 storage support by Kwiirk, Rodries & Tantric", 18, 0, 640, 1014 - offset, (GXColor)WHITE);
FONT_writeCenter("zlib, libpng & libtremor by their respective authors", 18, 0, 640, 1032 - offset, (GXColor)WHITE);
FONT_writeCenter("devkitPPC by Wintermute", 18, 0, 640, 1050 - offset, (GXColor)WHITE);
FONT_writeCenter("Additional thanks to ...", 20, 0, 640, 1090 - offset, (GXColor)LIGHT_GREEN);
FONT_writeCenter("Softdev, Tmbinc, Costis, Emukiddid, Team Twiizer", 18, 0, 640, 1126 - offset, (GXColor)WHITE);
FONT_writeCenter("Brakken & Tehskeen members for their support", 18, 0, 640, 1144 - offset, (GXColor)WHITE);
gxSetScreen();
p = m_input.keys;
VIDEO_WaitVSync();
p |= m_input.keys;
offset ++;
if (offset > 1144)
offset = 0;
}
gxTextureClose(&texture);
}
/**************************************************************************** /****************************************************************************
* Main Menu * Main Menu
* *
@ -2733,7 +2756,7 @@ void MainMenu (void)
char *items[3] = char *items[3] =
{ {
"View Credits", "View Credits",
"Exit to Loader", "Return to Loader",
#ifdef HW_RVL #ifdef HW_RVL
"Exit to System Menu" "Exit to System Menu"
#else #else
@ -2849,6 +2872,10 @@ void MainMenu (void)
{ {
switch (GUI_OptionWindow(m, VERSION, items,3)) switch (GUI_OptionWindow(m, VERSION, items,3))
{ {
case 0: /* credits */
showcredits();
break;
case 1: /* return to loader */ case 1: /* return to loader */
#ifdef HW_RVL #ifdef HW_RVL
gxTextureClose(&w_pointer); gxTextureClose(&w_pointer);
@ -2872,25 +2899,9 @@ void MainMenu (void)
SYS_ResetSystem(SYS_HOTRESET,0,0); SYS_ResetSystem(SYS_HOTRESET,0,0);
#endif #endif
break; break;
default: /* credits (TODO !!!) */ default:
{
#if 0
gxClearScreen ((GXColor){0,0,0,0});
gx_texture *texture = gxTextureOpenPNG(Bg_credits_png,0);
if (texture)
{
gxDrawTexture(texture, (640-texture->width)/2, (480-texture->height)/2, texture->width, texture->height,255);
if (texture->data)
free(texture->data);
free(texture);
}
gxSetScreen();
while (!(m_input.keys & PAD_BUTTON_A) && !(m_input.keys & PAD_BUTTON_B))
VIDEO_WaitVSync ();
#endif
break; break;
}
} }
break; break;
} }
@ -2954,15 +2965,11 @@ void MainMenu (void)
gxSaveScreenshot(filename); gxSaveScreenshot(filename);
break; break;
/*** ROM information screen (TODO !!!) ***/ /*** ROM information screen ***/
case 8: case 8:
if (!cart.romsize) if (!cart.romsize)
break; break;
GUI_DrawMenuFX(m,30,1);
GUI_DeleteMenu(m);
showrominfo(); showrominfo();
GUI_InitMenu(m);
GUI_DrawMenuFX(m,30,0);
break; break;
} }
} }

View File

@ -26,9 +26,12 @@
#define _GC_VIDEO_H_ #define _GC_VIDEO_H_
/* EFB colors */ /* EFB colors */
#define BLACK {0,0,0,0xff} #define BLACK {0x00,0x00,0x00,0xff}
#define DARK_GREY {0x22,0x22,0x22,0xff} #define DARK_GREY {0x22,0x22,0x22,0xff}
#define WHITE {0xff,0xff,0xff,0xff} #define LIGHT_BLUE {0xb8,0xc7,0xda,0xff}
#define SKY_BLUE {0x99,0xcc,0xff,0xff}
#define LIGHT_GREEN {0xa9,0xc7,0xc6,0xff}
#define WHITE {0xff,0xff,0xff,0xff}
/* image texture */ /* image texture */
typedef struct typedef struct

View File

@ -143,8 +143,8 @@ COMPANYINFO companyinfo[MAXCOMPANY] = {
* http://www.zophar.net/tech/files/Genesis_ROM_Format.txt * http://www.zophar.net/tech/files/Genesis_ROM_Format.txt
***************************************************************************/ ***************************************************************************/
PERIPHERALINFO peripheralinfo[14] = { PERIPHERALINFO peripheralinfo[14] = {
{"J", "3-Button Joypad"}, {"J", "3B Joypad"},
{"6", "6-button Joypad"}, {"6", "6B Joypad"},
{"K", "Keyboard"}, {"K", "Keyboard"},
{"P", "Printer"}, {"P", "Printer"},
{"B", "Control Ball"}, {"B", "Control Ball"},
@ -236,7 +236,8 @@ static void getrominfo (char *romheader)
for (i = 0; i < 14; i++) for (i = 0; i < 14; i++)
for (j=0; j < 14; j++) for (j=0; j < 14; j++)
if (rominfo.io_support[i] == peripheralinfo[j].pID[0]) peripherals |= (1 << j); if (rominfo.io_support[i] == peripheralinfo[j].pID[0])
peripherals |= (1 << j);
} }
/* SMD (interleaved) rom support */ /* SMD (interleaved) rom support */