mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
Use doomtype.h types instead of libpng types
This commit is contained in:
parent
f6e8226c4e
commit
417aa778aa
1 changed files with 9 additions and 8 deletions
|
@ -475,13 +475,14 @@ boolean R_IsLumpPNG(const UINT8 *d, size_t s)
|
||||||
#ifndef NO_PNG_LUMPS
|
#ifndef NO_PNG_LUMPS
|
||||||
#ifdef HAVE_PNG
|
#ifdef HAVE_PNG
|
||||||
|
|
||||||
#if PNG_LIBPNG_VER_DLLNUM < 14
|
/*#if PNG_LIBPNG_VER_DLLNUM < 14
|
||||||
typedef PNG_CONST png_byte *png_const_bytep;
|
typedef PNG_CONST png_byte *png_const_bytep;
|
||||||
#endif
|
#endif*/
|
||||||
typedef struct {
|
typedef struct
|
||||||
png_const_bytep buffer;
|
{
|
||||||
png_uint_32 size;
|
const UINT8 *buffer;
|
||||||
png_uint_32 position;
|
UINT32 size;
|
||||||
|
UINT32 position;
|
||||||
} png_io_t;
|
} png_io_t;
|
||||||
|
|
||||||
static void PNG_IOReader(png_structp png_ptr, png_bytep data, png_size_t length)
|
static void PNG_IOReader(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||||
|
@ -577,7 +578,7 @@ static png_bytep *PNG_Read(const UINT8 *png, UINT16 *w, UINT16 *h, INT16 *topoff
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// set our own read function
|
// set our own read function
|
||||||
png_io.buffer = (png_const_bytep)png;
|
png_io.buffer = png;
|
||||||
png_io.size = size;
|
png_io.size = size;
|
||||||
png_io.position = 0;
|
png_io.position = 0;
|
||||||
png_set_read_fn(png_ptr, &png_io, PNG_IOReader);
|
png_set_read_fn(png_ptr, &png_io, PNG_IOReader);
|
||||||
|
@ -752,7 +753,7 @@ boolean R_PNGDimensions(UINT8 *png, INT16 *width, INT16 *height, size_t size)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// set our own read function
|
// set our own read function
|
||||||
png_io.buffer = (png_bytep)png;
|
png_io.buffer = png;
|
||||||
png_io.size = size;
|
png_io.size = size;
|
||||||
png_io.position = 0;
|
png_io.position = 0;
|
||||||
png_set_read_fn(png_ptr, &png_io, PNG_IOReader);
|
png_set_read_fn(png_ptr, &png_io, PNG_IOReader);
|
||||||
|
|
Loading…
Reference in a new issue