terrain: fix wrong rendering

The older implementation would leave empty areas on the right side of
the screen.
This commit is contained in:
Xavier Del Campo Romero 2022-06-26 18:05:08 +02:00
parent ad1d6b1f66
commit 70bc98f96c
1 changed files with 2 additions and 2 deletions

View File

@ -88,10 +88,10 @@ int terrain_render(const struct terrain_map *const map,
int nx = map->nx, ny = map->ny;
if (abs(remx) >= TERRAIN_SZ / 2)
if (abs(remx))
nx++;
if (abs(remy) >= TERRAIN_SZ / 2)
if (abs(remy))
ny++;
struct m