aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-12-22 23:46:51 +0200
committerkartofen <mladenovnasko0@gmail.com>2022-12-22 23:46:51 +0200
commitf1d359eefdc4b6c5465a6b210728b02b9b1651e2 (patch)
tree81f5414a8e48ee01448108c96bd4ac73ba13e165
parent764070a86a7aa98480eaaff64dfba7e2f2943292 (diff)
fixed a bugHEADmaster
-rw-r--r--src/config.h3
-rw-r--r--src/tilemap.c8
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;
}
}
}