]> git.xolatile.top Git - xolatile-raylib-ada.git/commitdiff
Subtyped boolean into logical.
authorxolatile <xolatile@proton.me>
Mon, 18 Mar 2024 12:19:30 +0000 (08:19 -0400)
committerxolatile <xolatile@proton.me>
Mon, 18 Mar 2024 12:19:30 +0000 (08:19 -0400)
raylib.ads

index f252579fa692fcacaf4a95a703221c4005dfd6bd..288c3dd0db92137c57fb8faae0aaaa188b0bab3b 100644 (file)
@@ -92,6 +92,10 @@ package Raylib is
 
 ------------------------------------------------------------------------
 
+       type Logical is new Boolean;
+       --
+       for Logical'Size use 32;
+
        type Config_Flags is (
                Flag_Fullscreen_Mode,
                Flag_Window_Resizable,
@@ -805,7 +809,7 @@ package Raylib is
        end record with Convention => C_Pass_By_Copy;
 
        type Ray_Collision is record
-               Hit      : Boolean   := False;
+               Hit      : Logical   := False;
                Distance : Float     := 0.0;
                Point    : Vector_3D := (0.0, 0.0, 0.0);
                Normal   : Vector_3D := (0.0, 0.0, 0.0);
@@ -842,7 +846,7 @@ package Raylib is
        type Music is record
                Stream       : Audio_Stream := No_Audio_Stream;
                Frame_Count  : Natural      := 0;
-               Looping      : Boolean      := False;
+               Looping      : Logical      := False;
                Context_Type : Integer      := 0;
                Context_Data : Pointer      := null;
        end record;
@@ -959,49 +963,49 @@ package Raylib is
                Convention    => C,
                External_Name => "CloseWindow";
 
-       function Window_Should_Close return Boolean with
+       function Window_Should_Close return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "WindowShouldClose";
 
-       function Is_Window_Ready return Boolean with
+       function Is_Window_Ready return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsWindowReady";
 
-       function Is_Window_Fullscreen return Boolean with
+       function Is_Window_Fullscreen return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsWindowFullscreen";
 
-       function Is_Window_Hidden return Boolean with
+       function Is_Window_Hidden return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsWindowHidden";
 
-       function Is_Window_Minimized return Boolean with
+       function Is_Window_Minimized return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsWindowMinimized";
 
-       function Is_Window_Maximized return Boolean with
+       function Is_Window_Maximized return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsWindowMaximized";
 
-       function Is_Window_Focused return Boolean with
+       function Is_Window_Focused return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsWindowFocused";
 
-       function Is_Window_Resized return Boolean with
+       function Is_Window_Resized return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsWindowResized";
 
        function Is_Window_State (
                Flags : Natural := 0
-       ) return Boolean with
+       ) return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsWindowState";
@@ -1244,7 +1248,7 @@ package Raylib is
                Convention    => C,
                External_Name => "HideCursor";
 
-       function Is_Cursor_Hidden return Boolean with
+       function Is_Cursor_Hidden return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsCursorHidden";
@@ -1259,7 +1263,7 @@ package Raylib is
                Convention    => C,
                External_Name => "DisableCursor";
 
-       function Is_Cursor_On_Screen return Boolean with
+       function Is_Cursor_On_Screen return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsCursorOnScreen";
@@ -1400,7 +1404,7 @@ package Raylib is
 
        function Is_Shader_Ready (
                Data : Shader := No_Shader
-       ) return Boolean with
+       ) return Logical with
                Import        => True,
                Convention    => C,
                External_Name => "IsShaderReady";