|
|
| version 1.1, 2003/11/21 06:51:14 | version 1.4, 2005/02/07 14:46:13 |
|---|---|
| Line 5 | Line 5 |
| #include "palettes.h" | #include "palettes.h" |
| #if defined(SIZE_QVGA) && defined(SUPPORT_16BPP) | #if defined(SIZE_QVGA) && !defined(SIZE_VGATEST) && defined(SUPPORT_16BPP) |
| // vram off | // vram off |
| static void SCRNCALL qvga16p_0(SDRAW sdraw, int maxy) { | static void SCRNCALL qvga16p_0(SDRAW sdraw, int maxy) { |
| Line 13 static void SCRNCALL qvga16p_0(SDRAW sdr | Line 13 static void SCRNCALL qvga16p_0(SDRAW sdr |
| int xbytes; | int xbytes; |
| UINT32 palwork; | UINT32 palwork; |
| UINT16 pal; | UINT16 pal; |
| BYTE *p; | UINT8 *p; |
| int y; | int y; |
| int x; | int x; |
| Line 42 static void SCRNCALL qvga16p_0(SDRAW sdr | Line 42 static void SCRNCALL qvga16p_0(SDRAW sdr |
| static void SCRNCALL qvga16p_1(SDRAW sdraw, int maxy) { | static void SCRNCALL qvga16p_1(SDRAW sdraw, int maxy) { |
| int xbytes; | int xbytes; |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| UINT32 work; | UINT32 work; |
| Line 79 const BYTE *p; | Line 79 const BYTE *p; |
| static void SCRNCALL qvga16p_2(SDRAW sdraw, int maxy) { | static void SCRNCALL qvga16p_2(SDRAW sdraw, int maxy) { |
| int xbytes; | int xbytes; |
| const BYTE *p; | const UINT8 *p; |
| const BYTE *q; | const UINT8 *q; |
| BYTE *r; | UINT8 *r; |
| int y; | int y; |
| int x; | int x; |
| UINT32 work; | UINT32 work; |
| Line 124 const BYTE *q; | Line 124 const BYTE *q; |
| static void SCRNCALL qvga16p_gi(SDRAW sdraw, int maxy) { | static void SCRNCALL qvga16p_gi(SDRAW sdraw, int maxy) { |
| int xbytes; | int xbytes; |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| UINT32 work; | UINT32 work; |
| Line 159 const BYTE *p; | Line 159 const BYTE *p; |
| static void SCRNCALL qvga16p_2i(SDRAW sdraw, int maxy) { | static void SCRNCALL qvga16p_2i(SDRAW sdraw, int maxy) { |
| int xbytes; | int xbytes; |
| const BYTE *p; | const UINT8 *p; |
| const BYTE *q; | const UINT8 *q; |
| BYTE *r; | UINT8 *r; |
| int y; | int y; |
| int x; | int x; |
| UINT32 work; | UINT32 work; |
| Line 208 const BYTE *q; | Line 208 const BYTE *q; |
| sdraw->y = y; | sdraw->y = y; |
| } | } |
| #if defined(SUPPORT_CRT15KHZ) | |
| // text or grph 1¥×¥ì¡¼¥ó (15kHz) | |
| static void SCRNCALL qvga16p_1d(SDRAW sdraw, int maxy) { | |
| int xbytes; | |
| const UINT8 *p; | |
| UINT8 *q; | |
| int y; | |
| int x; | |
| UINT32 work; | |
| xbytes = sdraw->xalign * sdraw->width / 2; | |
| p = sdraw->src; | |
| q = sdraw->dst; | |
| y = sdraw->y; | |
| do { | |
| if (sdraw->dirty[y]) { | |
| for (x=0; x<sdraw->width; x+=2) { | |
| work = np2_pal16[p[x+0] + NP2PAL_GRPH]; | |
| work += np2_pal16[p[x+1] + NP2PAL_GRPH]; | |
| work &= 0x07e0f81f << 1; | |
| *(UINT16 *)q = (UINT16)((work >> 1) + (work >> 17)); | |
| q += sdraw->xalign; | |
| } | |
| q -= xbytes; | |
| } | |
| p += SURFACE_WIDTH; | |
| q += sdraw->yalign; | |
| } while(++y < maxy); | |
| sdraw->src = p; | |
| sdraw->dst = q; | |
| sdraw->y = y; | |
| } | |
| // text + grph (15kHz) | |
| static void SCRNCALL qvga16p_2d(SDRAW sdraw, int maxy) { | |
| int xbytes; | |
| const UINT8 *p; | |
| const UINT8 *q; | |
| UINT8 *r; | |
| int y; | |
| int x; | |
| UINT32 work; | |
| xbytes = sdraw->xalign * sdraw->width / 2; | |
| p = sdraw->src; | |
| q = sdraw->src2; | |
| r = sdraw->dst; | |
| y = sdraw->y; | |
| do { | |
| if (sdraw->dirty[y]) { | |
| for (x=0; x<sdraw->width; x+=2) { | |
| work = np2_pal16[p[x+0] + q[x+0] + NP2PAL_GRPH]; | |
| work += np2_pal16[p[x+1] + q[x+1] + NP2PAL_GRPH]; | |
| work &= 0x07e0f81f << 1; | |
| *(UINT16 *)r = (UINT16)((work >> 1) + (work >> 17)); | |
| r += sdraw->xalign; | |
| } | |
| r -= xbytes; | |
| } | |
| p += SURFACE_WIDTH; | |
| q += SURFACE_WIDTH; | |
| r += sdraw->yalign; | |
| } while(++y < maxy); | |
| sdraw->src = p; | |
| sdraw->src2 = q; | |
| sdraw->dst = r; | |
| sdraw->y = y; | |
| } | |
| #endif | |
| static const SDRAWFN qvga16p[] = { | static const SDRAWFN qvga16p[] = { |
| qvga16p_0, qvga16p_1, qvga16p_1, qvga16p_2, | qvga16p_0, qvga16p_1, qvga16p_1, qvga16p_2, |
| qvga16p_0, qvga16p_1, qvga16p_gi, qvga16p_2i, | qvga16p_0, qvga16p_1, qvga16p_gi, qvga16p_2i, |
| qvga16p_0, qvga16p_1, qvga16p_gi, qvga16p_2i}; | qvga16p_0, qvga16p_1, qvga16p_gi, qvga16p_2i, |
| #if defined(SUPPORT_CRT15KHZ) | |
| qvga16p_0, qvga16p_1d, qvga16p_1d, qvga16p_2d, | |
| #endif | |
| }; | |
| const SDRAWFN *sdraw_getproctbl(const SCRNSURF *surf) { | const SDRAWFN *sdraw_getproctbl(const SCRNSURF *surf) { |