From b6f9624d4b362e311c1a910867f9f994a6d9d7c5 Mon Sep 17 00:00:00 2001 From: Cubitect Date: Wed, 25 Jul 2018 10:20:06 +0200 Subject: [PATCH] Minor fixes. --- find_quadhuts.c | 4 ++-- finders.c | 4 ++-- finders.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/find_quadhuts.c b/find_quadhuts.c index d6dbc99..4f8da48 100644 --- a/find_quadhuts.c +++ b/find_quadhuts.c @@ -146,7 +146,7 @@ int main(int argc, char *argv[]) int64_t hits = 0, swpc; - for(j = 0; j < 0x10000; j++) + for(j = 0; j < qhcnt; j++) { seed = base + (j << 48); @@ -161,7 +161,7 @@ int main(int argc, char *argv[]) // This seed base does not seem to contain many quad huts, so make // a more detailed analysis of the surroundings and see if there is - // enough potential for more swamps to justify searching fruther. + // enough potential for more swamps to justify searching further. if(hits == 0 && (j & 0xfff) == 0xfff) { swpc = 0; diff --git a/finders.c b/finders.c index f194c87..f8dd341 100644 --- a/finders.c +++ b/finders.c @@ -670,8 +670,8 @@ void search4QuadBases(const char *fnam, const int threads, for(t = 0; t < threads; t++) { info[t].threadID = t; - info[t].start = (t * SEEDMAX / threads) & 0x0000ffffffff0000; - info[t].end = ((info[t].start + (SEEDMAX-1) / threads) & 0x0000ffffffff0000) + 1; + info[t].start = (t * SEED_BASE_MAX / threads) & 0x0000ffffffff0000; + info[t].end = ((info[t].start + (SEED_BASE_MAX-1) / threads) & 0x0000ffffffff0000) + 1; info[t].fnam = fnam; info[t].quality = quality; info[t].sconf = structureConfig; diff --git a/finders.h b/finders.h index 8258cbf..fc140af 100644 --- a/finders.h +++ b/finders.h @@ -9,7 +9,7 @@ #define DEFAULT_THREADS 6 -#define SEEDMAX (1LL << 48) +#define SEED_BASE_MAX (1LL << 48) #define PI 3.141592653589793 #define LARGE_STRUCT 1 @@ -39,7 +39,7 @@ extern const StructureConfig MANSION_CONFIG; enum { Desert_Pyramid, Igloo, Jungle_Pyramid, Swamp_Hut, Village, Ocean_Ruin, Shipwreck, Monument, Mansion -} StructureType; +}; static const int templeBiomeList[] = {desert, desertHills, jungle, jungleHills, swampland, icePlains, coldTaiga}; static const int biomesToSpawnIn[] = {forest, plains, taiga, taigaHills, forestHills, jungle, jungleHills}; @@ -338,7 +338,7 @@ int areBiomesViable( * blockX, blockZ : block coordinates * * In the case of isViableFeaturePos() the 'type' argument specifies the type of - * scattered feature the check is performed for. + * scattered feature (as an enum) for which the check is performed. * * The return value is non-zero if the position is valid. */