diff options
Diffstat (limited to 'src/tiles.c')
-rw-r--r-- | src/tiles.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tiles.c b/src/tiles.c index 6b7a39b..d3fdc9d 100644 --- a/src/tiles.c +++ b/src/tiles.c @@ -39,16 +39,16 @@ void print_tiles() for(size_t y = 0; y < TILE_HEIGHT; y++) { for(size_t x = 0; x < TILE_WIDTH; x++) - putchar(tiles[i][y * TILE_WIDTH + x] + '0'); + putchar((tiles[i][(y * TILE_WIDTH + x)*3 + 0]) == 0 ? '#' : '.'); putchar('\n'); } putchar('\n'); } } -int get_tile_pixel(size_t t, size_t x, size_t y) +int get_tile_pixel(size_t t, size_t x, size_t y, int k) { - return tiles[t][y * TILE_WIDTH + x]; + return tiles[t][(y * TILE_WIDTH + x)*3 + k]; } small_t *load_tile_connections() |