diff options
Diffstat (limited to 'src/libsok')
| -rw-r--r-- | src/libsok/sok-ctx-hash.c | 30 | 
1 files changed, 0 insertions, 30 deletions
| diff --git a/src/libsok/sok-ctx-hash.c b/src/libsok/sok-ctx-hash.c index a3a32c7..cf0f270 100644 --- a/src/libsok/sok-ctx-hash.c +++ b/src/libsok/sok-ctx-hash.c @@ -22,36 +22,6 @@ fnv1a(    return hash;  } -#if 0 -uint64_t -sok_ctx_hash( -  const sok_ctx_t * const ctx -) { -  uint8_t buf[1024] = { -    (ctx->home.x) & 0xff,  -    (ctx->home.x >> 16) & 0xff, -    (ctx->home.y) & 0xff,  -    (ctx->home.y >> 16) & 0xff, -    0, -  }; - -  for (size_t i = 0; i < ctx->level.num_boxes; i++) { -    buf[(4 * (i + 1) + 0)] = ctx->boxes[i].x & 0xff; -    buf[(4 * (i + 1) + 1)] = (ctx->boxes[i].x >> 16) & 0xff; -    buf[(4 * (i + 1) + 2)] = ctx->boxes[i].y & 0xff; -    buf[(4 * (i + 1) + 3)] = (ctx->boxes[i].y >> 16) & 0xff; -  } - -  // calculate buffer length -  const size_t used = 2 * (ctx->level.num_boxes + 1) * sizeof(uint16_t); -  const size_t len = (used < sizeof(buf)) ? used : sizeof(buf); - -  const uint64_t hash = fnv1a((uint8_t*) buf, len); -  fprintf(stderr, "hash = %lx, used = %zu, len = %zu\n", hash, used, len); -  return hash; -} -#endif /* 0 */ -  uint64_t  sok_ctx_hash(    const sok_ctx_t * const ctx | 
