From 1489a94be34cdc25911f33a12f78e96484b02f7a Mon Sep 17 00:00:00 2001 From: ekeeke31 Date: Mon, 14 Dec 2009 09:05:41 +0000 Subject: [PATCH] minor menu arrangments --- source/gx/gui/filesel.c | 4 -- source/gx/gui/menu.c | 69 +++++++++++++++++++-------------- source/gx/images/Main_quit.png | Bin 1962 -> 2242 bytes 3 files changed, 39 insertions(+), 34 deletions(-) diff --git a/source/gx/gui/filesel.c b/source/gx/gui/filesel.c index befe79f..86f8604 100644 --- a/source/gx/gui/filesel.c +++ b/source/gx/gui/filesel.c @@ -192,10 +192,6 @@ int FileSelector(unsigned char *buffer, bool useFAT) old = selection; string_offset = 0; - /* play sound effect */ - 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); - /* delete previous texture if any */ gxTextureClose(&bg_filesel[8].texture); bg_filesel[8].state &= ~IMAGE_VISIBLE; diff --git a/source/gx/gui/menu.c b/source/gx/gui/menu.c index 443d5fb..8adaa8f 100644 --- a/source/gx/gui/menu.c +++ b/source/gx/gui/menu.c @@ -158,9 +158,9 @@ static gui_image bg_list[6] = static gui_item items_main[9] = { - {NULL,Main_quit_png ,"","",128, 84,52,80}, - {NULL,Main_load_png ,"","",280, 72,80,92}, - {NULL,Main_options_png ,"","",456, 76,60,88}, + {NULL,Main_load_png ,"","",114, 72,80,92}, + {NULL,Main_options_png ,"","",290, 76,60,88}, + {NULL,Main_quit_png ,"","",460, 80,52,84}, {NULL,Main_file_png ,"","",114,216,80,92}, {NULL,Main_reset_png ,"","",282,224,76,84}, {NULL,Main_ggenie_png ,"","",450,224,72,84}, @@ -2212,19 +2212,27 @@ void MainMenu (void) switch (ret) { - case -1: /*** Return to Game ***/ - case 6: - if (!cart.romsize) break; - GUI_DrawMenuFX(m,10,1); + /*** Load Game Menu ***/ + case 0: GUI_DeleteMenu(m); - quit = 1; + quit = loadmenu(); + if (quit) break; + GUI_InitMenu(m); break; - case 0: /*** Exit Menu ***/ + /*** Options Menu */ + case 1: + GUI_DeleteMenu(m); + optionmenu(); + GUI_InitMenu(m); + break; + + /*** Exit Menu ***/ + case 2: { switch (GUI_OptionWindow(m, VERSION, items,3)) { - case 1: + case 1: /* return to loader */ #ifdef HW_RVL gxTextureClose(&w_pointer); #endif @@ -2234,7 +2242,7 @@ void MainMenu (void) exit(0); break; - case 2: + case 2: /* soft reset */ #ifdef HW_RVL gxTextureClose(&w_pointer); #endif @@ -2248,26 +2256,14 @@ void MainMenu (void) #endif break; - default: /* TODO */ + default: /* credits (TODO !!!) */ break; } break; } - case 1: /*** Load Game ***/ - GUI_DeleteMenu(m); - quit = loadmenu(); - if (quit) break; - GUI_InitMenu(m); - break; - - case 2: /*** Options */ - GUI_DeleteMenu(m); - optionmenu(); - GUI_InitMenu(m); - break; - - case 3: /*** Memory Manager (TODO !!!) ***/ + /*** File Manager (TODO !!!) ***/ + case 3: if (!cart.romsize) break; GUI_DeleteMenu(m); quit = filemenu(); @@ -2275,7 +2271,8 @@ void MainMenu (void) GUI_InitMenu(m); break; - case 4: /*** System Power Off/On ***/ + /*** Virtual system hard reset ***/ + case 4: if (!cart.romsize) break; GUI_DrawMenuFX(m,10,1); GUI_DeleteMenu(m); @@ -2288,21 +2285,33 @@ void MainMenu (void) quit = 1; break; - case 5: /*** Game Genie (TODO !!!) ***/ + /*** Game Genie menu (TODO !!!) ***/ + case 5: if (!cart.romsize) break; GUI_DeleteMenu(m); GetGGEntries(); GUI_InitMenu(m); break; - case 7: /*** Game Screenshot ***/ + /*** Return to Game ***/ + case 6: + case -1: + if (!cart.romsize) break; + GUI_DrawMenuFX(m,10,1); + GUI_DeleteMenu(m); + quit = 1; + break; + + /*** Game Capture ***/ + case 7: if (!cart.romsize) break; char filename[MAXPATHLEN]; sprintf(filename,"%s/snaps/%s.png", DEFAULT_PATH, rom_filename); gxSaveScreenshot(filename); break; - case 8: /*** ROM Information ***/ + /*** ROM information screen (TODO !!!) ***/ + case 8: if (!cart.romsize) break; GUI_DeleteMenu(m); showrominfo(); diff --git a/source/gx/images/Main_quit.png b/source/gx/images/Main_quit.png index 172a1c734a20efe4437f4e9ccd929c0df7391862..00dcc7deedd9ecdb8bd01b2b83a638a76e8e2a78 100644 GIT binary patch delta 2143 zcmV-l2%z_>55f_U7YbAe1^@s6&5RVWks)V)F)}YPG%qkYjyCX=000OUNklsTHJPRU&T+NNbl^EpJ4S;G<|FMjk3^3>eg)MAVRAh);+}Kup9$ zPz)-d5?{OwYLz0}B0_n#2$qV_QVMOMly=5H*17afncm)WW(pHCUvhGD?>&2;{q41X z&suA*wRTT`f4|{CM2y8Y*dKdh4;+FwU~P5VI6R2!aX%K~4y-Dr^bN;2dWK3UA|}W| zABO3Y$o3eIZSe}U9@2}|SdLX#ihFPyeuu|ODQku@p2mbCVrwaZ)3FO)BPG-X%keM# z8JFRnQp&SUI%-5HB6h+T@P0{TII#eKzrlH>lt=0|u1zQ+_QbbvB(|*kz%KEel-Acv zDL2(=Sc_0Z9E~&Z_FBVhj(_0WrIgFNZO}ELh&TynVXr~{ehw?D&pxRHdaPFrW4j&D zAb1St;o@%ItF8z|#38r>Q`&xBg?~#ewGa>B8A+y3YP1R14>PbUUR{GoJ67O-94W0A zsrQK39tU9YCTA`pcEq`DWY*wLT!VQPkw;4@&upaqMC>bx9WIyaq?&{#;7d|kKW^)L z8yr>jc`zR6D51(&o`+9YKh4LF@N3L3rPLZ#MeaQ~RnBNntqypyYJWSX;X^ncudM!` zvr$43(OcboDYmFcd=s~nQif!IjU!?oIped{*Oc?Cu^flp+kRh)<2wtE;X= zHpE)o+wOJ^CZW@$y56>b`hK)@Ip*WGh`3ogr7N+ll=587LG(%mut@H3C&*Ys6D*Zm z_ZKigZC8%y?`5E4Fszea_CvTAbF1qyNpMvuWmTsUL`07?j62IX#G9};c9K5Xco~Q2 z27kk`rIaNbBXle-k!yTYSW}UB0*j^BJrB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