avoid global zlib.h include
This commit is contained in:
parent
085e61148f
commit
fca0057334
13 changed files with 25 additions and 5 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "command.hh"
|
||||
|
||||
#include <cctype>
|
||||
#include <climits>
|
||||
|
||||
#include <sauerlib/encoding.hh>
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "octa.hh"
|
||||
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
|
||||
#include <shared/command.hh>
|
||||
#include <shared/igame.hh>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include <new>
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#include <shared/command.hh>
|
||||
#include <shared/glemu.hh>
|
||||
#include <shared/igame.hh>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "pvs.hh"
|
||||
|
||||
#include <climits>
|
||||
|
||||
#include <shared/command.hh>
|
||||
|
||||
#include "console.hh" /* conoutf */
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "renderlights.hh"
|
||||
|
||||
#include <climits>
|
||||
|
||||
#include <shared/command.hh>
|
||||
#include <shared/glemu.hh>
|
||||
#include <shared/igame.hh>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "rendermodel.hh"
|
||||
|
||||
#include <climits>
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <sauerlib/encoding.hh>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "renderva.hh"
|
||||
|
||||
#include <climits>
|
||||
|
||||
#include <shared/command.hh>
|
||||
#include <shared/glemu.hh>
|
||||
#include <shared/igame.hh>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "shader.hh"
|
||||
|
||||
#include <climits>
|
||||
|
||||
#include <sauerlib/encoding.hh>
|
||||
|
||||
#include <shared/command.hh>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef ENGINE_SHADER_HH
|
||||
#define ENGINE_SHADER_HH
|
||||
|
||||
#include <climits>
|
||||
|
||||
#include <shared/glexts.hh>
|
||||
#include <shared/tools.hh>
|
||||
#include <shared/geom.hh>
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <ctime>
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#include <sauerlib/encoding.hh>
|
||||
|
||||
#include <shared/command.hh>
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cstdarg>
|
||||
#include <cmath>
|
||||
#include <cassert>
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
|
@ -1243,7 +1242,7 @@ extern stream *openrawfile(const char *filename, const char *mode);
|
|||
extern stream *openzipfile(const char *filename, const char *mode);
|
||||
extern stream *openfile(const char *filename, const char *mode);
|
||||
extern stream *opentempfile(const char *filename, const char *mode);
|
||||
extern stream *opengzfile(const char *filename, const char *mode, stream *file = nullptr, int level = Z_BEST_COMPRESSION);
|
||||
extern stream *opengzfile(const char *filename, const char *mode, stream *file = nullptr);
|
||||
extern stream *openutf8file(const char *filename, const char *mode, stream *file = nullptr);
|
||||
extern char *loadfile(const char *fn, size_t *size, bool utf8 = true);
|
||||
extern bool listdir(const char *dir, bool rel, const char *ext, vector<char *> &files);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <new>
|
||||
|
||||
#include <SDL.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#include <sauerlib/encoding.hh>
|
||||
|
||||
|
@ -1201,12 +1202,12 @@ stream *opentempfile(const char *name, const char *mode)
|
|||
return file;
|
||||
}
|
||||
|
||||
stream *opengzfile(const char *filename, const char *mode, stream *file, int level)
|
||||
stream *opengzfile(const char *filename, const char *mode, stream *file)
|
||||
{
|
||||
stream *source = file ? file : openfile(filename, mode);
|
||||
if(!source) return nullptr;
|
||||
gzstream *gz = new gzstream;
|
||||
if(!gz->open(source, mode, !file, level)) { if(!file) delete source; delete gz; return nullptr; }
|
||||
if(!gz->open(source, mode, !file, Z_BEST_COMPRESSION)) { if(!file) delete source; delete gz; return nullptr; }
|
||||
return gz;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include <new>
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#include "command.hh"
|
||||
|
||||
#include <engine/console.hh> /* conoutf */
|
||||
|
|
Loading…
Reference in a new issue