From 3b9e3afd449facf5c98ffee50247c80e293f8545 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 16 Dec 2017 16:45:46 +0100 Subject: Start adding decorations. --- src/world.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/world.cpp') 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; -- cgit