summaryrefslogtreecommitdiff
path: root/examples/labyrinth.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/labyrinth.c')
-rwxr-xr-xexamples/labyrinth.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/examples/labyrinth.c b/examples/labyrinth.c
new file mode 100755
index 0000000..2c34054
--- /dev/null
+++ b/examples/labyrinth.c
@@ -0,0 +1,50 @@
+#if 0 /*
+#/ ================================================================
+#/
+#/ labyrinth.c
+#/
+#/ ================================================================
+#/
+#/ Self-compilation shell script
+#/
+SRC=${0##*./}
+BIN=${SRC%.*}
+gcc \
+ -Wall -Wextra -Werror -pedantic \
+ -Wno-old-style-declaration \
+ -Wno-missing-braces \
+ -Wno-unused-variable \
+ -Wno-unused-but-set-variable \
+ -Wno-unused-parameter \
+ -Wno-overlength-strings \
+ -O3 \
+ -fsanitize=undefined,address,leak -mshstk \
+ -lX11 -lm \
+ -o $BIN $SRC && \
+ ./$BIN $@ && rm $BIN
+exit $? # */
+#endif
+
+#include "../reduced_system_layer.c"
+
+i32 main(i32 argc, c8 **argv) {
+ (void) argc;
+ (void) argv;
+
+ platform = (Platform) {
+ .title = "Labyrinth",
+ .frame_width = 960,
+ .frame_height = 720,
+ };
+
+ p_init();
+
+ while (!platform.done) {
+ p_handle_events();
+ p_render_frame();
+ p_sleep_for(0);
+ }
+
+ p_cleanup();
+ return 0;
+}