|
|
| version 1.1, 2003/10/16 17:58:14 | version 1.5, 2004/02/29 03:10:03 |
|---|---|
| Line 4 | Line 4 |
| #include "sdraw.h" | #include "sdraw.h" |
| #include "palettes.h" | #include "palettes.h" |
| #if !defined(SIZE_QVGA) || defined(SIZE_VGATEST) | |
| #if defined(SUPPORT_8BPP) | #if defined(SUPPORT_8BPP) |
| #define SDSYM(sym) sdraw8##sym | #define SDSYM(sym) sdraw8##sym |
| Line 17 | Line 18 |
| #define SDSYM(sym) sdraw16##sym | #define SDSYM(sym) sdraw16##sym |
| #define SDSETPIXEL(ptr, pal) *(UINT16 *)(ptr) = np2_pal16[(pal)] | #define SDSETPIXEL(ptr, pal) *(UINT16 *)(ptr) = np2_pal16[(pal)] |
| #include "sdraw.mcr" | #include "sdraw.mcr" |
| #include "sdrawex.mcr" | |
| #undef SDSYM | #undef SDSYM |
| #undef SDSETPIXEL | #undef SDSETPIXEL |
| #endif | #endif |
| Line 27 | Line 29 |
| (ptr)[RGB24_G] = np2_pal32[(pal)].p.g; \ | (ptr)[RGB24_G] = np2_pal32[(pal)].p.g; \ |
| (ptr)[RGB24_B] = np2_pal32[(pal)].p.b | (ptr)[RGB24_B] = np2_pal32[(pal)].p.b |
| #include "sdraw.mcr" | #include "sdraw.mcr" |
| #include "sdrawex.mcr" | |
| #undef SDSYM | #undef SDSYM |
| #undef SDSETPIXEL | #undef SDSETPIXEL |
| #endif | #endif |
| Line 35 | Line 38 |
| #define SDSYM(sym) sdraw32##sym | #define SDSYM(sym) sdraw32##sym |
| #define SDSETPIXEL(ptr, pal) *(UINT32 *)(ptr) = np2_pal32[(pal)].d | #define SDSETPIXEL(ptr, pal) *(UINT32 *)(ptr) = np2_pal32[(pal)].d |
| #include "sdraw.mcr" | #include "sdraw.mcr" |
| #include "sdrawex.mcr" | |
| #undef SDSYM | #undef SDSYM |
| #undef SDSETPIXEL | #undef SDSETPIXEL |
| #endif | #endif |
| Line 88 static const SDRAWFN *tbl[] = { | Line 92 static const SDRAWFN *tbl[] = { |
| #endif | #endif |
| }; | }; |
| const SDRAWFN *sdraw_getproctbl(const SCRNSURF *surf) { | const SDRAWFN *sdraw_getproctbl(const SCRNSURF *surf) { |
| int proc; | int proc; |
| proc = ((surf->bpp >> 3) - 1) & 3; | proc = ((surf->bpp >> 3) - 1) & 3; |
| #if defined(SUPPORT_NORMALDISP) | |
| if (surf->extend) { | |
| proc += 4; | |
| } | |
| #endif | |
| return(tbl[proc]); | return(tbl[proc]); |
| } | } |
| // ---- PC-9821 | |
| #if defined(SUPPORT_PC9821) | |
| static const SDRAWFN *tblex[] = { | |
| NULL, | |
| #if defined(SUPPORT_16BPP) | |
| sdraw16pex, | |
| #else | |
| NULL, | |
| #endif | |
| #if defined(SUPPORT_24BPP) | |
| sdraw24pex, | |
| #else | |
| NULL, | |
| #endif | |
| #if defined(SUPPORT_32BPP) | |
| sdraw32pex, | |
| #else | |
| NULL, | |
| #endif | |
| #if defined(SUPPORT_NORMALDISP) | |
| NULL, | |
| #if defined(SUPPORT_16BPP) | |
| sdraw16nex, | |
| #else | |
| NULL, | |
| #endif | |
| #if defined(SUPPORT_24BPP) | |
| sdraw24nex, | |
| #else | |
| NULL, | |
| #endif | |
| #if defined(SUPPORT_32BPP) | |
| sdraw32nex, | |
| #else | |
| NULL, | |
| #endif | |
| #endif | |
| }; | |
| const SDRAWFN *sdraw_getproctblex(const SCRNSURF *surf) { | |
| int proc; | |
| proc = ((surf->bpp >> 3) - 1) & 3; | |
| #if defined(SUPPORT_NORMALDISP) | |
| if (surf->extend) { | |
| proc += 4; | |
| } | |
| #endif | |
| return(tblex[proc]); | |
| } | |
| #endif | |
| #endif | |