1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-07-21 16:23:34 +02:00
SpaceCadetPinball/SpaceCadetPinball/zdrv.h

31 lines
1.1 KiB
C
Raw Normal View History

2020-11-08 16:37:59 +01:00
#pragma once
2020-11-14 16:13:00 +01:00
#include "gdrv.h"
2020-11-08 16:37:59 +01:00
struct zmap_header_type
2020-11-08 16:37:59 +01:00
{
zmap_header_type(int width, int height, int stride);
~zmap_header_type();
int Width;
int Height;
int Stride;
unsigned Resolution;
uint16_t* ZPtr1;
SDL_Texture* Texture;
private:
static int pad(int width);
2020-11-08 16:37:59 +01:00
};
2020-11-14 16:13:00 +01:00
2020-11-08 16:37:59 +01:00
class zdrv
{
public:
static void fill(zmap_header_type* zmap, int width, int height, int xOff, int yOff, uint16_t fillWord);
2020-11-14 16:13:00 +01: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 CreatePreview(zmap_header_type& zMap);
static void FlipZMapHorizontally(const zmap_header_type& zMap);
2020-11-08 16:37:59 +01:00
};