First hack to get a random gen map going.
This commit is contained in:
parent
2daa1c9bd5
commit
56d67aba28
7 changed files with 72 additions and 34 deletions
|
@ -110,10 +110,17 @@ void WorldBuilder::stylize_room(int room, string tile_name, float size) {
|
|||
bool placed = $map.place_entity(room, pos_out);
|
||||
dbc::check(placed, "failed to place style in room");
|
||||
|
||||
dbc::log("FIX THE SYTLE ROOM TO VARY FLOOR OR WALL");
|
||||
tile_name = tile_name == "FLOOR_TILE" ? "WALL_PLAIN" : tile_name;
|
||||
|
||||
for(matrix::circle it{$map.$walls, pos_out, size}; it.next();) {
|
||||
for(int x = it.left; x < it.right; x++) {
|
||||
if(!$map.iswall(x, it.y)) {
|
||||
if($map.iswall(x, it.y)) {
|
||||
// a wall tile
|
||||
$map.$tiles.set_tile(x, it.y, tile_name);
|
||||
} else {
|
||||
// a floor tile
|
||||
$map.$tiles.set_tile(x, it.y, "FLOOR_TILE");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue