diff options
| author | citrons <citrons@mondecitronne.com> | 2023-10-12 16:39:17 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2023-10-12 16:39:17 -0500 |
| commit | 02cb7450f39eab76e1aa015101f6ba7361e9ff01 (patch) | |
| tree | f8365d4892ed31ea705572972d72ec172db5ef18 /generator.c | |
| parent | 551fd5884d06ffad651f10dc81da6b4b24145ef0 (diff) | |
fix formatting
Diffstat (limited to 'generator.c')
| -rw-r--r-- | generator.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } } } |
