Merge pull request #7 from Gertkeno/master

macosx -> macos; double -> f64
This commit is contained in:
Nikolas 2020-11-29 11:34:15 +01:00 committed by GitHub
commit 8ae2cefd4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View File

@ -29,7 +29,7 @@ pub fn Pkg(pkgdir: comptime []const u8) type {
exe.addIncludeDir(pkgdir ++ "/raylib/src/external/glfw/deps/mingw"); exe.addIncludeDir(pkgdir ++ "/raylib/src/external/glfw/deps/mingw");
exe.addCSourceFile(pkgdir ++ "/raylib/src/rglfw.c", raylibFlags); 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.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); std.os.exit(1);
}, },

View File

@ -13,6 +13,8 @@ def c_to_zig_type(t: str) -> str:
t = t.replace("const ", "") t = t.replace("const ", "")
if t == "float": if t == "float":
t = "f32" t = "f32"
if t == "double":
t = "f64"
if t == "int": if t == "int":
t = "c_int" t = "c_int"
if t == "unsigned int": if t == "unsigned int":

View File

@ -55,7 +55,7 @@ pub extern fn GetScreenToWorld2D(position: Vector2, camera: Camera2D) Vector2;
pub extern fn SetTargetFPS(fps: c_int) void; pub extern fn SetTargetFPS(fps: c_int) void;
pub extern fn GetFPS() c_int; pub extern fn GetFPS() c_int;
pub extern fn GetFrameTime() f32; 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 ColorToInt(color: Color) c_int;
pub extern fn ColorNormalize(color: Color) Vector4; pub extern fn ColorNormalize(color: Color) Vector4;
pub extern fn ColorFromNormalized(normalized: Vector4) Color; pub extern fn ColorFromNormalized(normalized: Vector4) Color;

View File

@ -58,9 +58,9 @@ pub extern fn MatrixRotateY(angle: f32) Matrix;
pub extern fn MatrixRotateZ(angle: f32) Matrix; pub extern fn MatrixRotateZ(angle: f32) Matrix;
pub extern fn MatrixScale(x: f32, y: f32, z: 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 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 MatrixFrustum(left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64) Matrix;
pub extern fn MatrixPerspective(fovy: double, aspect: double, near: double, far: double) Matrix; pub extern fn MatrixPerspective(fovy: f64, aspect: f64, near: f64, far: f64) Matrix;
pub extern fn MatrixOrtho(left: double, right: double, bottom: double, top: double, near: double, far: double) 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 MatrixLookAt(eye: Vector3, target: Vector3, up: Vector3) Matrix;
pub extern fn MatrixToFloatV(mat: Matrix) float16; pub extern fn MatrixToFloatV(mat: Matrix) float16;
pub extern fn QuaternionIdentity() Quaternion; pub extern fn QuaternionIdentity() Quaternion;