terrain: fix wrong rendering
The older implementation would leave empty areas on the right side of the screen.
This commit is contained in:
parent
ad1d6b1f66
commit
70bc98f96c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue