]> git.xolatile.top Git - xolatile-raylib-ada.git/commitdiff
Gamepad functions...
authorxolatile <xolatile@proton.me>
Sun, 7 Apr 2024 22:43:24 +0000 (18:43 -0400)
committerxolatile <xolatile@proton.me>
Sun, 7 Apr 2024 22:43:24 +0000 (18:43 -0400)
raylib.ads

index 722afec179252a7705922ccf8fdd03621a021780..7c3836155b0b4bb0f62021ca5aba3d095c65e867 100644 (file)
@@ -1898,55 +1898,78 @@ package Raylib is
       Convention    => C,
       External_Name => "SetExitKey";
 
-   --~function bool IsGamepadAvailable (int gamepad) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Is_Gamepad_Available (
+      Gamepad : Integer := 0
+   ) return Logical with
+      Import        => True,
+      Convention    => C,
+      External_Name => "IsGamepadAvailable";
 
-   --~function const char *GetGamepadName (int gamepad) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Get_Gamepad_Name (
+      Gamepad : Integer := 0
+   ) return access Character with
+      Import        => True,
+      Convention    => C,
+      External_Name => "GetGamepadName";
 
-   --~function bool IsGamepadButtonPressed (int gamepad, int button) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Is_Gamepad_Button_Pressed (
+      Gamepad : Integer        := 0;
+      Button  : Gamepad_Button := Gamepad_Button_Left_Thumb
+   ) return Logical with
+      Import        => True,
+      Convention    => C,
+      External_Name => "IsGamepadButtonPressed";
 
-   --~function bool IsGamepadButtonDown (int gamepad, int button) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Is_Gamepad_Button_Down (
+      Gamepad : Integer        := 0;
+      Button  : Gamepad_Button := Gamepad_Button_Left_Thumb
+   ) return Logical with
+      Import        => True,
+      Convention    => C,
+      External_Name => "IsGamepadButtonDown";
 
-   --~function bool IsGamepadButtonReleased (int gamepad, int button) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Is_Gamepad_Button_Released (
+      Gamepad : Integer        := 0;
+      Button  : Gamepad_Button := Gamepad_Button_Left_Thumb
+   ) return Logical with
+      Import        => True,
+      Convention    => C,
+      External_Name => "IsGamepadButtonReleased";
 
-   --~function bool IsGamepadButtonUp (int gamepad, int button) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Is_Gamepad_Button_Up (
+      Gamepad : Integer        := 0;
+      Button  : Gamepad_Button := Gamepad_Button_Left_Thumb
+   ) return Logical with
+      Import        => True,
+      Convention    => C,
+      External_Name => "IsGamepadButtonUp";
 
-   --~function int GetGamepadButtonPressed (void) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Get_Gamepad_Button_Pressed return Integer with
+      Import        => True,
+      Convention    => C,
+      External_Name => "GetGamepadButtonPressed";
 
-   --~function int GetGamepadAxisCount (int gamepad) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Get_Gamepad_Axis_Count (
+      Gamepad : Integer := 0
+   ) return Integer with
+      Import        => True,
+      Convention    => C,
+      External_Name => "GetGamepadAxisCount";
 
-   --~function float GetGamepadAxisMovement (int gamepad, int axis) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Get_Gamepad_Axis_Movement (
+      Gamepad : Integer      := 0;
+      Axis    : Gamepad_Axis := Gamepad_Axis_Left_Trigger
+   ) return Float with
+      Import        => True,
+      Convention    => C,
+      External_Name => "GetGamepadAxisMovement";
 
-   --~function int SetGamepadMappings (const char *mappings) with
-      --~Import        => True,
-      --~Convention    => C,
-      --~External_Name => "";
+   function Set_Gamepad_Mappings (
+      Mappings : String := ""
+   ) return Integer with
+      Import        => True,
+      Convention    => C,
+      External_Name => "SetGamepadMappings";
 
    function Is_Mouse_Button_Pressed (
       Button : Mouse_Button := Mouse_Button_Left