mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 19:50:45 +00:00
2cbe211e7c
The EDuke32 and RedNukem frontends are working, Blood isn't yet. Notes: many of the CMake variables and its output still refer to zdoom. Before changing that I wanted to make sure to be able to commit something that works. support code for Windows XP has been entirely removed. On Windows this will only target Vista and up. the crc32.h header had to be renamed to deconflict from zlib. several Windows API calls were changed to call the A-versions directly. Weirdly enough there were places that defined their parameters as T types but in a non-working way. removed some remaining editor files and support for the native software rendering only Windows backend. in a few simple cases, replaced 'char' with 'uint8_t'. The code as-is depends on chars being unsigned which is non-portable. This needs to be carefully reviewed.
39 lines
738 B
C
39 lines
738 B
C
#ifndef __PNGWRITE_H__
|
|
#define __PNGWRITE_H__
|
|
|
|
#include <zlib.h>
|
|
|
|
#include "vfs.h"
|
|
|
|
#define CHUNK_COMPRESSED 1
|
|
#define CHUNK_ROW 2
|
|
|
|
enum
|
|
{
|
|
PNG_TRUECOLOR = 2,
|
|
PNG_INDEXED = 3,
|
|
};
|
|
|
|
#pragma pack(push, 1)
|
|
typedef struct
|
|
{
|
|
z_stream *zs;
|
|
buildvfs_FILE file;
|
|
uint8_t *pal_data;
|
|
uint16_t pal_entries;
|
|
uint8_t *text;
|
|
uint8_t textlen;
|
|
} pngwrite_t;
|
|
|
|
typedef struct
|
|
{
|
|
uint32_t width, height;
|
|
uint8_t depth, type, filler[3];
|
|
} png_ihdr_t;
|
|
#pragma pack(pop)
|
|
|
|
void png_set_pal(uint8_t const * data, int numentries);
|
|
void png_set_text(char const * keyword, char const * text);
|
|
void png_write(buildvfs_FILE const file, int const width, int const height, uint8_t const type, uint8_t const * const data);
|
|
|
|
#endif
|