merging changes from Zopenko from 2.3.4
31
readme.txt
@ -38,14 +38,31 @@ https://github.com/dborth/vbagx/releases
|
|||||||
|0O×øo· UPDATE HISTORY ·oø×O0|
|
|0O×øo· UPDATE HISTORY ·oø×O0|
|
||||||
`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨'
|
`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨'
|
||||||
|
|
||||||
[2.3.3]
|
[2.3.4 - September 15, 2016]
|
||||||
|
|
||||||
* fixes the gc pad down on file browser
|
* Added the delete save file (SRAM / Snapshot) option
|
||||||
* added koston default green gb color screen
|
* Changed the box colors for the SRAM and Snapshots files to match the color
|
||||||
* added the screenshot/preview button
|
scheme of the emu GUI
|
||||||
* added the wiiupro icon on the controller settings
|
* Change the "Power off Wii" exit option to completely turn off the wii,
|
||||||
* increased and centered the screenshot image
|
ignoring the WC24 settings
|
||||||
* added the screenshot white image background
|
* Updated settings file name in order to have it's own settings file name
|
||||||
|
* Added an option to switch between screenshots, covers, or artwork images,
|
||||||
|
with their respective named folders at the device's root. You can set which
|
||||||
|
one to show, by going to Settings > Menu > Preview Image. The .PNG image file
|
||||||
|
needs to have the same name as the ROM (e.g.: Mother 3.png)
|
||||||
|
* Removed sound from GUI (thanks to Askot)
|
||||||
|
* Added option to switch between the Green or Monochrome GB color screen. You
|
||||||
|
can set which one to show by going to Settings > Emulation > GB Screen Palette
|
||||||
|
|
||||||
|
[2.3.3 - June 25, 2016]
|
||||||
|
|
||||||
|
* Fixed the GC pad Down input on the File browser window
|
||||||
|
* Added Koston's green gb color screen
|
||||||
|
* Added the Screenshot Button
|
||||||
|
* Increased and Centered the Screenshot image and reduce game list width
|
||||||
|
* Added a background for the preview image
|
||||||
|
* Added the WiiuPro Controller icon on the controller settings
|
||||||
|
* Fix DSI error / Bug from Emulator Main Menu
|
||||||
|
|
||||||
[2.3.2 - March 4, 2015] - libertyernie
|
[2.3.2 - March 4, 2015] - libertyernie
|
||||||
|
|
||||||
|
@ -93,6 +93,8 @@ extern const u8 icon_game_load_png[];
|
|||||||
extern const u32 icon_game_load_png_size;
|
extern const u32 icon_game_load_png_size;
|
||||||
extern const u8 icon_game_save_png[];
|
extern const u8 icon_game_save_png[];
|
||||||
extern const u32 icon_game_save_png_size;
|
extern const u32 icon_game_save_png_size;
|
||||||
|
extern const u8 icon_game_delete_png[];
|
||||||
|
extern const u32 icon_game_delete_png_size;
|
||||||
extern const u8 icon_game_reset_png[];
|
extern const u8 icon_game_reset_png[];
|
||||||
extern const u32 icon_game_reset_png_size;
|
extern const u32 icon_game_reset_png_size;
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ GuiSaveBrowser::GuiSaveBrowser(int w, int h, SaveList * s, int a)
|
|||||||
|
|
||||||
if(action == 0) // load
|
if(action == 0) // load
|
||||||
listOffset = 0;
|
listOffset = 0;
|
||||||
|
else if(action == 2) // delete SRAM / Snapshot
|
||||||
|
listOffset = 0;
|
||||||
else
|
else
|
||||||
listOffset = -2; // save - reserve -2 & -1 for new slots
|
listOffset = -2; // save - reserve -2 & -1 for new slots
|
||||||
|
|
||||||
@ -257,7 +259,8 @@ void GuiSaveBrowser::Update(GuiTrigger * t)
|
|||||||
if(selectedItem == 0)
|
if(selectedItem == 0)
|
||||||
{
|
{
|
||||||
if((listOffset - 2 >= 0 && action == 0) ||
|
if((listOffset - 2 >= 0 && action == 0) ||
|
||||||
(listOffset >= 0 && action == 1))
|
(listOffset >= 0 && action == 1) ||
|
||||||
|
(listOffset - 2 >= 0 && action == 2))
|
||||||
{
|
{
|
||||||
// move list up by 1
|
// move list up by 1
|
||||||
listOffset -= 2;
|
listOffset -= 2;
|
||||||
@ -295,7 +298,8 @@ void GuiSaveBrowser::Update(GuiTrigger * t)
|
|||||||
if(selectedItem < 2)
|
if(selectedItem < 2)
|
||||||
{
|
{
|
||||||
if((listOffset - 2 >= 0 && action == 0) ||
|
if((listOffset - 2 >= 0 && action == 0) ||
|
||||||
(listOffset >= 0 && action == 1))
|
(listOffset >= 0 && action == 1) ||
|
||||||
|
(listOffset - 2 >= 0 && action == 2))
|
||||||
{
|
{
|
||||||
// move list up by 1
|
// move list up by 1
|
||||||
listOffset -= 2;
|
listOffset -= 2;
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 11 KiB |
173
source/menu.cpp
@ -773,7 +773,7 @@ static void WindowCredits(void * ptr)
|
|||||||
txt[i] = new GuiText("Credits", 20, (GXColor){0, 0, 0, 255});
|
txt[i] = new GuiText("Credits", 20, (GXColor){0, 0, 0, 255});
|
||||||
txt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); txt[i]->SetPosition(0,y); i++; y+=24;
|
txt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); txt[i]->SetPosition(0,y); i++; y+=24;
|
||||||
|
|
||||||
txt[i] = new GuiText("Official Site: https://github.com/dborth/vba-wii", 20, (GXColor){0, 0, 0, 255});
|
txt[i] = new GuiText("Official Site: https://github.com/dborth/vbagx", 20, (GXColor){0, 0, 0, 255});
|
||||||
txt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); txt[i]->SetPosition(0,y); i++; y+=32;
|
txt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); txt[i]->SetPosition(0,y); i++; y+=32;
|
||||||
|
|
||||||
txt[i]->SetPresets(20, (GXColor){0, 0, 0, 255}, 0,
|
txt[i]->SetPresets(20, (GXColor){0, 0, 0, 255}, 0,
|
||||||
@ -973,7 +973,7 @@ static int MenuGameSelection()
|
|||||||
preview.SetPosition(174, -8);
|
preview.SetPosition(174, -8);
|
||||||
u8* imgBuffer = MEM_ALLOC(512 * 512 * 4);
|
u8* imgBuffer = MEM_ALLOC(512 * 512 * 4);
|
||||||
int previousBrowserIndex = -1;
|
int previousBrowserIndex = -1;
|
||||||
char screenshotPath[MAXJOLIET + 1];
|
char imagePath[MAXJOLIET + 1];
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
btnLogo->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
btnLogo->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
||||||
@ -1009,15 +1009,15 @@ static int MenuGameSelection()
|
|||||||
gameBrowser.TriggerUpdate();
|
gameBrowser.TriggerUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
//update game screenshot
|
//update gamelist image
|
||||||
if(previousBrowserIndex != browser.selIndex)
|
if(previousBrowserIndex != browser.selIndex)
|
||||||
{
|
{
|
||||||
previousBrowserIndex = browser.selIndex;
|
previousBrowserIndex = browser.selIndex;
|
||||||
snprintf(screenshotPath, MAXJOLIET, "%s%s/%s.png", pathPrefix[GCSettings.LoadMethod], GCSettings.ScreenshotsFolder, browserList[browser.selIndex].displayname);
|
snprintf(imagePath, MAXJOLIET, "%s%s/%s.png", pathPrefix[GCSettings.LoadMethod], GCSettings.ImageFolder, browserList[browser.selIndex].displayname);
|
||||||
|
|
||||||
AllocSaveBuffer();
|
AllocSaveBuffer();
|
||||||
int width, height;
|
int width, height;
|
||||||
if(LoadFile(screenshotPath, SILENT))
|
if(LoadFile(imagePath, SILENT))
|
||||||
{
|
{
|
||||||
if(DecodePNG(savebuffer, &width, &height, imgBuffer, 512, 512))
|
if(DecodePNG(savebuffer, &width, &height, imgBuffer, 512, 512))
|
||||||
{
|
{
|
||||||
@ -1134,6 +1134,7 @@ static int MenuGame()
|
|||||||
GuiImageData iconGameSettings(icon_game_settings_png);
|
GuiImageData iconGameSettings(icon_game_settings_png);
|
||||||
GuiImageData iconLoad(icon_game_load_png);
|
GuiImageData iconLoad(icon_game_load_png);
|
||||||
GuiImageData iconSave(icon_game_save_png);
|
GuiImageData iconSave(icon_game_save_png);
|
||||||
|
GuiImageData iconDelete(icon_game_delete_png);
|
||||||
GuiImageData iconReset(icon_game_reset_png);
|
GuiImageData iconReset(icon_game_reset_png);
|
||||||
|
|
||||||
GuiImageData battery(battery_png);
|
GuiImageData battery(battery_png);
|
||||||
@ -1143,10 +1144,9 @@ static int MenuGame()
|
|||||||
GuiTrigger trigHome;
|
GuiTrigger trigHome;
|
||||||
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
||||||
|
|
||||||
int xOffset=125, yOffset=65;
|
int xOffset=125;
|
||||||
if (isBoktai) {
|
if (isBoktai)
|
||||||
xOffset=170; yOffset=70;
|
xOffset=200;
|
||||||
}
|
|
||||||
|
|
||||||
GuiText saveBtnTxt("Save", 22, (GXColor){0, 0, 0, 255});
|
GuiText saveBtnTxt("Save", 22, (GXColor){0, 0, 0, 255});
|
||||||
GuiImage saveBtnImg(&btnLargeOutline);
|
GuiImage saveBtnImg(&btnLargeOutline);
|
||||||
@ -1154,7 +1154,7 @@ static int MenuGame()
|
|||||||
GuiImage saveBtnIcon(&iconSave);
|
GuiImage saveBtnIcon(&iconSave);
|
||||||
GuiButton saveBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
GuiButton saveBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||||
saveBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
saveBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
saveBtn.SetPosition(-xOffset, 185-yOffset);
|
saveBtn.SetPosition(-200, 120);
|
||||||
saveBtn.SetLabel(&saveBtnTxt);
|
saveBtn.SetLabel(&saveBtnTxt);
|
||||||
saveBtn.SetImage(&saveBtnImg);
|
saveBtn.SetImage(&saveBtnImg);
|
||||||
saveBtn.SetImageOver(&saveBtnImgOver);
|
saveBtn.SetImageOver(&saveBtnImgOver);
|
||||||
@ -1171,7 +1171,7 @@ static int MenuGame()
|
|||||||
GuiImage loadBtnIcon(&iconLoad);
|
GuiImage loadBtnIcon(&iconLoad);
|
||||||
GuiButton loadBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
GuiButton loadBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||||
loadBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
loadBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
loadBtn.SetPosition(xOffset, 185-yOffset);
|
loadBtn.SetPosition(0, 120);
|
||||||
loadBtn.SetLabel(&loadBtnTxt);
|
loadBtn.SetLabel(&loadBtnTxt);
|
||||||
loadBtn.SetImage(&loadBtnImg);
|
loadBtn.SetImage(&loadBtnImg);
|
||||||
loadBtn.SetImageOver(&loadBtnImgOver);
|
loadBtn.SetImageOver(&loadBtnImgOver);
|
||||||
@ -1182,29 +1182,51 @@ static int MenuGame()
|
|||||||
loadBtn.SetTrigger(trig2);
|
loadBtn.SetTrigger(trig2);
|
||||||
loadBtn.SetEffectGrow();
|
loadBtn.SetEffectGrow();
|
||||||
|
|
||||||
|
GuiText deleteBtnTxt("Delete", 22, (GXColor){0, 0, 0, 255});
|
||||||
|
GuiImage deleteBtnImg(&btnLargeOutline);
|
||||||
|
GuiImage deleteBtnImgOver(&btnLargeOutlineOver);
|
||||||
|
GuiImage deleteBtnIcon(&iconDelete);
|
||||||
|
GuiButton deleteBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||||
|
deleteBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
|
deleteBtn.SetPosition(200, 120);
|
||||||
|
deleteBtn.SetLabel(&deleteBtnTxt);
|
||||||
|
deleteBtn.SetImage(&deleteBtnImg);
|
||||||
|
deleteBtn.SetImageOver(&deleteBtnImgOver);
|
||||||
|
deleteBtn.SetIcon(&deleteBtnIcon);
|
||||||
|
deleteBtn.SetSoundOver(&btnSoundOver);
|
||||||
|
deleteBtn.SetSoundClick(&btnSoundClick);
|
||||||
|
deleteBtn.SetTrigger(trigA);
|
||||||
|
deleteBtn.SetTrigger(trig2);
|
||||||
|
deleteBtn.SetEffectGrow();
|
||||||
|
|
||||||
// Boktai adds an extra button for setting the sun.
|
// Boktai adds an extra button for setting the sun.
|
||||||
GuiText *sunBtnTxt = NULL;
|
GuiText *sunBtnTxt = NULL;
|
||||||
GuiImage *sunBtnImg = NULL;
|
GuiImage *sunBtnImg = NULL;
|
||||||
GuiImage *sunBtnImgOver = NULL;
|
GuiImage *sunBtnImgOver = NULL;
|
||||||
GuiButton *sunBtn = NULL;
|
GuiButton *sunBtn = NULL;
|
||||||
if (isBoktai) {
|
if (isBoktai)
|
||||||
|
{
|
||||||
struct tm *newtime;
|
struct tm *newtime;
|
||||||
time_t long_time;
|
time_t long_time;
|
||||||
|
|
||||||
// regardless of the weather, there should be no sun at night time!
|
// regardless of the weather, there should be no sun at night time!
|
||||||
time(&long_time); // Get time as long integer.
|
time(&long_time); // Get time as long integer.
|
||||||
newtime = localtime(&long_time); // Convert to local time.
|
newtime = localtime(&long_time); // Convert to local time.
|
||||||
|
|
||||||
if (newtime->tm_hour > 21 || newtime->tm_hour < 5)
|
if (newtime->tm_hour > 21 || newtime->tm_hour < 5)
|
||||||
{
|
{
|
||||||
sprintf(s, "Weather: Night Time");
|
sprintf(s, "Weather: Night Time");
|
||||||
} else sprintf(s, "Weather: %d%% sun", SunBars*10);
|
}
|
||||||
|
else
|
||||||
|
sprintf(s, "Weather: %d%% sun", SunBars*10);
|
||||||
|
|
||||||
sunBtnTxt = new GuiText(s, 22, (GXColor){0, 0, 0, 255});
|
sunBtnTxt = new GuiText(s, 22, (GXColor){0, 0, 0, 255});
|
||||||
sunBtnTxt->SetWrap(true, btnLargeOutline.GetWidth()-30);
|
sunBtnTxt->SetWrap(true, btnLargeOutline.GetWidth()-30);
|
||||||
sunBtnImg = new GuiImage(&btnLargeOutline);
|
sunBtnImg = new GuiImage(&btnLargeOutline);
|
||||||
sunBtnImgOver = new GuiImage(&btnLargeOutlineOver);
|
sunBtnImgOver = new GuiImage(&btnLargeOutlineOver);
|
||||||
sunBtn = new GuiButton(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
sunBtn = new GuiButton(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||||
sunBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
sunBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
sunBtn->SetPosition(0, 185);
|
sunBtn->SetPosition(0, 250);
|
||||||
sunBtn->SetLabel(sunBtnTxt);
|
sunBtn->SetLabel(sunBtnTxt);
|
||||||
sunBtn->SetImage(sunBtnImg);
|
sunBtn->SetImage(sunBtnImg);
|
||||||
sunBtn->SetImageOver(sunBtnImgOver);
|
sunBtn->SetImageOver(sunBtnImgOver);
|
||||||
@ -1221,7 +1243,7 @@ static int MenuGame()
|
|||||||
GuiImage resetBtnIcon(&iconReset);
|
GuiImage resetBtnIcon(&iconReset);
|
||||||
GuiButton resetBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
GuiButton resetBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||||
resetBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
resetBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
resetBtn.SetPosition(xOffset, 185+yOffset);
|
resetBtn.SetPosition(xOffset, 250);
|
||||||
resetBtn.SetLabel(&resetBtnTxt);
|
resetBtn.SetLabel(&resetBtnTxt);
|
||||||
resetBtn.SetImage(&resetBtnImg);
|
resetBtn.SetImage(&resetBtnImg);
|
||||||
resetBtn.SetImageOver(&resetBtnImgOver);
|
resetBtn.SetImageOver(&resetBtnImgOver);
|
||||||
@ -1239,7 +1261,7 @@ static int MenuGame()
|
|||||||
GuiImage gameSettingsBtnIcon(&iconGameSettings);
|
GuiImage gameSettingsBtnIcon(&iconGameSettings);
|
||||||
GuiButton gameSettingsBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
GuiButton gameSettingsBtn(btnLargeOutline.GetWidth(), btnLargeOutline.GetHeight());
|
||||||
gameSettingsBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
gameSettingsBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
gameSettingsBtn.SetPosition(-xOffset, 185+yOffset);
|
gameSettingsBtn.SetPosition(-xOffset, 250);
|
||||||
gameSettingsBtn.SetLabel(&gameSettingsBtnTxt);
|
gameSettingsBtn.SetLabel(&gameSettingsBtnTxt);
|
||||||
gameSettingsBtn.SetImage(&gameSettingsBtnImg);
|
gameSettingsBtn.SetImage(&gameSettingsBtnImg);
|
||||||
gameSettingsBtn.SetImageOver(&gameSettingsBtnImgOver);
|
gameSettingsBtn.SetImageOver(&gameSettingsBtnImgOver);
|
||||||
@ -1328,6 +1350,7 @@ static int MenuGame()
|
|||||||
w.Append(&titleTxt);
|
w.Append(&titleTxt);
|
||||||
w.Append(&saveBtn);
|
w.Append(&saveBtn);
|
||||||
w.Append(&loadBtn);
|
w.Append(&loadBtn);
|
||||||
|
w.Append(&deleteBtn);
|
||||||
w.Append(&resetBtn);
|
w.Append(&resetBtn);
|
||||||
w.Append(&gameSettingsBtn);
|
w.Append(&gameSettingsBtn);
|
||||||
if (isBoktai)
|
if (isBoktai)
|
||||||
@ -1443,7 +1466,8 @@ static int MenuGame()
|
|||||||
|
|
||||||
if (isBoktai)
|
if (isBoktai)
|
||||||
{
|
{
|
||||||
if (sunBtn->GetState() == STATE_CLICKED) {
|
if (sunBtn->GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
++SunBars;
|
++SunBars;
|
||||||
if (SunBars>10) SunBars=0;
|
if (SunBars>10) SunBars=0;
|
||||||
menu = MENU_GAME;
|
menu = MENU_GAME;
|
||||||
@ -1458,6 +1482,10 @@ static int MenuGame()
|
|||||||
{
|
{
|
||||||
menu = MENU_GAME_LOAD;
|
menu = MENU_GAME_LOAD;
|
||||||
}
|
}
|
||||||
|
else if(deleteBtn.GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
|
menu = MENU_GAME_DELETE;
|
||||||
|
}
|
||||||
else if(resetBtn.GetState() == STATE_CLICKED)
|
else if(resetBtn.GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
if (WindowPrompt("Reset Game", "Reset this game? Any unsaved progress will be lost.", "OK", "Cancel"))
|
if (WindowPrompt("Reset Game", "Reset this game? Any unsaved progress will be lost.", "OK", "Cancel"))
|
||||||
@ -1584,6 +1612,7 @@ static int MenuGameSaves(int action)
|
|||||||
int j = 0;
|
int j = 0;
|
||||||
|
|
||||||
char filepath[1024];
|
char filepath[1024];
|
||||||
|
char deletepath[1024];
|
||||||
char scrfile[1024];
|
char scrfile[1024];
|
||||||
char tmp[MAXJOLIET+1];
|
char tmp[MAXJOLIET+1];
|
||||||
|
|
||||||
@ -1601,6 +1630,8 @@ static int MenuGameSaves(int action)
|
|||||||
|
|
||||||
if(action == 0)
|
if(action == 0)
|
||||||
titleTxt.SetText("Load Game");
|
titleTxt.SetText("Load Game");
|
||||||
|
else if (action == 2)
|
||||||
|
titleTxt.SetText("Delete Saves");
|
||||||
else
|
else
|
||||||
titleTxt.SetText("Save Game");
|
titleTxt.SetText("Save Game");
|
||||||
|
|
||||||
@ -1709,7 +1740,7 @@ static int MenuGameSaves(int action)
|
|||||||
FreeSaveBuffer();
|
FreeSaveBuffer();
|
||||||
saves.length = j;
|
saves.length = j;
|
||||||
|
|
||||||
if(saves.length == 0 && action == 0)
|
if((saves.length == 0 && action == 0) || (saves.length == 0 && action == 2))
|
||||||
{
|
{
|
||||||
InfoPrompt("No game saves found.");
|
InfoPrompt("No game saves found.");
|
||||||
menu = MENU_GAME;
|
menu = MENU_GAME;
|
||||||
@ -1730,7 +1761,7 @@ static int MenuGameSaves(int action)
|
|||||||
|
|
||||||
ret = saveBrowser.GetClickedSave();
|
ret = saveBrowser.GetClickedSave();
|
||||||
|
|
||||||
// load or save game
|
// load, save and delete save games
|
||||||
if(ret > -3)
|
if(ret > -3)
|
||||||
{
|
{
|
||||||
result = 0;
|
result = 0;
|
||||||
@ -1750,6 +1781,35 @@ static int MenuGameSaves(int action)
|
|||||||
}
|
}
|
||||||
if(result)
|
if(result)
|
||||||
menu = MENU_EXIT;
|
menu = MENU_EXIT;
|
||||||
|
}
|
||||||
|
else if(action == 2) // delete SRAM/Snapshot
|
||||||
|
{
|
||||||
|
if (WindowPrompt("Delete File", "Delete this save file? Deleted files can not be restored.", "OK", "Cancel"))
|
||||||
|
{
|
||||||
|
MakeFilePath(filepath, saves.type[ret], saves.filename[ret]);
|
||||||
|
switch(saves.type[ret])
|
||||||
|
{
|
||||||
|
case FILE_SRAM:
|
||||||
|
strncpy(deletepath, filepath, 1024);
|
||||||
|
deletepath[strlen(deletepath)-4] = 0;
|
||||||
|
sprintf(deletepath, "%s.sav", deletepath);
|
||||||
|
remove(deletepath); // Delete the *.srm file (Battery save file)
|
||||||
|
break;
|
||||||
|
case FILE_SNAPSHOT:
|
||||||
|
strncpy(deletepath, filepath, 1024);
|
||||||
|
deletepath[strlen(deletepath)-4] = 0;
|
||||||
|
sprintf(deletepath, "%s.png", deletepath);
|
||||||
|
remove(deletepath); // Delete the *.png file (Screenshot file)
|
||||||
|
strncpy(deletepath, filepath, 1024);
|
||||||
|
deletepath[strlen(deletepath)-4] = 0;
|
||||||
|
sprintf(deletepath, "%s.sgm", deletepath);
|
||||||
|
remove(deletepath); // Delete the *.frz file (Save State file)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
menu = MENU_GAME_DELETE;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else // save
|
else // save
|
||||||
{
|
{
|
||||||
@ -2016,7 +2076,7 @@ static int MenuGameSettings()
|
|||||||
if (WindowPrompt("Preview Screenshot", "Save a new Preview Screenshot? Current Screenshot image will be overwritten.", "OK", "Cancel"))
|
if (WindowPrompt("Preview Screenshot", "Save a new Preview Screenshot? Current Screenshot image will be overwritten.", "OK", "Cancel"))
|
||||||
{
|
{
|
||||||
snprintf(filepath, 1024, "%s%s/%s", pathPrefix[GCSettings.SaveMethod], GCSettings.ScreenshotsFolder, ROMFilename);
|
snprintf(filepath, 1024, "%s%s/%s", pathPrefix[GCSettings.SaveMethod], GCSettings.ScreenshotsFolder, ROMFilename);
|
||||||
SavePreviewImg(filepath, NOTSILENT);
|
SavePreviewImg(filepath, SILENT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(closeBtn.GetState() == STATE_CLICKED)
|
else if(closeBtn.GetState() == STATE_CLICKED)
|
||||||
@ -3067,6 +3127,7 @@ static int MenuSettingsEmulation()
|
|||||||
sprintf(options.name[i++], "Hardware (GB/GBC)");
|
sprintf(options.name[i++], "Hardware (GB/GBC)");
|
||||||
sprintf(options.name[i++], "Super Game Boy border");
|
sprintf(options.name[i++], "Super Game Boy border");
|
||||||
sprintf(options.name[i++], "Offset from UTC (hours)");
|
sprintf(options.name[i++], "Offset from UTC (hours)");
|
||||||
|
sprintf(options.name[i++], "GB Screen Palette");
|
||||||
options.length = i;
|
options.length = i;
|
||||||
|
|
||||||
for(i=0; i < options.length; i++)
|
for(i=0; i < options.length; i++)
|
||||||
@ -3135,6 +3196,9 @@ static int MenuSettingsEmulation()
|
|||||||
GCSettings.OffsetMinutesUTC = -60*12;
|
GCSettings.OffsetMinutesUTC = -60*12;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
GCSettings.BasicPalette ^= 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret >= 0 || firstRun)
|
if(ret >= 0 || firstRun)
|
||||||
@ -3149,10 +3213,6 @@ static int MenuSettingsEmulation()
|
|||||||
sprintf (options.value[0], "Super Game Boy");
|
sprintf (options.value[0], "Super Game Boy");
|
||||||
else if (GCSettings.GBHardware == 3)
|
else if (GCSettings.GBHardware == 3)
|
||||||
sprintf (options.value[0], "Game Boy");
|
sprintf (options.value[0], "Game Boy");
|
||||||
else if (GCSettings.GBHardware == 4)
|
|
||||||
sprintf (options.value[0], "Game Boy Advance");
|
|
||||||
else if (GCSettings.GBHardware == 5)
|
|
||||||
sprintf (options.value[0], "Super Game Boy 2");
|
|
||||||
|
|
||||||
if (GCSettings.SGBBorder == 0)
|
if (GCSettings.SGBBorder == 0)
|
||||||
sprintf (options.value[1], "Off");
|
sprintf (options.value[1], "Off");
|
||||||
@ -3163,6 +3223,12 @@ static int MenuSettingsEmulation()
|
|||||||
|
|
||||||
sprintf (options.value[2], "%+.2f", GCSettings.OffsetMinutesUTC / 60.0);
|
sprintf (options.value[2], "%+.2f", GCSettings.OffsetMinutesUTC / 60.0);
|
||||||
|
|
||||||
|
if (GCSettings.BasicPalette == 0)
|
||||||
|
sprintf (options.value[3], "Green Screen");
|
||||||
|
else
|
||||||
|
sprintf (options.value[3], "Monochrome Screen");
|
||||||
|
|
||||||
|
|
||||||
optionBrowser.TriggerUpdate();
|
optionBrowser.TriggerUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3172,6 +3238,7 @@ static int MenuSettingsEmulation()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
HaltGui();
|
HaltGui();
|
||||||
|
InitialisePalette();
|
||||||
mainWindow->Remove(&optionBrowser);
|
mainWindow->Remove(&optionBrowser);
|
||||||
mainWindow->Remove(&w);
|
mainWindow->Remove(&w);
|
||||||
mainWindow->Remove(&titleTxt);
|
mainWindow->Remove(&titleTxt);
|
||||||
@ -3379,6 +3446,8 @@ static int MenuSettingsFile()
|
|||||||
sprintf(options.name[i++], "Load Folder");
|
sprintf(options.name[i++], "Load Folder");
|
||||||
sprintf(options.name[i++], "Save Folder");
|
sprintf(options.name[i++], "Save Folder");
|
||||||
sprintf(options.name[i++], "Screenshots Folder");
|
sprintf(options.name[i++], "Screenshots Folder");
|
||||||
|
sprintf(options.name[i++], "Covers Folder");
|
||||||
|
sprintf(options.name[i++], "Artworks Folder");
|
||||||
sprintf(options.name[i++], "Auto Load");
|
sprintf(options.name[i++], "Auto Load");
|
||||||
sprintf(options.name[i++], "Auto Save");
|
sprintf(options.name[i++], "Auto Save");
|
||||||
sprintf(options.name[i++], "Append Auto to .SAV Files");
|
sprintf(options.name[i++], "Append Auto to .SAV Files");
|
||||||
@ -3453,18 +3522,26 @@ static int MenuSettingsFile()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
|
OnScreenKeyboard(GCSettings.CoverFolder, MAXPATHLEN);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6:
|
||||||
|
OnScreenKeyboard(GCSettings.ArtworkFolder, MAXPATHLEN);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 7:
|
||||||
GCSettings.AutoLoad++;
|
GCSettings.AutoLoad++;
|
||||||
if (GCSettings.AutoLoad > 2)
|
if (GCSettings.AutoLoad > 2)
|
||||||
GCSettings.AutoLoad = 0;
|
GCSettings.AutoLoad = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 8:
|
||||||
GCSettings.AutoSave++;
|
GCSettings.AutoSave++;
|
||||||
if (GCSettings.AutoSave > 3)
|
if (GCSettings.AutoSave > 3)
|
||||||
GCSettings.AutoSave = 0;
|
GCSettings.AutoSave = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 9:
|
||||||
GCSettings.AppendAuto++;
|
GCSettings.AppendAuto++;
|
||||||
if (GCSettings.AppendAuto > 1)
|
if (GCSettings.AppendAuto > 1)
|
||||||
GCSettings.AppendAuto = 0;
|
GCSettings.AppendAuto = 0;
|
||||||
@ -3530,18 +3607,20 @@ static int MenuSettingsFile()
|
|||||||
snprintf (options.value[2], 35, "%s", GCSettings.LoadFolder);
|
snprintf (options.value[2], 35, "%s", GCSettings.LoadFolder);
|
||||||
snprintf (options.value[3], 35, "%s", GCSettings.SaveFolder);
|
snprintf (options.value[3], 35, "%s", GCSettings.SaveFolder);
|
||||||
snprintf (options.value[4], 35, "%s", GCSettings.ScreenshotsFolder);
|
snprintf (options.value[4], 35, "%s", GCSettings.ScreenshotsFolder);
|
||||||
|
snprintf (options.value[5], 35, "%s", GCSettings.CoverFolder);
|
||||||
|
snprintf (options.value[6], 35, "%s", GCSettings.ArtworkFolder);
|
||||||
|
|
||||||
if (GCSettings.AutoLoad == 0) sprintf (options.value[5],"Off");
|
if (GCSettings.AutoLoad == 0) sprintf (options.value[7],"Off");
|
||||||
else if (GCSettings.AutoLoad == 1) sprintf (options.value[5],"SRAM");
|
else if (GCSettings.AutoLoad == 1) sprintf (options.value[7],"SRAM");
|
||||||
else if (GCSettings.AutoLoad == 2) sprintf (options.value[5],"Snapshot");
|
else if (GCSettings.AutoLoad == 2) sprintf (options.value[7],"Snapshot");
|
||||||
|
|
||||||
if (GCSettings.AutoSave == 0) sprintf (options.value[6],"Off");
|
if (GCSettings.AutoSave == 0) sprintf (options.value[8],"Off");
|
||||||
else if (GCSettings.AutoSave == 1) sprintf (options.value[6],"SRAM");
|
else if (GCSettings.AutoSave == 1) sprintf (options.value[8],"SRAM");
|
||||||
else if (GCSettings.AutoSave == 2) sprintf (options.value[6],"Snapshot");
|
else if (GCSettings.AutoSave == 2) sprintf (options.value[8],"Snapshot");
|
||||||
else if (GCSettings.AutoSave == 3) sprintf (options.value[6],"Both");
|
else if (GCSettings.AutoSave == 3) sprintf (options.value[8],"Both");
|
||||||
|
|
||||||
if (GCSettings.AppendAuto == 0) sprintf (options.value[7],"Off");
|
if (GCSettings.AppendAuto == 0) sprintf (options.value[9],"Off");
|
||||||
else if (GCSettings.AppendAuto == 1) sprintf (options.value[7],"On");
|
else if (GCSettings.AppendAuto == 1) sprintf (options.value[9],"On");
|
||||||
|
|
||||||
optionBrowser.TriggerUpdate();
|
optionBrowser.TriggerUpdate();
|
||||||
}
|
}
|
||||||
@ -3575,6 +3654,7 @@ static int MenuSettingsMenu()
|
|||||||
sprintf(options.name[i++], "Sound Effects Volume");
|
sprintf(options.name[i++], "Sound Effects Volume");
|
||||||
sprintf(options.name[i++], "Rumble");
|
sprintf(options.name[i++], "Rumble");
|
||||||
sprintf(options.name[i++], "Language");
|
sprintf(options.name[i++], "Language");
|
||||||
|
sprintf(options.name[i++], "Preview Image");
|
||||||
options.length = i;
|
options.length = i;
|
||||||
|
|
||||||
for(i=0; i < options.length; i++)
|
for(i=0; i < options.length; i++)
|
||||||
@ -3658,6 +3738,11 @@ static int MenuSettingsMenu()
|
|||||||
else if(GCSettings.language == LANG_JAPANESE)
|
else if(GCSettings.language == LANG_JAPANESE)
|
||||||
GCSettings.language = LANG_ENGLISH;
|
GCSettings.language = LANG_ENGLISH;
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
GCSettings.PreviewImage++;
|
||||||
|
if(GCSettings.PreviewImage > 2)
|
||||||
|
GCSettings.PreviewImage = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret >= 0 || firstRun)
|
if(ret >= 0 || firstRun)
|
||||||
@ -3725,6 +3810,21 @@ static int MenuSettingsMenu()
|
|||||||
case LANG_TURKISH: sprintf(options.value[5], "Turkish"); break;
|
case LANG_TURKISH: sprintf(options.value[5], "Turkish"); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch(GCSettings.PreviewImage)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
sprintf(options.value[6], "Screenshots");
|
||||||
|
snprintf(GCSettings.ImageFolder, MAXJOLIET, "%s", GCSettings.ScreenshotsFolder);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
sprintf(options.value[6], "Covers");
|
||||||
|
snprintf(GCSettings.ImageFolder, MAXJOLIET, "%s", GCSettings.CoverFolder);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
sprintf(options.value[6], "Artworks");
|
||||||
|
snprintf(GCSettings.ImageFolder, MAXJOLIET, "%s", GCSettings.ArtworkFolder);
|
||||||
|
break;
|
||||||
|
}
|
||||||
optionBrowser.TriggerUpdate();
|
optionBrowser.TriggerUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4671,6 +4771,9 @@ MainMenu (int menu)
|
|||||||
case MENU_GAME_SAVE:
|
case MENU_GAME_SAVE:
|
||||||
currentMenu = MenuGameSaves(1);
|
currentMenu = MenuGameSaves(1);
|
||||||
break;
|
break;
|
||||||
|
case MENU_GAME_DELETE:
|
||||||
|
currentMenu = MenuGameSaves(2);
|
||||||
|
break;
|
||||||
case MENU_GAMESETTINGS:
|
case MENU_GAMESETTINGS:
|
||||||
currentMenu = MenuGameSettings();
|
currentMenu = MenuGameSettings();
|
||||||
break;
|
break;
|
||||||
|
@ -39,6 +39,7 @@ enum
|
|||||||
MENU_GAME,
|
MENU_GAME,
|
||||||
MENU_GAME_SAVE,
|
MENU_GAME_SAVE,
|
||||||
MENU_GAME_LOAD,
|
MENU_GAME_LOAD,
|
||||||
|
MENU_GAME_DELETE,
|
||||||
MENU_GAMESETTINGS,
|
MENU_GAMESETTINGS,
|
||||||
MENU_GAMESETTINGS_MAPPINGS,
|
MENU_GAMESETTINGS_MAPPINGS,
|
||||||
MENU_GAMESETTINGS_MAPPINGS_MAP,
|
MENU_GAMESETTINGS_MAPPINGS_MAP,
|
||||||
|
@ -167,7 +167,10 @@ preparePrefsData ()
|
|||||||
createXMLSetting("SaveMethod", "Save Method", toStr(GCSettings.SaveMethod));
|
createXMLSetting("SaveMethod", "Save Method", toStr(GCSettings.SaveMethod));
|
||||||
createXMLSetting("LoadFolder", "Load Folder", GCSettings.LoadFolder);
|
createXMLSetting("LoadFolder", "Load Folder", GCSettings.LoadFolder);
|
||||||
createXMLSetting("SaveFolder", "Save Folder", GCSettings.SaveFolder);
|
createXMLSetting("SaveFolder", "Save Folder", GCSettings.SaveFolder);
|
||||||
//createXMLSetting("CheatFolder", "Cheats Folder", GCSettings.CheatFolder);
|
createXMLSetting("ScreenshotsFolder", "Screenshots Folder", GCSettings.ScreenshotsFolder);
|
||||||
|
createXMLSetting("CoverFolder", "Covers Folder", GCSettings.CoverFolder);
|
||||||
|
createXMLSetting("ArtworkFolder", "Artworks Folder", GCSettings.ArtworkFolder);
|
||||||
|
createXMLSetting("ImageFolder", "Image Folder", GCSettings.ImageFolder);
|
||||||
|
|
||||||
createXMLSection("Network", "Network Settings");
|
createXMLSection("Network", "Network Settings");
|
||||||
|
|
||||||
@ -197,6 +200,11 @@ preparePrefsData ()
|
|||||||
createXMLSetting("SFXVolume", "Sound Effects Volume", toStr(GCSettings.SFXVolume));
|
createXMLSetting("SFXVolume", "Sound Effects Volume", toStr(GCSettings.SFXVolume));
|
||||||
createXMLSetting("Rumble", "Rumble", toStr(GCSettings.Rumble));
|
createXMLSetting("Rumble", "Rumble", toStr(GCSettings.Rumble));
|
||||||
createXMLSetting("language", "Language", toStr(GCSettings.language));
|
createXMLSetting("language", "Language", toStr(GCSettings.language));
|
||||||
|
createXMLSetting("PreviewImage", "Preview Image", toStr(GCSettings.PreviewImage));
|
||||||
|
|
||||||
|
createXMLSection("Emulation", "Emulation Settings");
|
||||||
|
|
||||||
|
createXMLSetting("BasicPalette", "Basic Color Palette for GB", toStr(GCSettings.BasicPalette));
|
||||||
|
|
||||||
createXMLSection("Controller", "Controller Settings");
|
createXMLSection("Controller", "Controller Settings");
|
||||||
|
|
||||||
@ -448,9 +456,6 @@ decodePrefsData ()
|
|||||||
result = false;
|
result = false;
|
||||||
else if(verMajor < 2) // less than version 2.0.0
|
else if(verMajor < 2) // less than version 2.0.0
|
||||||
result = false; // reset settings (sorry, should update settings instead)
|
result = false; // reset settings (sorry, should update settings instead)
|
||||||
else if((verMajor*100 + verMinor*10 + verPoint) >
|
|
||||||
(curMajor*100 + curMinor*10 + curPoint)) // some future version
|
|
||||||
result = false; // reset settings
|
|
||||||
else
|
else
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
@ -466,7 +471,10 @@ decodePrefsData ()
|
|||||||
loadXMLSetting(&GCSettings.SaveMethod, "SaveMethod");
|
loadXMLSetting(&GCSettings.SaveMethod, "SaveMethod");
|
||||||
loadXMLSetting(GCSettings.LoadFolder, "LoadFolder", sizeof(GCSettings.LoadFolder));
|
loadXMLSetting(GCSettings.LoadFolder, "LoadFolder", sizeof(GCSettings.LoadFolder));
|
||||||
loadXMLSetting(GCSettings.SaveFolder, "SaveFolder", sizeof(GCSettings.SaveFolder));
|
loadXMLSetting(GCSettings.SaveFolder, "SaveFolder", sizeof(GCSettings.SaveFolder));
|
||||||
//loadXMLSetting(GCSettings.CheatFolder, "CheatFolder", sizeof(GCSettings.CheatFolder));
|
loadXMLSetting(GCSettings.ScreenshotsFolder, "ScreenshotsFolder", sizeof(GCSettings.ScreenshotsFolder));
|
||||||
|
loadXMLSetting(GCSettings.CoverFolder, "CoverFolder", sizeof(GCSettings.CoverFolder));
|
||||||
|
loadXMLSetting(GCSettings.ArtworkFolder, "ArtworkFolder", sizeof(GCSettings.ArtworkFolder));
|
||||||
|
loadXMLSetting(GCSettings.ImageFolder, "ImageFolder", sizeof(GCSettings.ImageFolder));
|
||||||
|
|
||||||
// Network Settings
|
// Network Settings
|
||||||
|
|
||||||
@ -496,6 +504,12 @@ decodePrefsData ()
|
|||||||
loadXMLSetting(&GCSettings.SFXVolume, "SFXVolume");
|
loadXMLSetting(&GCSettings.SFXVolume, "SFXVolume");
|
||||||
loadXMLSetting(&GCSettings.Rumble, "Rumble");
|
loadXMLSetting(&GCSettings.Rumble, "Rumble");
|
||||||
loadXMLSetting(&GCSettings.language, "language");
|
loadXMLSetting(&GCSettings.language, "language");
|
||||||
|
loadXMLSetting(&GCSettings.PreviewImage, "PreviewImage");
|
||||||
|
|
||||||
|
// Emulation Settings
|
||||||
|
|
||||||
|
loadXMLSetting(&GCSettings.BasicPalette, "BasicPalette");
|
||||||
|
|
||||||
|
|
||||||
// Controller Settings
|
// Controller Settings
|
||||||
|
|
||||||
@ -599,7 +613,11 @@ DefaultSettings ()
|
|||||||
GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB)
|
GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB)
|
||||||
sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files
|
sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files
|
||||||
sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files
|
sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files
|
||||||
sprintf (GCSettings.CheatFolder, "%s/cheats", APPFOLDER); // Path to cheat files
|
sprintf (GCSettings.ScreenshotsFolder, "%s/screenshots", APPFOLDER); // Path to screenshot files
|
||||||
|
sprintf (GCSettings.CoverFolder, "%s/covers", APPFOLDER); // Path to cover files
|
||||||
|
sprintf (GCSettings.ArtworkFolder, "%s/artworks", APPFOLDER); // Path to artwork files
|
||||||
|
sprintf (GCSettings.ImageFolder, "%s/screenshots", APPFOLDER);
|
||||||
|
|
||||||
GCSettings.AutoLoad = 1;
|
GCSettings.AutoLoad = 1;
|
||||||
GCSettings.AutoSave = 1;
|
GCSettings.AutoSave = 1;
|
||||||
|
|
||||||
@ -623,6 +641,10 @@ DefaultSettings ()
|
|||||||
GCSettings.MusicVolume = 40;
|
GCSettings.MusicVolume = 40;
|
||||||
GCSettings.SFXVolume = 40;
|
GCSettings.SFXVolume = 40;
|
||||||
GCSettings.Rumble = 1;
|
GCSettings.Rumble = 1;
|
||||||
|
GCSettings.PreviewImage = 0;
|
||||||
|
|
||||||
|
GCSettings.BasicPalette = 0;
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
GCSettings.language = CONF_GetLanguage();
|
GCSettings.language = CONF_GetLanguage();
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ void ExitApp()
|
|||||||
ExitCleanup();
|
ExitCleanup();
|
||||||
|
|
||||||
if(ShutdownRequested)
|
if(ShutdownRequested)
|
||||||
SYS_ResetSystem(SYS_POWEROFF, 0, 0);
|
SYS_ResetSystem(SYS_POWEROFF_STANDBY, 0, 0);
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
if(GCSettings.ExitAction == 0) // Auto
|
if(GCSettings.ExitAction == 0) // Auto
|
||||||
@ -123,7 +123,7 @@ void ExitApp()
|
|||||||
}
|
}
|
||||||
else if(GCSettings.ExitAction == 2) // Shutdown Wii
|
else if(GCSettings.ExitAction == 2) // Shutdown Wii
|
||||||
{
|
{
|
||||||
SYS_ResetSystem(SYS_POWEROFF, 0, 0);
|
SYS_ResetSystem(SYS_POWEROFF_STANDBY, 0, 0);
|
||||||
}
|
}
|
||||||
else // Exit to Loader
|
else // Exit to Loader
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "utils/FreeTypeGX.h"
|
#include "utils/FreeTypeGX.h"
|
||||||
|
|
||||||
#define APPNAME "Visual Boy Advance GX"
|
#define APPNAME "Visual Boy Advance GX"
|
||||||
#define APPVERSION "2.3.3"
|
#define APPVERSION "2.3.4"
|
||||||
#define APPFOLDER "vbagx"
|
#define APPFOLDER "vbagx"
|
||||||
#define PREF_FILE_NAME "settings.xml"
|
#define PREF_FILE_NAME "settings.xml"
|
||||||
#define PAL_FILE_NAME "palettes.xml"
|
#define PAL_FILE_NAME "palettes.xml"
|
||||||
@ -27,7 +27,8 @@
|
|||||||
const char pathPrefix[9][8] =
|
const char pathPrefix[9][8] =
|
||||||
{ "", "sd:/", "usb:/", "dvd:/", "smb:/", "carda:/", "cardb:/" };
|
{ "", "sd:/", "usb:/", "dvd:/", "smb:/", "carda:/", "cardb:/" };
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
DEVICE_AUTO,
|
DEVICE_AUTO,
|
||||||
DEVICE_SD,
|
DEVICE_SD,
|
||||||
DEVICE_USB,
|
DEVICE_USB,
|
||||||
@ -37,14 +38,16 @@ enum {
|
|||||||
DEVICE_SD_SLOTB
|
DEVICE_SD_SLOTB
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
FILE_SRAM,
|
FILE_SRAM,
|
||||||
FILE_SNAPSHOT,
|
FILE_SNAPSHOT,
|
||||||
FILE_ROM,
|
FILE_ROM,
|
||||||
FILE_BORDER_PNG
|
FILE_BORDER_PNG
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
LANG_JAPANESE = 0,
|
LANG_JAPANESE = 0,
|
||||||
LANG_ENGLISH,
|
LANG_ENGLISH,
|
||||||
LANG_GERMAN,
|
LANG_GERMAN,
|
||||||
@ -62,7 +65,8 @@ enum {
|
|||||||
LANG_LENGTH
|
LANG_LENGTH
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SGCSettings{
|
struct SGCSettings
|
||||||
|
{
|
||||||
float gbaZoomHor; // GBA horizontal zoom amount
|
float gbaZoomHor; // GBA horizontal zoom amount
|
||||||
float gbaZoomVert; // GBA vertical zoom amount
|
float gbaZoomVert; // GBA vertical zoom amount
|
||||||
float gbZoomHor; // GB horizontal zoom amount
|
float gbZoomHor; // GB horizontal zoom amount
|
||||||
@ -88,15 +92,22 @@ struct SGCSettings{
|
|||||||
int SFXVolume;
|
int SFXVolume;
|
||||||
int Rumble;
|
int Rumble;
|
||||||
int language;
|
int language;
|
||||||
|
int PreviewImage;
|
||||||
|
|
||||||
int OffsetMinutesUTC; // Used for clock on MBC3 and TAMA5
|
int OffsetMinutesUTC; // Used for clock on MBC3 and TAMA5
|
||||||
int GBHardware; // Mapped to gbEmulatorType in VBA
|
int GBHardware; // Mapped to gbEmulatorType in VBA
|
||||||
int SGBBorder;
|
int SGBBorder;
|
||||||
|
int BasicPalette; // 0 - Green 1 - Monochrome
|
||||||
|
|
||||||
char LoadFolder[MAXPATHLEN]; // Path to game files
|
char LoadFolder[MAXPATHLEN]; // Path to game files
|
||||||
char LastFileLoaded[MAXPATHLEN]; //Last file loaded filename
|
char LastFileLoaded[MAXPATHLEN]; //Last file loaded filename
|
||||||
char SaveFolder[MAXPATHLEN]; // Path to save files
|
char SaveFolder[MAXPATHLEN]; // Path to save files
|
||||||
char CheatFolder[MAXPATHLEN]; // Path to cheat files
|
|
||||||
char ScreenshotsFolder[MAXPATHLEN]; //Path to screenshots files
|
char ScreenshotsFolder[MAXPATHLEN]; //Path to screenshots files
|
||||||
|
char CoverFolder[MAXPATHLEN]; //Path to cover files
|
||||||
|
char ArtworkFolder[MAXPATHLEN]; //Path to artwork files
|
||||||
|
char ImageFolder[MAXPATHLEN]; //Saved image folder path
|
||||||
char BorderFolder[MAXPATHLEN]; // Path to Super Game Boy border files
|
char BorderFolder[MAXPATHLEN]; // Path to Super Game Boy border files
|
||||||
|
|
||||||
char smbip[80];
|
char smbip[80];
|
||||||
char smbuser[20];
|
char smbuser[20];
|
||||||
char smbpwd[20];
|
char smbpwd[20];
|
||||||
|
@ -1061,12 +1061,14 @@ bool LoadGBROM()
|
|||||||
{
|
{
|
||||||
gbEmulatorType = GCSettings.GBHardware;
|
gbEmulatorType = GCSettings.GBHardware;
|
||||||
|
|
||||||
if (browserList[browser.selIndex].length > 1024*1024*8) {
|
if (browserList[browser.selIndex].length > 1024*1024*8)
|
||||||
|
{
|
||||||
InfoPrompt("ROM size is too large (> 8 MB)");
|
InfoPrompt("ROM size is too large (> 8 MB)");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
gbRom = (u8 *)malloc(1024*1024*8); // 32 MB is too much for sure
|
gbRom = (u8 *)malloc(1024*1024*8); // 32 MB is too much for sure
|
||||||
if (!gbRom) {
|
if (!gbRom)
|
||||||
|
{
|
||||||
InfoPrompt("Unable to allocate 8 MB of memory");
|
InfoPrompt("Unable to allocate 8 MB of memory");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1309,10 +1311,20 @@ void InitialisePalette()
|
|||||||
int i;
|
int i;
|
||||||
// Build GBPalette
|
// Build GBPalette
|
||||||
for( i = 0; i < 24; )
|
for( i = 0; i < 24; )
|
||||||
|
{
|
||||||
|
|
||||||
|
if (GCSettings.BasicPalette == 0) //Greenish color
|
||||||
{
|
{
|
||||||
systemGbPalette[i++] = (0x1c) | (0x1e << 5) | (0x1c << 10);
|
systemGbPalette[i++] = (0x1c) | (0x1e << 5) | (0x1c << 10);
|
||||||
systemGbPalette[i++] = (0x10) | (0x17 << 5) | (0x0b << 10);
|
systemGbPalette[i++] = (0x10) | (0x17 << 5) | (0x0b << 10);
|
||||||
systemGbPalette[i++] = (0x27) | (0x0c << 5) | (0x0a << 10);
|
systemGbPalette[i++] = (0x27) | (0x0c << 5) | (0x0a << 10);
|
||||||
|
}
|
||||||
|
else // Monochrome color
|
||||||
|
{
|
||||||
|
systemGbPalette[i++] = (0x1f) | (0x1f << 5) | (0x1f << 10);
|
||||||
|
systemGbPalette[i++] = (0x15) | (0x15 << 5) | (0x15 << 10);
|
||||||
|
systemGbPalette[i++] = (0x0c) | (0x0c << 5) | (0x0c << 10);
|
||||||
|
}
|
||||||
systemGbPalette[i++] = 0;
|
systemGbPalette[i++] = 0;
|
||||||
}
|
}
|
||||||
// Set palette etc - Fixed to RGB565
|
// Set palette etc - Fixed to RGB565
|
||||||
|