Lighting is working way better and now for world generation work.
This commit is contained in:
parent
9c03e850b5
commit
194cc6664b
8 changed files with 57 additions and 63 deletions
|
@ -153,10 +153,17 @@ void WorldBuilder::generate() {
|
|||
}
|
||||
|
||||
$map.load_tiles();
|
||||
stylize_room(3, "WATER_TILE", 2.5);
|
||||
stylize_room(2, "SAND_TILE", 4.5);
|
||||
stylize_room(4, "MOSAIC_TILE_2", 7.0);
|
||||
stylize_room(1, "GRASS_TILE", 3.4);
|
||||
|
||||
std::array<string, 6> room_types{
|
||||
"WATER_TILE", "SAND_TILE", "MOSAIC_TILE_1",
|
||||
"MOSAIC_TILE_2", "MOSAIC_TILE_3", "GRASS_TILE"
|
||||
};
|
||||
|
||||
for(size_t i = 0; i < $map.$rooms.size() - 1; i++) {
|
||||
size_t room_type = Random::uniform<size_t>(0, room_types.size() - 1);
|
||||
int room_size = Random::uniform<int>(100, 800);
|
||||
stylize_room(i, room_types[room_type], room_size * 0.01f);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldBuilder::make_room(size_t origin_x, size_t origin_y, size_t w, size_t h) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue