Added 6 more functions...

This commit is contained in:
Ognjen Milan Robovic 2024-03-18 15:28:32 -04:00
parent 607f7d0e32
commit 5bb0d020ce
2 changed files with 73 additions and 45 deletions

View File

@ -627,18 +627,22 @@ package Raylib is
type Quaternion is new Vector_4D; type Quaternion is new Vector_4D;
type Matrix_4D is record type Matrix_4D is record
--~M00, M10, M20, M30, M00 : Float := 1.0;
--~M01, M11, M21, M31, M10 : Float := 0.0;
--~M02, M12, M22, M32, M20 : Float := 0.0;
--~M03, M13, M23, M33 : Float := ( M30 : Float := 0.0;
--~1.0, 0.0, 0.0, 0.0, M01 : Float := 0.0;
--~0.0, 1.0, 0.0, 0.0, M11 : Float := 1.0;
--~0.0, 0.0, 1.0, 0.0, M21 : Float := 0.0;
--~0.0, 0.0, 0.0, 1.0); M31 : Float := 0.0;
M00, M10, M20, M30, M02 : Float := 0.0;
M01, M11, M21, M31, M12 : Float := 0.0;
M02, M12, M22, M32, M22 : Float := 1.0;
M03, M13, M23, M33 : Float; M32 : Float := 0.0;
M03 : Float := 0.0;
M13 : Float := 0.0;
M23 : Float := 0.0;
M33 : Float := 1.0;
end record with Convention => C_Pass_By_Copy; end record with Convention => C_Pass_By_Copy;
Id_Matrix : Matrix_4D; Id_Matrix : Matrix_4D;
@ -725,6 +729,8 @@ package Raylib is
Projection : Camera_Projection := Camera_Perspective; Projection : Camera_Projection := Camera_Perspective;
end record with Convention => C_Pass_By_Copy; end record with Convention => C_Pass_By_Copy;
No_Camera_3D : Camera_3D;
type Camera_2D is record type Camera_2D is record
Offset : Vector_2D := (0.0, 0.0); Offset : Vector_2D := (0.0, 0.0);
Target : Vector_2D := (0.0, 0.0); Target : Vector_2D := (0.0, 0.0);
@ -732,6 +738,8 @@ package Raylib is
Zoom : Float := 0.0; Zoom : Float := 0.0;
end record with Convention => C_Pass_By_Copy; end record with Convention => C_Pass_By_Copy;
No_Camera_2D : Camera_2D;
type Mesh is record type Mesh is record
Vertex_Count : Integer := 0; Vertex_Count : Integer := 0;
Triangle_Count : Integer := 0; Triangle_Count : Integer := 0;
@ -1475,44 +1483,65 @@ package Raylib is
Import => True, Import => True,
Convention => C, Convention => C,
External_Name => "UnloadShader"; External_Name => "UnloadShader";
--~################################################################
--~################################################################
--~################################################################
--~function Ray GetMouseRay (Vector2 mousePosition, Camera camera) with
--~Import => True,
--~Convention => C,
--~External_Name => "";
--~function Matrix GetCameraMatrix (Camera camera) with function Get_Mouse_Ray (
--~Import => True, Mouse_Position : Vector_2D := (0.0, 0.0);
--~Convention => C, Camera : Camera_3D := No_Camera_3D
--~External_Name => ""; ) return Ray with
Import => True,
Convention => C,
External_Name => "GetMouseRay";
--~function Matrix GetCameraMatrix2D (Camera2D camera) with function Get_Camera_Matrix_3D (
--~Import => True, Camera : Camera_3D := No_Camera_3D
--~Convention => C, ) return Matrix_4D with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "GetCameraMatrix";
--~function Vector2 GetWorldToScreen (Vector3 position, Camera camera) with function Get_Camera_Matrix_2D (
--~Import => True, Camera : Camera_2D := No_Camera_2D
--~Convention => C, ) return Matrix_4D with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "GetCameraMatrix2D";
--~function Vector2 GetScreenToWorld2D (Vector2 position, Camera2D camera) with function Get_World_To_Screen_3D (
--~Import => True, Position : Vector_3D := (0.0, 0.0, 0.0);
--~Convention => C, Camera : Camera_3D := No_Camera_3D
--~External_Name => ""; ) return Vector_2D with
Import => True,
Convention => C,
External_Name => "GetWorldToScreen";
--~function Vector2 GetWorldToScreenEx (Vector3 position, Camera camera, int width, int height) with function Get_Screen_To_World_2D (
--~Import => True, Position : Vector_2D := (0.0, 0.0);
--~Convention => C, Camera : Camera_2D := No_Camera_2D
--~External_Name => ""; ) return Vector_2D with
Import => True,
Convention => C,
External_Name => "GetScreenToWorld2D";
--~function Vector2 GetWorldToScreen2D (Vector2 position, Camera2D camera) with function Get_World_To_Screen_Ex (
--~Import => True, Position : Vector_3D := (0.0, 0.0, 0.0);
--~Convention => C, Camera : Camera_3D := No_Camera_3D;
--~External_Name => ""; Width : Integer := 0;
Height : Integer := 0
) return Vector_2D with
Import => True,
Convention => C,
External_Name => "GetWorldToScreenEx";
function Get_World_To_Screen_2D (
Position : Vector_2D := (0.0, 0.0);
Camera : Camera_2D := No_Camera_2D
) return Vector_2D with
Import => True,
Convention => C,
External_Name => "GetWorldToScreen2D";
################################################################
################################################################
################################################################
procedure Set_Target_FPS ( procedure Set_Target_FPS (
FPS : Integer := 60 FPS : Integer := 60
) with ) with

View File

@ -25,10 +25,9 @@ begin
Begin_Drawing; Begin_Drawing;
-- --
Clear_Background (Sky_Blue); Clear_Background (Sky_Blue);
--
Draw_Texture (Dragdown, 100, 100, White); Draw_Texture (Dragdown, 100, 100, White);
Draw_Text_Pro (Get_Font_Default, Text, (90.0, 90.0), (9.0, 9.0), 0.0, 32.0, 4.0, Red); Draw_Text_Pro (Get_Font_Default, Text, (90.0, 90.0), (9.0, 9.0), 0.0, 32.0, 4.0, Red);
Draw_FPS (60, 60); Draw_FPS (X, Y);
Draw_Line (0, 0, 300, 300, Black); Draw_Line (0, 0, 300, 300, Black);
Draw_Rectangle (120, 120, 30, 60, Blue); Draw_Rectangle (120, 120, 30, 60, Blue);
-- --