1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2025-12-15 23:10:59 +01:00

gdrv: RGBA buffers, pre-applied palettes, SDL bitmap origin.

Refactored partman.
Added sprite viewer.
This commit is contained in:
Muzychenko Andrey 2021-09-21 13:14:39 +03:00
parent 8bae7a5b05
commit c63c6701ac
28 changed files with 901 additions and 564 deletions

View file

@ -6,16 +6,16 @@ struct zmap_header_type
int Width;
int Height;
int Stride;
unsigned Resolution;
uint16_t* ZPtr1;
uint16_t* ZPtr2;
uint16_t ZBuffer[1];
SDL_Texture* Texture;
};
class zdrv
{
public:
static int pad(int width);
static int create_zmap(zmap_header_type* zmap, int width, int height);
static int create_zmap(zmap_header_type* zmap, int width, int height, int stride = -1);
static int destroy_zmap(zmap_header_type* zmap);
static void fill(zmap_header_type* zmap, int width, int height, int xOff, int yOff, uint16_t fillWord);
static void paint(int width, int height, gdrv_bitmap8* dstBmp, int dstBmpXOff, int dstBmpYOff,
@ -24,6 +24,6 @@ public:
static void paint_flat(int width, int height, gdrv_bitmap8* dstBmp, int dstBmpXOff, int dstBmpYOff,
zmap_header_type* zMap, int dstZMapXOff, int dstZMapYOff, gdrv_bitmap8* srcBmp,
int srcBmpXOff, int srcBmpYOff, uint16_t depth);
static void paint_spliced_bmp(int xPos, int yPos, gdrv_bitmap8* dstBmp, zmap_header_type* dstZmap,
gdrv_bitmap8* srcBmp);
static void CreatePreview(zmap_header_type& zMap);
static void FlipZMapHorizontally(const zmap_header_type& zMap);
};