diff options
-rw-r--r-- | src/config.h | 3 | ||||
-rw-r--r-- | src/tilemap.c | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/config.h b/src/config.h index f1fa501..ef8c29c 100644 --- a/src/config.h +++ b/src/config.h @@ -1,7 +1,4 @@ -// name of the tileset, localated in files/tilesets directory #define TILESET knots - -// Array for which tiles to include the tiles.dat int tiles_to_load[] = { 3, 4 }; 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; } } } |