summaryrefslogtreecommitdiff
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 46dcde5..1975b4e 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -34,15 +34,8 @@ void world_t::generate(sector_t *sector, sector_index_t index, bool partial)
sector->bounds.v[0] = (v2f_t)index * SECTOR_SIZE;
sector->bounds.v[1] = sector->bounds.v[0] + v2f_t(SECTOR_SIZE, SECTOR_SIZE);
- for (coord_t ly = 0; ly < SECTOR_SIZE; ly++)
- for (coord_t lx = 0; lx < SECTOR_SIZE; lx++) {
- tile_t *tile = sector->tiles + ly * SECTOR_SIZE + lx;
- tile_index_t tile_index(index[0] * SECTOR_SIZE + lx,
- index[1] * SECTOR_SIZE + ly);
- generator(tile, tile_index, &perlin);
- }
-
sector->empty = false;
+ generator(this, index, sector, generator_data);
if (partial)
return;