diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-16 16:45:46 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-16 16:45:46 +0100 |
commit | 3b9e3afd449facf5c98ffee50247c80e293f8545 (patch) | |
tree | 34dd4c8a1038ec666b6ccbf69a74d9ff09b2b86c /src/world.cpp | |
parent | b13dc31b08cddf14ecfa6b8cf496cf4e7308083c (diff) |
Start adding decorations.
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 9 |
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; |