diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1,3 +1,4 @@ +#include <stddef.h> #include <stdlib.h> #include "level.h" @@ -35,6 +36,26 @@ int main() { DrawLine(0, y * gridSize, GetScreenWidth(), y * gridSize, LIGHTGRAY); } + // Drawing points + for (int x = 0; x < level->width; x++) { + for (int y = 0; y < level->height; y++) { + Color color = GRAY; + + for (int i = 0; i < level->height * level->width; i++) { + Side *side = level->sides[i]; + if (side == NULL) continue; + + if ((x == side->a.x && y == side->a.y) || + (x == side->b.x && y == side->b.y)) { + color = RED; + break; + } + } + + DrawCircle(x * gridSize, y * gridSize, 4, color); + } + } + EndDrawing(); } |
