summaryrefslogtreecommitdiff
path: root/dbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbox.c')
-rw-r--r--dbox.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dbox.c b/dbox.c
index 7f162a5..af18ccd 100644
--- a/dbox.c
+++ b/dbox.c
@@ -53,7 +53,7 @@ static const char ident[]="$Id$";
/* ---------------------------------------- TYPES
*/
typedef unsigned long long map_t;
-typedef unsigned long hash_t;
+typedef map_t hash_t;
typedef char route_t[MAX_ROUTE+1];
typedef enum {SPACE_GL=' ',
@@ -616,11 +616,11 @@ static map_t *CreateMap(const level_t *p_level, const state_t *p_state)
}
-static hash_t ROL(hash_t p_val, int p_bits)
+static hash_t ROL(map_t p_val, int p_bits)
{
while(p_bits--)
{
- p_val = (p_val >> 31) | (p_val << 1);
+ p_val = (p_val >> 63) | (p_val << 1);
}
return p_val;
@@ -639,7 +639,7 @@ static hash_t CreateHash(const level_t *p_level, const state_t *p_state)
hash = p_state->player.x * p_state->player.y;
- for(f = 0; f < p_level->no_boxes; f++)
+ for(f = 0; f < p_level->height; f++)
{
hash ^= ROL(m[f], f);
}