diff --git a/lib/raylib-zig.zig b/lib/raylib-zig.zig index b6d00b0..7a05183 100755 --- a/lib/raylib-zig.zig +++ b/lib/raylib-zig.zig @@ -1188,22 +1188,22 @@ pub const ShowWindow = UnhideWindow; pub const FormatText = TextFormat; // ---------- WORKAROUND ---------- -pub extern fn WGetMouseRay(mouseX: f32, mouseY: f32, camera: Camera) Ray; -pub extern fn WDrawSphere(posX: f32, posY: f32, posZ: f32, radius: f32, r: u8, g: u8, b: u8, a: u8) void; -pub extern fn WDrawRay(ray: Ray, r: u8, g: u8, b: u8, a: u8) void; +pub extern fn WGetMouseRay(mousePosition: [*c]const Vector2, camera: Camera) Ray; +pub extern fn WDrawSphere(centerPos: [*c]const Vector3, radius: f32, color: [*c]const Color) void; +pub extern fn WDrawRay(ray: Ray, color: [*c]const Color) void; pub fn GetMouseRay(mousePosition: Vector2, camera: Camera) Ray { - return WGetMouseRay(mousePosition.x, mousePosition.y, camera); + return WGetMouseRay(&mousePosition, camera); } pub fn DrawSphere(centerPos: Vector3, radius: f32, color: Color) void { - WDrawSphere(centerPos.x, centerPos.y, centerPos.z, radius, color.r, color.g, color.b, color.a); + WDrawSphere(¢erPos, radius, &color); } pub fn DrawRay(ray: Ray, color: Color) void { - WDrawRay(ray, color.r, color.g, color.b, color.a); + WDrawRay(ray, &color); } diff --git a/lib/workaround/workaround.h b/lib/workaround/workaround.h index 137a03e..3bf8cbb 100644 --- a/lib/workaround/workaround.h +++ b/lib/workaround/workaround.h @@ -9,9 +9,9 @@ #define VECTOR3 float x, float y, float z #define COLOR unsigned char r, unsigned char g, unsigned char b, unsigned char a -Ray WGetMouseRay(float mouseX, float mouseY, Camera camera); +Ray WGetMouseRay(Vector2 * mousePosition, Camera camera); -void WDrawSphere(VECTOR3, float radius, COLOR); -void WDrawRay(Ray ray, COLOR); +void WDrawSphere(Vector3 * centerPos, float radius, Color * color); +void WDrawRay(Ray ray, Color * color); #endif //RAYLIB_ZIG_WORKAROUND_H