Fix NOPNG compiling

This commit is contained in:
James R 2019-12-24 11:37:37 -08:00
parent 9d28351b5c
commit be063c454a
4 changed files with 40 additions and 54 deletions

View File

@ -536,9 +536,7 @@ static UINT8 *R_GenerateTexture(size_t texnum)
}
// multi-patch textures (or 'composite')
#ifndef NO_PNG_LUMPS
multipatch:
#endif
texture->holes = false;
texture->flip = 0;
blocksize = (texture->width * 4) + (texture->width * texture->height);

View File

@ -788,6 +788,8 @@ static UINT8 *R_GetTextureFlat(levelflat_t *levelflat, boolean leveltexture, boo
patch_t *patch = NULL;
boolean texturechanged = (leveltexture ? (levelflat->u.texture.num != levelflat->u.texture.lastnum) : false);
(void)ispng;
// Check if the texture changed.
if (leveltexture && (!texturechanged))
{

View File

@ -9,6 +9,26 @@
/// \file
/// \brief SDL Mixer interface for sound
#ifdef HAVE_LIBGME
#ifdef HAVE_ZLIB
#ifndef _MSC_VER
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#endif
#ifndef _LFS64_LARGEFILE
#define _LFS64_LARGEFILE
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 0
#endif
#include <zlib.h>
#endif // HAVE_ZLIB
#endif // HAVE_LIBGME
#include "../doomdef.h"
#include "../doomstat.h" // menuactive
@ -57,24 +77,6 @@
#include "gme/gme.h"
#define GME_TREBLE 5.0f
#define GME_BASS 1.0f
#ifdef HAVE_ZLIB
#ifndef _MSC_VER
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#endif
#ifndef _LFS64_LARGEFILE
#define _LFS64_LARGEFILE
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 0
#endif
#include "zlib.h"
#endif // HAVE_ZLIB
#endif // HAVE_LIBGME
static UINT16 BUFFERSIZE = 2048;

View File

@ -11,6 +11,24 @@
/// \file w_wad.c
/// \brief Handles WAD file header, directory, lump I/O
#ifdef HAVE_ZLIB
#ifndef _MSC_VER
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#endif
#ifndef _LFS64_LARGEFILE
#define _LFS64_LARGEFILE
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 0
#endif
#include <zlib.h>
#endif
#ifdef __GNUC__
#include <unistd.h>
#endif
@ -22,22 +40,6 @@
#include "lzf.h"
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 0
#endif
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#ifndef _LFS64_LARGEFILE
#define _LFS64_LARGEFILE
#endif
//#ifdef HAVE_ZLIB
#include "zlib.h"
//#endif // HAVE_ZLIB
#include "doomdef.h"
#include "doomstat.h"
#include "doomtype.h"
@ -77,24 +79,6 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
#define O_BINARY 0
#endif
#ifdef HAVE_ZLIB
#ifndef _MSC_VER
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#endif
#ifndef _LFS64_LARGEFILE
#define _LFS64_LARGEFILE
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 0
#endif
#include "zlib.h"
#endif
typedef struct
{