Back to shtanton's homepage
summaryrefslogtreecommitdiff
path: root/src/levels.c
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2025-04-05 18:21:28 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2025-04-05 18:21:28 +0100
commit912fcda40233fd4400e33ee91b0dcedc28b78d98 (patch)
tree8d46662e219d4db62de080be2d1f211ff69cd466 /src/levels.c
parentd36583ad6ae53708f1ae11bb7e4f4939e6ac3b4d (diff)
downloadldjam57-912fcda40233fd4400e33ee91b0dcedc28b78d98.tar
Add a level
Diffstat (limited to 'src/levels.c')
-rw-r--r--src/levels.c37
1 files changed, 37 insertions, 0 deletions
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