#include "input_pico.h"
#include "version.h"
+#include "../libpicofe/plat.h"
+
#include <pico/pico_int.h>
#include <pico/patch.h>
#define MENU_X2 0
#endif
-#if defined USE_BGR555
-#define COL_ROM 0x5eff
-#define COL_OTH 0x5ff5
-#elif defined USE_BGR565
-#define COL_ROM 0xfdf7
-#define COL_OTH 0xaff5
-#else
-#define COL_ROM 0xbdff
-#define COL_OTH 0xaff5
-#endif
+#define COL_ROM PXMAKE(0xbf, 0xbf, 0xff)
+#define COL_OTH PXMAKE(0xaf, 0xff, 0xaf)
// FIXME
#ifndef REVISION
if (strcasecmp(ext, rom_exts[i]) == 0) return COL_ROM;
for (i = 0; i < array_size(other_exts); i++)
if (strcasecmp(ext, other_exts[i]) == 0) return COL_OTH;
- return 0xffff;
+ return PXMAKE(0xff, 0xff, 0xff);
}
#include <platform/libpicofe/menu.c>
for (y = 0; y < h; y++, src += pp, d += g_menuscreen_w*2/2) {
for (x = 0; x < w; x++) {
t = src[x];
- t = ((t & 0xf79e)>>1) - ((t & 0xc618)>>3);
+ t = (PXMASKH(t,1)>>1) - (PXMASKH(t,3)>>3);
t |= t << 16;
d[x] = d[x + g_menuscreen_w / 2] = t;
}
copy_bg(0);
menuscreen_memset_lines(dst, 0xff, me_sfont_h - 2);
- smalltext_out16(1, 3 * me_sfont_h, "Processing CD image / MP3s", 0xffff);
- smalltext_out16(1, 4 * me_sfont_h, fname, 0xffff);
+ smalltext_out16(1, 3 * me_sfont_h, "Processing CD image / MP3s", PXMAKE(0xff, 0xff, 0xff));
+ smalltext_out16(1, 4 * me_sfont_h, fname, PXMAKE(0xff, 0xff, 0xff));
dst += g_menuscreen_pp * me_sfont_h * 3;
if (len > g_menuscreen_w)
p--;
menu_draw_begin(1, 1);
- smalltext_out16(1, 1, "Loading", 0xffff);
- smalltext_out16(1, me_sfont_h, p, 0xffff);
+ smalltext_out16(1, 1, "Loading", PXMAKE(0xff, 0xff, 0xff));
+ smalltext_out16(1, me_sfont_h, p, PXMAKE(0xff, 0xff, 0xff));
/* copy menu to bg for callbacks. OK since we are not in menu_loop here */
copy_bg(1);
menu_draw_end();
menu_draw_begin(0, 1);
copy_bg(0);
smalltext_out16(1, (cdload_called ? 6 : 3) * me_sfont_h,
- "Starting emulation...", 0xffff);
+ "Starting emulation...", PXMAKE(0xff, 0xff, 0xff));
menu_draw_end();
}
if (pos < 0) continue;
if (pos >= max_cnt) break;
active = PicoPatches[i].active;
- smalltext_out16(14, pos * me_sfont_h, active ? "ON " : "OFF", active ? 0xfff6 : 0xffff);
- smalltext_out16(14 + me_sfont_w*4, pos * me_sfont_h, PicoPatches[i].name, active ? 0xfff6 : 0xffff);
+ smalltext_out16(14, pos * me_sfont_h, active ? "ON " : "OFF", PXMAKE(0xff, 0xff, active ? 0xff : 0xb0));
+ smalltext_out16(14 + me_sfont_w*4, pos * me_sfont_h, PicoPatches[i].name, PXMAKE(0xff, 0xff, active ? 0xff : 0xb0));
}
pos = start + i;
if (pos < max_cnt)
- smalltext_out16(14, pos * me_sfont_h, "done", 0xffff);
+ smalltext_out16(14, pos * me_sfont_h, "done", PXMAKE(0xff, 0xff, 0xff));
text_out16(5, max_cnt / 2 * me_sfont_h, ">");
menu_draw_end();
str = p;
for (line = from; line < g_menuscreen_h / me_sfont_h; line++)
{
- smalltext_out16(1, line * me_sfont_h, str, 0xffff);
+ smalltext_out16(1, line * me_sfont_h, str, PXMAKE(0xff, 0xff, 0xff));
while (*p && *p != '\n')
p++;
if (*p == 0)
pemu_forced_frame(1, 0);
make_bg(1, 1);
- smalltext_out16(4, 1, "build: r" REVISION " "__DATE__ " " __TIME__ " " COMPILER, 0xffff);
- smalltext_out16(4, g_menuscreen_h - me_sfont_h, layer_str, 0xffff);
+ smalltext_out16(4, 1, "build: r" REVISION " "__DATE__ " " __TIME__ " " COMPILER, PXMAKE(0xff, 0xff, 0xff));
+ smalltext_out16(4, g_menuscreen_h - me_sfont_h, layer_str, PXMAKE(0xff, 0xff, 0xff));
}
static void debug_menu_loop(void)
draw_text_debug(tmp, 0, 0);
if (dumped) {
smalltext_out16(g_menuscreen_w - 6 * me_sfont_h,
- g_menuscreen_h - me_mfont_h, "dumped", 0xffff);
+ g_menuscreen_h - me_mfont_h, "dumped", PXMAKE(0xff, 0xff, 0xff));
dumped = 0;
}
break;
static void draw_frame_credits(void)
{
- smalltext_out16(4, 1, "build: " __DATE__ " " __TIME__, 0xe7fc);
+ smalltext_out16(4, 1, "build: " __DATE__ " " __TIME__, PXMAKE(0xe0, 0xff, 0xe0));
}
static const char credits[] =