summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2025-06-03 13:31:44 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2025-06-03 13:31:44 +0100
commitee04ca47d990f828d51d00d81e30850f31e69b23 (patch)
treeef50cb690ac3d894519c0b866de3af8cdbd47b2b
downloadflock-master.tar.gz
flock-master.tar.bz2
flock-master.zip
Initmaster
-rw-r--r--.dir-locals.el6
-rw-r--r--.gitignore1
-rw-r--r--build.sh9
-rw-r--r--main.c30
4 files changed, 46 insertions, 0 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..d7eba5e
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,6 @@
+;;; Directory Local Variables -*- no-byte-compile: t -*-
+;;; For more information see (info "(emacs) Directory Variables")
+
+((nil . ((compile-command . "sh build.sh && ./flock.out")
+ (+license/license-choice . "Unlicense")))
+ (c-mode . ((mode . clang-format))))
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..645913e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/flock.out
diff --git a/build.sh b/build.sh
new file mode 100644
index 0000000..2d075a7
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+
+CFLAGS="-Wall -Wextra -fsanitize=address -fsanitize=undefined -std=c11 -ggdb -lraylib"
+SRC="main.c"
+OUT="flock.out"
+
+set -xe
+
+cc $CFLAGS -o $OUT $SRC;
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..2c18c80
--- /dev/null
+++ b/main.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2025 Aryadev Chavali
+
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the Unlicense for details.
+
+ * You may distribute and modify this code under the terms of the Unlicense,
+ * which you should have received a copy of along with this program. If not,
+ * please go to <https://unlicense.org/>.
+
+ * Created: 2025-06-03
+ * Description:
+ */
+
+#include <raylib.h>
+#include <stdio.h>
+
+int main(void)
+{
+ InitWindow(800, 600, "Flock Simulation");
+ while (!WindowShouldClose())
+ {
+ BeginDrawing();
+ ClearBackground(BLACK);
+ DrawText("Hello, world!", 360, 260, 20, WHITE);
+ EndDrawing();
+ }
+ CloseWindow();
+ return 0;
+}