]> git.xolatile.top Git - xolatile-raylib-ada.git/commitdiff
All spline functions...
authorxolatile <xolatile@proton.me>
Tue, 23 Apr 2024 00:56:18 +0000 (20:56 -0400)
committerxolatile <xolatile@proton.me>
Tue, 23 Apr 2024 00:56:18 +0000 (20:56 -0400)
raylib.ads

index c7b9602db17d5d2c62913b5272d6fe2c5ad2d8ed..69ae85f80cb313115ccdcc1d98527f54662e7799 100644 (file)
@@ -2598,110 +2598,164 @@ package Raylib is
       Convention    => C,
       External_Name => "DrawPolyLinesEx";
 
-   --~procedure DrawSplineLinear (
-      --~Vector2 *points, int pointCount, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
-
-   --~procedure DrawSplineBasis (
-      --~Vector2 *points, int pointCount, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Linear (
+      Points      : access Vector_2D := null;
+      Point_Count :        Natural   := 0;
+      Thickness   :        Float     := 0.0;
+      Tint        :        Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineLinear";
 
-   --~procedure DrawSplineCatmullRom (
-      --~Vector2 *points, int pointCount, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Basis (
+      Points      : access Vector_2D := null;
+      Point_Count :        Natural   := 0;
+      Thickness   :        Float     := 0.0;
+      Tint        :        Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineBasis";
 
-   --~procedure DrawSplineBezierQuadratic (
-      --~Vector2 *points, int pointCount, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Catmull_Rom (
+      Points      : access Vector_2D := null;
+      Point_Count :        Natural   := 0;
+      Thickness   :        Float     := 0.0;
+      Tint        :        Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineCatmullRom";
 
-   --~procedure DrawSplineBezierCubic (
-      --~Vector2 *points, int pointCount, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Bezier_Quadratic (
+      Points      : access Vector_2D := null;
+      Point_Count :        Natural   := 0;
+      Thickness   :        Float     := 0.0;
+      Tint        :        Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineBezierQuadratic";
 
-   --~procedure DrawSplineSegmentLinear (
-      --~Vector2 p1, Vector2 p2, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Bezier_Cubic (
+      Points      : access Vector_2D := null;
+      Point_Count :        Natural   := 0;
+      Thickness   :        Float     := 0.0;
+      Tint        :        Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineBezierCubic";
 
-   --~procedure DrawSplineSegmentBasis (
-      --~Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Segment_Linear (
+      From      : Vector_2D := (others => 0.0);
+      To        : Vector_2D := (others => 0.0);
+      Thickness : Float     := 0.0;
+      Tint      : Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineSegmentLinear";
 
-   --~procedure DrawSplineSegmentCatmullRom (
-      --~Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Segment_Basis (
+      Point_1   : Vector_2D := (others => 0.0);
+      Point_2   : Vector_2D := (others => 0.0);
+      Point_3   : Vector_2D := (others => 0.0);
+      Point_4   : Vector_2D := (others => 0.0);
+      Thickness : Float     := 0.0;
+      Tint      : Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineSegmentBasis";
 
-   --~procedure DrawSplineSegmentBezierQuadratic (
-      --~Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Segment_Catmull_Rom (
+      Point_1   : Vector_2D := (others => 0.0);
+      Point_2   : Vector_2D := (others => 0.0);
+      Point_3   : Vector_2D := (others => 0.0);
+      Point_4   : Vector_2D := (others => 0.0);
+      Thickness : Float     := 0.0;
+      Tint      : Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineSegmentCatmullRom";
 
-   --~procedure DrawSplineSegmentBezierCubic (
-      --~Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Segment_Bezier_Quadratic (
+      Point_1   : Vector_2D := (others => 0.0);
+      Point_2   : Vector_2D := (others => 0.0);
+      Point_3   : Vector_2D := (others => 0.0);
+      Thickness : Float     := 0.0;
+      Tint      : Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineSegmentBezierQuadratic";
 
-   --~function Vector2 GetSplinePointLinear (
-      --~Vector2 startPos, Vector2 endPos, float t
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   procedure Draw_Spline_Segment_Bezier_Cubic (
+      Point_1   : Vector_2D := (others => 0.0);
+      Point_2   : Vector_2D := (others => 0.0);
+      Point_3   : Vector_2D := (others => 0.0);
+      Point_4   : Vector_2D := (others => 0.0);
+      Thickness : Float     := 0.0;
+      Tint      : Color     := White
+   ) with
+      Import        => True,
+      Convention    => C,
+      External_Name => "DrawSplineSegmentBezierCubic";
+--~################################################################
+   function Get_Spline_Point_Linear (
+      From : Vector_2D := (others => 0.0);
+      To   : Vector_2D := (others => 0.0);
+      Off  : Float     := 0.0
+   ) return Vector_2D with
+      Import        => True,
+      Convention    => C,
+      External_Name => "GetSplinePointLinear";
 
-   --~function Vector2 GetSplinePointBasis (
-      --~Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Get_Spline_Point_Basis (
+      Point_1 : Vector_2D := (others => 0.0);
+      Point_2 : Vector_2D := (others => 0.0);
+      Point_3 : Vector_2D := (others => 0.0);
+      Point_4 : Vector_2D := (others => 0.0);
+      Off     : Float     := 0.0
+   ) return Vector_2D with
+      Import        => True,
+      Convention    => C,
+      External_Name => "GetSplinePointBasis";
 
-   --~function Vector2 GetSplinePointCatmullRom (
-      --~Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Get_Spline_Point_Catmull_Rom (
+      Point_1 : Vector_2D := (others => 0.0);
+      Point_2 : Vector_2D := (others => 0.0);
+      Point_3 : Vector_2D := (others => 0.0);
+      Point_4 : Vector_2D := (others => 0.0);
+      Off     : Float     := 0.0
+   ) return Vector_2D with
+      Import        => True,
+      Convention    => C,
+      External_Name => "GetSplinePointCatmullRom";
 
-   --~function Vector2 GetSplinePointBezierQuad (
-      --~Vector2 p1, Vector2 c2, Vector2 p3, float t
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Get_Spline_Point_Bezier_Quad (
+      Point_1 : Vector_2D := (others => 0.0);
+      Point_2 : Vector_2D := (others => 0.0);
+      Point_3 : Vector_2D := (others => 0.0);
+      Off     : Float     := 0.0
+   ) return Vector_2D with
+      Import        => True,
+      Convention    => C,
+      External_Name => "GetSplinePointBezierQuad";
 
-   --~function Vector2 GetSplinePointBezierCubic (
-      --~Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t
-   --~) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Get_Spline_Point_Bezier_Cubic (
+      Point_1 : Vector_2D := (others => 0.0);
+      Point_2 : Vector_2D := (others => 0.0);
+      Point_3 : Vector_2D := (others => 0.0);
+      Point_4 : Vector_2D := (others => 0.0);
+      Off     : Float     := 0.0
+   ) return Vector_2D with
+      Import        => True,
+      Convention    => C,
+      External_Name => "GetSplinePointBezierCubic";
 
    --~function bool CheckCollisionRecs (
       --~Rectangle rec1, Rectangle rec2