\r
#undef mk_text_out\r
\r
+void emu_osd_text16(int x, int y, const char *text)\r
+{\r
+ int len = strlen(text) * 8;\r
+ int i, h;\r
+\r
+ len++;\r
+ if (x + len > g_screen_width)\r
+ len = g_screen_width - x;\r
+\r
+ for (h = 0; h < 8; h++) {\r
+ unsigned short *p;\r
+ p = (unsigned short *)g_screen_ptr\r
+ + x + g_screen_width * (y + h);\r
+ for (i = len; i > 0; i--, p++)\r
+ *p = (*p >> 2) & 0x39e7;\r
+ }\r
+ emu_text_out16(x, y, text);\r
+}\r
\r
-void update_movie(void)\r
+static void update_movie(void)\r
{\r
int offs = Pico.m.frame_count*3 + 0x40;\r
if (offs+3 > movie_size) {\r
void emu_text_out8_rot (int x, int y, const char *text);
void emu_text_out16_rot(int x, int y, const char *text);
+void emu_osd_text16(int x, int y, const char *text);
+
void emu_make_path(char *buff, const char *end, int size);
void emu_update_input(void);
void emu_get_game_name(char *str150);
emu_text_out8(x, y, text);\r
}\r
\r
-static void osd_text16(int x, int y, const char *text)\r
-{\r
- int len = strlen(text)*8;\r
- int *p, i, h, offs;\r
-\r
- len = (len+1) >> 1;\r
- for (h = 0; h < 8; h++) {\r
- offs = (x + g_screen_width * (y+h)) & ~1;\r
- p = (int *) ((short *)g_screen_ptr + offs);\r
- for (i = len; i; i--, p++)\r
- *p = (*p >> 2) & 0x39e7;\r
- }\r
- emu_text_out16(x, y, text);\r
-}\r
-\r
static void osd_text8_rot(int x, int y, const char *text)\r
{\r
int len = strlen(text) * 8;\r
PicoDrawSetCallbacks(emu_scan_begin, emu_scan_end);\r
\r
if (is_16bit_mode())\r
- osd_text = (currentConfig.EmuOpt & EOPT_WIZ_TEAR_FIX) ? osd_text16_rot : osd_text16;\r
+ osd_text = (currentConfig.EmuOpt & EOPT_WIZ_TEAR_FIX) ? osd_text16_rot : emu_osd_text16;\r
else\r
osd_text = (currentConfig.EmuOpt & EOPT_WIZ_TEAR_FIX) ? osd_text8_rot : osd_text8;\r
\r
PicoOpt &= ~POPT_EN_DRC;\r
}\r
\r
-// FIXME: dupes from GP2X, need cleanup\r
-static void (*osd_text)(int x, int y, const char *text);\r
-\r
-/*\r
-static void osd_text8(int x, int y, const char *text)\r
-{\r
- int len = strlen(text)*8;\r
- int *p, i, h, offs;\r
-\r
- len = (len+3) >> 2;\r
- for (h = 0; h < 8; h++) {\r
- offs = (x + g_screen_width * (y+h)) & ~3;\r
- p = (int *) ((char *)g_screen_ptr + offs);\r
- for (i = len; i; i--, p++)\r
- *p = 0xe0e0e0e0;\r
- }\r
- emu_text_out8(x, y, text);\r
-}\r
-*/\r
-\r
-static void osd_text16(int x, int y, const char *text)\r
-{\r
- int len = strlen(text)*8;\r
- int *p, i, h, offs;\r
-\r
- len = (len+1) >> 1;\r
- for (h = 0; h < 8; h++) {\r
- offs = (x + g_screen_width * (y+h)) & ~1;\r
- p = (int *) ((short *)g_screen_ptr + offs);\r
- for (i = len; i; i--, p++)\r
- *p = (*p >> 2) & 0x39e7;\r
- }\r
- emu_text_out16(x, y, text);\r
-}\r
-\r
static void draw_cd_leds(void)\r
{\r
int led_reg, pitch, scr_offs, led_offs;\r
\r
if (notice || (currentConfig.EmuOpt & EOPT_SHOW_FPS)) {\r
if (notice)\r
- osd_text(4, g_screen_height - 8, notice);\r
+ emu_osd_text16(4, g_screen_height - 8, notice);\r
if (currentConfig.EmuOpt & EOPT_SHOW_FPS)\r
- osd_text(g_screen_width - 60, g_screen_height - 8, fps);\r
+ emu_osd_text16(g_screen_width - 60, g_screen_height - 8, fps);\r
}\r
if ((PicoAHW & PAHW_MCD) && (currentConfig.EmuOpt & EOPT_EN_CD_LEDS))\r
draw_cd_leds();\r
void pemu_loop_prep(void)\r
{\r
apply_renderer();\r
- osd_text = osd_text16;\r
}\r
\r
void pemu_loop_end(void)\r
currentConfig.CPUclock = plat_target_cpu_clock_get();\r
}\r
\r
-static void osd_text(int x, int y, const char *text)\r
-{\r
- int len = strlen(text)*8;\r
- int i, h;\r
-\r
- len++;\r
- if (x + len > g_screen_width)\r
- len = g_screen_width - x;\r
-\r
- for (h = 0; h < 8; h++) {\r
- unsigned short *p;\r
- p = (unsigned short *)g_screen_ptr + x + g_screen_width*(y + h);\r
- for (i = len; i > 0; i--, p++)\r
- *p = (*p>>2) & 0x39e7;\r
- }\r
- emu_text_out16(x, y, text);\r
-}\r
-\r
static void draw_cd_leds(void)\r
{\r
int old_reg;\r
void pemu_finalize_frame(const char *fps, const char *notice)\r
{\r
if (notice && notice[0])\r
- osd_text(2, g_osd_y, notice);\r
+ emu_osd_text16(2, g_osd_y, notice);\r
if (fps && fps[0] && (currentConfig.EmuOpt & EOPT_SHOW_FPS))\r
- osd_text(g_osd_fps_x, g_osd_y, fps);\r
+ emu_osd_text16(g_osd_fps_x, g_osd_y, fps);\r
if ((PicoAHW & PAHW_MCD) && (currentConfig.EmuOpt & EOPT_EN_CD_LEDS))\r
draw_cd_leds();\r
}\r