1
0
mirror of https://github.com/parasyte/alt64 synced 2024-11-02 08:15:07 -04:00

minor refactoring

This commit is contained in:
Robin Jones 2017-01-02 21:44:32 +00:00
parent 84f983f4ee
commit 311d060a14
2 changed files with 12 additions and 20 deletions

View File

@ -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");
@ -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,6 +4493,7 @@ 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:

View File

@ -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);
} }