diff options
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -22,7 +22,7 @@ Map empty_map(size_t width, size_t height) { for (size_t row = 0; row < height; row++) { map[row] = malloc(sizeof(MapTile) * width); if (map[row] == NULL) return NULL; - memset(map[row], 0, width*sizeof(MapTile)); + memset(map[row], 0, width*sizeof(MapTile)); } return map; @@ -260,16 +260,16 @@ void draw_map(Map map, size_t width, size_t height, Position start, Position goa for (size_t j = 0; j < width; j++) { int color_pair = 0; /* The color pair of the current char */ switch (map[i][j]) { - case EMPTY: + case EMPTY: if (visited != NULL && visited[i][j]) color_pair = COLOR_PAIR(VISITED_COLOR); - else + else color_pair = COLOR_PAIR(EMPTY_COLOR); - c = EMPTY_CHAR; + c = EMPTY_CHAR; break; - case WALL: + case WALL: color_pair = COLOR_PAIR(WALL_COLOR); - c = WALL_CHAR; + c = WALL_CHAR; break; } @@ -291,7 +291,7 @@ void draw_map(Map map, size_t width, size_t height, Position start, Position goa } } } - + /* Render the frontier */ if (frontier != NULL) { attron(COLOR_PAIR(FRONTIER_COLOR)); |
