diff options
Diffstat (limited to 'src/grid.c')
-rw-r--r-- | src/grid.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/grid.c b/src/grid.c new file mode 100644 index 0000000..f39ebcf --- /dev/null +++ b/src/grid.c @@ -0,0 +1,15 @@ +#include "TZR.h" +#include "entity.h" +#include "entityimpl.h" + +IMPL_INIT(grid, 0) {} + +IMPL(draw) { + if (TZR_GetTick() % 2) + return; + TZR_DrawSetColor(1, 1, 1, 1); + for (int i = 0; i < DHEIGHT; i += TSIZE) + TZR_DrawLine(-1, i - 1, DWIDTH, i - 1); + for (int i = 0; i < DWIDTH; i += TSIZE) + TZR_DrawLine(i - 1, -1, i - 1, DHEIGHT); +} |