I can now create any tiles I want. First version is just one room will have a circular pool in it.

This commit is contained in:
Zed A. Shaw 2024-12-24 03:26:06 -05:00
parent 89e31279be
commit 03fe9b3d01
3 changed files with 19 additions and 7 deletions

View file

@ -139,8 +139,16 @@ void WorldBuilder::generate() {
$map.$walls[it.y][it.x] = is_wall;
}
// BUG: this is so weird
$map.load_tiles();
Point center = $map.place_entity(1);
for(matrix::circle it{center, 3}; it.next();) {
for(int x = it.x0; x < it.x1; x++) {
if($map.inmap(x, it.y) && !$map.iswall(x, it.y)) {
$map.$tiles.set_tile(x, it.y, "WATER_TILE");
}
}
}
}
void WorldBuilder::make_room(size_t origin_x, size_t origin_y, size_t w, size_t h) {