render: break up grid_render()

This commit is contained in:
Daniel Eklöf 2019-06-19 14:37:42 +02:00
parent 304f15d696
commit 0ddd96de0d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 158 additions and 152 deletions

3
grid.c
View file

@ -170,9 +170,10 @@ grid_scroll(struct grid *grid, int rows)
int count = cell_end - cell_start;
LOG_DBG("moving %d cells from %d", count, cell_start);
const size_t bytes = count * sizeof(grid->cells[0]);
memmove(
&grid->cells[0], &grid->cells[cell_start],
count * sizeof(grid->cells[0]));
bytes);
tll_free(grid->damage);