static void psp_display_screen_cheat_list(void) { char buffer[512]; int color = 0; int cheat_line = 0; int index = 0; int x = 0; int y = 0; int y_step = 0; psp_sdl_blit_help(); x = 5; y = 0; y_step = 10; cheat_line = psp_cheat_top; index = 0; while ((index < CHEAT_LINE_BY_PAGE) && (cheat_line < psp_cheat_size)) { strcpy(buffer, psp_cheat[cheat_line]); string_fill_with_space(buffer, CHEAT_CHAR_BY_LINE); if (cheat_line == psp_cheat_current) color = PSP_MENU_SEL2_COLOR; else color = PSP_MENU_TEXT_COLOR; psp_sdl_back2_print(x, y, buffer, color); y += y_step; index++; cheat_line++; } if (index != CHEAT_LINE_BY_PAGE) { buffer[0]=0; string_fill_with_space(buffer, CHEAT_CHAR_BY_LINE); while (index < CHEAT_LINE_BY_PAGE) { if (cheat_line == psp_cheat_current) color = PSP_MENU_SEL2_COLOR; else color = PSP_MENU_TEXT_COLOR; psp_sdl_back2_print(x, y, buffer, color); y += y_step; index++; } } }
static void psp_display_screen_help(void) { char buffer[512]; int help_line = 0; int index = 0; int x = 0; int y = 0; int y_step = 0; psp_sdl_blit_help(); x = 5; y = 0; y_step = 10; help_line = psp_help_current; index = 0; while ((index < HELP_LINE_BY_PAGE) && (help_line < psp_help_size)) { strcpy(buffer, psp_help[help_line]); string_fill_with_space(buffer, HELP_CHAR_BY_LINE); psp_sdl_back2_print(x, y, buffer, PSP_MENU_SEL_COLOR); y += y_step; index++; help_line++; } if (index != HELP_LINE_BY_PAGE) { buffer[0]=0; string_fill_with_space(buffer, HELP_CHAR_BY_LINE); while (index < HELP_LINE_BY_PAGE) { psp_sdl_back2_print(x, y, buffer, PSP_MENU_SEL_COLOR); y += y_step; index++; } } }
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(); }
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(); }
static void psp_display_screen_fmgr(void) { psp_sdl_blit_help(); }