Fixed directory status check for windows.

This commit is contained in:
Cubitect 2020-11-18 19:28:44 +01:00
parent fc5a42180c
commit 94ffb83018
3 changed files with 9 additions and 3 deletions

View File

@ -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(

View File

@ -5,15 +5,16 @@
#include <stdlib.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#if defined(_WIN32)
#include <direct.h>
#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 <sys/types.h>
#include <sys/stat.h>
#define IS_DIR_SEP(C) ((C) == '/')
#endif

View File

@ -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 $^