SpaceCadetPinballPPC/SpaceCadetPinball/zdrv.h
oz 93de90b680 Replaced memory with new.
Cleaned up gdrv, zdrv, render.
2021-10-02 17:45:31 +03:00

31 lines
1.1 KiB
C++

#pragma once
#include "gdrv.h"
struct zmap_header_type
{
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);
};
class zdrv
{
public:
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,
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);
};