From 1e094a665c79ebdcf537fd5ddbd204726d14e59e Mon Sep 17 00:00:00 2001 From: xolatile Date: Sun, 7 Apr 2024 18:43:24 -0400 Subject: [PATCH] Gamepad functions... --- raylib.ads | 103 +++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 40 deletions(-) diff --git a/raylib.ads b/raylib.ads index 722afec..7c38361 100644 --- a/raylib.ads +++ b/raylib.ads @@ -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