From 94ffb83018a5703019a8854af7d0e8c1600354ff Mon Sep 17 00:00:00 2001 From: Cubitect Date: Wed, 18 Nov 2020 19:28:44 +0100 Subject: [PATCH] Fixed directory status check for windows. --- README.md | 2 ++ finders.c | 7 ++++--- makefile | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ec998fc..d313721 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,7 @@ int main() int entry = L_VORONOI_ZOOM_1; int *area = allocCache(&g.layers[entry], w, h); + printf("Searching...\n"); int64_t seed; for (seed = 0; ; seed++) if (checkForBiomes(&g, entry, area, seed, x, z, w, h, filter, 1) > 0) @@ -248,6 +249,7 @@ int main() int threads = 8; LayerStack g; + printf("Preparing seed bases...\n"); // Get all 48-bit quad-witch-hut bases, but consider only the best 20-bit // constellations where the structures are the closest together. int err = searchAll48( diff --git a/finders.c b/finders.c index 4e09e2a..ad5b0e2 100644 --- a/finders.c +++ b/finders.c @@ -5,15 +5,16 @@ #include #include +#include +#include + #if defined(_WIN32) #include -#define IS_DIR_SEP ((C) == '/' || (C) == '\\') +#define IS_DIR_SEP(C) ((C) == '/' || (C) == '\\') #define stat _stat #define mkdir(P,X) _mkdir(P) #define S_IFDIR _S_IFDIR #else -#include -#include #define IS_DIR_SEP(C) ((C) == '/') #endif diff --git a/makefile b/makefile index 7566a43..b553308 100644 --- a/makefile +++ b/makefile @@ -21,7 +21,10 @@ debug: libcubiomes release: CFLAGS += -O3 -march=native release: libcubiomes +ifeq ($(OS),Windows_NT) +else libcubiomes: CFLAGS += -fPIC +endif libcubiomes: layers.o generator.o finders.o util.o $(AR) $(ARFLAGS) libcubiomes.a $^