Mercurial > hg > dmlib
diff tools/lib64gfx.h @ 1378:c465860e44ed
Make c64 image bank allocation dynamic.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 24 Sep 2017 19:48:33 +0300 |
parents | 67ae449cf9e1 |
children | 1e67dd44351e |
line wrap: on
line diff
--- a/tools/lib64gfx.h Sun Sep 24 17:50:02 2017 +0300 +++ b/tools/lib64gfx.h Sun Sep 24 19:48:33 2017 +0300 @@ -24,7 +24,6 @@ #define C64_SCR_COLOR_SIZE (C64_SCR_CH_WIDTH * C64_SCR_CH_HEIGHT) #define C64_SCR_SCREEN_SIZE (C64_SCR_CH_WIDTH * C64_SCR_CH_HEIGHT) #define C64_SCR_BITMAP_SIZE ((C64_SCR_WIDTH * C64_SCR_HEIGHT)/8) -#define C64_SCR_MAX_BANK 8 #define C64_MAX_EXTRA_DATA 64 // C64 video screen pixel aspect ratio on PAL @@ -102,16 +101,17 @@ typedef struct _DMC64Image { int type, // Image type (D64_FMT_*) - laceType; // Interlace type (D64_ILACE_*) + laceType, // Interlace type (D64_ILACE_*) + nbanks; int width, height; // Width and height in pixels int ch_width, ch_height; // Width and height in charblocks Uint8 - *color[C64_SCR_MAX_BANK], - *bitmap[C64_SCR_MAX_BANK], - *screen[C64_SCR_MAX_BANK], - *charmem[C64_SCR_MAX_BANK], + **color, + **bitmap, + **screen, + **charmem, *extraData[C64_MAX_EXTRA_DATA], d020, bgcolor, d022, d023, d024; @@ -185,7 +185,7 @@ extern const int ndmC64ImageFormats; -DMC64Image *dmC64ImageAlloc(int width, int height, int ch_width, int ch_height); +DMC64Image *dmC64ImageAlloc(const DMC64ImageFormat *fmt); void dmC64ImageFree(DMC64Image *img);