X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2F32x%2Fdraw.c;h=33947e6bf3dadc69b8139ab980b74f1415612fa2;hb=8a847c12e6a82869b7ff6f1742f53e0da1ad2db6;hp=48908d8335efda380f8a031d62a108f3d1cfc8a6;hpb=7a961c19baab782879b7428e9a467113603b31c1;p=picodrive.git diff --git a/pico/32x/draw.c b/pico/32x/draw.c index 48908d8..33947e6 100644 --- a/pico/32x/draw.c +++ b/pico/32x/draw.c @@ -1,3 +1,10 @@ +/* + * PicoDrive + * (C) notaz, 2009,2010 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include "../pico_int.h" int (*PicoScan32xBegin)(unsigned int num); @@ -75,6 +82,7 @@ static void convert_pal555(int invert_prio) } \ } +// this is almost never used (Wiz and menu bg gen only) void FinalizeLine32xRGB555(int sh, int line) { unsigned short *pd = DrawLineDest; @@ -299,20 +307,23 @@ void PicoDraw32xLayerMdOnly(int offs, int lines) } } -void PicoDraw32xSetFrameMode(int is_on, int only_32x) +void PicoDrawSetOutFormat32x(pdso_t which, int use_32x_line_mode) { #ifdef _ASM_32X_DRAW extern void *Pico32xNativePal; Pico32xNativePal = Pico32xMem->pal_native; #endif - if (is_on) { - // use the same layout as alt renderer - PicoDrawSetInternalBuf(PicoDraw2FB + 328*8, 328); - Pico32xDrawMode = only_32x ? PDM32X_32X_ONLY : PDM32X_BOTH; - } else { + if (which == PDF_RGB555 && use_32x_line_mode) { + // we'll draw via FinalizeLine32xRGB555 (rare) PicoDrawSetInternalBuf(NULL, 0); Pico32xDrawMode = PDM32X_OFF; + return; } + + // use the same layout as alt renderer + PicoDrawSetInternalBuf(PicoDraw2FB, 328); + Pico32xDrawMode = (which == PDF_RGB555) ? PDM32X_32X_ONLY : PDM32X_BOTH; } +// vim:shiftwidth=2:ts=2:expandtab