Mercurial > hg > dmlib
comparison tools/lib64gfx.h @ 2309:0f8232c2af63
Comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 09 Jul 2019 10:26:26 +0300 |
parents | e798a41f27a5 |
children | 87533af8db64 |
comparison
equal
deleted
inserted
replaced
2308:28701abacc31 | 2309:0f8232c2af63 |
---|---|
40 #define D64_SPR_WIDTH_PX 24 | 40 #define D64_SPR_WIDTH_PX 24 |
41 #define D64_SPR_HEIGHT_PX 21 | 41 #define D64_SPR_HEIGHT_PX 21 |
42 #define D64_SPR_WIDTH_UT (D64_SPR_WIDTH_PX / 8) // bytes | 42 #define D64_SPR_WIDTH_UT (D64_SPR_WIDTH_PX / 8) // bytes |
43 #define D64_SPR_HEIGHT_UT D64_SPR_HEIGHT_PX | 43 #define D64_SPR_HEIGHT_UT D64_SPR_HEIGHT_PX |
44 #define D64_SPR_SIZE ((D64_SPR_WIDTH_UT * D64_SPR_HEIGHT_UT) + 1) | 44 #define D64_SPR_SIZE ((D64_SPR_WIDTH_UT * D64_SPR_HEIGHT_UT) + 1) |
45 #define D64_MAX_SPRITES 8 // Max sprites per scanline (in simple cases) | |
46 | |
45 | 47 |
46 // Character constants | 48 // Character constants |
47 #define D64_CHR_WIDTH_PX 8 | 49 #define D64_CHR_WIDTH_PX 8 |
48 #define D64_CHR_HEIGHT_PX 8 | 50 #define D64_CHR_HEIGHT_PX 8 |
49 #define D64_CHR_WIDTH_UT 1 // bytes | 51 #define D64_CHR_WIDTH_UT 1 // bytes |
51 #define D64_CHR_SIZE (D64_CHR_WIDTH_UT * D64_CHR_HEIGHT_UT) | 53 #define D64_CHR_SIZE (D64_CHR_WIDTH_UT * D64_CHR_HEIGHT_UT) |
52 | 54 |
53 // Etc. | 55 // Etc. |
54 #define D64_NCOLORS 16 | 56 #define D64_NCOLORS 16 |
55 #define D64_VIDBANK_SIZE (16*1024) | 57 #define D64_VIDBANK_SIZE (16*1024) |
56 #define D64_MAX_SPRITES 1024 | |
57 #define D64_MAX_CHARS 256 | 58 #define D64_MAX_CHARS 256 |
58 | 59 |
59 | 60 |
60 // Different supported flags/modes | 61 // Different supported flags/modes |
61 enum | 62 enum |
100 // Various extra settings (see DMC64Image::extraInfo[]) | 101 // Various extra settings (see DMC64Image::extraInfo[]) |
101 enum | 102 enum |
102 { | 103 { |
103 D64_EI_MODE = 0, // Actual mode, if the format supports several | 104 D64_EI_MODE = 0, // Actual mode, if the format supports several |
104 | 105 |
105 D64_EI_CHAR_CASE, | 106 D64_EI_CHAR_CASE, // [CHAR] 0 = upper case, != lower case |
106 D64_EI_CHAR_CUSTOM, | 107 D64_EI_CHAR_CUSTOM, // [CHAR] 0 = ROM charset, != custom charset |
107 | 108 |
108 D64_EI_FLI_TYPE, | 109 D64_EI_FLI_TYPE, // FLI type (see D64_FLI_*) |
109 D64_EI_ILACE_TYPE, | 110 D64_EI_ILACE_TYPE, // Interlace type (see D64_ILACE_*) |
110 }; | 111 }; |
111 | 112 |
112 | 113 |
113 // Image <-> bitmap conversion dithering | 114 // Image <-> bitmap conversion dithering |
114 enum | 115 enum |
191 } DMC64MemBlock; | 192 } DMC64MemBlock; |
192 | 193 |
193 | 194 |
194 typedef struct | 195 typedef struct |
195 { | 196 { |
197 int xc, yc; // Sprite coordinates (XXX TODO: borders etc.) | |
196 BOOL multicolor, xexpand, yexpand; | 198 BOOL multicolor, xexpand, yexpand; |
197 int color, xc, yc; | 199 int color; // Color |
198 Uint8 data[D64_SPR_HEIGHT_UT][D64_SPR_WIDTH_UT]; | 200 int sprnum; // Physical sprite number for priority checking |
201 Uint8 *data; // "const" pointer to sprite data, do not deallocate | |
199 } DMC64Sprite; | 202 } DMC64Sprite; |
200 | 203 |
201 | 204 |
202 typedef struct _DMC64ImageCommonFormat DMC64ImageCommonFormat; | 205 typedef struct _DMC64ImageCommonFormat DMC64ImageCommonFormat; |
203 typedef struct _DMC64ImageFormat DMC64ImageFormat; | 206 typedef struct _DMC64ImageFormat DMC64ImageFormat; |