Switched to Raylib

- Added Raylib due to being simple and similar to XNA's APIs
- Remove ifdef cplusplus from filehandler
- Added VSCode, GH Actions and FetchTSO
This commit is contained in:
Tony Bark 2024-04-29 03:04:46 -04:00
parent d83abea13c
commit 02827893df
9 changed files with 976 additions and 100 deletions

View file

@ -22,9 +22,27 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
// C headers
exe.linkLibC();
exe.addIncludePath(.{ .path = "./library/formats" });
exe.addIncludePath(.{ .path = "./library/libvitaboy" });
// Modules
const raylib_dep = b.dependency("raylib-zig", .{
.target = target,
.optimize = optimize,
});
const raylib = raylib_dep.module("raylib"); // main raylib module
const raylib_math = raylib_dep.module("raylib-math"); // raymath module
const rlgl = raylib_dep.module("rlgl"); // rlgl module
const raylib_artifact = raylib_dep.artifact("raylib"); // raylib C library
exe.linkLibrary(raylib_artifact);
exe.root_module.addImport("raylib", raylib);
exe.root_module.addImport("raylib-math", raylib_math);
exe.root_module.addImport("rlgl", rlgl);
// This declares intent for the executable to be installed into the
// standard location when the user invokes the "install" step (the default
// step when running `zig build`).
@ -59,6 +77,7 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
exe_unit_tests.linkLibC();
exe_unit_tests.addIncludePath(.{ .path = "./library/formats" });
exe_unit_tests.addIncludePath(.{ .path = "./library/libvitaboy" });