Mercurial > hg > dmlib
comparison tools/lib64gfx.h @ 1859:f382cde6bb58
Rename various C64 sprite / character constants.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 24 Jun 2018 05:35:23 +0300 |
parents | 219417325036 |
children | 34ba8e2d2dd7 |
comparison
equal
deleted
inserted
replaced
1858:1816211341a0 | 1859:f382cde6bb58 |
---|---|
26 | 26 |
27 // C64 video screen pixel aspect ratio on PAL | 27 // C64 video screen pixel aspect ratio on PAL |
28 #define C64_SCR_PAR_XY (0.9365f) | 28 #define C64_SCR_PAR_XY (0.9365f) |
29 | 29 |
30 // Sprite constants | 30 // Sprite constants |
31 #define C64_SPR_WIDTH 3 // bytes | 31 #define C64_SPR_WIDTH_PX 24 |
32 #define C64_SPR_HEIGHT 21 // lines | 32 #define C64_SPR_HEIGHT_PX 21 |
33 #define C64_SPR_WIDTH_PX (8 * C64_SPR_WIDTH) | 33 #define C64_SPR_WIDTH_UT (C64_SPR_WIDTH_PX / 8) // bytes |
34 #define C64_SPR_SIZE ((C64_SPR_WIDTH * C64_SPR_HEIGHT) + 1) | 34 #define C64_SPR_HEIGHT_UT C64_SPR_HEIGHT_PX |
35 #define C64_SPR_SIZE ((C64_SPR_WIDTH_UT * C64_SPR_HEIGHT_UT) + 1) | |
35 | 36 |
36 // Character constants | 37 // Character constants |
37 #define C64_CHR_WIDTH 1 // bytes | 38 #define C64_CHR_WIDTH_PX 8 |
38 #define C64_CHR_HEIGHT 8 // lines | 39 #define C64_CHR_HEIGHT_PX 8 |
39 #define C64_CHR_WIDTH_PX (8 * C64_CHR_WIDTH) | 40 #define C64_CHR_WIDTH_UT 1 // bytes |
40 #define C64_CHR_SIZE (C64_CHR_WIDTH * C64_CHR_HEIGHT) | 41 #define C64_CHR_HEIGHT_UT 8 // lines |
42 #define C64_CHR_SIZE (C64_CHR_WIDTH_UT * C64_CHR_HEIGHT_UT) | |
41 | 43 |
42 // Etc. | 44 // Etc. |
43 #define C64_NCOLORS 16 | 45 #define C64_NCOLORS 16 |
44 #define C64_VIDBANK_SIZE (16*1024) | 46 #define C64_VIDBANK_SIZE (16*1024) |
45 #define C64_MAX_SPRITES (C64_VIDBANK_SIZE / C64_SPR_SIZE) | 47 #define C64_MAX_SPRITES 1024 |
46 #define C64_MAX_CHARS 256 | 48 #define C64_MAX_CHARS 256 |
47 | 49 |
48 | 50 |
49 #define DM_GET_ADDR_LO(addr) ((addr) & 0xff) | 51 #define DM_GET_ADDR_LO(addr) ((addr) & 0xff) |
50 #define DM_GET_ADDR_HI(addr) (((addr) >> 8) & 0xff) | 52 #define DM_GET_ADDR_HI(addr) (((addr) >> 8) & 0xff) |
128 | 130 |
129 typedef struct | 131 typedef struct |
130 { | 132 { |
131 BOOL multicolor, xexpand, yexpand; | 133 BOOL multicolor, xexpand, yexpand; |
132 int color, xc, yc; | 134 int color, xc, yc; |
133 Uint8 data[C64_SPR_HEIGHT][C64_SPR_WIDTH]; | 135 Uint8 data[C64_SPR_HEIGHT_UT][C64_SPR_WIDTH_UT]; |
134 } DMC64Sprite; | 136 } DMC64Sprite; |
135 | 137 |
136 | 138 |
137 typedef struct _DMC64Image | 139 typedef struct _DMC64Image |
138 { | 140 { |