summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-04-22 12:35:09 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-04-22 12:35:09 -0400
commitedec8789a919372207c530ae1a3c98c05ec07aed (patch)
tree287c7bc5cd77f03dbab42a4aab0dfc49dc5d6ad3 /src/map.h
parentupdate makefile (diff)
downloadraycaster-edec8789a919372207c530ae1a3c98c05ec07aed.tar.gz
raycaster-edec8789a919372207c530ae1a3c98c05ec07aed.tar.bz2
raycaster-edec8789a919372207c530ae1a3c98c05ec07aed.zip
move raycastign to its own file
Diffstat (limited to '')
-rw-r--r--src/map.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/map.h b/src/map.h
new file mode 100644
index 0000000..3e265b2
--- /dev/null
+++ b/src/map.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <stdint.h>
+
+#define MAP_SIZE 8
+static uint8_t MAPDATA[MAP_SIZE * MAP_SIZE] = {
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 0, 0, 0, 0, 0, 1,
+ 1, 0, 0, 0, 0, 3, 0, 1,
+ 1, 0, 0, 0, 0, 0, 0, 1,
+ 1, 0, 2, 0, 4, 4, 0, 1,
+ 1, 0, 0, 0, 4, 0, 0, 1,
+ 1, 0, 3, 0, 0, 0, 0, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+};
+
+#define value(x, y) (MAPDATA[(x) + MAP_SIZE * (y)])