static void psp_display_screen_settings_menu(void) { char buffer[64]; int menu_id = 0; int color = 0; int x = 0; int y = 0; int y_step = 0; psp_sdl_blit_help(); x = 10; y = 5; y_step = 10; for (menu_id = 0; menu_id < MAX_MENU_SET_ITEM; menu_id++) { color = PSP_MENU_TEXT_COLOR; if (cur_menu_id == menu_id) color = PSP_MENU_SEL_COLOR; psp_sdl_back2_print(x, y, menu_list[menu_id].title, color); if (menu_id == MENU_SET_SOUND) { if (atari_snd_enable) strcpy(buffer,"yes"); else strcpy(buffer,"no "); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_VIEW_FPS) { if (atari_view_fps) strcpy(buffer,"yes"); else strcpy(buffer,"no "); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_SKIP_FPS) { sprintf(buffer,"%d", atari_skip_fps); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_SPEED_LIMIT) { if (atari_speed_limiter == 0) strcpy(buffer,"no"); else sprintf(buffer, "%d fps", atari_speed_limiter); string_fill_with_space(buffer, 10); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_RENDER) { /* if (atari_render_mode == ATARI_RENDER_NORMAL) */ strcpy(buffer, "normal"); string_fill_with_space(buffer, 13); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_FLICKER_MODE) { if (atari_flicker_mode == ATARI_FLICKER_NONE) strcpy(buffer, "none"); else if (atari_flicker_mode == ATARI_FLICKER_SIMPLE) strcpy(buffer, "simple"); else if (atari_flicker_mode == ATARI_FLICKER_PHOSPHOR) strcpy(buffer, "phosphor"); else strcpy(buffer, "average"); string_fill_with_space(buffer, 13); psp_sdl_back2_print(140, y, buffer, color); #if defined(GCW0_MODE) y += y_step; #endif } else #if !defined(GCW0_MODE) if (menu_id == MENU_SET_CLOCK) { sprintf(buffer,"%d", psp_cpu_clock); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); y += y_step; } else #endif if (menu_id == MENU_SET_RESET) { y += y_step; } y += y_step; } psp_menu_display_save_name(); }
void psp_display_screen_menu(void) { char buffer[64]; int menu_id = 0; int slot_id = 0; int color = 0; int x = 0; int y = 0; int y_step = 0; psp_sdl_blit_background(); x = 10; y = 5; y_step = 10; for (menu_id = 0; menu_id < MAX_MENU_ITEM; menu_id++) { color = PSP_MENU_TEXT_COLOR; if (cur_menu_id == menu_id) color = PSP_MENU_SEL_COLOR; else if (menu_id == MENU_EXIT) color = PSP_MENU_WARNING_COLOR; else if (menu_id == MENU_HELP) color = PSP_MENU_GREEN_COLOR; if (menu_id == MENU_EDITOR) { if (ATARI.comment_present) { psp_sdl_back2_print(x, y, "View comment", color); } else { psp_sdl_back2_print(x, y, "New comment", color); } } else { psp_sdl_back2_print(x, y, menu_list[menu_id].title, color); } if (menu_id == MENU_SCREENSHOT) { sprintf(buffer,"%d", ATARI.psp_screenshot_id); string_fill_with_space(buffer, 4); psp_sdl_back2_print(120, y, buffer, color); #if defined(GCW0_MODE) y += y_step; #endif; } else #if !defined(GCW0_MODE) if (menu_id == MENU_VOLUME) { sprintf(buffer,"%d", gp2xGetSoundVolume()); string_fill_with_space(buffer, 4); psp_sdl_back2_print(120, y, buffer, color); y += y_step; } else #endif if (menu_id == MENU_DEL_SLOT) { y += y_step; } else if (menu_id == MENU_SETTINGS) { y += y_step; } else if (menu_id == MENU_BACK) { y += y_step; } else if (menu_id == MENU_LOAD_ROM) { y += y_step; } else if (menu_id == MENU_CHEATS) { } else if (menu_id == MENU_HELP) { y += y_step; } y += y_step; } y_step = 10; y = 20; for (slot_id = 0; slot_id < ATARI_MAX_SAVE_STATE; slot_id++) { if (slot_id == cur_slot) color = PSP_MENU_SEL2_COLOR; else color = PSP_MENU_TEXT_COLOR; if (ATARI.atari_save_state[slot_id].used) { # if defined(LINUX_MODE) || defined(WIZ_MODE) struct tm *my_date = localtime(& ATARI.atari_save_state[slot_id].date); sprintf(buffer, "- %02d/%02d %02d:%02d:%02d", my_date->tm_mday, my_date->tm_mon, my_date->tm_hour, my_date->tm_min, my_date->tm_sec ); # else sprintf(buffer, "- used"); # endif } else { sprintf(buffer, "- empty"); } string_fill_with_space(buffer, 32); psp_sdl_back2_print(100, y, buffer, color); y += y_step; } if (ATARI.atari_save_state[cur_slot].thumb) { psp_sdl_blit_thumb(170,125, ATARI.atari_save_state[cur_slot].surface); } else { psp_sdl_blit_thumb(170,125, thumb_surface); } psp_menu_display_save_name(); }
void psp_display_screen_menu(void) { char buffer[64]; int menu_id = 0; int slot_id = 0; int color = 0; int x = 0; int y = 0; int y_step = 0; psp_sdl_blit_background(); x = 10; y = 5; y_step = 10; for (menu_id = 0; menu_id < MAX_MENU_ITEM; menu_id++) { color = PSP_MENU_TEXT_COLOR; if (cur_menu_id == menu_id) color = PSP_MENU_SEL_COLOR; else if (menu_id == MENU_EXIT) color = PSP_MENU_WARNING_COLOR; else if (menu_id == MENU_HELP) color = PSP_MENU_GREEN_COLOR; if (menu_id == MENU_COMMAND) { strcpy(buffer, menu_list[menu_id].title); strcat(buffer, command_name[cur_command]); string_fill_with_space(buffer, 25); psp_sdl_back2_print(x, y, buffer, color); } else if (menu_id == MENU_EDITOR) { if (CPC.comment_present) { psp_sdl_back2_print(x, y, "View comment", color); } else { psp_sdl_back2_print(x, y, "New comment", color); } } else { psp_sdl_back2_print(x, y, menu_list[menu_id].title, color); } if (menu_id == MENU_SCREENSHOT) { sprintf(buffer,"%d", CPC.psp_screenshot_id); string_fill_with_space(buffer, 4); psp_sdl_back2_print(120, y, buffer, color); y += y_step; } else if (menu_id == MENU_DEL_SLOT) { //y += y_step; } else if (menu_id == MENU_LOAD_DSKB) { y += y_step; } else if (menu_id == MENU_COMMAND) { //y += y_step; } else if (menu_id == MENU_SETTINGS) { //y += y_step; } else if (menu_id == MENU_BACK) { y += y_step; } else if (menu_id == MENU_HELP) { y += y_step; } y += y_step; } y_step = 10; y = 25; for (slot_id = 0; slot_id < CPC_MAX_SAVE_STATE; slot_id++) { if (slot_id == cur_slot) color = PSP_MENU_SEL2_COLOR; else color = PSP_MENU_TEXT_COLOR; if (CPC.cpc_save_state[slot_id].used) { # if defined(LINUX_MODE) || defined(WIZ_MODE) struct tm *my_date = localtime(& CPC.cpc_save_state[slot_id].date); sprintf(buffer, "- %02d/%02d %02d:%02d:%02d", my_date->tm_mday, my_date->tm_mon, my_date->tm_hour, my_date->tm_min, my_date->tm_sec ); # else sprintf(buffer, "- used"); # endif } else { sprintf(buffer, "- empty"); } string_fill_with_space(buffer, 32); psp_sdl_back2_print(105, y, buffer, color); y += y_step; } if (CPC.cpc_save_state[cur_slot].thumb) { psp_sdl_blit_thumb(180, 135, CPC.cpc_save_state[cur_slot].surface); } else { psp_sdl_blit_thumb(180, 135, thumb_surface); } psp_menu_display_save_name(); }
static void psp_display_screen_settings_menu(void) { char buffer[64]; int menu_id = 0; int color = 0; int x = 0; int y = 0; int y_step = 0; psp_sdl_blit_help(); x = 10; y = 5; y_step = 10; for (menu_id = 0; menu_id < MAX_MENU_SET_ITEM; menu_id++) { color = PSP_MENU_TEXT_COLOR; if (cur_menu_id == menu_id) color = PSP_MENU_SEL_COLOR; psp_sdl_back2_print(x, y, menu_list[menu_id].title, color); if (menu_id == MENU_SET_SOUND) { if (hugo_snd_enable) strcpy(buffer,"yes"); else strcpy(buffer,"no "); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_FREQ) { if (hugo_snd_freq == SND_MONO_22K) strcpy(buffer, "22k mono"); else if (hugo_snd_freq == SND_MONO_44K) strcpy(buffer, "44k mono"); else if (hugo_snd_freq == SND_STEREO_22K) strcpy(buffer, "22k stereo"); else if (hugo_snd_freq == SND_STEREO_44K) strcpy(buffer, "44k stereo"); string_fill_with_space(buffer, 12); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_VOLUME) { sprintf(buffer,"%d", hugo_snd_volume); string_fill_with_space(buffer, 7); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_VIEW_FPS) { if (hugo_view_fps) strcpy(buffer,"on "); else strcpy(buffer,"off"); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_OVERCLOCK) { sprintf(buffer,"%d", hugo_overclock); string_fill_with_space(buffer, 7); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_SKIP_FPS) { sprintf(buffer,"%d", hugo_skip_fps); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_SPEED_LIMIT) { if (hugo_speed_limiter == 0) strcpy(buffer,"no"); else sprintf(buffer, "%d fps", hugo_speed_limiter); string_fill_with_space(buffer, 10); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_VSYNC) { if (hugo_vsync) strcpy(buffer,"yes"); else strcpy(buffer,"no "); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_RENDER) { if (hugo_render_mode == HUGO_RENDER_FAST ) strcpy(buffer , "fast"); else if (hugo_render_mode == HUGO_RENDER_FAST_MAX) strcpy(buffer , "fast max"); else strcpy(buffer, "fit"); string_fill_with_space(buffer, 13); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_SET_CLOCK) { sprintf(buffer,"%d", psp_cpu_clock); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); y += y_step; } else if (menu_id == MENU_SET_RESET) { y += y_step; } y += y_step; } psp_menu_display_save_name(); }
static void psp_display_screen_kbd_menu(void) { char buffer[32]; char *scan; int menu_id = 0; int kbd_id = 0; int hugo_key = 0; int color = 0; int x = 0; int y = 0; int y_step = 0; psp_sdl_blit_help(); x = 5; y = 5; y_step = 10; for (menu_id = 0; menu_id < MAX_MENU_KBD_ITEM; menu_id++) { if (cur_menu_id == menu_id) color = PSP_MENU_SEL_COLOR; else if (menu_id == MENU_KBD_KBD_SELECT) color = PSP_MENU_NOTE_COLOR; else color = PSP_MENU_TEXT_COLOR; psp_sdl_back2_print(x, y, menu_list[menu_id].title, color); if (menu_id == MENU_KBD_SKIN) { snprintf(buffer, 30, psp_kbd_skin_dir[psp_kbd_skin]); scan = strchr(buffer, '/'); if (scan) *scan = 0; psp_sdl_back2_print(70, y, buffer, color); } else if (menu_id == MENU_KBD_KBD_SELECT) { if (menu_kbd_selected == -1) sprintf(buffer, "standard"); else if (menu_kbd_selected == KBD_LTRIGGER_MAPPING) sprintf(buffer, "left"); else if (menu_kbd_selected == KBD_RTRIGGER_MAPPING) sprintf(buffer, "right"); string_fill_with_space(buffer, 20); psp_sdl_back2_print(70, y, buffer, color); } else if ((menu_id >= MENU_KBD_UP ) && (menu_id <= MENU_KBD_JOY_RIGHT)) { kbd_id = psp_kbd_menu_id_to_key_id(menu_id); if (menu_kbd_selected == KBD_NORMAL_MAPPING ) hugo_key = loc_kbd_mapping[kbd_id]; else if (menu_kbd_selected == KBD_LTRIGGER_MAPPING) hugo_key = loc_kbd_mapping_L[kbd_id]; else if (menu_kbd_selected == KBD_RTRIGGER_MAPPING) hugo_key = loc_kbd_mapping_R[kbd_id]; if ((hugo_key >= 0) && (hugo_key < HUGO_MAX_KEY)) { strcpy(buffer, psp_hugo_key_to_name[hugo_key].name); } else if (hugo_key == KBD_UNASSIGNED) { sprintf(buffer, "UNASSIGNED"); } else if (hugo_key == KBD_LTRIGGER_MAPPING) { sprintf(buffer, "L MAPPING"); } else if (hugo_key == KBD_RTRIGGER_MAPPING) { sprintf(buffer, "R MAPPING"); } else { sprintf(buffer, "KEY %d", hugo_key); } string_fill_with_space(buffer, 12); psp_sdl_back2_print(70, y, buffer, color); if (menu_id == MENU_KBD_JOY_RIGHT) { y += y_step; } } y += y_step; } psp_menu_display_save_name(); }
static void psp_display_screen_joystick_menu(void) { char buffer[64]; int menu_id = 0; int color = 0; int x = 0; int y = 0; int y_step = 0; psp_sdl_blit_help(); x = 10; y = 5; y_step = 10; for (menu_id = 0; menu_id < MAX_MENU_JOY_ITEM; menu_id++) { color = PSP_MENU_TEXT_COLOR; if (cur_menu_id == menu_id) color = PSP_MENU_SEL_COLOR; psp_sdl_back2_print(x, y, menu_list[menu_id].title, color); if (menu_id == MENU_JOY_ANALOG) { if (psp_reverse_analog) strcpy(buffer,"yes"); else strcpy(buffer,"no "); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_JOY_AUTOFIRE_T) { sprintf(buffer,"%d", atari_auto_fire_period+1); string_fill_with_space(buffer, 7); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_JOY_AUTOFIRE_M) { if (atari_auto_fire_mode) strcpy(buffer,"yes"); else strcpy(buffer,"no "); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_JOY_JOYSTICK) { if (psp_active_joystick) strcpy(buffer,"player 2"); else strcpy(buffer,"player 1 "); string_fill_with_space(buffer, 10); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_JOY_PADDLE) { if (atari_paddle_enable) strcpy(buffer,"yes"); else strcpy(buffer,"no "); string_fill_with_space(buffer, 4); psp_sdl_back2_print(140, y, buffer, color); } else if (menu_id == MENU_JOY_PADDLE_SPEED) { sprintf(buffer, "%d", atari_paddle_speed); string_fill_with_space(buffer, 10); psp_sdl_back2_print(140, y, buffer, color); y += y_step; } else if (menu_id == MENU_JOY_RESET) { y += y_step; } y += y_step; } psp_menu_display_save_name(); }
static void psp_display_screen_cheat_menu(void) { char buffer[128]; int menu_id = 0; int color = 0; int cheat_id = 0; int addr_id = 0; int x = 0; int y = 0; int y_step = 0; int sav_y = 0; int first = 0; char* scan = 0; psp_sdl_blit_help(); x = 10; y = 5; y_step = 10; for (menu_id = 0; menu_id < MAX_MENU_CHEAT_ITEM; menu_id++) { color = PSP_MENU_TEXT_COLOR; if (menu_id == MENU_CHEAT_DEL) color = PSP_MENU_NOTE_COLOR; if (cur_menu_id == menu_id) color = PSP_MENU_SEL_COLOR; psp_sdl_back2_print(x, y, menu_list[menu_id].title, color); if (menu_id == MENU_CHEAT_OLD_VAL) { sprintf(buffer,"%02X", scan_old_value); string_fill_with_space(buffer, 4); psp_sdl_back2_print( 90, y, buffer, color); } else if (menu_id == MENU_CHEAT_NEW_VAL) { sprintf(buffer,"%02X", scan_new_value); string_fill_with_space(buffer, 4); psp_sdl_back2_print( 90, y, buffer, color); } else if (menu_id == MENU_CHEAT_POKE) { sprintf(buffer,"%02X", scan_poke_value); string_fill_with_space(buffer, 4); psp_sdl_back2_print( 90, y, buffer, color); } else if (menu_id == MENU_CHEAT_ADD) { if (scan_addr_found) { scan = buffer; buffer[0] = 0; first = 1; sav_y = y; for (addr_id = 0; addr_id < scan_addr_found; addr_id++) { if (addr_id >= MAX_SCAN_ADDR) break; if (first) { sprintf(scan, "%04X", scan_addr[addr_id]); first = 0; scan += 4; } else { sprintf(scan, ",%04X", scan_addr[addr_id]); scan += 5; if (addr_id == 4) { string_fill_with_space(buffer, 38); psp_sdl_back2_print( 90, y, buffer, color); scan = buffer; buffer[0] = 0; first = 1; y += y_step; } } } if (scan_addr_found >= MAX_SCAN_ADDR) { sprintf(scan," ... (%d)", scan_addr_found ); } string_fill_with_space(buffer, 38); psp_sdl_back2_print( 90, y, buffer, color); y = sav_y; } else { sprintf(buffer,"No match"); string_fill_with_space(buffer, 38); psp_sdl_back2_print( 90, y, buffer, color); } //y += y_step; } else if (menu_id == MENU_CHEAT_RAM) { y += y_step; } else if (menu_id == MENU_CHEAT_EDIT) { y += y_step; } else if (menu_id == MENU_CHEAT_DEL) { y += (CPC_MAX_CHEAT - 6) * y_step; } else if (menu_id == MENU_CHEAT_RESET) { y += y_step; } y += y_step; } y_step = 10; y = 65; for (cheat_id = 0; cheat_id < CPC_MAX_CHEAT; cheat_id++) { if (cheat_id == cur_cheat) color = PSP_MENU_SEL2_COLOR; else color = PSP_MENU_TEXT_COLOR; CPC_cheat_t* a_cheat = &CPC.cpc_cheat[cheat_id]; if (a_cheat->type != CPC_CHEAT_NONE) { char enable = (a_cheat->type == CPC_CHEAT_ENABLE) ? 'X' : ' '; sprintf(buffer, "[%c] %04X-%02X %s", enable, a_cheat->addr, a_cheat->value, a_cheat->comment); } else { sprintf(buffer, "[ ] - Empty"); } string_fill_with_space(buffer, 36); psp_sdl_back2_print(90, y, buffer, color); y += y_step; } psp_menu_display_save_name(); }