1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
with Interfaces.C; use Interfaces.C;
with Raymath; use Raymath;
package Raylib is
procedure Init_Window(Width, Height: int; Title: in char_array)
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;
KEY_P: constant int := 80;
KEY_SPACE: constant int := 32;
function Is_Key_Pressed(key: int) return C_bool
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";
function Is_Key_Down(Key: int) return C_Bool
with
Import => True,
Convention => C,
External_Name => "IsKeyDown";
function Measure_Text(Text: Char_Array; FontSize: Int) return Int
with
Import => True,
Convention => C,
External_Name => "MeasureText";
procedure Draw_Text(Text: Char_Array; PosX, PosY: Int; FontSize: Int; C: Color)
with
Import => True,
Convention => C,
External_Name => "DrawText";
procedure Set_Target_FPS(Fps: int)
with
Import => True,
Convention => C,
External_Name => "SetTargetFPS";
procedure Draw_FPS(PosX, PosY: Int)
with
Import => True,
Convention => C,
External_Name => "DrawFPS";
function Color_Brightness(C: Color; Factor: C_Float) return Color
with
Import => True,
Convention => C,
External_Name => "ColorBrightness";
end Raylib;
|