blob: daeaa0aa5ff448d924fcd6063809c9608d6026da (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <u.h>
#include <libc.h>
#include <draw.h>
#include <event.h>
Image *back; // Background image for drawing
int gridsize = 16; // Size of each grid cell
int gridwidth = 10; // Number of grid columns
int gridheight = 10; // Number of grid rows
Mouse mouse;
void drawgrid(void) {
int x, y;
for (x = 0; x <= gridwidth; x++) {
line(back, Pt(x * gridsize, 0), Pt(x * gridsize, gridheight *
|