slight cleanup

This commit is contained in:
ariahiro64 2021-09-30 01:57:26 -04:00
parent d6bf3e6231
commit fc740cf581
2 changed files with 73 additions and 20 deletions

View File

@ -170,6 +170,7 @@ enum InputMap
mpk_quick_backup,
mp3,
abort_screen,
control_screen,
};
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);
drawBox(28, 105, 260, 30, disp);
break; //green full filename
case 12:
box_color = graphics_make_color(0x00, 0x60, 0x00, 0xC3);
drawBox(20, 24, 277, 193, disp);
break; //filebrowser
default:
break;
@ -3092,7 +3097,21 @@ void showAboutScreen(display_context_t 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)
{
char name_file[256];
@ -3260,9 +3279,10 @@ void handleInput(display_context_t disp, sprite_t *contr)
switch (input_mapping)
{
case file_manager:
if (sound_on){
if (sound_on)
playSound(4);
}
if (select_mode)
{
if (count != 0)
@ -3334,9 +3354,10 @@ void handleInput(display_context_t disp, sprite_t *contr)
switch (input_mapping)
{
case file_manager:
if (sound_on){
if (sound_on)
playSound(4);
}
if (select_mode)
{
if (count != 0)
@ -4058,6 +4079,7 @@ void handleInput(display_context_t disp, sprite_t *contr)
}
else if (!strcmp(extension, "MPK"))
{ //mpk file
clearScreen(disp);
drawBoxNumber(disp, 4);
display_show(disp);
@ -4099,23 +4121,28 @@ void handleInput(display_context_t disp, sprite_t *contr)
{
case file_manager:
showAboutScreen(disp);
input_mapping = none;
input_mapping = control_screen;
break;
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);
case mempak_menu:
drawBoxNumber(disp, 4);
display_show(disp);
view_mpk(disp);
input_mapping = abort_screen;
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);
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;
default:

View File

@ -26,7 +26,33 @@ void menu_about(display_context_t disp)
printText("Richard Weick", 9, -1, disp);
printText("ChillyWilly", 9, -1, disp);
printText("ShaunTaylor", 9, -1, disp);
printText("Conle", 9, -1, disp);
printText("Aria Hiro 64", 9, -1, disp);
printText("Conle Z: Page 2", 9, -1, disp);
printText("AriaHiro64", 9, -1, disp);
printText("moparisthebest", 9, -1, disp);
} //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);
}