--- xmil/vram/scrnsave.c 2004/08/17 12:30:41 1.1 +++ xmil/vram/scrnsave.c 2004/08/18 08:08:13 1.2 @@ -5,6 +5,7 @@ #include "iocore.h" #include "scrndraw.h" #include "palettes.h" +#include "makescrn.h" #include "scrnsave.h" @@ -29,16 +30,79 @@ typedef struct { } SCRNDATA; -static void screenmix80(PALNUM *dst, const UINT8 *src) { +static void screenmix32s(PALNUM *dst, const UINT8 *src) { - int i; + int y; + int x; + REG8 c; - for (i=0; i<(SURFACE_WIDTH * SURFACE_HEIGHT); i++) { - dst[i] = src[i]; + for (y=0; y<(SURFACE_HEIGHT/2); y++) { + for (x=0; x<(SURFACE_WIDTH/2); x++) { + c = src[x]; + dst[x*2+0] = (PALNUM)c; + dst[x*2+1] = (PALNUM)c; + dst[x*2+SURFACE_WIDTH+0] = (PALNUM)(c + 0x40); + dst[x*2+SURFACE_WIDTH+1] = (PALNUM)(c + 0x40); + } + dst += SURFACE_WIDTH * 2; + src += SURFACE_WIDTH * 2; + } +} + +static void screenmix62s(PALNUM *dst, const UINT8 *src) { + + int y; + int x; + REG8 c; + + for (y=0; y<(SURFACE_HEIGHT/2); y++) { + for (x=0; xdat; scrnsize = SURFACE_WIDTH * SURFACE_HEIGHT; - switch(scrn.widthmode) { - case SCRNWIDTHMODE_WIDTH80: - default: - mix = screenmix80; - break; - - case SCRNWIDTHMODE_WIDTH40: - mix = screenmix40; - break; - -#if defined(SUPPORT_TURBOZ) - case SCRNWIDTHMODE_4096: - mix = screenmixz; - break; -#endif - } - (*mix)(sd->dat, screenmap); + scmix[makescrn.drawmode](sd->dat, screenmap); // パレット最適化 s = sd->dat;