From 0aa509f90d056abafd8a9114f11a9ae3df0bfefb Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 28 Jul 2009 18:50:35 +0000 Subject: [PATCH] update for recent /gp2x changes git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@718 be3aeb3a-fb24-0410-a615-afba39da0efa --- linux/blit.c | 45 ++++++++++++++++++++++++--------------------- linux/gp2x.c | 5 +++++ 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/linux/blit.c b/linux/blit.c index a4981d9..7f46623 100644 --- a/linux/blit.c +++ b/linux/blit.c @@ -1,6 +1,7 @@ // Convert 0000bbb0 ggg0rrr0 0000bbb0 ggg0rrr0 // to 00000000 rrr00000 ggg00000 bbb00000 ... +// TODO: rm when gp2x/emu.c is no longer used void vidConvCpyRGB32 (void *to, void *from, int pixels) { @@ -45,37 +46,39 @@ void vidConvCpyRGB32hi(void *to, void *from, int pixels) } } -void vidCpyM2_40col(void *dest, void *src) +void vidcpy_m2(void *dest, void *src, int m32col, int with_32c_border) { unsigned char *pd = dest, *ps = src; int i, u; - for (i = 0; i < 224; i++) - { - ps += 8; - for (u = 0; u < 320; u++) - *pd++ = *ps++; + if (m32col) { + for (i = 0; i < 224; i++) + { + ps += 8; + pd += 32; + for (u = 0; u < 256; u++) + *pd++ = *ps++; + ps += 64; + pd += 32; + } + } else { + for (i = 0; i < 224; i++) + { + ps += 8; + for (u = 0; u < 320; u++) + *pd++ = *ps++; + } } } -void vidCpyM2_32col(void *dest, void *src) +void vidcpy_m2_rot(void *dest, void *src, int m32col, int with_32c_border) { - unsigned char *pd = dest, *ps = src; - int i, u; - - for (i = 0; i < 224; i++) - { - ps += 8; - pd += 32; - for (u = 0; u < 256; u++) - *pd++ = *ps++; - ps += 64; - pd += 32; - } } -void vidCpyM2_32col_nobord(void *dest, void *src) +void rotated_blit8 (void *dst, void *linesx4, int y, int is_32col) { - vidCpyM2_32col(dest, src); } +void rotated_blit16(void *dst, void *linesx4, int y, int is_32col) +{ +} diff --git a/linux/gp2x.c b/linux/gp2x.c index bcd7c7c..c00671a 100644 --- a/linux/gp2x.c +++ b/linux/gp2x.c @@ -25,6 +25,7 @@ static int current_bpp = 8; static int current_pal[256]; static const char *verstring = "PicoDrive " VERSION; static int scr_changed = 0, scr_w = SCREEN_WIDTH, scr_h = SCREEN_HEIGHT; +void *gp2x_screens[4]; // dummies int mix_32_to_16l_level; @@ -206,11 +207,15 @@ void finalize_image(guchar *pixels, gpointer data) static void realloc_screen(void) { void *old = g_screen_ptr; + int i; g_screen_width = scr_w; g_screen_height = scr_h; g_screen_ptr = calloc(g_screen_width * g_screen_height * 2, 1); free(old); scr_changed = 0; + + for (i = 0; i < 4; i++) + gp2x_screens[i] = g_screen_ptr; } /* gp2x/emu.c stuff, most to be rm'd */ -- 2.39.5