diff --git a/build.zig b/build.zig index 76f7a6a..bf46761 100644 --- a/build.zig +++ b/build.zig @@ -20,7 +20,13 @@ pub fn build(b: *std.build.Builder) void { exe.addIncludeDir("3rdparty/raylib/src"); exe.addIncludeDir("3rdparty/raygui/src"); exe.addIncludeDir("3rdparty/raygui/examples"); - exe.addCSourceFile("src/raylib.c", &[_][]u8{}); + const raylib_flags = &[_][]const u8{ + "-std=gnu99", + "-DPLATFORM_DESKTOP", + "-DGL_SILENCE_DEPRECATION=199309L", + "-fno-sanitize=undefined", + }; + exe.addCSourceFile("src/raylib.c", raylib_flags); exe.setBuildMode(mode); exe.install(); diff --git a/src/test_box.zig b/src/test_box.zig deleted file mode 100644 index 8bc5202..0000000 --- a/src/test_box.zig +++ /dev/null @@ -1,23 +0,0 @@ -const std = @import("std"); -const r = @import("raylib.zig"); - -pub fn main() anyerror!void { - r.InitWindow(800, 450, "doggo"); - defer r.CloseWindow(); - - while (!r.WindowShouldClose()) { - - // Draw - r.BeginDrawing(); - defer r.EndDrawing(); - - r.ClearBackground(r.RAYWHITE); - - _ = r.GuiMessageBox( - r.Rectangle{ .x = 0, .y = 0, .width = 200, .height = 200 }, - "Message Box Title", - "Message content", - null, - ); - } -}