From 16e1a2f3dd5c08a3847aa635d4bd9dbf83f83c3f Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 24 Oct 2017 23:39:15 +0200 Subject: Tile rendering needs a redoing. --- src/world.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/world.cpp') diff --git a/src/world.cpp b/src/world.cpp index e176913..9a504c3 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -34,10 +34,12 @@ void world_t::generate_tile(tile_t *tile, tile_index_t x) if (height < waterlevel) tile->type = TILE_NONE; - else if (height < waterlevel + 0.3) + else if (height < waterlevel + 0.1) tile->type = TILE_DIRT; - else + else if (perlin.get(x, 3.0f) > 0.0f) tile->type = TILE_WALL; + else + tile->type = TILE_DIRT; } void world_t::generate(sector_t *sector, sector_index_t index, bool partial) @@ -65,7 +67,7 @@ void world_t::generate(sector_t *sector, sector_index_t index, bool partial) tile = sector->tiles + ly * SECTOR_SIZE + lx; tile->neighbors = 0; - for (size_t i = 0; i < 4; i++) { + for (size_t i = 0; i < 8; i++) { tile_index_t neighbor_index; tile_t *neighbor; -- cgit