From 912fcda40233fd4400e33ee91b0dcedc28b78d98 Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Sat, 5 Apr 2025 18:21:28 +0100 Subject: Add a level --- src/levels.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/levels.c (limited to 'src/levels.c') diff --git a/src/levels.c b/src/levels.c new file mode 100644 index 0000000..22ad76a --- /dev/null +++ b/src/levels.c @@ -0,0 +1,37 @@ +#include "all.c" + +typedef struct { + int grid[GRIDWIDTH * GRIDHEIGHT]; + int goalx, goaly; +} Level; + +#define _ EMPTY, +#define B BLACK, +#define O BLUE, +static Level levels[] = { + { + .grid = { + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ B O _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + }, + .goalx = 18, + .goaly = 7, + }, +}; +#undef _ +#undef B +#undef O -- cgit v1.2.3