From f45dbe8c48e32385127947a7152eaae5dd621217 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 24 May 2025 12:34:45 -0400 Subject: [PATCH] Ready to refactor the tilemap so I can stylize different parts of the maps generated. --- assets/config.json | 6 +++--- assets/tiles.json | 4 ++-- tilemap.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/config.json b/assets/config.json index bfa0a33..0a83810 100644 --- a/assets/config.json +++ b/assets/config.json @@ -95,17 +95,17 @@ "frame_width": 256, "frame_height": 256 }, - "wall": + "moss_wall": {"path": "assets/glowing_moss_wall-256.png", "frame_width": 256, "frame_height": 256 }, - "lava_floor": + "floor": {"path": "assets/floor_tile_test-256.png", "frame_width": 256, "frame_height": 256 }, - "floor": + "lava_floor": {"path": "assets/lava_floor-256.png", "frame_width": 256, "frame_height": 256 diff --git a/assets/tiles.json b/assets/tiles.json index 043e848..d657b7b 100644 --- a/assets/tiles.json +++ b/assets/tiles.json @@ -11,14 +11,14 @@ "foreground": [230, 20, 30], "background": [230, 20, 120], "collision": true, - "display": 9608 + "display": 8820 }, "WALL_PLAIN": { "texture": "assets/wall_texture_test-256.png", "foreground": [230, 20, 30], "background": [230, 20, 120], "collision": true, - "display": 37 + "display": 9608 }, "WALL_VINES": { "texture": "assets/wall_with_vines-256.png", diff --git a/tilemap.cpp b/tilemap.cpp index 06f5815..94ae667 100644 --- a/tilemap.cpp +++ b/tilemap.cpp @@ -48,7 +48,7 @@ void TileMap::set_tile(size_t x, size_t y, string tile_name) { void TileMap::load(matrix::Matrix &walls) { for(matrix::each_cell it{walls}; it.next();) { - string tile_name = walls[it.y][it.x] == SPACE_VALUE ? "FLOOR_TILE" : "WALL_MOSS"; + string tile_name = walls[it.y][it.x] == SPACE_VALUE ? "FLOOR_TILE" : "WALL_PLAIN"; set_tile(it.x, it.y, tile_name); } }