From 02cb7450f39eab76e1aa015101f6ba7361e9ff01 Mon Sep 17 00:00:00 2001 From: citrons Date: Thu, 12 Oct 2023 16:39:17 -0500 Subject: fix formatting --- generator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'generator.c') diff --git a/generator.c b/generator.c index 6cf3ad4..74848d0 100644 --- a/generator.c +++ b/generator.c @@ -58,10 +58,10 @@ void generate_chunk(world *w, chunk *c) { for (int x = 0; x < CHUNK_DIM; x++) { if (rand_int() % rarity == 0) { int y = 0; - while (!is_solid(c->tiles[tile_index((SDL_Point) {x, y + 1})])) y++; - c->tiles[tile_index((SDL_Point) {x, y})] = rand_int() % TILE_LIGHT; + tile t = rand_int() % TILE_LIGHT; + c->tiles[tile_index((SDL_Point) {x, y})] = t; } } } -- cgit v1.2.3