Trying a new 'glowing moss' texture to sort out how to make the raycaster alter the light of a surface that has its own light.

This commit is contained in:
Zed A. Shaw 2025-05-24 00:47:44 -04:00
parent e361984c40
commit 9dcc2036aa
12 changed files with 109 additions and 51 deletions

View file

@ -39,15 +39,16 @@ void TileMap::dump(int show_x, int show_y) {
}
void TileMap::set_tile(size_t x, size_t y, string tile_name) {
json tile_conf = $config[tile_name];
auto tile = components::convert<Tile>(tile_conf);
$tile_ids[y][x] = tile.display;
$display[y][x] = tile;
json tile_conf = $config[tile_name];
auto tile = components::convert<Tile>(tile_conf);
$tile_ids[y][x] = tile.display;
$display[y][x] = tile;
}
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_PLAIN";
string tile_name = walls[it.y][it.x] == SPACE_VALUE ? "FLOOR_TILE" : "WALL_MOSS";
set_tile(it.x, it.y, tile_name);
}
}