Ready to refactor the tilemap so I can stylize different parts of the maps generated.

This commit is contained in:
Zed A. Shaw 2025-05-24 12:34:45 -04:00
parent 96a585220b
commit f45dbe8c48
3 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -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",

View file

@ -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);
}
}