summaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'map.c')
-rw-r--r--map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/map.c b/map.c
index 3d81c00..dcf009d 100644
--- a/map.c
+++ b/map.c
@@ -10,7 +10,7 @@ Map map_new(size_t width, size_t height) {
map.tiles = malloc(sizeof(Pixel *) * height);
if (map.tiles == NULL) return map;
for (size_t row = 0; row < height; row++) {
- map.tiles[row] = malloc(sizeof(Pixel *) * width);
+ map.tiles[row] = malloc(sizeof(Pixel) * width);
if (map.tiles[row] == NULL) {
/* FIXME: free prev rows */
map.tiles = NULL;
@@ -45,11 +45,11 @@ Map map_default(void) {
/* Boundaries */
for (size_t x = 0; x < map.width; x++) { /* Horizontal */
- map.tiles[0][x] = P_MAGENTA;
+ map.tiles[0][x] = P_RED;
map.tiles[map.height - 1][x] = P_RED;
}
for (size_t y = 0; y < map.height; y++) { /* Vertical */
- map.tiles[y][0] = P_MAGENTA;
+ map.tiles[y][0] = P_RED;
map.tiles[y][map.width - 1] = P_RED;
}