frontend: eliminate osd_text dupes
[picodrive.git] / platform / common / emu.c
index 88fefd5..7f375a3 100644 (file)
@@ -738,8 +738,26 @@ mk_text_out(emu_text_out16_rot, unsigned short, 0xffff,
 \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