diff --git a/lib.zig b/lib.zig index 3de1e8c..4e853aa 100644 --- a/lib.zig +++ b/lib.zig @@ -29,7 +29,7 @@ pub fn Pkg(pkgdir: comptime []const u8) type { exe.addIncludeDir(pkgdir ++ "/raylib/src/external/glfw/deps/mingw"); exe.addCSourceFile(pkgdir ++ "/raylib/src/rglfw.c", raylibFlags); }, - .macosx => { + .macos => { std.debug.warn("Compiling raylib is unsupported on macOS. Please add '-Dsystem-raylib=true' to your build command to use your system raylib.\n", .{}); std.os.exit(1); }, diff --git a/lib/generate_functions.py b/lib/generate_functions.py index d31c9c3..4e965f5 100644 --- a/lib/generate_functions.py +++ b/lib/generate_functions.py @@ -13,6 +13,8 @@ def c_to_zig_type(t: str) -> str: t = t.replace("const ", "") if t == "float": t = "f32" + if t == "double": + t = "f64" if t == "int": t = "c_int" if t == "unsigned int": diff --git a/lib/raylib-wa.zig b/lib/raylib-wa.zig index 170f9a4..8dff39b 100644 --- a/lib/raylib-wa.zig +++ b/lib/raylib-wa.zig @@ -55,7 +55,7 @@ pub extern fn GetScreenToWorld2D(position: Vector2, camera: Camera2D) Vector2; pub extern fn SetTargetFPS(fps: c_int) void; pub extern fn GetFPS() c_int; pub extern fn GetFrameTime() f32; -pub extern fn GetTime() double; +pub extern fn GetTime() f64; pub extern fn ColorToInt(color: Color) c_int; pub extern fn ColorNormalize(color: Color) Vector4; pub extern fn ColorFromNormalized(normalized: Vector4) Color; diff --git a/lib/raylib-zig-math.zig b/lib/raylib-zig-math.zig index c47b0ea..2d3f18e 100755 --- a/lib/raylib-zig-math.zig +++ b/lib/raylib-zig-math.zig @@ -58,9 +58,9 @@ pub extern fn MatrixRotateY(angle: f32) Matrix; pub extern fn MatrixRotateZ(angle: f32) Matrix; pub extern fn MatrixScale(x: f32, y: f32, z: f32) Matrix; pub extern fn MatrixMultiply(left: Matrix, right: Matrix) Matrix; -pub extern fn MatrixFrustum(left: double, right: double, bottom: double, top: double, near: double, far: double) Matrix; -pub extern fn MatrixPerspective(fovy: double, aspect: double, near: double, far: double) Matrix; -pub extern fn MatrixOrtho(left: double, right: double, bottom: double, top: double, near: double, far: double) Matrix; +pub extern fn MatrixFrustum(left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64) Matrix; +pub extern fn MatrixPerspective(fovy: f64, aspect: f64, near: f64, far: f64) Matrix; +pub extern fn MatrixOrtho(left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64) Matrix; pub extern fn MatrixLookAt(eye: Vector3, target: Vector3, up: Vector3) Matrix; pub extern fn MatrixToFloatV(mat: Matrix) float16; pub extern fn QuaternionIdentity() Quaternion;