|
|
| version 1.5, 2004/01/31 20:05:24 | version 1.8, 2005/02/07 14:46:13 |
|---|---|
| Line 4 | Line 4 |
| // vram off | // vram off |
| static void SCRNCALL SDSYM(p_0)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(p_0)(SDRAW sdraw, int maxy) { |
| BYTE *p; | UINT8 *p; |
| int y; | int y; |
| int x; | int x; |
| Line 28 static void SCRNCALL SDSYM(p_0)(SDRAW sd | Line 28 static void SCRNCALL SDSYM(p_0)(SDRAW sd |
| // text or grph 1プレーン | // text or grph 1プレーン |
| static void SCRNCALL SDSYM(p_1)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(p_1)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| Line 56 const BYTE *p; | Line 56 const BYTE *p; |
| // text + grph | // text + grph |
| static void SCRNCALL SDSYM(p_2)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(p_2)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| const BYTE *q; | const UINT8 *q; |
| BYTE *r; | UINT8 *r; |
| int y; | int y; |
| int x; | int x; |
| Line 88 const BYTE *q; | Line 88 const BYTE *q; |
| // text + (grph:interleave) | // text + (grph:interleave) |
| static void SCRNCALL SDSYM(p_ti)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(p_ti)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| Line 127 const BYTE *p; | Line 127 const BYTE *p; |
| // grph:interleave | // grph:interleave |
| static void SCRNCALL SDSYM(p_gi)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(p_gi)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| Line 166 const BYTE *p; | Line 166 const BYTE *p; |
| // text + grph:interleave | // text + grph:interleave |
| static void SCRNCALL SDSYM(p_2i)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(p_2i)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| const BYTE *q; | const UINT8 *q; |
| BYTE *r; | UINT8 *r; |
| int y; | int y; |
| int x; | int x; |
| Line 209 const BYTE *q; | Line 209 const BYTE *q; |
| // grph:interleave ex | // grph:interleave ex |
| static void SCRNCALL SDSYM(p_gie)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(p_gie)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| Line 248 const BYTE *p; | Line 248 const BYTE *p; |
| // text + grph:interleave ex | // text + grph:interleave ex |
| static void SCRNCALL SDSYM(p_2ie)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(p_2ie)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| const BYTE *q; | const UINT8 *q; |
| BYTE *r; | UINT8 *r; |
| int y; | int y; |
| int x; | int x; |
| BYTE c; | UINT8 c; |
| p = sdraw->src; | p = sdraw->src; |
| q = sdraw->src2; | q = sdraw->src2; |
| Line 294 const BYTE *q; | Line 294 const BYTE *q; |
| sdraw->y = y; | sdraw->y = y; |
| } | } |
| #if defined(SUPPORT_CRT15KHZ) | |
| // text or grph 1プレーン(15kHz) | |
| static void SCRNCALL SDSYM(p_1d)(SDRAW sdraw, int maxy) { | |
| const UINT8 *p; | |
| UINT8 *q; | |
| int a; | |
| int y; | |
| int x; | |
| int c; | |
| p = sdraw->src; | |
| q = sdraw->dst; | |
| a = sdraw->yalign; | |
| y = sdraw->y; | |
| do { | |
| if (sdraw->dirty[y]) { | |
| for (x=0; x<sdraw->width; x++) { | |
| c = p[x] + NP2PAL_GRPH; | |
| SDSETPIXEL(q, c); | |
| SDSETPIXEL((q + a), c); | |
| q += sdraw->xalign; | |
| } | |
| q -= sdraw->xbytes; | |
| } | |
| p += SURFACE_WIDTH; | |
| q += a * 2; | |
| } while(++y < maxy); | |
| sdraw->src = p; | |
| sdraw->dst = q; | |
| sdraw->y = y; | |
| } | |
| // text + grph (15kHz) | |
| static void SCRNCALL SDSYM(p_2d)(SDRAW sdraw, int maxy) { | |
| const UINT8 *p; | |
| const UINT8 *q; | |
| UINT8 *r; | |
| int a; | |
| int y; | |
| int x; | |
| int c; | |
| p = sdraw->src; | |
| q = sdraw->src2; | |
| r = sdraw->dst; | |
| a = sdraw->yalign; | |
| y = sdraw->y; | |
| do { | |
| if (sdraw->dirty[y]) { | |
| for (x=0; x<sdraw->width; x++) { | |
| c = p[x] + q[x] + NP2PAL_GRPH; | |
| SDSETPIXEL(r, c); | |
| SDSETPIXEL((r + a), c); | |
| r += sdraw->xalign; | |
| } | |
| r -= sdraw->xbytes; | |
| } | |
| p += SURFACE_WIDTH; | |
| q += SURFACE_WIDTH; | |
| r += a * 2; | |
| } while(++y < maxy); | |
| sdraw->src = p; | |
| sdraw->src2 = q; | |
| sdraw->dst = r; | |
| sdraw->y = y; | |
| } | |
| #endif | |
| static const SDRAWFN SDSYM(p)[] = { | static const SDRAWFN SDSYM(p)[] = { |
| SDSYM(p_0), SDSYM(p_1), SDSYM(p_1), SDSYM(p_2), | SDSYM(p_0), SDSYM(p_1), SDSYM(p_1), SDSYM(p_2), |
| SDSYM(p_0), SDSYM(p_ti), SDSYM(p_gi), SDSYM(p_2i), | SDSYM(p_0), SDSYM(p_ti), SDSYM(p_gi), SDSYM(p_2i), |
| SDSYM(p_0), SDSYM(p_ti), SDSYM(p_gie), SDSYM(p_2ie)}; | SDSYM(p_0), SDSYM(p_ti), SDSYM(p_gie), SDSYM(p_2ie), |
| #if defined(SUPPORT_CRT15KHZ) | |
| SDSYM(p_0), SDSYM(p_1d), SDSYM(p_1d), SDSYM(p_2d), | |
| #endif | |
| }; | |
| // ---- normal display | // ---- normal display |
| Line 307 static const SDRAWFN SDSYM(p)[] = { | Line 382 static const SDRAWFN SDSYM(p)[] = { |
| // vram off | // vram off |
| static void SCRNCALL SDSYM(n_0)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(n_0)(SDRAW sdraw, int maxy) { |
| BYTE *p; | UINT8 *p; |
| int y; | int y; |
| int x; | int x; |
| Line 332 static void SCRNCALL SDSYM(n_0)(SDRAW sd | Line 407 static void SCRNCALL SDSYM(n_0)(SDRAW sd |
| // text 1プレーン | // text 1プレーン |
| static void SCRNCALL SDSYM(n_t)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(n_t)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| Line 363 const BYTE *p; | Line 438 const BYTE *p; |
| // grph 1プレーン | // grph 1プレーン |
| static void SCRNCALL SDSYM(n_g)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(n_g)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| Line 392 const BYTE *p; | Line 467 const BYTE *p; |
| // text + grph | // text + grph |
| static void SCRNCALL SDSYM(n_2)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(n_2)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| const BYTE *q; | const UINT8 *q; |
| BYTE *r; | UINT8 *r; |
| int y; | int y; |
| int x; | int x; |
| Line 427 const BYTE *q; | Line 502 const BYTE *q; |
| // text + (grph:interleave) | // text + (grph:interleave) |
| static void SCRNCALL SDSYM(n_ti)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(n_ti)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| Line 472 const BYTE *p; | Line 547 const BYTE *p; |
| // grph:interleave | // grph:interleave |
| static void SCRNCALL SDSYM(n_gi)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(n_gi)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| Line 513 const BYTE *p; | Line 588 const BYTE *p; |
| // text + grph:interleave | // text + grph:interleave |
| static void SCRNCALL SDSYM(n_2i)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(n_2i)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| const BYTE *q; | const UINT8 *q; |
| BYTE *r; | UINT8 *r; |
| int y; | int y; |
| int x; | int x; |
| Line 563 const BYTE *q; | Line 638 const BYTE *q; |
| // grph:interleave ex | // grph:interleave ex |
| static void SCRNCALL SDSYM(n_gie)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(n_gie)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int y; | int y; |
| int x; | int x; |
| Line 586 const BYTE *p; | Line 661 const BYTE *p; |
| if (sdraw->dirty[y+1]) { | if (sdraw->dirty[y+1]) { |
| SDSETPIXEL(q, NP2PAL_TEXT3); | SDSETPIXEL(q, NP2PAL_TEXT3); |
| for (x=0; x<sdraw->width; x++) { | for (x=0; x<sdraw->width; x++) { |
| SDSETPIXEL(q, p[x] + NP2PAL_SKIP); | |
| q += sdraw->xalign; | q += sdraw->xalign; |
| SDSETPIXEL(q, p[x] + NP2PAL_SKIP); | |
| } | } |
| q -= sdraw->xbytes; | q -= sdraw->xbytes; |
| } | } |
| Line 604 const BYTE *p; | Line 679 const BYTE *p; |
| // text + grph:interleave ex | // text + grph:interleave ex |
| static void SCRNCALL SDSYM(n_2ie)(SDRAW sdraw, int maxy) { | static void SCRNCALL SDSYM(n_2ie)(SDRAW sdraw, int maxy) { |
| const BYTE *p; | const UINT8 *p; |
| const BYTE *q; | const UINT8 *q; |
| BYTE *r; | UINT8 *r; |
| int y; | int y; |
| int x; | int x; |
| BYTE c; | UINT8 c; |
| p = sdraw->src; | p = sdraw->src; |
| q = sdraw->src2; | q = sdraw->src2; |
| Line 656 const BYTE *q; | Line 731 const BYTE *q; |
| sdraw->y = y; | sdraw->y = y; |
| } | } |
| #if defined(SUPPORT_CRT15KHZ) | |
| // text 1プレーン (15kHz) | |
| static void SCRNCALL SDSYM(n_td)(SDRAW sdraw, int maxy) { | |
| const UINT8 *p; | |
| UINT8 *q; | |
| int a; | |
| int y; | |
| int x; | |
| int c; | |
| p = sdraw->src; | |
| q = sdraw->dst; | |
| a = sdraw->yalign; | |
| y = sdraw->y; | |
| do { | |
| if (sdraw->dirty[y]) { | |
| c = p[0] + NP2PAL_TEXT3; | |
| SDSETPIXEL(q, c); | |
| SDSETPIXEL((q + a), c); | |
| q += sdraw->xalign; | |
| for (x=1; x<sdraw->width; x++) { | |
| c = p[x] + NP2PAL_GRPH; | |
| SDSETPIXEL(q, c); | |
| SDSETPIXEL((q + a), c); | |
| q += sdraw->xalign; | |
| } | |
| SDSETPIXEL(q, NP2PAL_TEXT2); | |
| SDSETPIXEL((q + a), NP2PAL_TEXT2); | |
| q -= sdraw->xbytes; | |
| } | |
| p += SURFACE_WIDTH; | |
| q += a * 2; | |
| } while(++y < maxy); | |
| sdraw->src = p; | |
| sdraw->dst = q; | |
| sdraw->y = y; | |
| } | |
| // grph 1プレーン (15kHz) | |
| static void SCRNCALL SDSYM(n_gd)(SDRAW sdraw, int maxy) { | |
| const UINT8 *p; | |
| UINT8 *q; | |
| int a; | |
| int y; | |
| int x; | |
| int c; | |
| p = sdraw->src; | |
| q = sdraw->dst; | |
| a = sdraw->yalign; | |
| y = sdraw->y; | |
| do { | |
| if (sdraw->dirty[y]) { | |
| SDSETPIXEL(q, NP2PAL_TEXT3); | |
| SDSETPIXEL((q + a), NP2PAL_TEXT3); | |
| for (x=0; x<sdraw->width; x++) { | |
| q += sdraw->xalign; | |
| c = p[x] + NP2PAL_GRPH; | |
| SDSETPIXEL(q, c); | |
| SDSETPIXEL((q + a), c); | |
| } | |
| q -= sdraw->xbytes; | |
| } | |
| p += SURFACE_WIDTH; | |
| q += a * 2; | |
| } while(++y < maxy); | |
| sdraw->src = p; | |
| sdraw->dst = q; | |
| sdraw->y = y; | |
| } | |
| // text + grph (15kHz) | |
| static void SCRNCALL SDSYM(n_2d)(SDRAW sdraw, int maxy) { | |
| const UINT8 *p; | |
| const UINT8 *q; | |
| UINT8 *r; | |
| int a; | |
| int y; | |
| int x; | |
| int c; | |
| p = sdraw->src; | |
| q = sdraw->src2; | |
| r = sdraw->dst; | |
| a = sdraw->yalign; | |
| y = sdraw->y; | |
| do { | |
| if (sdraw->dirty[y]) { | |
| c = (q[0] >> 4) + NP2PAL_TEXT3; | |
| SDSETPIXEL(r, c); | |
| SDSETPIXEL((r + a), c); | |
| r += sdraw->xalign; | |
| for (x=1; x<sdraw->width; x++) { | |
| c = p[x-1] + q[x] + NP2PAL_GRPH; | |
| SDSETPIXEL(r, c); | |
| SDSETPIXEL((r + a), c); | |
| r += sdraw->xalign; | |
| } | |
| c = p[x-1] + NP2PAL_GRPH; | |
| SDSETPIXEL(r, c); | |
| SDSETPIXEL((r + a), c); | |
| r -= sdraw->xbytes; | |
| } | |
| p += SURFACE_WIDTH; | |
| q += SURFACE_WIDTH; | |
| r += a * 2; | |
| } while(++y < maxy); | |
| sdraw->src = p; | |
| sdraw->src2 = q; | |
| sdraw->dst = r; | |
| sdraw->y = y; | |
| } | |
| #endif | |
| static const SDRAWFN SDSYM(n)[] = { | static const SDRAWFN SDSYM(n)[] = { |
| SDSYM(n_0), SDSYM(n_t), SDSYM(n_g), SDSYM(n_2), | SDSYM(n_0), SDSYM(n_t), SDSYM(n_g), SDSYM(n_2), |
| SDSYM(n_0), SDSYM(n_ti), SDSYM(n_gi), SDSYM(n_2i), | SDSYM(n_0), SDSYM(n_ti), SDSYM(n_gi), SDSYM(n_2i), |
| SDSYM(n_0), SDSYM(n_ti), SDSYM(n_gie), SDSYM(n_2ie)}; | SDSYM(n_0), SDSYM(n_ti), SDSYM(n_gie), SDSYM(n_2ie), |
| #if defined(SUPPORT_CRT15KHZ) | |
| SDSYM(n_0), SDSYM(n_td), SDSYM(n_gd), SDSYM(n_2d), | |
| #endif | |
| }; | |
| #endif | #endif |