1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

CAP_ZLIB to tell whether we need ZLIB

This commit is contained in:
Zeno Rogue 2020-02-15 14:10:49 +01:00
parent 33e6242f36
commit 8c87f123a0
2 changed files with 12 additions and 4 deletions

View File

@ -78,6 +78,10 @@
#define CAP_THREAD (!ISMOBILE && !ISWEB)
#endif
#ifndef CAP_ZLIB
#define CAP_ZLIB (MAXMDIM >= 4)
#endif
#define CAP_FRAMELIMIT (!ISMOBWEB)
#if ISMOBILE
@ -168,6 +172,10 @@
#define CAP_ODS 0
#endif
#ifndef MAXMDIM
#define MAXMDIM 4
#endif
#ifndef CAP_TEXTURE
#define CAP_TEXTURE (CAP_GL && (CAP_PNG || CAP_SDL_IMG) && !ISMINI)
#endif
@ -426,7 +434,9 @@ extern "C" {
#include <complex>
#include <new>
#if CAP_ZLIB
#include <zlib.h>
#endif
#if CAP_THREAD
#if WINDOWS
@ -494,10 +504,6 @@ union SDL_Event;
#endif
#endif
#ifndef MAXMDIM
#define MAXMDIM 4
#endif
#ifndef CAP_GEOMETRY
#define CAP_GEOMETRY (!(ISMINI))
#endif

View File

@ -523,6 +523,7 @@ bignum::bignum(ld d) {
while(n >= 0) { digits[n] = int(d); d -= digits[n]; d *= BASE; n--; }
}
#if CAP_ZLIB
/* compression/decompression */
EX string compress_string(string s) {
@ -563,5 +564,6 @@ EX string decompress_string(string s) {
println(hlog, isize(s), " -> ", isize(out));
return out;
}
#endif
}