mirror of
https://github.com/raylib-zig/raylib-zig.git
synced 2026-02-21 16:54:36 +00:00
Made workaround easier to develop
This commit is contained in:
parent
b475f62cfa
commit
39b9fff30a
@ -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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user