Mercurial > hg > dmlib
diff 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 |
line wrap: on
line diff
--- a/tools/lib64gfx.h Sun Jun 24 03:37:00 2018 +0300 +++ b/tools/lib64gfx.h Sun Jun 24 05:35:23 2018 +0300 @@ -28,21 +28,23 @@ #define C64_SCR_PAR_XY (0.9365f) // Sprite constants -#define C64_SPR_WIDTH 3 // bytes -#define C64_SPR_HEIGHT 21 // lines -#define C64_SPR_WIDTH_PX (8 * C64_SPR_WIDTH) -#define C64_SPR_SIZE ((C64_SPR_WIDTH * C64_SPR_HEIGHT) + 1) +#define C64_SPR_WIDTH_PX 24 +#define C64_SPR_HEIGHT_PX 21 +#define C64_SPR_WIDTH_UT (C64_SPR_WIDTH_PX / 8) // bytes +#define C64_SPR_HEIGHT_UT C64_SPR_HEIGHT_PX +#define C64_SPR_SIZE ((C64_SPR_WIDTH_UT * C64_SPR_HEIGHT_UT) + 1) // Character constants -#define C64_CHR_WIDTH 1 // bytes -#define C64_CHR_HEIGHT 8 // lines -#define C64_CHR_WIDTH_PX (8 * C64_CHR_WIDTH) -#define C64_CHR_SIZE (C64_CHR_WIDTH * C64_CHR_HEIGHT) +#define C64_CHR_WIDTH_PX 8 +#define C64_CHR_HEIGHT_PX 8 +#define C64_CHR_WIDTH_UT 1 // bytes +#define C64_CHR_HEIGHT_UT 8 // lines +#define C64_CHR_SIZE (C64_CHR_WIDTH_UT * C64_CHR_HEIGHT_UT) // Etc. #define C64_NCOLORS 16 #define C64_VIDBANK_SIZE (16*1024) -#define C64_MAX_SPRITES (C64_VIDBANK_SIZE / C64_SPR_SIZE) +#define C64_MAX_SPRITES 1024 #define C64_MAX_CHARS 256 @@ -130,7 +132,7 @@ { BOOL multicolor, xexpand, yexpand; int color, xc, yc; - Uint8 data[C64_SPR_HEIGHT][C64_SPR_WIDTH]; + Uint8 data[C64_SPR_HEIGHT_UT][C64_SPR_WIDTH_UT]; } DMC64Sprite;