--- xmil/vram/sdraw.mcr 2004/08/17 12:30:41 1.2 +++ xmil/vram/sdraw.mcr 2004/08/18 08:08:13 1.3 @@ -1,32 +1,155 @@ -static void SCRNCALL SDSYM(x1)(SDRAW sdraw, int maxy) { +// ---- 200line 15khz + +static void SCRNCALL SDSYM(_32S)(SDRAW sdraw, int maxy) { const UINT8 *p; UINT8 *q; + int a; int y; + int xmax; int x; + UINT c; + + p = sdraw->src; + q = sdraw->dst; + a = sdraw->yalign; + y = sdraw->y; + do { + if (sdraw->dirty[y]) { + xmax = sdraw->width / 2; + for (x=0; xxalign; + SDSETPIXEL(q, c); + SDSETPIXEL(q + a, c + 0x40); + q += sdraw->xalign; + } + q -= sdraw->xbytes; + } + p += SURFACE_WIDTH * 2; + q += a * 2; + y += 2; + } while(y < maxy); + + sdraw->src = p; + sdraw->dst = q; + sdraw->y = y; +} + +static void SCRNCALL SDSYM(_62S)(SDRAW sdraw, int maxy) { + +const UINT8 *p; + UINT8 *q; + int a; + int y; + int x; + UINT c; p = sdraw->src; q = sdraw->dst; + a = sdraw->yalign; y = sdraw->y; do { if (sdraw->dirty[y]) { for (x=0; xwidth; x++) { - SDSETPIXEL(q, p[x]); + c = p[x]; + SDSETPIXEL(q, c); + SDSETPIXEL(q + a, c + 0x40); q += sdraw->xalign; } q -= sdraw->xbytes; } - p += SURFACE_WIDTH; - q += sdraw->yalign; - } while(++y < maxy); + p += SURFACE_WIDTH * 2; + q += a * 2; + y += 2; + } while(y < maxy); + + sdraw->src = p; + sdraw->dst = q; + sdraw->y = y; +} + + +// ---- 200line 24khz + +static void SCRNCALL SDSYM(_32H)(SDRAW sdraw, int maxy) { + +const UINT8 *p; + UINT8 *q; + int a; + int y; + int xmax; + int x; + UINT c; + + p = sdraw->src; + q = sdraw->dst; + a = sdraw->yalign; + y = sdraw->y; + do { + if (sdraw->dirty[y]) { + xmax = sdraw->width / 2; + for (x=0; xxalign; + SDSETPIXEL(q, c); + SDSETPIXEL(q + a, c); + q += sdraw->xalign; + } + q -= sdraw->xbytes; + } + p += SURFACE_WIDTH * 2; + q += a * 2; + y += 2; + } while(y < maxy); + + sdraw->src = p; + sdraw->dst = q; + sdraw->y = y; +} + +static void SCRNCALL SDSYM(_62H)(SDRAW sdraw, int maxy) { + +const UINT8 *p; + UINT8 *q; + int a; + int y; + int x; + UINT c; + + p = sdraw->src; + q = sdraw->dst; + a = sdraw->yalign; + y = sdraw->y; + do { + if (sdraw->dirty[y]) { + for (x=0; xwidth; x++) { + c = p[x]; + SDSETPIXEL(q, c); + SDSETPIXEL(q + a, c); + q += sdraw->xalign; + } + q -= sdraw->xbytes; + } + p += SURFACE_WIDTH * 2; + q += a * 2; + y += 2; + } while(y < maxy); sdraw->src = p; sdraw->dst = q; sdraw->y = y; } -static void SCRNCALL SDSYM(x2)(SDRAW sdraw, int maxy) { + +// ---- 400line 24khz + +static void SCRNCALL SDSYM(_34)(SDRAW sdraw, int maxy) { const UINT8 *p; UINT8 *q; @@ -59,6 +182,36 @@ const UINT8 *p; sdraw->y = y; } +static void SCRNCALL SDSYM(_64)(SDRAW sdraw, int maxy) { + +const UINT8 *p; + UINT8 *q; + int y; + int x; + + p = sdraw->src; + q = sdraw->dst; + y = sdraw->y; + do { + if (sdraw->dirty[y]) { + for (x=0; xwidth; x++) { + SDSETPIXEL(q, p[x]); + q += sdraw->xalign; + } + q -= sdraw->xbytes; + } + p += SURFACE_WIDTH; + q += sdraw->yalign; + } while(++y < maxy); + + sdraw->src = p; + sdraw->dst = q; + sdraw->y = y; +} + + +// ---- + #if defined(SUPPORT_TURBOZ) && defined(SDZMODE) static void SCRNCALL SDSYM(z)(SDRAW sdraw, int maxy) { @@ -98,7 +251,9 @@ const UINT8 *p; // ---- static const SDRAWFN SDSYM(p)[] = { - SDSYM(x1), SDSYM(x2), + SDSYM(_32S), SDSYM(_62S), + SDSYM(_32H), SDSYM(_62H), + SDSYM(_34), SDSYM(_64), #if defined(SUPPORT_TURBOZ) #if defined(SDZMODE) SDSYM(z)