mirror of
https://github.com/parasyte/alt64
synced 2024-11-02 00:05:03 -04:00
minor refactoring
This commit is contained in:
parent
84f983f4ee
commit
311d060a14
31
src/menu.c
31
src/menu.c
@ -130,10 +130,12 @@ int fat_initialized = 0;
|
|||||||
int exit_ok = 0;
|
int exit_ok = 0;
|
||||||
int boot_cic = 0;
|
int boot_cic = 0;
|
||||||
int boot_save = 0;
|
int boot_save = 0;
|
||||||
|
|
||||||
int cursor_line = 0;
|
int cursor_line = 0;
|
||||||
int cursor_lastline = 0;
|
int cursor_lastline = 0;
|
||||||
u16 cursor_history[32];
|
u16 cursor_history[32];
|
||||||
u16 cursor_history_pos = 0;
|
u16 cursor_history_pos = 0;
|
||||||
|
|
||||||
u8 empty = 0;
|
u8 empty = 0;
|
||||||
u8 playing = 0;
|
u8 playing = 0;
|
||||||
u8 gb_load_y = 0;
|
u8 gb_load_y = 0;
|
||||||
@ -1258,14 +1260,12 @@ void loadnesrom(display_context_t disp, u8 *rom_path)
|
|||||||
void loadrom(display_context_t disp, u8 *buff, int fast)
|
void loadrom(display_context_t disp, u8 *buff, int fast)
|
||||||
{
|
{
|
||||||
clearScreen(disp);
|
clearScreen(disp);
|
||||||
|
|
||||||
display_show(disp);
|
display_show(disp);
|
||||||
|
|
||||||
if (!fast)
|
if (!fast)
|
||||||
printText("Restoring:", 3, 4, disp);
|
printText("Restoring:", 3, 4, disp);
|
||||||
|
|
||||||
sleep(10);
|
//sleep(1000); //needless waiting :>
|
||||||
sleep(1000); //needless waiting :>
|
|
||||||
|
|
||||||
TRACE(disp, "timing done");
|
TRACE(disp, "timing done");
|
||||||
|
|
||||||
@ -1589,7 +1589,7 @@ char TranslateNotes(char *bNote, char *Text)
|
|||||||
#pragma warning(disable : 4305 4309)
|
#pragma warning(disable : 4305 4309)
|
||||||
char cReturn = 0x00;
|
char cReturn = 0x00;
|
||||||
const char aSpecial[] = {0x21, 0x22, 0x23, 0x60, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x3A, 0x3D, 0x3F, 0x40, 0x74, 0xA9, 0xAE};
|
const char aSpecial[] = {0x21, 0x22, 0x23, 0x60, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x3A, 0x3D, 0x3F, 0x40, 0x74, 0xA9, 0xAE};
|
||||||
// { '!' , '\"', '#' , '`' , '*' , '+' , ',' , '-' , '.' , '/' , ':' , '=' , '?' , '>' , 'tm', '(r)','(c)' };
|
// { '!' , '\"', '#' , '`' , '*' , '+' , ',' , '-' , '.' , '/' , ':' , '=' , '?' , '>' , 'tm', '(r)','(c)' };
|
||||||
#pragma warning(default : 4305 4309)
|
#pragma warning(default : 4305 4309)
|
||||||
int i = 16;
|
int i = 16;
|
||||||
do
|
do
|
||||||
@ -2202,7 +2202,7 @@ void readSDcard(display_context_t disp, char *directory)
|
|||||||
//clear screen and print the directory name
|
//clear screen and print the directory name
|
||||||
clearScreen(disp);
|
clearScreen(disp);
|
||||||
|
|
||||||
//creates string list of files and directorys
|
//creates string list of files and directories
|
||||||
for (int i = 0; i < dir->size; i++)
|
for (int i = 0; i < dir->size; i++)
|
||||||
{
|
{
|
||||||
char name_tmpl[32];
|
char name_tmpl[32];
|
||||||
@ -3279,8 +3279,6 @@ void showAboutScreen(display_context_t 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", 9, -1, disp);
|
||||||
|
|
||||||
sleep(500);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void loadFile(display_context_t disp)
|
void loadFile(display_context_t disp)
|
||||||
@ -4214,25 +4212,19 @@ void handleInput(display_context_t disp, sprite_t *contr)
|
|||||||
switch (input_mapping)
|
switch (input_mapping)
|
||||||
{
|
{
|
||||||
case file_manager:
|
case file_manager:
|
||||||
|
input_mapping = abort_screen;
|
||||||
input_mapping = unknown;
|
|
||||||
|
|
||||||
showAboutScreen(disp);
|
showAboutScreen(disp);
|
||||||
|
|
||||||
input_mapping = abort_screen;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mempak_menu:
|
case mempak_menu:
|
||||||
|
input_mapping = abort_screen;
|
||||||
|
if (sound_on)
|
||||||
|
playSound(2);
|
||||||
|
|
||||||
drawBoxNumber(disp, 4);
|
drawBoxNumber(disp, 4);
|
||||||
display_show(disp);
|
display_show(disp);
|
||||||
view_mpk(disp);
|
view_mpk(disp);
|
||||||
|
|
||||||
if (sound_on)
|
|
||||||
playSound(2);
|
|
||||||
|
|
||||||
sleep(500);
|
|
||||||
input_mapping = abort_screen;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -4501,7 +4493,8 @@ void handleInput(display_context_t disp, sprite_t *contr)
|
|||||||
case mpk_quick_backup:
|
case mpk_quick_backup:
|
||||||
|
|
||||||
//rom info screen
|
//rom info screen
|
||||||
|
input_mapping = file_manager;
|
||||||
|
|
||||||
while (!(disp = display_lock()))
|
while (!(disp = display_lock()))
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -4509,8 +4502,6 @@ void handleInput(display_context_t disp, sprite_t *contr)
|
|||||||
display_dir(list, cursor, page, MAX_LIST, count, disp);
|
display_dir(list, cursor, page, MAX_LIST, count, disp);
|
||||||
|
|
||||||
display_show(disp);
|
display_show(disp);
|
||||||
|
|
||||||
input_mapping = file_manager;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case toplist:
|
case toplist:
|
||||||
|
@ -273,6 +273,7 @@ int getSRAM32( uint8_t *buffer) {
|
|||||||
return getSRAM(buffer, SAVE_SIZE_SRAM);
|
return getSRAM(buffer, SAVE_SIZE_SRAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: is this now 96k?
|
||||||
int getSRAM128( uint8_t *buffer) {
|
int getSRAM128( uint8_t *buffer) {
|
||||||
return getSRAM(buffer, SAVE_SIZE_SRAM128);
|
return getSRAM(buffer, SAVE_SIZE_SRAM128);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user