|
|
| version 1.6, 2004/04/05 09:45:06 | version 1.9, 2005/02/07 14:46:10 |
|---|---|
| Line 2 | Line 2 |
| #ifndef __CMNDRAW | #ifndef __CMNDRAW |
| #define __CMNDRAW | #define __CMNDRAW |
| struct _cmnpalfn { | |
| BYTE (*get8)(struct _cmnpalfn *fn, UINT num); | |
| UINT32 (*get32)(struct _cmnpalfn *fn, UINT num); | |
| UINT16 (*cnv16)(struct _cmnpalfn *fn, RGB32 pal32); | |
| long userdata; | |
| }; | |
| typedef struct _cmnpalfn CMNPALFN; | |
| typedef struct { | |
| UINT8 pal8; | |
| UINT8 padding; | |
| UINT16 pal16; | |
| RGB32 pal32; | |
| } CMNPALS; | |
| typedef union { | typedef union { |
| RGB32 pal32; | RGB32 pal32; |
| UINT16 pal16; | UINT16 pal16; |
| Line 25 typedef union { | Line 9 typedef union { |
| } CMNPAL; | } CMNPAL; |
| typedef struct { | typedef struct { |
| BYTE *ptr; | UINT8 *ptr; |
| int width; | int width; |
| int height; | int height; |
| int xalign; | int xalign; |
| Line 39 typedef void (*CMNPALCNV)(CMNPAL *dst, c | Line 23 typedef void (*CMNPALCNV)(CMNPAL *dst, c |
| extern "C" { | extern "C" { |
| #endif | #endif |
| void cmndraw_getpals(CMNPALFN *fn, CMNPALS *pal, UINT pals); | |
| void cmndraw_makegrad(RGB32 *pal, int pals, RGB32 bg, RGB32 fg); | void cmndraw_makegrad(RGB32 *pal, int pals, RGB32 bg, RGB32 fg); |
| #if defined(SUPPORT_8BPP) | void cmndraw_fill(const CMNVRAM *vram, int x, int y, |
| void cmndraw8_fill(const CMNVRAM *vram, int x, int y, | |
| int cx, int cy, BYTE fg); | |
| void cmndraw8_setfg(const CMNVRAM *vram, const BYTE *src, | |
| int x, int y, BYTE fg); | |
| void cmndraw8_setpat(const CMNVRAM *vram, const BYTE *src, | |
| int x, int y, BYTE bg, BYTE fg); | |
| #endif | |
| #if defined(SUPPORT_16BPP) | |
| void cmndraw16_fill(const CMNVRAM *vram, int x, int y, | |
| int cx, int cy, UINT16 fg); | |
| void cmndraw16_setfg(const CMNVRAM *vram, const BYTE *src, | |
| int x, int y, UINT16 fg); | |
| void cmndraw16_setpat(const CMNVRAM *vram, const BYTE *src, | |
| int x, int y, UINT16 bg, UINT16 fg); | |
| #endif | |
| #if defined(SUPPORT_24BPP) | |
| void cmndraw24_fill(const CMNVRAM *vram, int x, int y, | |
| int cx, int cy, RGB32 fg); | |
| void cmndraw24_setfg(const CMNVRAM *vram, const BYTE *src, | |
| int x, int y, RGB32 fg); | |
| void cmndraw24_setpat(const CMNVRAM *vram, const BYTE *src, | |
| int x, int y, RGB32 bg, RGB32 fg); | |
| #endif | |
| #if defined(SUPPORT_32BPP) | |
| void cmndraw32_fill(const CMNVRAM *vram, int x, int y, | |
| int cx, int cy, RGB32 fg); | |
| void cmndraw32_setfg(const CMNVRAM *vram, const BYTE *src, | |
| int x, int y, RGB32 fg); | |
| void cmndraw32_setpat(const CMNVRAM *vram, const BYTE *src, | |
| int x, int y, RGB32 bg, RGB32 fg); | |
| #endif | |
| // ---- | |
| void cmddraw_fill(CMNVRAM *vram, int x, int y, int cx, int cy, CMNPALS *pal); | |
| void cmndraw_fill2(const CMNVRAM *vram, int x, int y, | |
| int cx, int cy, CMNPAL fg); | int cx, int cy, CMNPAL fg); |
| void cmndraw_setfg2(const CMNVRAM *vram, const BYTE *src, | void cmndraw_setfg(const CMNVRAM *vram, const UINT8 *src, |
| int x, int y, CMNPAL fg); | int x, int y, CMNPAL fg); |
| void cmndraw_setpat2(const CMNVRAM *vram, const BYTE *src, | void cmndraw_setpat(const CMNVRAM *vram, const UINT8 *src, |
| int x, int y, CMNPAL bg, CMNPAL fg); | int x, int y, CMNPAL bg, CMNPAL fg); |
| void cmddraw_text8(CMNVRAM *vram, int x, int y, const char *str, CMNPAL fg); | void cmddraw_text8(CMNVRAM *vram, int x, int y, const char *str, CMNPAL fg); |
| // ---- | // ---- |
| enum { | enum { |
| Line 103 enum { | Line 46 enum { |
| }; | }; |
| typedef struct { | typedef struct { |
| BYTE *ptr; | UINT8 *ptr; |
| int width; | int width; |
| int height; | int height; |
| int align; | int align; |