mirror of https://github.com/parasyte/alt64
slight cleanup
This commit is contained in:
parent
d6bf3e6231
commit
fc740cf581
63
src/main.c
63
src/main.c
|
@ -170,6 +170,7 @@ enum InputMap
|
||||||
mpk_quick_backup,
|
mpk_quick_backup,
|
||||||
mp3,
|
mp3,
|
||||||
abort_screen,
|
abort_screen,
|
||||||
|
control_screen,
|
||||||
};
|
};
|
||||||
enum InputMap input_mapping = file_manager;
|
enum InputMap input_mapping = file_manager;
|
||||||
|
|
||||||
|
@ -716,6 +717,10 @@ void drawBoxNumber(display_context_t disp, int box)
|
||||||
box_color = graphics_make_color(0x00, 0x60, 0x00, 0xC3);
|
box_color = graphics_make_color(0x00, 0x60, 0x00, 0xC3);
|
||||||
drawBox(28, 105, 260, 30, disp);
|
drawBox(28, 105, 260, 30, disp);
|
||||||
break; //green full filename
|
break; //green full filename
|
||||||
|
case 12:
|
||||||
|
box_color = graphics_make_color(0x00, 0x60, 0x00, 0xC3);
|
||||||
|
drawBox(20, 24, 277, 193, disp);
|
||||||
|
break; //filebrowser
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -3092,7 +3097,21 @@ void showAboutScreen(display_context_t disp)
|
||||||
|
|
||||||
menu_about(disp);
|
menu_about(disp);
|
||||||
}
|
}
|
||||||
|
void showControlScreen(display_context_t disp)
|
||||||
|
{
|
||||||
|
while (!(disp = display_lock()))
|
||||||
|
;
|
||||||
|
new_scroll_pos(&cursor, &page, MAX_LIST, count);
|
||||||
|
clearScreen(disp); //part clear?
|
||||||
|
display_dir(list, cursor, page, MAX_LIST, count, disp);
|
||||||
|
drawBoxNumber(disp, 12);
|
||||||
|
display_show(disp);
|
||||||
|
|
||||||
|
if (sound_on)
|
||||||
|
playSound(2);
|
||||||
|
|
||||||
|
menu_controls(disp);
|
||||||
|
}
|
||||||
void loadFile(display_context_t disp)
|
void loadFile(display_context_t disp)
|
||||||
{
|
{
|
||||||
char name_file[256];
|
char name_file[256];
|
||||||
|
@ -3260,9 +3279,10 @@ void handleInput(display_context_t disp, sprite_t *contr)
|
||||||
switch (input_mapping)
|
switch (input_mapping)
|
||||||
{
|
{
|
||||||
case file_manager:
|
case file_manager:
|
||||||
if (sound_on){
|
|
||||||
|
if (sound_on)
|
||||||
playSound(4);
|
playSound(4);
|
||||||
}
|
|
||||||
if (select_mode)
|
if (select_mode)
|
||||||
{
|
{
|
||||||
if (count != 0)
|
if (count != 0)
|
||||||
|
@ -3334,9 +3354,10 @@ void handleInput(display_context_t disp, sprite_t *contr)
|
||||||
switch (input_mapping)
|
switch (input_mapping)
|
||||||
{
|
{
|
||||||
case file_manager:
|
case file_manager:
|
||||||
if (sound_on){
|
|
||||||
|
if (sound_on)
|
||||||
playSound(4);
|
playSound(4);
|
||||||
}
|
|
||||||
if (select_mode)
|
if (select_mode)
|
||||||
{
|
{
|
||||||
if (count != 0)
|
if (count != 0)
|
||||||
|
@ -4058,6 +4079,7 @@ void handleInput(display_context_t disp, sprite_t *contr)
|
||||||
}
|
}
|
||||||
else if (!strcmp(extension, "MPK"))
|
else if (!strcmp(extension, "MPK"))
|
||||||
{ //mpk file
|
{ //mpk file
|
||||||
|
clearScreen(disp);
|
||||||
drawBoxNumber(disp, 4);
|
drawBoxNumber(disp, 4);
|
||||||
display_show(disp);
|
display_show(disp);
|
||||||
|
|
||||||
|
@ -4099,23 +4121,28 @@ void handleInput(display_context_t disp, sprite_t *contr)
|
||||||
{
|
{
|
||||||
case file_manager:
|
case file_manager:
|
||||||
showAboutScreen(disp);
|
showAboutScreen(disp);
|
||||||
input_mapping = none;
|
input_mapping = control_screen;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mempak_menu:
|
case mempak_menu:
|
||||||
if (sound_on)
|
|
||||||
playSound(2);
|
|
||||||
clearScreen(disp);
|
|
||||||
while (!(disp = display_lock()))
|
|
||||||
;
|
|
||||||
new_scroll_pos(&cursor, &page, MAX_LIST, count);
|
|
||||||
clearScreen(disp); //part clear?
|
|
||||||
display_dir(list, cursor, page, MAX_LIST, count, disp);
|
|
||||||
|
|
||||||
drawBoxNumber(disp, 4);
|
while (!(disp = display_lock()))
|
||||||
display_show(disp);
|
;
|
||||||
view_mpk(disp);
|
new_scroll_pos(&cursor, &page, MAX_LIST, count);
|
||||||
input_mapping = abort_screen;
|
clearScreen(disp); //part clear?
|
||||||
|
display_dir(list, cursor, page, MAX_LIST, count, disp);
|
||||||
|
view_mpk(disp);
|
||||||
|
drawBoxNumber(disp, 4);
|
||||||
|
display_show(disp);
|
||||||
|
if (sound_on)
|
||||||
|
playSound(2);
|
||||||
|
|
||||||
|
input_mapping = abort_screen;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case control_screen:
|
||||||
|
showControlScreen(disp);
|
||||||
|
input_mapping = none;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -26,7 +26,33 @@ void menu_about(display_context_t disp)
|
||||||
printText("Richard Weick", 9, -1, disp);
|
printText("Richard Weick", 9, -1, disp);
|
||||||
printText("ChillyWilly", 9, -1, disp);
|
printText("ChillyWilly", 9, -1, disp);
|
||||||
printText("ShaunTaylor", 9, -1, disp);
|
printText("ShaunTaylor", 9, -1, disp);
|
||||||
printText("Conle", 9, -1, disp);
|
printText("Conle Z: Page 2", 9, -1, disp);
|
||||||
printText("Aria Hiro 64", 9, -1, disp);
|
printText("AriaHiro64", 9, -1, disp);
|
||||||
printText("moparisthebest", 9, -1, disp);
|
printText("moparisthebest", 9, -1, disp);
|
||||||
} //TODO: make scrolling text, should include libraries used.
|
} //TODO: make scrolling text, should include libraries used.
|
||||||
|
void menu_controls(display_context_t disp)
|
||||||
|
{
|
||||||
|
printText(" - Controls -", 4, 4, disp);
|
||||||
|
printText(" ", 4, -1, disp);
|
||||||
|
printText(" L: brings up the mempak", 4, -1, disp);
|
||||||
|
printText(" menu", 5, -1, disp);
|
||||||
|
printText(" ", 4, -1, disp);
|
||||||
|
printText(" Z: about screen", 4, -1, disp);
|
||||||
|
printText(" ", 4, -1, disp);
|
||||||
|
printText(" A: start rom/directory", 4, -1, disp);
|
||||||
|
printText(" mempak", 4, -1, disp);
|
||||||
|
printText(" ", 4, -1, disp);
|
||||||
|
printText(" B: back/cancel", 4, -1, disp);
|
||||||
|
printText(" ", 4, -1, disp);
|
||||||
|
printText(" START: start last rom", 4, -1, disp);
|
||||||
|
printText(" ", 4, -1, disp);
|
||||||
|
printText(" C-left: rom info/mempak", 4, -1, disp);
|
||||||
|
printText(" content view", 4, -1, disp);
|
||||||
|
printText(" ", 4, -1, disp);
|
||||||
|
printText("C-right: rom config creen", 4, -1, disp);
|
||||||
|
printText(" ", 4, -1, disp);
|
||||||
|
printText(" C-up: view full filename", 4, -1, disp);
|
||||||
|
printText(" ", 4, -1, disp);
|
||||||
|
printText(" C-down: Toplist 15", 4, -1, disp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue