mirror of
https://github.com/Cubitect/cubiomes.git
synced 2025-09-22 19:24:35 -04:00
Merge branch 'master' into 1_13
This commit is contained in:
commit
d9c2c8ae07
12
finders.c
12
finders.c
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
1
layers.c
1
layers.c
@ -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;
|
||||
|
1
layers.h
1
layers.h
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user