ref: 44a39f8b8ecd778f6e01a1fc51441a48fcd46620
parent: 88101b646a382bc33f5dffb89d96a6fc92f90fe6
author: cancel <cancel@cancel.fm>
date: Sun Nov 25 00:07:10 EST 2018
Clean up test drawing code to clear each frame
--- a/main.c
+++ b/main.c
@@ -31,7 +31,7 @@
// nodelay(stdscr, TRUE);
Field field;
- field_init_fill(&field, 16, 16, '.');
+ field_init_zeros(&field, 16, 16);
printw("Type any character to fill it in an alternating grid, or\ntype '");
attron(A_BOLD);
@@ -69,6 +69,7 @@
if (new_fill_char != fill_char) {
fill_char = new_fill_char;
}
+ field_fill_subrect(&field, 0, 0, field.height, field.width, '.');
field_fill_subrect(&field, 1, 1, field.height - 2, field.width - 2,
fill_char);
field_debug_draw(stdscr, &field, 0, 0);