X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=common%2Fmenu.c;h=1becb8328f94a4d201a9356d26c7e5db31bd1ba8;hb=f11bad75edc8966e9f84b040163cc86e830c46c6;hp=00afc34b0dc54fd451beab4f14b834822983f224;hpb=dfa8d77a42bf22658504d9d1f3d6700dd41d0c7d;p=libpicofe.git diff --git a/common/menu.c b/common/menu.c index 00afc34..1becb83 100644 --- a/common/menu.c +++ b/common/menu.c @@ -39,6 +39,8 @@ me_bind_action me_ctrl_actions[15] = }; +#ifndef UIQ3 + static unsigned char menu_font_data[10240]; static int menu_text_color = 0xffff; // default to white static int menu_sel_color = -1; // disabled @@ -331,35 +333,13 @@ int me_process(menu_entry *entries, int count, menu_id id, int is_next) } } -const char *me_region_name(unsigned int code, int auto_order) -{ - static const char *names[] = { "Auto", " Japan NTSC", " Japan PAL", " USA", " Europe" }; - static const char *names_short[] = { "", " JP", " JP", " US", " EU" }; - int u, i = 0; - if (code) { - code <<= 1; - while((code >>= 1)) i++; - if (i > 4) return "unknown"; - return names[i]; - } else { - static char name[24]; - strcpy(name, "Auto:"); - for (u = 0; u < 3; u++) { - i = 0; code = ((auto_order >> u*4) & 0xf) << 1; - while((code >>= 1)) i++; - strcat(name, names_short[i]); - } - return name; - } -} - // ------------ debug menu ------------ #include #include -#include -#include +#include +#include void SekStepM68k(void); @@ -405,13 +385,16 @@ void debug_menu_loop(void) { int inp, mode = 0; int spr_offs = 0, dumped = 0; + char *tmp; while (1) { switch (mode) { case 0: menu_draw_begin(); - draw_text_debug(PDebugMain(), 0, 0); + tmp = PDebugMain(); + emu_platformDebugCat(tmp); + draw_text_debug(tmp, 0, 0); if (dumped) { smalltext_out16(SCREEN_WIDTH-6*10, SCREEN_HEIGHT-8, "dumped", 0xffff); dumped = 0; @@ -469,4 +452,30 @@ void debug_menu_loop(void) } } +#endif // !UIQ3 + +// ------------ util ------------ + +const char *me_region_name(unsigned int code, int auto_order) +{ + static const char *names[] = { "Auto", " Japan NTSC", " Japan PAL", " USA", " Europe" }; + static const char *names_short[] = { "", " JP", " JP", " US", " EU" }; + int u, i = 0; + if (code) { + code <<= 1; + while((code >>= 1)) i++; + if (i > 4) return "unknown"; + return names[i]; + } else { + static char name[24]; + strcpy(name, "Auto:"); + for (u = 0; u < 3; u++) { + i = 0; code = ((auto_order >> u*4) & 0xf) << 1; + while((code >>= 1)) i++; + strcat(name, names_short[i]); + } + return name; + } +} +