diff options
Diffstat (limited to 'src/tilemap.c')
-rw-r--r-- | src/tilemap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tilemap.c b/src/tilemap.c index 8cb78f9..ca9d975 100644 --- a/src/tilemap.c +++ b/src/tilemap.c @@ -7,8 +7,8 @@ #define MIN(x, y) (((x) < (y)) ? (x) : (y)) #define BIG_SZ (sizeof(big_t) * 8) -#define INDEX ((__typeof(n))(n / BIG_SZ)) -#define OFFSET ((__typeof(n))(n % BIG_SZ)) +#define INDEX (n / BIG_SZ) +#define OFFSET (n % BIG_SZ) // from tiles.c extern size_t TILES; @@ -39,11 +39,11 @@ void generate_tile_masks() for(size_t i = 0; i < SIDES; i++) { // current solution for circuits :( // if(n == j && (n == 3 || n == 4 || n == 5 || n ==6)) - // tile_masks[INDEX][j][i] |= (tc[n][3-i] != tc[j][i]) << OFFSET; + // tile_masks[INDEX][j][i] |= (big_t)(tile_connections[n][3-i] != tile_connections[j][i]) << OFFSET; // else if(n == j && (n == 7|| n == 8 || n == 9 || n == 10)) // tile_masks[INDEX][j][i] |= 0 << OFFSET; // else - tile_masks[INDEX][j][i] |= (tile_connections[n][3-i] == tile_connections[j][i]) << OFFSET; + tile_masks[INDEX][j][i] |= (big_t)(tile_connections[n][3-i] == tile_connections[j][i]) << OFFSET; } } } |