Merge branch 'master' into 1_13

This commit is contained in:
Tom Schumm 2018-07-02 14:35:02 -07:00
commit d9c2c8ae07
4 changed files with 14 additions and 1 deletions

View File

@ -534,6 +534,10 @@ static void *baseQuadWitchHutSearchThread(void *data)
sprintf(fnam, "%s.part%d", info.fnam, info.threadID);
FILE *fp = fopen(fnam, "a+");
if (fp == NULL) {
fprintf(stderr, "Could not open \"%s\" for writing.\n", fnam);
exit(-1);
}
seed = start;
@ -620,6 +624,10 @@ void baseQuadWitchHutSearch(const char *fnam, const int threads, const int quali
char fnamThread[256];
char buffer[4097];
FILE *fp = fopen(fnam, "w");
if (fp == NULL) {
fprintf(stderr, "Could not open \"%s\" for writing.\n", fnam);
exit(-1);
}
FILE *fpart;
int n;
@ -663,6 +671,8 @@ void baseQuadWitchHutSearch(const char *fnam, const int threads, const int quali
/* getBiomeAtPos
* ----------------
* Returns the biome for the specified block position.
* (Alternatives should be considered in performance critical code.)
* This function is not threadsafe.
*/
int getBiomeAtPos(const LayerStack g, const Pos pos)
{
@ -812,7 +822,7 @@ Pos getMansionPos(long seed, const long area80X, const long area80Z)
pos.z += (seed >> 17) % 60;
pos.x = area80X*80 + (pos.x >> 1);
pos.z = area80X*80 + (pos.z >> 1);
pos.z = area80Z*80 + (pos.z >> 1);
pos.x = pos.x*16 + 8;
pos.z = pos.z*16 + 8;
return pos;

View File

@ -129,6 +129,7 @@ void baseQuadWitchHutSearch(const char *fnam, int threads, int quality);
* ----------------
* Returns the biome for the specified block position.
* (Alternatives should be considered in performance critical code.)
* This function is not threadsafe.
*/
int getBiomeAtPos(const LayerStack g, const Pos pos);

View File

@ -861,6 +861,7 @@ void mapBiomeEdge(Layer *l, int * __restrict out, int areaX, int areaZ, int area
}
/* This function is not threadsafe. */
void mapHills(Layer *l, int * __restrict out, int areaX, int areaZ, int areaWidth, int areaHeight)
{
int pX = areaX - 1;

View File

@ -376,6 +376,7 @@ void mapDeepOcean(Layer *l, int * __restrict out, int x, int z, int w, int h);
void mapBiome(Layer *l, int * __restrict out, int x, int z, int w, int h);
void mapRiverInit(Layer *l, int * __restrict out, int x, int z, int w, int h);
void mapBiomeEdge(Layer *l, int * __restrict out, int x, int z, int w, int h);
/* This function is not threadsafe. */
void mapHills(Layer *l, int * __restrict out, int x, int z, int w, int h);
void mapRiver(Layer *l, int * __restrict out, int x, int z, int w, int h);
void mapSmooth(Layer *l, int * __restrict out, int x, int z, int w, int h);