diff --git a/finders.c b/finders.c index 80a0ef5..83f6a6e 100644 --- a/finders.c +++ b/finders.c @@ -715,7 +715,7 @@ int scanForQuadBits(const StructureConfig sconf, int radius, int64_t s48, int scanForQuads( const StructureConfig sconf, int radius, int64_t s48, - const int64_t *lowBits, int lowBitCnt, int lowBitN, + const int64_t *lowBits, int lowBitCnt, int lowBitN, int64_t salt, int x, int z, int w, int h, Pos *qplist, int n) { int i, cnt = 0; @@ -729,7 +729,7 @@ int scanForQuads( for (i = 0; i < lowBitCnt; i++) { - cnt += scanForQuadBits(sconf, radius, s48, lowBits[i], lowBitN, invB, + cnt += scanForQuadBits(sconf, radius, s48, lowBits[i]-salt, lowBitN, invB, x, z, w, h, qplist+cnt, n-cnt); if (cnt >= n) break; diff --git a/finders.h b/finders.h index 00a91be..f563a4e 100644 --- a/finders.h +++ b/finders.h @@ -425,15 +425,16 @@ Pos getOptimalAfk(Pos p[4], int ax, int ay, int az, int *spcnt); * @lowBits : consider transformations that yield one of these lower bits * @lowBitCnt : length of lower bit subset * @lowBitN : number of bits in the subset values (0 < lowBitN <= 48) + * @salt : salt subtracted from subset values (useful for protobases) * @x,z,w,h : area to scan in region coordinates (inclusive) * @qplist : output region coordinates for the descovered quad-structures * @n : maximum number of quad-structures to look for - * + *< * Returns the number of quad-structures found (up to 'n'). */ int scanForQuads( const StructureConfig sconf, int radius, int64_t s48, - const int64_t *lowBits, int lowBitCnt, int lowBitN, + const int64_t *lowBits, int lowBitCnt, int lowBitN, int64_t salt, int x, int z, int w, int h, Pos *qplist, int n); //==============================================================================