static unsigned char *menu_font_data = NULL;\r
static int menu_text_color = 0xffff; // default to white\r
static int menu_sel_color = -1; // disabled\r
static unsigned char *menu_font_data = NULL;\r
static int menu_text_color = 0xffff; // default to white\r
static int menu_sel_color = -1; // disabled\r
text_out16_(x,y,buffer,menu_text_color);\r
}\r
\r
text_out16_(x,y,buffer,menu_text_color);\r
}\r
\r
static void smalltext_out16_(int x, int y, const char *texto, int color)\r
{\r
static void smalltext_out16_(int x, int y, const char *texto, int color)\r
{\r
int ln, len = percent * g_screen_width / 100;\r
unsigned short *dst = (unsigned short *)g_screen_ptr + g_screen_width * 10 * 2;\r
\r
int ln, len = percent * g_screen_width / 100;\r
unsigned short *dst = (unsigned short *)g_screen_ptr + g_screen_width * 10 * 2;\r
\r
- smalltext_out16(1, 3 * 10, "Processing CD image / MP3s", 0xffff);\r
- smalltext_out16(1, 4 * 10, rom_fname_loaded, 0xffff);\r
- dst += g_screen_width * 30;\r
+ smalltext_out16(1, 3 * me_sfont_h, "Processing CD image / MP3s", 0xffff);\r
+ smalltext_out16(1, 4 * me_sfont_h, rom_fname_loaded, 0xffff);\r
+ dst += g_screen_width * me_sfont_h * 3;\r
while (p > rom_name && *p != '/')\r
p--;\r
\r
/* fill both buffers, callbacks won't update in full */\r
while (p > rom_name && *p != '/')\r
p--;\r
\r
/* fill both buffers, callbacks won't update in full */\r
smalltext_out16(1, 1, "Loading", 0xffff);\r
smalltext_out16(1, 1, "Loading", 0xffff);\r
- smalltext_out16(1, 10, p, 0xffff);\r
+ smalltext_out16(1, me_sfont_h, p, 0xffff);\r
smalltext_out16(1, 1, "Loading", 0xffff);\r
smalltext_out16(1, 1, "Loading", 0xffff);\r
- smalltext_out16(1, 10, p, 0xffff);\r
+ smalltext_out16(1, me_sfont_h, p, 0xffff);\r
\r
static void draw_dirlist(char *curdir, struct dirent **namelist, int n, int sel)\r
{\r
\r
static void draw_dirlist(char *curdir, struct dirent **namelist, int n, int sel)\r
{\r
- int max_cnt, start, i, pos;\r
+ int max_cnt, start, i, x, pos;\r
- smalltext_out16(14, (start - 2)*10, curdir, 0xffff);\r
+ smalltext_out16(14, (start - 2) * me_sfont_h, curdir, 0xffff);\r
for (i = 0; i < n; i++) {\r
pos = start + i;\r
if (pos < 0) continue;\r
if (pos >= max_cnt) break;\r
if (namelist[i+1]->d_type == DT_DIR) {\r
for (i = 0; i < n; i++) {\r
pos = start + i;\r
if (pos < 0) continue;\r
if (pos >= max_cnt) break;\r
if (namelist[i+1]->d_type == DT_DIR) {\r
- smalltext_out16(14, pos*10, "/", 0xfff6);\r
- smalltext_out16(14+6, pos*10, namelist[i+1]->d_name, 0xfff6);\r
+ smalltext_out16(x, pos * me_sfont_h, "/", 0xfff6);\r
+ smalltext_out16(x + me_sfont_w, pos * me_sfont_h, namelist[i+1]->d_name, 0xfff6);\r
- smalltext_out16(14, pos*10, namelist[i+1]->d_name, color);\r
+ smalltext_out16(x, pos * me_sfont_h, namelist[i+1]->d_name, color);\r
- smalltext_out16(5, max_cnt/2 * 10, ">", 0xffff);\r
+ smalltext_out16(5, max_cnt/2 * me_sfont_h, ">", 0xffff);\r
- smalltext_out16(14, pos*10, active ? "ON " : "OFF", active ? 0xfff6 : 0xffff);\r
- smalltext_out16(14+6*4, pos*10, PicoPatches[i].name, active ? 0xfff6 : 0xffff);\r
+ smalltext_out16(14, pos * me_sfont_h, active ? "ON " : "OFF", active ? 0xfff6 : 0xffff);\r
+ smalltext_out16(14+6*4, pos * me_sfont_h, PicoPatches[i].name, active ? 0xfff6 : 0xffff);\r
- smalltext_out16(14, pos * 10, "done", 0xffff);\r
+ smalltext_out16(14, pos * me_sfont_h, "done", 0xffff);\r
\r
/* draw all 10 slots */\r
for (i = 0; i < 10; i++, y += me_mfont_h)\r
\r
/* draw all 10 slots */\r
for (i = 0; i < 10; i++, y += me_mfont_h)\r
- if (static_buff[0])\r
- strncat(static_buff, " + ", sizeof(static_buff));\r
- strncat(static_buff, xname, sizeof(static_buff));\r
+ len = strlen(static_buff);\r
+ if (len) {\r
+ strncat(static_buff, " + ", sizeof(static_buff) - len - 1);\r
+ len += 3;\r
+ }\r
+ strncat(static_buff, xname, sizeof(static_buff) - len - 1);\r
static void draw_key_config(const me_bind_action *opts, int opt_cnt, int player_idx,\r
int sel, int dev_id, int dev_count, int is_bind)\r
{\r
static void draw_key_config(const me_bind_action *opts, int opt_cnt, int player_idx,\r
int sel, int dev_id, int dev_count, int is_bind)\r
{\r
y = (g_screen_height - 4 * me_mfont_h) / 2 - (2 + opt_cnt) * me_mfont_h / 2;\r
if (x < me_mfont_w * 2)\r
x = me_mfont_w * 2;\r
y = (g_screen_height - 4 * me_mfont_h) / 2 - (2 + opt_cnt) * me_mfont_h / 2;\r
if (x < me_mfont_w * 2)\r
x = me_mfont_w * 2;\r
\r
for (i = 0; i < opt_cnt; i++, y += me_mfont_h)\r
text_out16(x, y, "%s : %s", opts[i].name,\r
\r
for (i = 0; i < opt_cnt; i++, y += me_mfont_h)\r
text_out16(x, y, "%s : %s", opts[i].name,\r
- while (*p && *p != '\n') p++;\r
- smalltext_out16(1, line*10, str, 0xffff);\r
- if (*p == 0) break;\r
+ smalltext_out16(1, line * me_sfont_h, str, 0xffff);\r
+ while (*p && *p != '\n')\r
+ p++;\r
+ if (*p == 0)\r
+ break;\r
- smalltext_out16(4, g_screen_height - 8, layer_str, 0xffff);\r
+ smalltext_out16(4, g_screen_height - me_sfont_h, layer_str, 0xffff);\r
emu_platformDebugCat(tmp);\r
draw_text_debug(tmp, 0, 0);\r
if (dumped) {\r
emu_platformDebugCat(tmp);\r
draw_text_debug(tmp, 0, 0);\r
if (dumped) {\r
mee_handler_id("Resume game", MA_MAIN_RESUME_GAME, main_menu_handler),\r
mee_handler_id("Save State", MA_MAIN_SAVE_STATE, main_menu_handler),\r
mee_handler_id("Load State", MA_MAIN_LOAD_STATE, main_menu_handler),\r
mee_handler_id("Resume game", MA_MAIN_RESUME_GAME, main_menu_handler),\r
mee_handler_id("Save State", MA_MAIN_SAVE_STATE, main_menu_handler),\r
mee_handler_id("Load State", MA_MAIN_LOAD_STATE, main_menu_handler),\r
plat_video_menu_enter(rom_loaded);\r
in_set_blocking(1);\r
me_loop(e_menu_main, &sel);\r
plat_video_menu_enter(rom_loaded);\r
in_set_blocking(1);\r
me_loop(e_menu_main, &sel);\r
/* wait until menu, ok, back is released */\r
while (in_menu_wait_any(50) & (PBTN_MENU|PBTN_MOK|PBTN_MBACK));\r
/* wait until menu, ok, back is released */\r
while (in_menu_wait_any(50) & (PBTN_MENU|PBTN_MOK|PBTN_MBACK));\r