mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
finalize 4.0.1
This commit is contained in:
parent
fe9d114fd0
commit
fbfc422d35
@ -2,11 +2,10 @@
|
||||
<app version="1">
|
||||
<name>Snes9X GX</name>
|
||||
<coder>Tantric, michniewski</coder>
|
||||
<version>4.0.0</version>
|
||||
<release_date>20090404</release_date>
|
||||
<version>4.0.1</version>
|
||||
<release_date>20090413</release_date>
|
||||
<short_description>Super Nintendo Emulator</short_description>
|
||||
<long_description>
|
||||
|
||||
A Super Nintendo Emulator for Wii
|
||||
|
||||
Based on Snes9x 1.51
|
||||
|
12
readme.txt
12
readme.txt
@ -10,7 +10,7 @@
|
||||
———————————————————————————————————————————————————————————————————————•ßrK•
|
||||
|
||||
×—–—–—–—– –—–—–—–—–—–—–—–—–—–— —–—–—–—–—–—–—–—-—–-–•¬
|
||||
|0O×øo· Snes9x GX 4.0.0 ·oø×O0|
|
||||
|0O×øo· Snes9x GX 4.0.1 ·oø×O0|
|
||||
| http://code.google.com/p/snes9x-gx |
|
||||
| (Under GPL License) |
|
||||
`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨'
|
||||
@ -48,6 +48,16 @@ guides on how to install and get homebrew working on your Nintendo Wii.
|
||||
| UPDATE HISTORY |
|
||||
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
|
||||
|
||||
[4.0.1 - April 13, 2009]
|
||||
* Fixed turning off autosave in menu
|
||||
* Keyboard fixed, more keys added
|
||||
* Fixed 7z loading from DVD
|
||||
* Enable auto loading and renaming of SRAM save without "Auto" in the name
|
||||
* PAL resolution fixed - no more letterboxing
|
||||
* File browser scrollbar box now draggable, arrow buttons now scroll list
|
||||
* Better handling of multiple on-screen wiimotes
|
||||
* Menu restructured - new "Game Settings" menu
|
||||
|
||||
[4.0.0 - April 4, 2009]
|
||||
|
||||
* New GX-based menu, with a completely redesigned layout. Has Wiimote IR
|
||||
|
@ -50,6 +50,8 @@ extern const u32 icon_settings_png_size;
|
||||
extern const u8 icon_home_png[];
|
||||
extern const u32 icon_home_png_size;
|
||||
|
||||
extern const u8 icon_game_settings_png[];
|
||||
extern const u32 icon_game_settings_png_size;
|
||||
extern const u8 icon_game_cheats_png[];
|
||||
extern const u32 icon_game_cheats_png_size;
|
||||
extern const u8 icon_game_controllers_png[];
|
||||
|
@ -30,9 +30,6 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
|
||||
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
|
||||
trigHeldA = new GuiTrigger;
|
||||
if(GCSettings.WiimoteOrientation)
|
||||
trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
else
|
||||
trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
|
||||
btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
||||
|
BIN
source/ngc/images/icon_game_settings.png
Normal file
BIN
source/ngc/images/icon_game_settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -1140,8 +1140,7 @@ static int MenuGame()
|
||||
GuiImageData btnCloseOutlineOver(button_small_over_png);
|
||||
GuiImageData btnLargeOutline(button_large_png);
|
||||
GuiImageData btnLargeOutlineOver(button_large_over_png);
|
||||
GuiImageData iconCheats(icon_game_cheats_png);
|
||||
GuiImageData iconController(icon_game_controllers_png);
|
||||
GuiImageData iconGameSettings(icon_game_settings_png);
|
||||
GuiImageData iconLoad(icon_game_load_png);
|
||||
GuiImageData iconSave(icon_game_save_png);
|
||||
GuiImageData iconReset(icon_game_reset_png);
|
||||
@ -1164,8 +1163,8 @@ static int MenuGame()
|
||||
GuiImage saveBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage saveBtnIcon(&iconSave);
|
||||
GuiButton saveBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
saveBtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
saveBtn.SetPosition(50, 120);
|
||||
saveBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
saveBtn.SetPosition(-125, 120);
|
||||
saveBtn.SetLabel(&saveBtnTxt);
|
||||
saveBtn.SetImage(&saveBtnImg);
|
||||
saveBtn.SetImageOver(&saveBtnImgOver);
|
||||
@ -1181,7 +1180,7 @@ static int MenuGame()
|
||||
GuiImage loadBtnIcon(&iconLoad);
|
||||
GuiButton loadBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
loadBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
loadBtn.SetPosition(0, 120);
|
||||
loadBtn.SetPosition(125, 120);
|
||||
loadBtn.SetLabel(&loadBtnTxt);
|
||||
loadBtn.SetImage(&loadBtnImg);
|
||||
loadBtn.SetImageOver(&loadBtnImgOver);
|
||||
@ -1196,8 +1195,8 @@ static int MenuGame()
|
||||
GuiImage resetBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage resetBtnIcon(&iconReset);
|
||||
GuiButton resetBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
resetBtn.SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
||||
resetBtn.SetPosition(-50, 120);
|
||||
resetBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
resetBtn.SetPosition(125, 250);
|
||||
resetBtn.SetLabel(&resetBtnTxt);
|
||||
resetBtn.SetImage(&resetBtnImg);
|
||||
resetBtn.SetImageOver(&resetBtnImgOver);
|
||||
@ -1207,37 +1206,22 @@ static int MenuGame()
|
||||
resetBtn.SetTrigger(&trigA);
|
||||
resetBtn.SetEffectGrow();
|
||||
|
||||
GuiText controllerBtnTxt("Controller", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage controllerBtnImg(&btnLargeOutline);
|
||||
GuiImage controllerBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage controllerBtnIcon(&iconController);
|
||||
GuiButton controllerBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
controllerBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
controllerBtn.SetPosition(-125, 250);
|
||||
controllerBtn.SetLabel(&controllerBtnTxt);
|
||||
controllerBtn.SetImage(&controllerBtnImg);
|
||||
controllerBtn.SetImageOver(&controllerBtnImgOver);
|
||||
controllerBtn.SetIcon(&controllerBtnIcon);
|
||||
controllerBtn.SetSoundOver(&btnSoundOver);
|
||||
controllerBtn.SetSoundClick(&btnSoundClick);
|
||||
controllerBtn.SetTrigger(&trigA);
|
||||
controllerBtn.SetEffectGrow();
|
||||
|
||||
GuiText cheatsBtnTxt("Cheats", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage cheatsBtnImg(&btnLargeOutline);
|
||||
GuiImage cheatsBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage cheatsBtnIcon(&iconCheats);
|
||||
GuiButton cheatsBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
cheatsBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
cheatsBtn.SetPosition(125, 250);
|
||||
cheatsBtn.SetLabel(&cheatsBtnTxt);
|
||||
cheatsBtn.SetImage(&cheatsBtnImg);
|
||||
cheatsBtn.SetImageOver(&cheatsBtnImgOver);
|
||||
cheatsBtn.SetIcon(&cheatsBtnIcon);
|
||||
cheatsBtn.SetSoundOver(&btnSoundOver);
|
||||
cheatsBtn.SetSoundClick(&btnSoundClick);
|
||||
cheatsBtn.SetTrigger(&trigA);
|
||||
cheatsBtn.SetEffectGrow();
|
||||
GuiText gameSettingsBtnTxt("Game Settings", 24, (GXColor){0, 0, 0, 255});
|
||||
gameSettingsBtnTxt.SetMaxWidth(btnLargeOutline.GetWidth()-30);
|
||||
GuiImage gameSettingsBtnImg(&btnLargeOutline);
|
||||
GuiImage gameSettingsBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage gameSettingsBtnIcon(&iconGameSettings);
|
||||
GuiButton gameSettingsBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
gameSettingsBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
gameSettingsBtn.SetPosition(-125, 250);
|
||||
gameSettingsBtn.SetLabel(&gameSettingsBtnTxt);
|
||||
gameSettingsBtn.SetImage(&gameSettingsBtnImg);
|
||||
gameSettingsBtn.SetImageOver(&gameSettingsBtnImgOver);
|
||||
gameSettingsBtn.SetIcon(&gameSettingsBtnIcon);
|
||||
gameSettingsBtn.SetSoundOver(&btnSoundOver);
|
||||
gameSettingsBtn.SetSoundClick(&btnSoundClick);
|
||||
gameSettingsBtn.SetTrigger(&trigA);
|
||||
gameSettingsBtn.SetEffectGrow();
|
||||
|
||||
GuiText mainmenuBtnTxt("Main Menu", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage mainmenuBtnImg(&btnOutline);
|
||||
@ -1314,8 +1298,7 @@ static int MenuGame()
|
||||
w.Append(&saveBtn);
|
||||
w.Append(&loadBtn);
|
||||
w.Append(&resetBtn);
|
||||
w.Append(&controllerBtn);
|
||||
w.Append(&cheatsBtn);
|
||||
w.Append(&gameSettingsBtn);
|
||||
|
||||
#ifdef HW_RVL
|
||||
w.Append(batteryBtn[0]);
|
||||
@ -1347,12 +1330,7 @@ static int MenuGame()
|
||||
batteryBtn[3]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 35);
|
||||
#endif
|
||||
|
||||
saveBtn.SetEffect(EFFECT_FADE, 15);
|
||||
loadBtn.SetEffect(EFFECT_FADE, 15);
|
||||
resetBtn.SetEffect(EFFECT_FADE, 15);
|
||||
controllerBtn.SetEffect(EFFECT_FADE, 15);
|
||||
cheatsBtn.SetEffect(EFFECT_FADE, 15);
|
||||
|
||||
w.SetEffect(EFFECT_FADE, 15);
|
||||
AutoSave();
|
||||
}
|
||||
|
||||
@ -1401,17 +1379,9 @@ static int MenuGame()
|
||||
S9xSoftReset ();
|
||||
menu = MENU_EXIT;
|
||||
}
|
||||
else if(controllerBtn.GetState() == STATE_CLICKED)
|
||||
else if(gameSettingsBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
ControllerWindow();
|
||||
}
|
||||
else if(cheatsBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
cheatsBtn.ResetState();
|
||||
if(Cheat.num_cheats > 0)
|
||||
menu = MENU_GAME_CHEATS;
|
||||
else
|
||||
InfoPrompt("Cheats file not found!");
|
||||
menu = MENU_GAMESETTINGS;
|
||||
}
|
||||
else if(mainmenuBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
@ -1450,12 +1420,7 @@ static int MenuGame()
|
||||
batteryBtn[3]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
#endif
|
||||
|
||||
saveBtn.SetEffect(EFFECT_FADE, -20);
|
||||
loadBtn.SetEffect(EFFECT_FADE, -20);
|
||||
resetBtn.SetEffect(EFFECT_FADE, -20);
|
||||
controllerBtn.SetEffect(EFFECT_FADE, -20);
|
||||
cheatsBtn.SetEffect(EFFECT_FADE, -20);
|
||||
|
||||
w.SetEffect(EFFECT_FADE, -20);
|
||||
usleep(200000); // wait for effects to finish
|
||||
}
|
||||
}
|
||||
@ -1759,6 +1724,199 @@ static int MenuGameSaves(int action)
|
||||
return menu;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* MenuGameSettings
|
||||
***************************************************************************/
|
||||
static int MenuGameSettings()
|
||||
{
|
||||
int menu = MENU_NONE;
|
||||
|
||||
GuiText titleTxt("Game Settings", 28, (GXColor){255, 255, 255, 255});
|
||||
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
titleTxt.SetPosition(50,50);
|
||||
|
||||
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||
GuiImageData btnOutline(button_png);
|
||||
GuiImageData btnOutlineOver(button_over_png);
|
||||
GuiImageData btnLargeOutline(button_large_png);
|
||||
GuiImageData btnLargeOutlineOver(button_large_over_png);
|
||||
GuiImageData iconMappings(icon_settings_mappings_png);
|
||||
GuiImageData iconVideo(icon_settings_video_png);
|
||||
GuiImageData iconController(icon_game_controllers_png);
|
||||
GuiImageData iconCheats(icon_game_cheats_png);
|
||||
GuiImageData btnCloseOutline(button_small_png);
|
||||
GuiImageData btnCloseOutlineOver(button_small_over_png);
|
||||
|
||||
GuiTrigger trigA;
|
||||
if(GCSettings.WiimoteOrientation)
|
||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
else
|
||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
|
||||
GuiTrigger trigHome;
|
||||
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
||||
|
||||
GuiText mappingBtnTxt("Button Mappings", 24, (GXColor){0, 0, 0, 255});
|
||||
mappingBtnTxt.SetMaxWidth(btnLargeOutline.GetWidth()-30);
|
||||
GuiImage mappingBtnImg(&btnLargeOutline);
|
||||
GuiImage mappingBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage mappingBtnIcon(&iconMappings);
|
||||
GuiButton mappingBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
mappingBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
mappingBtn.SetPosition(-125, 120);
|
||||
mappingBtn.SetLabel(&mappingBtnTxt);
|
||||
mappingBtn.SetImage(&mappingBtnImg);
|
||||
mappingBtn.SetImageOver(&mappingBtnImgOver);
|
||||
mappingBtn.SetIcon(&mappingBtnIcon);
|
||||
mappingBtn.SetSoundOver(&btnSoundOver);
|
||||
mappingBtn.SetSoundClick(&btnSoundClick);
|
||||
mappingBtn.SetTrigger(&trigA);
|
||||
mappingBtn.SetEffectGrow();
|
||||
|
||||
GuiText videoBtnTxt("Video", 24, (GXColor){0, 0, 0, 255});
|
||||
videoBtnTxt.SetMaxWidth(btnLargeOutline.GetWidth()-30);
|
||||
GuiImage videoBtnImg(&btnLargeOutline);
|
||||
GuiImage videoBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage videoBtnIcon(&iconVideo);
|
||||
GuiButton videoBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
videoBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
videoBtn.SetPosition(125, 120);
|
||||
videoBtn.SetLabel(&videoBtnTxt);
|
||||
videoBtn.SetImage(&videoBtnImg);
|
||||
videoBtn.SetImageOver(&videoBtnImgOver);
|
||||
videoBtn.SetIcon(&videoBtnIcon);
|
||||
videoBtn.SetSoundOver(&btnSoundOver);
|
||||
videoBtn.SetSoundClick(&btnSoundClick);
|
||||
videoBtn.SetTrigger(&trigA);
|
||||
videoBtn.SetEffectGrow();
|
||||
|
||||
GuiText controllerBtnTxt("Controller", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage controllerBtnImg(&btnLargeOutline);
|
||||
GuiImage controllerBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage controllerBtnIcon(&iconController);
|
||||
GuiButton controllerBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
controllerBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
controllerBtn.SetPosition(-125, 250);
|
||||
controllerBtn.SetLabel(&controllerBtnTxt);
|
||||
controllerBtn.SetImage(&controllerBtnImg);
|
||||
controllerBtn.SetImageOver(&controllerBtnImgOver);
|
||||
controllerBtn.SetIcon(&controllerBtnIcon);
|
||||
controllerBtn.SetSoundOver(&btnSoundOver);
|
||||
controllerBtn.SetSoundClick(&btnSoundClick);
|
||||
controllerBtn.SetTrigger(&trigA);
|
||||
controllerBtn.SetEffectGrow();
|
||||
|
||||
GuiText cheatsBtnTxt("Cheats", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage cheatsBtnImg(&btnLargeOutline);
|
||||
GuiImage cheatsBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage cheatsBtnIcon(&iconCheats);
|
||||
GuiButton cheatsBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
cheatsBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
cheatsBtn.SetPosition(125, 250);
|
||||
cheatsBtn.SetLabel(&cheatsBtnTxt);
|
||||
cheatsBtn.SetImage(&cheatsBtnImg);
|
||||
cheatsBtn.SetImageOver(&cheatsBtnImgOver);
|
||||
cheatsBtn.SetIcon(&cheatsBtnIcon);
|
||||
cheatsBtn.SetSoundOver(&btnSoundOver);
|
||||
cheatsBtn.SetSoundClick(&btnSoundClick);
|
||||
cheatsBtn.SetTrigger(&trigA);
|
||||
cheatsBtn.SetEffectGrow();
|
||||
|
||||
GuiText closeBtnTxt("Close", 22, (GXColor){0, 0, 0, 255});
|
||||
GuiImage closeBtnImg(&btnCloseOutline);
|
||||
GuiImage closeBtnImgOver(&btnCloseOutlineOver);
|
||||
GuiButton closeBtn(btnCloseOutline.GetWidth(), btnCloseOutline.GetHeight());
|
||||
closeBtn.SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
||||
closeBtn.SetPosition(-30, 35);
|
||||
closeBtn.SetLabel(&closeBtnTxt);
|
||||
closeBtn.SetImage(&closeBtnImg);
|
||||
closeBtn.SetImageOver(&closeBtnImgOver);
|
||||
closeBtn.SetSoundOver(&btnSoundOver);
|
||||
closeBtn.SetSoundClick(&btnSoundClick);
|
||||
closeBtn.SetTrigger(&trigA);
|
||||
closeBtn.SetTrigger(&trigHome);
|
||||
closeBtn.SetEffectGrow();
|
||||
|
||||
GuiText backBtnTxt("Go Back", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage backBtnImg(&btnOutline);
|
||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||
GuiButton backBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
|
||||
backBtn.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
|
||||
backBtn.SetPosition(100, -35);
|
||||
backBtn.SetLabel(&backBtnTxt);
|
||||
backBtn.SetImage(&backBtnImg);
|
||||
backBtn.SetImageOver(&backBtnImgOver);
|
||||
backBtn.SetSoundOver(&btnSoundOver);
|
||||
backBtn.SetSoundClick(&btnSoundClick);
|
||||
backBtn.SetTrigger(&trigA);
|
||||
backBtn.SetEffectGrow();
|
||||
|
||||
HaltGui();
|
||||
GuiWindow w(screenwidth, screenheight);
|
||||
w.Append(&titleTxt);
|
||||
w.Append(&mappingBtn);
|
||||
w.Append(&videoBtn);
|
||||
w.Append(&controllerBtn);
|
||||
w.Append(&cheatsBtn);
|
||||
w.Append(&closeBtn);
|
||||
w.Append(&backBtn);
|
||||
|
||||
mainWindow->Append(&w);
|
||||
|
||||
ResumeGui();
|
||||
|
||||
while(menu == MENU_NONE)
|
||||
{
|
||||
VIDEO_WaitVSync ();
|
||||
|
||||
if(mappingBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS;
|
||||
}
|
||||
else if(videoBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_GAMESETTINGS_VIDEO;
|
||||
}
|
||||
else if(controllerBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
ControllerWindow();
|
||||
}
|
||||
else if(cheatsBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
cheatsBtn.ResetState();
|
||||
if(Cheat.num_cheats > 0)
|
||||
menu = MENU_GAMESETTINGS_CHEATS;
|
||||
else
|
||||
InfoPrompt("Cheats file not found!");
|
||||
}
|
||||
else if(closeBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_EXIT;
|
||||
|
||||
exitSound->Play();
|
||||
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
backBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
|
||||
w.SetEffect(EFFECT_FADE, -20);
|
||||
|
||||
usleep(200000); // wait for effects to finish
|
||||
}
|
||||
else if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_GAME;
|
||||
}
|
||||
}
|
||||
|
||||
HaltGui();
|
||||
mainWindow->Remove(&w);
|
||||
return menu;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* MenuGameCheats
|
||||
*
|
||||
@ -1777,7 +1935,7 @@ static int MenuGameCheats()
|
||||
|
||||
options.length = i;
|
||||
|
||||
GuiText titleTxt("Cheats", 28, (GXColor){255, 255, 255, 255});
|
||||
GuiText titleTxt("Game Settings - Cheats", 28, (GXColor){255, 255, 255, 255});
|
||||
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
titleTxt.SetPosition(50,50);
|
||||
|
||||
@ -1785,8 +1943,6 @@ static int MenuGameCheats()
|
||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||
GuiImageData btnOutline(button_png);
|
||||
GuiImageData btnOutlineOver(button_over_png);
|
||||
GuiImageData btnCloseOutline(button_small_png);
|
||||
GuiImageData btnCloseOutlineOver(button_small_over_png);
|
||||
|
||||
GuiTrigger trigA;
|
||||
if(GCSettings.WiimoteOrientation)
|
||||
@ -1794,9 +1950,6 @@ static int MenuGameCheats()
|
||||
else
|
||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
|
||||
GuiTrigger trigHome;
|
||||
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
||||
|
||||
GuiText backBtnTxt("Go Back", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage backBtnImg(&btnOutline);
|
||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||
@ -1811,21 +1964,6 @@ static int MenuGameCheats()
|
||||
backBtn.SetTrigger(&trigA);
|
||||
backBtn.SetEffectGrow();
|
||||
|
||||
GuiText closeBtnTxt("Close", 22, (GXColor){0, 0, 0, 255});
|
||||
GuiImage closeBtnImg(&btnCloseOutline);
|
||||
GuiImage closeBtnImgOver(&btnCloseOutlineOver);
|
||||
GuiButton closeBtn(btnCloseOutline.GetWidth(), btnCloseOutline.GetHeight());
|
||||
closeBtn.SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
||||
closeBtn.SetPosition(-30, 35);
|
||||
closeBtn.SetLabel(&closeBtnTxt);
|
||||
closeBtn.SetImage(&closeBtnImg);
|
||||
closeBtn.SetImageOver(&closeBtnImgOver);
|
||||
closeBtn.SetSoundOver(&btnSoundOver);
|
||||
closeBtn.SetSoundClick(&btnSoundClick);
|
||||
closeBtn.SetTrigger(&trigA);
|
||||
closeBtn.SetTrigger(&trigHome);
|
||||
closeBtn.SetEffectGrow();
|
||||
|
||||
GuiOptionBrowser optionBrowser(552, 248, &options);
|
||||
optionBrowser.SetPosition(0, 108);
|
||||
optionBrowser.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
@ -1833,7 +1971,6 @@ static int MenuGameCheats()
|
||||
HaltGui();
|
||||
GuiWindow w(screenwidth, screenheight);
|
||||
w.Append(&backBtn);
|
||||
w.Append(&closeBtn);
|
||||
mainWindow->Append(&optionBrowser);
|
||||
mainWindow->Append(&w);
|
||||
mainWindow->Append(&titleTxt);
|
||||
@ -1855,23 +1992,7 @@ static int MenuGameCheats()
|
||||
|
||||
if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_GAME;
|
||||
}
|
||||
else if(closeBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_EXIT;
|
||||
|
||||
exitSound->Play();
|
||||
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
|
||||
backBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
|
||||
|
||||
w.SetEffect(EFFECT_FADE, -20);
|
||||
|
||||
usleep(200000); // wait for effects to finish
|
||||
menu = MENU_GAMESETTINGS;
|
||||
}
|
||||
}
|
||||
HaltGui();
|
||||
@ -1881,223 +2002,6 @@ static int MenuGameCheats()
|
||||
return menu;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* MenuSettings
|
||||
***************************************************************************/
|
||||
static int MenuSettings()
|
||||
{
|
||||
int menu = MENU_NONE;
|
||||
|
||||
GuiText titleTxt("Settings", 28, (GXColor){255, 255, 255, 255});
|
||||
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
titleTxt.SetPosition(50,50);
|
||||
|
||||
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||
GuiImageData btnOutline(button_png);
|
||||
GuiImageData btnOutlineOver(button_over_png);
|
||||
GuiImageData btnLargeOutline(button_large_png);
|
||||
GuiImageData btnLargeOutlineOver(button_large_over_png);
|
||||
GuiImageData iconFile(icon_settings_file_png);
|
||||
GuiImageData iconMappings(icon_settings_mappings_png);
|
||||
GuiImageData iconMenu(icon_settings_menu_png);
|
||||
GuiImageData iconNetwork(icon_settings_network_png);
|
||||
GuiImageData iconVideo(icon_settings_video_png);
|
||||
|
||||
GuiTrigger trigA;
|
||||
if(GCSettings.WiimoteOrientation)
|
||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
else
|
||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
|
||||
GuiText mappingBtnTxt("Button Mappings", 24, (GXColor){0, 0, 0, 255});
|
||||
mappingBtnTxt.SetMaxWidth(btnLargeOutline.GetWidth()-30);
|
||||
GuiImage mappingBtnImg(&btnLargeOutline);
|
||||
GuiImage mappingBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage mappingBtnIcon(&iconMappings);
|
||||
GuiButton mappingBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
mappingBtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
mappingBtn.SetPosition(50, 120);
|
||||
mappingBtn.SetLabel(&mappingBtnTxt);
|
||||
mappingBtn.SetImage(&mappingBtnImg);
|
||||
mappingBtn.SetImageOver(&mappingBtnImgOver);
|
||||
mappingBtn.SetIcon(&mappingBtnIcon);
|
||||
mappingBtn.SetSoundOver(&btnSoundOver);
|
||||
mappingBtn.SetSoundClick(&btnSoundClick);
|
||||
mappingBtn.SetTrigger(&trigA);
|
||||
mappingBtn.SetEffectGrow();
|
||||
|
||||
GuiText videoBtnTxt("Video", 24, (GXColor){0, 0, 0, 255});
|
||||
videoBtnTxt.SetMaxWidth(btnLargeOutline.GetWidth()-30);
|
||||
GuiImage videoBtnImg(&btnLargeOutline);
|
||||
GuiImage videoBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage videoBtnIcon(&iconVideo);
|
||||
GuiButton videoBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
videoBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
videoBtn.SetPosition(0, 120);
|
||||
videoBtn.SetLabel(&videoBtnTxt);
|
||||
videoBtn.SetImage(&videoBtnImg);
|
||||
videoBtn.SetImageOver(&videoBtnImgOver);
|
||||
videoBtn.SetIcon(&videoBtnIcon);
|
||||
videoBtn.SetSoundOver(&btnSoundOver);
|
||||
videoBtn.SetSoundClick(&btnSoundClick);
|
||||
videoBtn.SetTrigger(&trigA);
|
||||
videoBtn.SetEffectGrow();
|
||||
|
||||
GuiText savingBtnTxt1("Saving", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiText savingBtnTxt2("&", 18, (GXColor){0, 0, 0, 255});
|
||||
GuiText savingBtnTxt3("Loading", 24, (GXColor){0, 0, 0, 255});
|
||||
savingBtnTxt1.SetPosition(0, -20);
|
||||
savingBtnTxt3.SetPosition(0, +20);
|
||||
GuiImage savingBtnImg(&btnLargeOutline);
|
||||
GuiImage savingBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage fileBtnIcon(&iconFile);
|
||||
GuiButton savingBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
savingBtn.SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
||||
savingBtn.SetPosition(-50, 120);
|
||||
savingBtn.SetLabel(&savingBtnTxt1, 0);
|
||||
savingBtn.SetLabel(&savingBtnTxt2, 1);
|
||||
savingBtn.SetLabel(&savingBtnTxt3, 2);
|
||||
savingBtn.SetImage(&savingBtnImg);
|
||||
savingBtn.SetImageOver(&savingBtnImgOver);
|
||||
savingBtn.SetIcon(&fileBtnIcon);
|
||||
savingBtn.SetSoundOver(&btnSoundOver);
|
||||
savingBtn.SetSoundClick(&btnSoundClick);
|
||||
savingBtn.SetTrigger(&trigA);
|
||||
savingBtn.SetEffectGrow();
|
||||
|
||||
GuiText menuBtnTxt("Menu", 24, (GXColor){0, 0, 0, 255});
|
||||
menuBtnTxt.SetMaxWidth(btnLargeOutline.GetWidth()-30);
|
||||
GuiImage menuBtnImg(&btnLargeOutline);
|
||||
GuiImage menuBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage menuBtnIcon(&iconMenu);
|
||||
GuiButton menuBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
menuBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
menuBtn.SetPosition(-125, 250);
|
||||
menuBtn.SetLabel(&menuBtnTxt);
|
||||
menuBtn.SetImage(&menuBtnImg);
|
||||
menuBtn.SetImageOver(&menuBtnImgOver);
|
||||
menuBtn.SetIcon(&menuBtnIcon);
|
||||
menuBtn.SetSoundOver(&btnSoundOver);
|
||||
menuBtn.SetSoundClick(&btnSoundClick);
|
||||
menuBtn.SetTrigger(&trigA);
|
||||
menuBtn.SetEffectGrow();
|
||||
|
||||
GuiText networkBtnTxt("Network", 24, (GXColor){0, 0, 0, 255});
|
||||
networkBtnTxt.SetMaxWidth(btnLargeOutline.GetWidth()-30);
|
||||
GuiImage networkBtnImg(&btnLargeOutline);
|
||||
GuiImage networkBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage networkBtnIcon(&iconNetwork);
|
||||
GuiButton networkBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
networkBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
networkBtn.SetPosition(125, 250);
|
||||
networkBtn.SetLabel(&networkBtnTxt);
|
||||
networkBtn.SetImage(&networkBtnImg);
|
||||
networkBtn.SetImageOver(&networkBtnImgOver);
|
||||
networkBtn.SetIcon(&networkBtnIcon);
|
||||
networkBtn.SetSoundOver(&btnSoundOver);
|
||||
networkBtn.SetSoundClick(&btnSoundClick);
|
||||
networkBtn.SetTrigger(&trigA);
|
||||
networkBtn.SetEffectGrow();
|
||||
|
||||
GuiText backBtnTxt("Go Back", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage backBtnImg(&btnOutline);
|
||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||
GuiButton backBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
|
||||
backBtn.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
|
||||
backBtn.SetPosition(100, -35);
|
||||
backBtn.SetLabel(&backBtnTxt);
|
||||
backBtn.SetImage(&backBtnImg);
|
||||
backBtn.SetImageOver(&backBtnImgOver);
|
||||
backBtn.SetSoundOver(&btnSoundOver);
|
||||
backBtn.SetSoundClick(&btnSoundClick);
|
||||
backBtn.SetTrigger(&trigA);
|
||||
backBtn.SetEffectGrow();
|
||||
|
||||
GuiText resetBtnTxt("Reset Settings", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage resetBtnImg(&btnOutline);
|
||||
GuiImage resetBtnImgOver(&btnOutlineOver);
|
||||
GuiButton resetBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
|
||||
resetBtn.SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
|
||||
resetBtn.SetPosition(-100, -35);
|
||||
resetBtn.SetLabel(&resetBtnTxt);
|
||||
resetBtn.SetImage(&resetBtnImg);
|
||||
resetBtn.SetImageOver(&resetBtnImgOver);
|
||||
resetBtn.SetSoundOver(&btnSoundOver);
|
||||
resetBtn.SetSoundClick(&btnSoundClick);
|
||||
resetBtn.SetTrigger(&trigA);
|
||||
resetBtn.SetEffectGrow();
|
||||
|
||||
HaltGui();
|
||||
GuiWindow w(screenwidth, screenheight);
|
||||
w.Append(&titleTxt);
|
||||
w.Append(&mappingBtn);
|
||||
w.Append(&videoBtn);
|
||||
w.Append(&savingBtn);
|
||||
w.Append(&menuBtn);
|
||||
|
||||
#ifdef HW_RVL
|
||||
w.Append(&networkBtn);
|
||||
#endif
|
||||
|
||||
w.Append(&backBtn);
|
||||
w.Append(&resetBtn);
|
||||
|
||||
mainWindow->Append(&w);
|
||||
|
||||
ResumeGui();
|
||||
|
||||
while(menu == MENU_NONE)
|
||||
{
|
||||
VIDEO_WaitVSync ();
|
||||
|
||||
if(mappingBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS;
|
||||
}
|
||||
else if(videoBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_VIDEO;
|
||||
}
|
||||
else if(savingBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_FILE;
|
||||
}
|
||||
else if(menuBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MENU;
|
||||
}
|
||||
else if(networkBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_NETWORK;
|
||||
}
|
||||
else if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_GAMESELECTION;
|
||||
}
|
||||
else if(resetBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
resetBtn.ResetState();
|
||||
|
||||
int choice = WindowPrompt(
|
||||
"Reset Settings",
|
||||
"Are you sure that you want to reset your settings?",
|
||||
"Yes",
|
||||
"No");
|
||||
|
||||
if(choice == 1)
|
||||
DefaultSettings();
|
||||
}
|
||||
}
|
||||
|
||||
if(menu == MENU_GAMESELECTION)
|
||||
SavePrefs(NOTSILENT);
|
||||
|
||||
HaltGui();
|
||||
mainWindow->Remove(&w);
|
||||
return menu;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* MenuSettingsMappings
|
||||
***************************************************************************/
|
||||
@ -2105,7 +2009,7 @@ static int MenuSettingsMappings()
|
||||
{
|
||||
int menu = MENU_NONE;
|
||||
|
||||
GuiText titleTxt("Settings - Button Mappings", 28, (GXColor){255, 255, 255, 255});
|
||||
GuiText titleTxt("Game Settings - Button Mappings", 28, (GXColor){255, 255, 255, 255});
|
||||
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
titleTxt.SetPosition(50,50);
|
||||
|
||||
@ -2227,27 +2131,27 @@ static int MenuSettingsMappings()
|
||||
|
||||
if(snesBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS_CTRL;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS_CTRL;
|
||||
mapMenuCtrlSNES = CTRL_PAD;
|
||||
}
|
||||
else if(superscopeBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS_CTRL;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS_CTRL;
|
||||
mapMenuCtrlSNES = CTRL_SCOPE;
|
||||
}
|
||||
else if(mouseBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS_CTRL;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS_CTRL;
|
||||
mapMenuCtrlSNES = CTRL_MOUSE;
|
||||
}
|
||||
else if(justifierBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS_CTRL;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS_CTRL;
|
||||
mapMenuCtrlSNES = CTRL_JUST;
|
||||
}
|
||||
else if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS;
|
||||
menu = MENU_GAMESETTINGS;
|
||||
}
|
||||
}
|
||||
HaltGui();
|
||||
@ -2261,7 +2165,7 @@ static int MenuSettingsMappingsController()
|
||||
char menuTitle[100];
|
||||
char menuSubtitle[100];
|
||||
|
||||
sprintf(menuTitle, "Settings - Button Mappings");
|
||||
sprintf(menuTitle, "Game Settings - Button Mappings");
|
||||
GuiText titleTxt(menuTitle, 28, (GXColor){255, 255, 255, 255});
|
||||
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
titleTxt.SetPosition(50,30);
|
||||
@ -2401,27 +2305,27 @@ static int MenuSettingsMappingsController()
|
||||
|
||||
if(wiimoteBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS_MAP;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS_MAP;
|
||||
mapMenuCtrl = CTRLR_WIIMOTE;
|
||||
}
|
||||
else if(nunchukBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS_MAP;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS_MAP;
|
||||
mapMenuCtrl = CTRLR_NUNCHUK;
|
||||
}
|
||||
else if(classicBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS_MAP;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS_MAP;
|
||||
mapMenuCtrl = CTRLR_CLASSIC;
|
||||
}
|
||||
else if(gamecubeBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS_MAP;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS_MAP;
|
||||
mapMenuCtrl = CTRLR_GCPAD;
|
||||
}
|
||||
else if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS;
|
||||
}
|
||||
}
|
||||
HaltGui();
|
||||
@ -2563,7 +2467,7 @@ static int MenuSettingsMappingsMap()
|
||||
|
||||
char menuTitle[100];
|
||||
char menuSubtitle[100];
|
||||
sprintf(menuTitle, "Settings - Button Mappings");
|
||||
sprintf(menuTitle, "Game Settings - Button Mappings");
|
||||
|
||||
GuiText titleTxt(menuTitle, 28, (GXColor){255, 255, 255, 255});
|
||||
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
@ -2685,7 +2589,7 @@ static int MenuSettingsMappingsMap()
|
||||
|
||||
if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MAPPINGS_CTRL;
|
||||
menu = MENU_GAMESETTINGS_MAPPINGS_CTRL;
|
||||
}
|
||||
}
|
||||
HaltGui();
|
||||
@ -2917,7 +2821,7 @@ static int MenuSettingsVideo()
|
||||
sprintf(options.name[i++], "Screen Position");
|
||||
options.length = i;
|
||||
|
||||
GuiText titleTxt("Settings - Video", 28, (GXColor){255, 255, 255, 255});
|
||||
GuiText titleTxt("Game Settings - Video", 28, (GXColor){255, 255, 255, 255});
|
||||
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
titleTxt.SetPosition(50,50);
|
||||
|
||||
@ -3015,7 +2919,7 @@ static int MenuSettingsVideo()
|
||||
|
||||
if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS;
|
||||
menu = MENU_GAMESETTINGS;
|
||||
}
|
||||
}
|
||||
HaltGui();
|
||||
@ -3025,6 +2929,177 @@ static int MenuSettingsVideo()
|
||||
return menu;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* MenuSettings
|
||||
***************************************************************************/
|
||||
static int MenuSettings()
|
||||
{
|
||||
int menu = MENU_NONE;
|
||||
|
||||
GuiText titleTxt("Settings", 28, (GXColor){255, 255, 255, 255});
|
||||
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
titleTxt.SetPosition(50,50);
|
||||
|
||||
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
|
||||
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
|
||||
GuiImageData btnOutline(button_png);
|
||||
GuiImageData btnOutlineOver(button_over_png);
|
||||
GuiImageData btnLargeOutline(button_large_png);
|
||||
GuiImageData btnLargeOutlineOver(button_large_over_png);
|
||||
GuiImageData iconFile(icon_settings_file_png);
|
||||
GuiImageData iconMenu(icon_settings_menu_png);
|
||||
GuiImageData iconNetwork(icon_settings_network_png);
|
||||
|
||||
GuiTrigger trigA;
|
||||
if(GCSettings.WiimoteOrientation)
|
||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
else
|
||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||
|
||||
GuiText savingBtnTxt1("Saving", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiText savingBtnTxt2("&", 18, (GXColor){0, 0, 0, 255});
|
||||
GuiText savingBtnTxt3("Loading", 24, (GXColor){0, 0, 0, 255});
|
||||
savingBtnTxt1.SetPosition(0, -20);
|
||||
savingBtnTxt3.SetPosition(0, +20);
|
||||
GuiImage savingBtnImg(&btnLargeOutline);
|
||||
GuiImage savingBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage fileBtnIcon(&iconFile);
|
||||
GuiButton savingBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
savingBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
savingBtn.SetPosition(-125, 120);
|
||||
savingBtn.SetLabel(&savingBtnTxt1, 0);
|
||||
savingBtn.SetLabel(&savingBtnTxt2, 1);
|
||||
savingBtn.SetLabel(&savingBtnTxt3, 2);
|
||||
savingBtn.SetImage(&savingBtnImg);
|
||||
savingBtn.SetImageOver(&savingBtnImgOver);
|
||||
savingBtn.SetIcon(&fileBtnIcon);
|
||||
savingBtn.SetSoundOver(&btnSoundOver);
|
||||
savingBtn.SetSoundClick(&btnSoundClick);
|
||||
savingBtn.SetTrigger(&trigA);
|
||||
savingBtn.SetEffectGrow();
|
||||
|
||||
GuiText menuBtnTxt("Menu", 24, (GXColor){0, 0, 0, 255});
|
||||
menuBtnTxt.SetMaxWidth(btnLargeOutline.GetWidth()-30);
|
||||
GuiImage menuBtnImg(&btnLargeOutline);
|
||||
GuiImage menuBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage menuBtnIcon(&iconMenu);
|
||||
GuiButton menuBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
menuBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
menuBtn.SetPosition(125, 120);
|
||||
menuBtn.SetLabel(&menuBtnTxt);
|
||||
menuBtn.SetImage(&menuBtnImg);
|
||||
menuBtn.SetImageOver(&menuBtnImgOver);
|
||||
menuBtn.SetIcon(&menuBtnIcon);
|
||||
menuBtn.SetSoundOver(&btnSoundOver);
|
||||
menuBtn.SetSoundClick(&btnSoundClick);
|
||||
menuBtn.SetTrigger(&trigA);
|
||||
menuBtn.SetEffectGrow();
|
||||
|
||||
GuiText networkBtnTxt("Network", 24, (GXColor){0, 0, 0, 255});
|
||||
networkBtnTxt.SetMaxWidth(btnLargeOutline.GetWidth()-30);
|
||||
GuiImage networkBtnImg(&btnLargeOutline);
|
||||
GuiImage networkBtnImgOver(&btnLargeOutlineOver);
|
||||
GuiImage networkBtnIcon(&iconNetwork);
|
||||
GuiButton networkBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||
networkBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
networkBtn.SetPosition(0, 250);
|
||||
networkBtn.SetLabel(&networkBtnTxt);
|
||||
networkBtn.SetImage(&networkBtnImg);
|
||||
networkBtn.SetImageOver(&networkBtnImgOver);
|
||||
networkBtn.SetIcon(&networkBtnIcon);
|
||||
networkBtn.SetSoundOver(&btnSoundOver);
|
||||
networkBtn.SetSoundClick(&btnSoundClick);
|
||||
networkBtn.SetTrigger(&trigA);
|
||||
networkBtn.SetEffectGrow();
|
||||
|
||||
GuiText backBtnTxt("Go Back", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage backBtnImg(&btnOutline);
|
||||
GuiImage backBtnImgOver(&btnOutlineOver);
|
||||
GuiButton backBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
|
||||
backBtn.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
|
||||
backBtn.SetPosition(100, -35);
|
||||
backBtn.SetLabel(&backBtnTxt);
|
||||
backBtn.SetImage(&backBtnImg);
|
||||
backBtn.SetImageOver(&backBtnImgOver);
|
||||
backBtn.SetSoundOver(&btnSoundOver);
|
||||
backBtn.SetSoundClick(&btnSoundClick);
|
||||
backBtn.SetTrigger(&trigA);
|
||||
backBtn.SetEffectGrow();
|
||||
|
||||
GuiText resetBtnTxt("Reset Settings", 24, (GXColor){0, 0, 0, 255});
|
||||
GuiImage resetBtnImg(&btnOutline);
|
||||
GuiImage resetBtnImgOver(&btnOutlineOver);
|
||||
GuiButton resetBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
|
||||
resetBtn.SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
|
||||
resetBtn.SetPosition(-100, -35);
|
||||
resetBtn.SetLabel(&resetBtnTxt);
|
||||
resetBtn.SetImage(&resetBtnImg);
|
||||
resetBtn.SetImageOver(&resetBtnImgOver);
|
||||
resetBtn.SetSoundOver(&btnSoundOver);
|
||||
resetBtn.SetSoundClick(&btnSoundClick);
|
||||
resetBtn.SetTrigger(&trigA);
|
||||
resetBtn.SetEffectGrow();
|
||||
|
||||
HaltGui();
|
||||
GuiWindow w(screenwidth, screenheight);
|
||||
w.Append(&titleTxt);
|
||||
w.Append(&savingBtn);
|
||||
w.Append(&menuBtn);
|
||||
|
||||
#ifdef HW_RVL
|
||||
w.Append(&networkBtn);
|
||||
#endif
|
||||
|
||||
w.Append(&backBtn);
|
||||
w.Append(&resetBtn);
|
||||
|
||||
mainWindow->Append(&w);
|
||||
|
||||
ResumeGui();
|
||||
|
||||
while(menu == MENU_NONE)
|
||||
{
|
||||
VIDEO_WaitVSync ();
|
||||
|
||||
if(savingBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_FILE;
|
||||
}
|
||||
else if(menuBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_MENU;
|
||||
}
|
||||
else if(networkBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_SETTINGS_NETWORK;
|
||||
}
|
||||
else if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
menu = MENU_GAMESELECTION;
|
||||
}
|
||||
else if(resetBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
resetBtn.ResetState();
|
||||
|
||||
int choice = WindowPrompt(
|
||||
"Reset Settings",
|
||||
"Are you sure that you want to reset your settings?",
|
||||
"Yes",
|
||||
"No");
|
||||
|
||||
if(choice == 1)
|
||||
DefaultSettings();
|
||||
}
|
||||
}
|
||||
|
||||
if(menu == MENU_GAMESELECTION)
|
||||
SavePrefs(NOTSILENT);
|
||||
|
||||
HaltGui();
|
||||
mainWindow->Remove(&w);
|
||||
return menu;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* MenuSettingsFile
|
||||
***************************************************************************/
|
||||
@ -3553,24 +3628,27 @@ MainMenu (int menu)
|
||||
case MENU_GAME_SAVE:
|
||||
currentMenu = MenuGameSaves(1);
|
||||
break;
|
||||
case MENU_GAME_CHEATS:
|
||||
case MENU_GAMESETTINGS:
|
||||
currentMenu = MenuGameSettings();
|
||||
break;
|
||||
case MENU_GAMESETTINGS_MAPPINGS:
|
||||
currentMenu = MenuSettingsMappings();
|
||||
break;
|
||||
case MENU_GAMESETTINGS_MAPPINGS_CTRL:
|
||||
currentMenu = MenuSettingsMappingsController();
|
||||
break;
|
||||
case MENU_GAMESETTINGS_MAPPINGS_MAP:
|
||||
currentMenu = MenuSettingsMappingsMap();
|
||||
break;
|
||||
case MENU_GAMESETTINGS_VIDEO:
|
||||
currentMenu = MenuSettingsVideo();
|
||||
break;
|
||||
case MENU_GAMESETTINGS_CHEATS:
|
||||
currentMenu = MenuGameCheats();
|
||||
break;
|
||||
case MENU_SETTINGS:
|
||||
currentMenu = MenuSettings();
|
||||
break;
|
||||
case MENU_SETTINGS_MAPPINGS:
|
||||
currentMenu = MenuSettingsMappings();
|
||||
break;
|
||||
case MENU_SETTINGS_MAPPINGS_CTRL:
|
||||
currentMenu = MenuSettingsMappingsController();
|
||||
break;
|
||||
case MENU_SETTINGS_MAPPINGS_MAP:
|
||||
currentMenu = MenuSettingsMappingsMap();
|
||||
break;
|
||||
case MENU_SETTINGS_VIDEO:
|
||||
currentMenu = MenuSettingsVideo();
|
||||
break;
|
||||
case MENU_SETTINGS_FILE:
|
||||
currentMenu = MenuSettingsFile();
|
||||
break;
|
||||
|
@ -27,10 +27,6 @@ enum
|
||||
MENU_EXIT = -1,
|
||||
MENU_NONE,
|
||||
MENU_SETTINGS,
|
||||
MENU_SETTINGS_MAPPINGS,
|
||||
MENU_SETTINGS_MAPPINGS_CTRL,
|
||||
MENU_SETTINGS_MAPPINGS_MAP,
|
||||
MENU_SETTINGS_VIDEO,
|
||||
MENU_SETTINGS_FILE,
|
||||
MENU_SETTINGS_MENU,
|
||||
MENU_SETTINGS_NETWORK,
|
||||
@ -38,7 +34,12 @@ enum
|
||||
MENU_GAME,
|
||||
MENU_GAME_SAVE,
|
||||
MENU_GAME_LOAD,
|
||||
MENU_GAME_CHEATS
|
||||
MENU_GAMESETTINGS,
|
||||
MENU_GAMESETTINGS_MAPPINGS,
|
||||
MENU_GAMESETTINGS_MAPPINGS_CTRL,
|
||||
MENU_GAMESETTINGS_MAPPINGS_MAP,
|
||||
MENU_GAMESETTINGS_VIDEO,
|
||||
MENU_GAMESETTINGS_CHEATS
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -98,7 +98,7 @@ void UpdateCheck()
|
||||
else // temporary, for compatibility
|
||||
{
|
||||
int versionnum = atoi(version);
|
||||
if(versionnum > 10) // 010
|
||||
if(versionnum > 11) // 011
|
||||
{
|
||||
item = mxmlFindElement(xml, xml, "file", NULL, NULL, MXML_DESCEND);
|
||||
if(item)
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "filelist.h"
|
||||
|
||||
#define APPNAME "Snes9x GX"
|
||||
#define APPVERSION "4.0.0"
|
||||
#define APPVERSION "4.0.1"
|
||||
#define PREF_FILE_NAME "settings.xml"
|
||||
|
||||
#define NOTSILENT 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<app version="010">
|
||||
<file url="http://snes9x-gx.googlecode.com/files/Snes9x%20GX%204.0.0%20-%20Wii.zip"></file>
|
||||
<app version="011">
|
||||
<file url="http://snes9x-gx.googlecode.com/files/Snes9x%20GX%204.0.1%20-%20Wii.zip"></file>
|
||||
</app>
|
||||
|
Loading…
Reference in New Issue
Block a user