summaryrefslogtreecommitdiff
path: root/raylib.ads
diff options
context:
space:
mode:
authorrexim <reximkut@gmail.com>2024-03-08 23:53:18 +0700
committerrexim <reximkut@gmail.com>2024-03-08 23:53:18 +0700
commit943af780e66da1a24253a34365c6d6aa96a22fec (patch)
treeb1f293f7dd8c98de809ed1e805eeb3e330748b91 /raylib.ads
Ready. Set. Go!
Diffstat (limited to 'raylib.ads')
-rw-r--r--raylib.ads118
1 files changed, 118 insertions, 0 deletions
diff --git a/raylib.ads b/raylib.ads
new file mode 100644
index 0000000..d23c4b2
--- /dev/null
+++ b/raylib.ads
@@ -0,0 +1,118 @@
+with Interfaces.C; use Interfaces.C;
+with Interfaces.C.Strings; use Interfaces.C.Strings;
+with Raymath; use Raymath;
+
+package Raylib is
+ procedure Init_Window(Width, Height: int; Title: chars_ptr)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "InitWindow";
+ procedure Close_Window
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "CloseWindow";
+ function Window_Should_Close return int
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "WindowShouldClose";
+ procedure Begin_Drawing
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "BeginDrawing";
+ procedure End_Drawing
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "EndDrawing";
+ type Color is record
+ r: unsigned_char;
+ g: unsigned_char;
+ b: unsigned_char;
+ a: unsigned_char;
+ end record
+ with Convention => C_Pass_By_Copy;
+ procedure Clear_Background(c: Color)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "ClearBackground";
+ procedure Draw_Rectangle(posX, posY, Width, Height: int; c: Color)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "DrawRectangle";
+ function Get_Screen_Width return int
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "GetScreenWidth";
+ function Get_Screen_Height return int
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "GetScreenHeight";
+ FLAG_WINDOW_RESIZABLE: constant unsigned := 16#00000004#;
+ procedure Set_Config_Flags(flags: unsigned)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "SetConfigFlags";
+ KEY_R: constant int := 82;
+ KEY_S: constant int := 83;
+ KEY_W: constant int := 87;
+ KEY_A: constant int := 65;
+ KEY_D: constant int := 68;
+ function Is_Key_Pressed(key: int) return int
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "IsKeyPressed";
+
+ procedure Draw_Rectangle_V(position: Vector2; size: Vector2; c: Color)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "DrawRectangleV";
+
+ type Camera2D is record
+ offset: Vector2;
+ target: Vector2;
+ rotation: C_float;
+ zoom: C_float;
+ end record
+ with Convention => C_Pass_By_Copy;
+ procedure Begin_Mode2D(camera: Camera2D)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "BeginMode2D";
+ procedure End_Mode2D
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "EndMode2D";
+ function Get_Frame_Time return C_float
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "GetFrameTime";
+ function Get_Color(hexValue: unsigned) return Color
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "GetColor";
+ procedure Draw_Circle(centerX, centerY: int; radius: C_float; c: Color)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "DrawCircle";
+ procedure Draw_Circle_V(center: Vector2; radius: C_float; C: Color)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "DrawCircleV";
+end Raylib;