1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2025-04-23 04:47:19 +02:00
SpaceCadetPinball/SpaceCadetPinball/zdrv.h

30 lines
1.1 KiB
C
Raw Normal View History

2020-11-08 18:37:59 +03:00
#pragma once
2020-11-14 18:13:00 +03:00
#include "gdrv.h"
2020-11-08 18:37:59 +03:00
struct zmap_header_type
2020-11-08 18:37:59 +03:00
{
int Width;
int Height;
int Stride;
uint16_t* ZPtr1;
uint16_t* ZPtr2;
uint16_t ZBuffer[1];
2020-11-08 18:37:59 +03:00
};
2020-11-14 18:13:00 +03:00
2020-11-08 18:37:59 +03:00
class zdrv
{
public:
2020-11-14 18:13:00 +03:00
static int pad(int width);
static int create_zmap(zmap_header_type* zmap, int width, int height);
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);
2020-11-14 18:13:00 +03:00
static void paint(int width, int height, gdrv_bitmap8* dstBmp, int dstBmpXOff, int dstBmpYOff,
zmap_header_type* dstZMap, int dstZMapXOff, int dstZMapYOff, gdrv_bitmap8* srcBmp, int srcBmpXOff,
int srcBmpYOff, zmap_header_type* srcZMap, int srcZMapXOff, int srcZMapYOff);
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);
2020-11-08 18:37:59 +03:00
};