summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-04-28 07:50:31 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-04-28 09:23:47 +0200
commit63eb46698b1e19d3f36944992b948c54a7a3740b (patch)
tree1aa8b686039e2f9291d680c21a47427de5daa12b /main.c
parent0ed91795a2db720e688fd2daefd22f7e9c754c2f (diff)
downloadstalag-63eb46698b1e19d3f36944992b948c54a7a3740b.tar.gz
Compiler settings and macOS port
Diffstat (limited to 'main.c')
-rw-r--r--main.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/main.c b/main.c
index 091c0f4..bcacb47 100644
--- a/main.c
+++ b/main.c
@@ -1,18 +1,24 @@
-#include "raylib.h"
+#define _POSIX_C_SOURCE 200809L
+#define NONSTD_IMPLEMENTATION
+#define VFS_IMPLEMENTATION
+#include "all.h"
-int main(void)
-{
- InitWindow(800, 450, "raylib example - basic window");
+int main(void) {
+ SetConfigFlags(FLAG_VSYNC_HINT);
+ InitWindow(1920, 1080, "Stalag");
+ SetTargetFPS(GetMonitorRefreshRate(GetCurrentMonitor()));
- while (!WindowShouldClose())
- {
- BeginDrawing();
- ClearBackground(RAYWHITE);
- DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
- EndDrawing();
+ vfs_init("data.pak");
+ InitGame();
+ game.vsync = true;
+
+ while (!WindowShouldClose()) {
+ UpdateGame();
+ DrawGame();
}
+ vfs_shutdown();
CloseWindow();
return 0;
-} \ No newline at end of file
+}