raylib-spinel 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/raylib_ffi.rb ADDED
@@ -0,0 +1,4093 @@
1
+ # raylib_ffi.rb — FFI declarations for Spinel AOT
2
+ # All C implementations live in raylib_adapter.o
3
+ # Under MRI, ffi_func/ffi_lib/ffi_cflags are no-ops defined in main.rb
4
+
5
+ module Raylib
6
+ ffi_lib "raylib"
7
+ # -Wl,-rpath,'$ORIGIN/../raylib' makes the produced binary (build/bin/<target>)
8
+ # prefer the known-good raylib-bindings gem lib that the Makefile vendors at
9
+ # build/raylib. Without it the loader falls back to /usr/local/lib's raylib,
10
+ # whose LoadRenderTexture creates an incomplete FBO (black render textures).
11
+ # Single quotes are required so the shell preserves $ORIGIN for the linker;
12
+ # spinel appends ffi_cflags verbatim to the single compile+link cc invocation.
13
+ # (A -I for a machine-local raylib used to sit here; it named one box's
14
+ # layout and never reached the compile that needs it: the carried C is
15
+ # compiled by spin with the flags from [native] pkg_config in spin.toml,
16
+ # and this TU includes no raylib header. Measured in PACKAGING.md item 4.)
17
+ ffi_cflags "-Wl,-rpath,'$ORIGIN/../raylib'"
18
+
19
+ # ====== generated: complete raylib API surface ======
20
+ ffi_func :rl_LoadFileData, [:str, :ptr], :ptr
21
+ ffi_func :rl_EncodeDataBase64, [:ptr, :int, :ptr], :ptr
22
+ ffi_func :rl_LoadFontData, [:ptr, :int, :int, :ptr, :int, :int, :ptr], :ptr
23
+ ffi_func :rl_LoadCodepoints, [:str, :ptr], :ptr
24
+ ffi_func :rl_LoadModelAnimations, [:str, :ptr], :ptr
25
+
26
+ # ====== generated: complete raylib API surface ======
27
+ ffi_func :rl_ImageFormat, [:ptr, :int], :void
28
+ ffi_func :rl_ImageAlphaCrop, [:ptr, :float], :void
29
+ ffi_func :rl_ImageAlphaPremultiply, [:ptr], :void
30
+ ffi_func :rl_ImageBlurGaussian, [:ptr, :int], :void
31
+ ffi_func :rl_ImageKernelConvolution, [:ptr, :ptr, :int], :void
32
+ ffi_func :rl_ImageResize, [:ptr, :int, :int], :void
33
+ ffi_func :rl_ImageResizeNN, [:ptr, :int, :int], :void
34
+ ffi_func :rl_ImageMipmaps, [:ptr], :void
35
+ ffi_func :rl_ImageDither, [:ptr, :int, :int, :int, :int], :void
36
+ ffi_func :rl_ImageFlipVertical, [:ptr], :void
37
+ ffi_func :rl_ImageFlipHorizontal, [:ptr], :void
38
+ ffi_func :rl_ImageRotate, [:ptr, :int], :void
39
+ ffi_func :rl_ImageRotateCW, [:ptr], :void
40
+ ffi_func :rl_ImageRotateCCW, [:ptr], :void
41
+ ffi_func :rl_ImageColorInvert, [:ptr], :void
42
+ ffi_func :rl_ImageColorGrayscale, [:ptr], :void
43
+ ffi_func :rl_ImageColorContrast, [:ptr, :int], :void
44
+ ffi_func :rl_ImageColorBrightness, [:ptr, :int], :void
45
+ ffi_func :rl_GenTextureMipmaps, [:ptr], :void
46
+ ffi_func :rl_UploadMesh, [:ptr, :bool], :void
47
+ ffi_func :rl_GenMeshTangents, [:ptr], :void
48
+ ffi_func :rl_SetModelMeshMaterial, [:ptr, :int, :int], :void
49
+
50
+ # Positional-construction fills (see the factory block below).
51
+ ffi_func :rl_Vector2Fill, %i[ptr float float], :void
52
+ ffi_func :rl_RectangleFill, [:ptr, :float, :float, :float, :float], :void
53
+ ffi_func :rl_Vector4Fill, %i[ptr float float float float], :void
54
+ ffi_func :rl_MatrixFill,
55
+ %i[ptr float float float float
56
+ float float float float
57
+ float float float float
58
+ float float float float], :void
59
+
60
+ # ====== generated: complete raylib API surface ======
61
+ ffi_func :IsWindowReady, [], :bool
62
+ ffi_func :IsWindowFullscreen, [], :bool
63
+ ffi_func :IsWindowHidden, [], :bool
64
+ ffi_func :IsWindowMinimized, [], :bool
65
+ ffi_func :IsWindowMaximized, [], :bool
66
+ ffi_func :IsWindowFocused, [], :bool
67
+ ffi_func :IsWindowResized, [], :bool
68
+ ffi_func :IsWindowState, [:uint], :bool
69
+ ffi_func :SetWindowState, [:uint], :void
70
+ ffi_func :ClearWindowState, [:uint], :void
71
+ ffi_func :ToggleFullscreen, [], :void
72
+ ffi_func :ToggleBorderlessWindowed, [], :void
73
+ ffi_func :MaximizeWindow, [], :void
74
+ ffi_func :MinimizeWindow, [], :void
75
+ ffi_func :RestoreWindow, [], :void
76
+ ffi_func :rl_SetWindowIcon, [:ptr], :void
77
+ ffi_func :SetWindowIcons, [:ptr, :int], :void
78
+ ffi_func :SetWindowTitle, [:str], :void
79
+ ffi_func :SetWindowPosition, [:int, :int], :void
80
+ ffi_func :SetWindowMonitor, [:int], :void
81
+ ffi_func :SetWindowMinSize, [:int, :int], :void
82
+ ffi_func :SetWindowMaxSize, [:int, :int], :void
83
+ ffi_func :SetWindowSize, [:int, :int], :void
84
+ ffi_func :SetWindowOpacity, [:float], :void
85
+ ffi_func :SetWindowFocused, [], :void
86
+ ffi_func :GetWindowHandle, [], :ptr
87
+ ffi_func :GetRenderWidth, [], :int
88
+ ffi_func :GetRenderHeight, [], :int
89
+ ffi_func :GetMonitorCount, [], :int
90
+ ffi_func :GetCurrentMonitor, [], :int
91
+ ffi_func :rl_GetMonitorPosition, [:int, :ptr], :void
92
+ ffi_func :GetMonitorWidth, [:int], :int
93
+ ffi_func :GetMonitorHeight, [:int], :int
94
+ ffi_func :GetMonitorPhysicalWidth, [:int], :int
95
+ ffi_func :GetMonitorPhysicalHeight, [:int], :int
96
+ ffi_func :GetMonitorRefreshRate, [:int], :int
97
+ ffi_func :rl_GetWindowPosition, [:ptr], :void
98
+ ffi_func :rl_GetWindowScaleDPI, [:ptr], :void
99
+ ffi_func :GetMonitorName, [:int], :str
100
+ ffi_func :SetClipboardText, [:str], :void
101
+ ffi_func :GetClipboardText, [], :str
102
+ ffi_func :rl_GetClipboardImage, [], :ptr
103
+ ffi_func :EnableEventWaiting, [], :void
104
+ ffi_func :DisableEventWaiting, [], :void
105
+ ffi_func :ShowCursor, [], :void
106
+ ffi_func :HideCursor, [], :void
107
+ ffi_func :IsCursorHidden, [], :bool
108
+ ffi_func :IsCursorOnScreen, [], :bool
109
+ ffi_func :rl_BeginMode2D, [:ptr], :void
110
+ ffi_func :EndMode2D, [], :void
111
+ ffi_func :rl_BeginTextureMode, [:ptr], :void
112
+ ffi_func :EndTextureMode, [], :void
113
+ ffi_func :rl_BeginShaderMode, [:ptr], :void
114
+ ffi_func :EndShaderMode, [], :void
115
+ ffi_func :BeginBlendMode, [:int], :void
116
+ ffi_func :EndBlendMode, [], :void
117
+ ffi_func :BeginScissorMode, [:int, :int, :int, :int], :void
118
+ ffi_func :EndScissorMode, [], :void
119
+ ffi_func :rl_BeginVrStereoMode, [:ptr], :void
120
+ ffi_func :EndVrStereoMode, [], :void
121
+ ffi_func :rl_LoadVrStereoConfig, [:ptr, :ptr], :void
122
+ ffi_func :rl_UnloadVrStereoConfig, [:ptr], :void
123
+ ffi_func :rl_LoadShader, [:str, :str], :ptr
124
+ ffi_func :rl_LoadShaderFromMemory, [:str, :str], :ptr
125
+ ffi_func :rl_IsShaderValid, [:ptr], :bool
126
+ ffi_func :rl_GetShaderLocation, [:ptr, :str], :int
127
+ ffi_func :rl_GetShaderLocationAttrib, [:ptr, :str], :int
128
+ ffi_func :rl_SetShaderValue, [:ptr, :int, :ptr, :int], :void
129
+ ffi_func :rl_SetShaderValueStr, [:ptr, :int, :str, :int], :void
130
+ ffi_func :rl_SetShaderValueV, [:ptr, :int, :ptr, :int, :int], :void
131
+ ffi_func :rl_SetShaderValueMatrix, [:ptr, :int, :ptr], :void
132
+ ffi_func :rl_SetShaderValueTexture, [:ptr, :int, :ptr], :void
133
+ ffi_func :rl_UnloadShader, [:ptr], :void
134
+ ffi_func :rl_GetScreenToWorldRay, [:ptr, :ptr, :ptr], :void
135
+ ffi_func :rl_GetScreenToWorldRayEx, [:ptr, :ptr, :int, :int, :ptr], :void
136
+ ffi_func :rl_GetWorldToScreen, [:ptr, :ptr, :ptr], :void
137
+ ffi_func :rl_GetWorldToScreenEx, [:ptr, :ptr, :int, :int, :ptr], :void
138
+ ffi_func :rl_GetWorldToScreen2D, [:ptr, :ptr, :ptr], :void
139
+ ffi_func :rl_GetScreenToWorld2D, [:ptr, :ptr, :ptr], :void
140
+ ffi_func :rl_GetCameraMatrix, [:ptr, :ptr], :void
141
+ ffi_func :rl_GetCameraMatrix2D, [:ptr, :ptr], :void
142
+ ffi_func :SwapScreenBuffer, [], :void
143
+ ffi_func :PollInputEvents, [], :void
144
+ ffi_func :WaitTime, [:double], :void
145
+ ffi_func :SetRandomSeed, [:uint], :void
146
+ ffi_func :LoadRandomSequence, [:uint, :int, :int], :ptr
147
+ ffi_func :UnloadRandomSequence, [:ptr], :void
148
+ ffi_func :TakeScreenshot, [:str], :void
149
+ ffi_func :SetConfigFlags, [:uint], :void
150
+ ffi_func :OpenURL, [:str], :void
151
+ ffi_func :SetTraceLogLevel, [:int], :void
152
+ # TraceLog is C-varargs; the gem/example calls pass (level, text) and raylib
153
+ # only walks the va_list when the text carries format specifiers.
154
+ ffi_func :TraceLog, %i[int str], :void
155
+ ffi_func :rl_SetTraceLogCallback, [:ptr], :void
156
+ ffi_func :MemAlloc, [:uint], :ptr
157
+ ffi_func :MemRealloc, [:ptr, :uint], :ptr
158
+ ffi_func :MemFree, [:ptr], :void
159
+ ffi_func :UnloadFileData, [:ptr], :void
160
+ ffi_func :SaveFileData, [:str, :ptr, :int], :bool
161
+ ffi_func :ExportDataAsCode, [:ptr, :int, :str], :bool
162
+ ffi_func :LoadFileText, [:str], :str
163
+ ffi_func :rl_LoadFileTextPtr, [:str], :ptr
164
+ ffi_func :rl_UnloadFileTextPtr, [:ptr], :void
165
+ ffi_func :rl_PtrToString, [:ptr], :str
166
+ ffi_func :UnloadFileText, [:str], :void
167
+ ffi_func :SaveFileText, [:str, :str], :bool
168
+ ffi_func :rl_SetLoadFileDataCallback, [:ptr], :void
169
+ ffi_func :rl_SetSaveFileDataCallback, [:ptr], :void
170
+ ffi_func :rl_SetLoadFileTextCallback, [:ptr], :void
171
+ ffi_func :rl_SetSaveFileTextCallback, [:ptr], :void
172
+ ffi_func :FileRename, [:str, :str], :int
173
+ ffi_func :FileRemove, [:str], :int
174
+ ffi_func :FileCopy, [:str, :str], :int
175
+ ffi_func :FileMove, [:str, :str], :int
176
+ ffi_func :FileTextReplace, [:str, :str, :str], :int
177
+ ffi_func :FileTextFindIndex, [:str, :str], :int
178
+ ffi_func :FileExists, [:str], :bool
179
+ ffi_func :DirectoryExists, [:str], :bool
180
+ ffi_func :IsFileExtension, [:str, :str], :bool
181
+ ffi_func :IsFileHidden, [:str], :bool
182
+ ffi_func :GetFileLength, [:str], :int
183
+ ffi_func :GetFileModTime, [:str], :long
184
+ ffi_func :GetFileExtension, [:str], :str
185
+ ffi_func :GetFileName, [:str], :str
186
+ ffi_func :GetFileNameWithoutExt, [:str], :str
187
+ ffi_func :GetDirectoryPath, [:str], :str
188
+ ffi_func :GetPrevDirectoryPath, [:str], :str
189
+ ffi_func :GetWorkingDirectory, [], :str
190
+ ffi_func :GetApplicationDirectory, [], :str
191
+ ffi_func :MakeDirectory, [:str], :int
192
+ ffi_func :ChangeDirectory, [:str], :int
193
+ ffi_func :IsPathFile, [:str], :bool
194
+ ffi_func :IsPathDirectory, [:str], :bool
195
+ ffi_func :IsPathAbsolute, [:str], :bool
196
+ ffi_func :IsFileNameValid, [:str], :bool
197
+ ffi_func :rl_LoadDirectoryFiles, [:str, :ptr], :void
198
+ ffi_func :rl_LoadDirectoryFilesEx, [:str, :str, :bool, :ptr], :void
199
+ ffi_func :rl_UnloadDirectoryFiles, [:ptr], :void
200
+ ffi_func :IsFileDropped, [], :bool
201
+ ffi_func :rl_LoadDroppedFiles, [:ptr], :void
202
+ ffi_func :rl_UnloadDroppedFiles, [:ptr], :void
203
+ ffi_func :GetDirectoryFileCount, [:str], :uint
204
+ ffi_func :GetDirectoryFileCountEx, [:str, :str, :bool], :uint
205
+ ffi_func :CompressData, [:ptr, :int, :ptr], :ptr
206
+ ffi_func :DecompressData, [:ptr, :int, :ptr], :ptr
207
+ ffi_func :DecodeDataBase64, [:str, :ptr], :ptr
208
+ ffi_func :ComputeCRC32, [:ptr, :int], :uint
209
+ ffi_func :ComputeMD5, [:ptr, :int], :ptr
210
+ ffi_func :ComputeSHA1, [:ptr, :int], :ptr
211
+ ffi_func :ComputeSHA256, [:ptr, :int], :ptr
212
+ ffi_func :rl_LoadAutomationEventList, [:str, :ptr], :void
213
+ ffi_func :rl_UnloadAutomationEventList, [:ptr], :void
214
+ ffi_func :rl_ExportAutomationEventList, [:ptr, :str], :bool
215
+ ffi_func :rl_SetAutomationEventList, [:ptr], :void
216
+ ffi_func :SetAutomationEventBaseFrame, [:int], :void
217
+ ffi_func :StartAutomationEventRecording, [], :void
218
+ ffi_func :StopAutomationEventRecording, [], :void
219
+ ffi_func :rl_PlayAutomationEvent, [:ptr], :void
220
+ ffi_func :IsKeyPressedRepeat, [:int], :bool
221
+ ffi_func :IsKeyReleased, [:int], :bool
222
+ ffi_func :IsKeyUp, [:int], :bool
223
+ ffi_func :GetKeyPressed, [], :int
224
+ ffi_func :GetCharPressed, [], :int
225
+ ffi_func :GetKeyName, [:int], :str
226
+ ffi_func :SetExitKey, [:int], :void
227
+ ffi_func :IsGamepadAvailable, [:int], :bool
228
+ ffi_func :GetGamepadName, [:int], :str
229
+ ffi_func :IsGamepadButtonPressed, [:int, :int], :bool
230
+ ffi_func :IsGamepadButtonReleased, [:int, :int], :bool
231
+ ffi_func :IsGamepadButtonUp, [:int, :int], :bool
232
+ ffi_func :GetGamepadButtonPressed, [], :int
233
+ ffi_func :GetGamepadAxisCount, [:int], :int
234
+ ffi_func :GetGamepadAxisMovement, [:int, :int], :float
235
+ ffi_func :SetGamepadMappings, [:str], :int
236
+ ffi_func :SetGamepadVibration, [:int, :float, :float, :float], :void
237
+ ffi_func :IsMouseButtonPressed, [:int], :bool
238
+ ffi_func :IsMouseButtonReleased, [:int], :bool
239
+ ffi_func :IsMouseButtonUp, [:int], :bool
240
+ ffi_func :rl_GetMousePosition, [:ptr], :void
241
+ ffi_func :rl_GetMouseDelta, [:ptr], :void
242
+ ffi_func :SetMousePosition, [:int, :int], :void
243
+ ffi_func :SetMouseOffset, [:int, :int], :void
244
+ ffi_func :SetMouseScale, [:float, :float], :void
245
+ ffi_func :GetMouseWheelMove, [], :float
246
+ ffi_func :rl_GetMouseWheelMoveV, [:ptr], :void
247
+ ffi_func :SetMouseCursor, [:int], :void
248
+ ffi_func :GetTouchX, [], :int
249
+ ffi_func :GetTouchY, [], :int
250
+ ffi_func :rl_GetTouchPosition, [:int, :ptr], :void
251
+ ffi_func :GetTouchPointId, [:int], :int
252
+ ffi_func :GetTouchPointCount, [], :int
253
+ ffi_func :SetGesturesEnabled, [:uint], :void
254
+ ffi_func :IsGestureDetected, [:uint], :bool
255
+ ffi_func :GetGestureDetected, [], :int
256
+ ffi_func :GetGestureHoldDuration, [], :float
257
+ ffi_func :rl_GetGestureDragVector, [:ptr], :void
258
+ ffi_func :GetGestureDragAngle, [], :float
259
+ ffi_func :rl_GetGesturePinchVector, [:ptr], :void
260
+ ffi_func :GetGesturePinchAngle, [], :float
261
+ ffi_func :rl_UpdateCameraPro, [:ptr, :ptr, :ptr, :float], :void
262
+ ffi_func :rl_SetShapesTexture, [:ptr, :ptr], :void
263
+ ffi_func :rl_GetShapesTexture, [], :ptr
264
+ ffi_func :rl_GetShapesTextureRectangle, [:ptr], :void
265
+ ffi_func :rl_DrawPixelV, [:ptr, :ptr], :void
266
+ ffi_func :rl_DrawLine, [:int, :int, :int, :int, :ptr], :void
267
+ ffi_func :rl_DrawLineV, [:ptr, :ptr, :ptr], :void
268
+ ffi_func :rl_DrawLineEx, [:ptr, :ptr, :float, :ptr], :void
269
+ ffi_func :rl_DrawLineStrip, [:ptr, :int, :ptr], :void
270
+ ffi_func :rl_DrawLineBezier, [:ptr, :ptr, :float, :ptr], :void
271
+ ffi_func :rl_DrawLineDashed, [:ptr, :ptr, :int, :int, :ptr], :void
272
+ ffi_func :rl_DrawTriangleGradient, [:ptr, :ptr, :ptr, :ptr, :ptr, :ptr], :void
273
+ ffi_func :rl_DrawTriangleLines, [:ptr, :ptr, :ptr, :ptr], :void
274
+ ffi_func :rl_DrawTriangleLinesEx, [:ptr, :ptr, :ptr, :float, :ptr], :void
275
+ ffi_func :rl_DrawTriangleFan, [:ptr, :int, :ptr], :void
276
+ ffi_func :rl_DrawTriangleStrip, [:ptr, :int, :ptr], :void
277
+ ffi_func :rl_DrawRectangleV, [:ptr, :ptr, :ptr], :void
278
+ ffi_func :rl_DrawRectangleRec, [:ptr, :ptr], :void
279
+ ffi_func :rl_DrawRectanglePro, [:ptr, :ptr, :float, :ptr], :void
280
+ ffi_func :rl_DrawRectangleGradientV, [:int, :int, :int, :int, :ptr, :ptr], :void
281
+ ffi_func :rl_DrawRectangleGradientH, [:int, :int, :int, :int, :ptr, :ptr], :void
282
+ ffi_func :rl_DrawRectangleGradientEx, [:ptr, :ptr, :ptr, :ptr, :ptr], :void
283
+ ffi_func :rl_DrawRectangleLinesEx, [:ptr, :float, :ptr], :void
284
+ ffi_func :rl_DrawRectangleRounded, [:ptr, :float, :int, :ptr], :void
285
+ ffi_func :rl_DrawRectangleRoundedLines, [:ptr, :float, :int, :ptr], :void
286
+ ffi_func :rl_DrawRectangleRoundedLinesEx, [:ptr, :float, :int, :float, :ptr], :void
287
+ ffi_func :rl_DrawPoly, [:ptr, :int, :float, :float, :ptr], :void
288
+ ffi_func :rl_DrawPolyLines, [:ptr, :int, :float, :float, :ptr], :void
289
+ ffi_func :rl_DrawPolyLinesEx, [:ptr, :int, :float, :float, :float, :ptr], :void
290
+ ffi_func :rl_DrawCircle, [:int, :int, :float, :ptr], :void
291
+ ffi_func :rl_DrawCircleGradient, [:ptr, :float, :ptr, :ptr], :void
292
+ ffi_func :rl_DrawCircleSector, [:ptr, :float, :float, :float, :int, :ptr], :void
293
+ ffi_func :rl_DrawCircleSectorLines, [:ptr, :float, :float, :float, :int, :ptr], :void
294
+ ffi_func :rl_DrawCircleSectorLinesEx, [:ptr, :float, :float, :float, :int, :float, :ptr], :void
295
+ ffi_func :rl_DrawCircleLines, [:int, :int, :float, :ptr], :void
296
+ ffi_func :rl_DrawCircleLinesV, [:ptr, :float, :ptr], :void
297
+ ffi_func :rl_DrawCircleLinesEx, [:ptr, :float, :float, :ptr], :void
298
+ ffi_func :rl_DrawEllipse, [:int, :int, :float, :float, :ptr], :void
299
+ ffi_func :rl_DrawEllipseV, [:ptr, :float, :float, :ptr], :void
300
+ ffi_func :rl_DrawEllipseLines, [:int, :int, :float, :float, :ptr], :void
301
+ ffi_func :rl_DrawEllipseLinesV, [:ptr, :float, :float, :ptr], :void
302
+ ffi_func :rl_DrawEllipseLinesEx, [:ptr, :float, :float, :float, :ptr], :void
303
+ ffi_func :rl_DrawRing, [:ptr, :float, :float, :float, :float, :int, :ptr], :void
304
+ ffi_func :rl_DrawRingLines, [:ptr, :float, :float, :float, :float, :int, :ptr], :void
305
+ ffi_func :rl_DrawRingLinesEx, [:ptr, :float, :float, :float, :float, :int, :float, :ptr], :void
306
+ ffi_func :rl_DrawSplineLinear, [:ptr, :int, :float, :ptr], :void
307
+ ffi_func :rl_DrawSplineBasis, [:ptr, :int, :float, :ptr], :void
308
+ ffi_func :rl_DrawSplineCatmullRom, [:ptr, :int, :float, :ptr], :void
309
+ ffi_func :rl_DrawSplineBezierQuadratic, [:ptr, :int, :float, :ptr], :void
310
+ ffi_func :rl_DrawSplineBezierCubic, [:ptr, :int, :float, :ptr], :void
311
+ ffi_func :rl_DrawSplineSegmentLinear, [:ptr, :ptr, :float, :ptr], :void
312
+ ffi_func :rl_DrawSplineSegmentBasis, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
313
+ ffi_func :rl_DrawSplineSegmentCatmullRom, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
314
+ ffi_func :rl_DrawSplineSegmentBezierQuadratic, [:ptr, :ptr, :ptr, :float, :ptr], :void
315
+ ffi_func :rl_DrawSplineSegmentBezierCubic, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
316
+ ffi_func :rl_GetSplinePointLinear, [:ptr, :ptr, :float, :ptr], :void
317
+ ffi_func :rl_GetSplinePointBasis, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
318
+ ffi_func :rl_GetSplinePointCatmullRom, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
319
+ ffi_func :rl_GetSplinePointBezierQuadratic, [:ptr, :ptr, :ptr, :float, :ptr], :void
320
+ ffi_func :rl_GetSplinePointBezierCubic, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
321
+ ffi_func :rl_CheckCollisionRecs, [:ptr, :ptr], :bool
322
+ ffi_func :rl_CheckCollisionCircles, [:ptr, :float, :ptr, :float], :bool
323
+ ffi_func :rl_CheckCollisionCircleRec, [:ptr, :float, :ptr], :bool
324
+ ffi_func :rl_CheckCollisionCircleLine, [:ptr, :float, :ptr, :ptr], :bool
325
+ ffi_func :rl_CheckCollisionPointRec, [:ptr, :ptr], :bool
326
+ ffi_func :rl_CheckCollisionPointCircle, [:ptr, :ptr, :float], :bool
327
+ ffi_func :rl_CheckCollisionPointTriangle, [:ptr, :ptr, :ptr, :ptr], :bool
328
+ ffi_func :rl_CheckCollisionPointLine, [:ptr, :ptr, :ptr, :int], :bool
329
+ ffi_func :rl_CheckCollisionPointPoly, [:ptr, :ptr, :int], :bool
330
+ ffi_func :rl_CheckCollisionLines, [:ptr, :ptr, :ptr, :ptr, :ptr], :bool
331
+ ffi_func :rl_GetCollisionRec, [:ptr, :ptr, :ptr], :void
332
+ ffi_func :rl_LoadImage, [:str], :ptr
333
+ ffi_func :rl_LoadImageRaw, [:str, :int, :int, :int, :int], :ptr
334
+ ffi_func :rl_LoadImageAnim, [:str, :ptr], :ptr
335
+ ffi_func :rl_LoadImageAnimFromMemory, [:str, :ptr, :int, :ptr], :ptr
336
+ ffi_func :rl_LoadImageFromMemory, [:str, :ptr, :int], :ptr
337
+ ffi_func :rl_LoadImageFromTexture, [:ptr], :ptr
338
+ ffi_func :rl_LoadImageFromScreen, [], :ptr
339
+ ffi_func :rl_IsImageValid, [:ptr], :bool
340
+ ffi_func :rl_UnloadImage, [:ptr], :void
341
+ ffi_func :rl_ExportImage, [:ptr, :str], :bool
342
+ ffi_func :rl_ExportImageToMemory, [:ptr, :str, :ptr], :ptr
343
+ ffi_func :rl_ExportImageAsCode, [:ptr, :str], :bool
344
+ ffi_func :rl_GenImageColor, [:int, :int, :ptr], :ptr
345
+ ffi_func :rl_GenImageGradientLinear, [:int, :int, :int, :ptr, :ptr], :ptr
346
+ ffi_func :rl_GenImageGradientRadial, [:int, :int, :float, :ptr, :ptr], :ptr
347
+ ffi_func :rl_GenImageGradientSquare, [:int, :int, :float, :ptr, :ptr], :ptr
348
+ ffi_func :rl_GenImageChecked, [:int, :int, :int, :int, :ptr, :ptr], :ptr
349
+ ffi_func :rl_GenImageWhiteNoise, [:int, :int, :float], :ptr
350
+ ffi_func :rl_GenImagePerlinNoise, [:int, :int, :int, :int, :float], :ptr
351
+ ffi_func :rl_GenImageCellular, [:int, :int, :int], :ptr
352
+ ffi_func :rl_GenImageText, [:int, :int, :str], :ptr
353
+ ffi_func :rl_ImageCopy, [:ptr], :ptr
354
+ ffi_func :rl_ImageFromImage, [:ptr, :ptr], :ptr
355
+ ffi_func :rl_ImageFromChannel, [:ptr, :int], :ptr
356
+ ffi_func :rl_ImageText, [:str, :int, :ptr], :ptr
357
+ ffi_func :rl_ImageTextEx, [:ptr, :str, :float, :float, :ptr], :ptr
358
+ ffi_func :rl_ImageToPOT, [:ptr, :ptr], :void
359
+ ffi_func :rl_ImageCrop, [:ptr, :ptr], :void
360
+ ffi_func :rl_ImageAlphaClear, [:ptr, :ptr, :float], :void
361
+ ffi_func :rl_ImageAlphaMask, [:ptr, :ptr], :void
362
+ ffi_func :rl_ImageResizeCanvas, [:ptr, :int, :int, :int, :int, :ptr], :void
363
+ ffi_func :rl_ImageColorTint, [:ptr, :ptr], :void
364
+ ffi_func :rl_ImageColorReplace, [:ptr, :ptr, :ptr], :void
365
+ ffi_func :rl_LoadImageColors, [:ptr], :ptr
366
+ ffi_func :rl_LoadImagePalette, [:ptr, :int, :ptr], :ptr
367
+ ffi_func :rl_UnloadImageColors, [:ptr], :void
368
+ ffi_func :rl_UnloadImagePalette, [:ptr], :void
369
+ ffi_func :rl_GetImageAlphaBorder, [:ptr, :float, :ptr], :void
370
+ ffi_func :rl_GetImageColor, [:ptr, :int, :int, :ptr], :void
371
+ ffi_func :rl_ImageClearBackground, [:ptr, :ptr], :void
372
+ ffi_func :rl_ImageDrawPixel, [:ptr, :int, :int, :ptr], :void
373
+ ffi_func :rl_ImageDrawPixelV, [:ptr, :ptr, :ptr], :void
374
+ ffi_func :rl_ImageDrawLine, [:ptr, :int, :int, :int, :int, :ptr], :void
375
+ ffi_func :rl_ImageDrawLineV, [:ptr, :ptr, :ptr, :ptr], :void
376
+ ffi_func :rl_ImageDrawLineEx, [:ptr, :ptr, :ptr, :int, :ptr], :void
377
+ ffi_func :rl_ImageDrawLineStrip, [:ptr, :ptr, :int, :ptr], :void
378
+ ffi_func :rl_ImageDrawTriangle, [:ptr, :ptr, :ptr, :ptr, :ptr], :void
379
+ ffi_func :rl_ImageDrawTriangleGradient, [:ptr, :ptr, :ptr, :ptr, :ptr, :ptr, :ptr], :void
380
+ ffi_func :rl_ImageDrawTriangleLines, [:ptr, :ptr, :ptr, :ptr, :ptr], :void
381
+ ffi_func :rl_ImageDrawTriangleFan, [:ptr, :ptr, :int, :ptr], :void
382
+ ffi_func :rl_ImageDrawTriangleStrip, [:ptr, :ptr, :int, :ptr], :void
383
+ ffi_func :rl_ImageDrawRectangle, [:ptr, :int, :int, :int, :int, :ptr], :void
384
+ ffi_func :rl_ImageDrawRectangleV, [:ptr, :ptr, :ptr, :ptr], :void
385
+ ffi_func :rl_ImageDrawRectangleRec, [:ptr, :ptr, :ptr], :void
386
+ ffi_func :rl_ImageDrawRectanglePro, [:ptr, :ptr, :ptr, :float, :ptr], :void
387
+ ffi_func :rl_ImageDrawRectangleLines, [:ptr, :int, :int, :int, :int, :ptr], :void
388
+ ffi_func :rl_ImageDrawRectangleLinesEx, [:ptr, :ptr, :int, :ptr], :void
389
+ ffi_func :rl_ImageDrawRectangleGradientEx, [:ptr, :ptr, :ptr, :ptr, :ptr, :ptr], :void
390
+ ffi_func :rl_ImageDrawCircle, [:ptr, :int, :int, :int, :ptr], :void
391
+ ffi_func :rl_ImageDrawCircleV, [:ptr, :ptr, :int, :ptr], :void
392
+ ffi_func :rl_ImageDrawCircleLines, [:ptr, :int, :int, :int, :ptr], :void
393
+ ffi_func :rl_ImageDrawCircleLinesV, [:ptr, :ptr, :int, :ptr], :void
394
+ ffi_func :rl_ImageDrawCircleGradient, [:ptr, :ptr, :float, :ptr, :ptr], :void
395
+ ffi_func :rl_ImageDrawImage, [:ptr, :ptr, :int, :int, :ptr], :void
396
+ ffi_func :rl_ImageDrawImageEx, [:ptr, :ptr, :ptr, :float, :float, :ptr], :void
397
+ ffi_func :rl_ImageDrawImageRec, [:ptr, :ptr, :ptr, :ptr, :ptr], :void
398
+ ffi_func :rl_ImageDrawImagePro, [:ptr, :ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
399
+ ffi_func :rl_ImageDrawText, [:ptr, :str, :int, :int, :int, :ptr], :void
400
+ ffi_func :rl_ImageDrawTextEx, [:ptr, :ptr, :str, :ptr, :float, :float, :ptr], :void
401
+ ffi_func :rl_ImageDrawTextPro, [:ptr, :ptr, :str, :ptr, :ptr, :float, :float, :float, :ptr], :void
402
+ ffi_func :rl_LoadTextureFromImage, [:ptr], :ptr
403
+ ffi_func :rl_LoadTextureCubemap, [:ptr, :int], :ptr
404
+ ffi_func :rl_LoadRenderTexture, [:int, :int], :ptr
405
+ ffi_func :rl_LoadRenderTextureEx, [:int, :int, :int], :ptr
406
+ ffi_func :rl_IsTextureValid, [:ptr], :bool
407
+ ffi_func :rl_IsRenderTextureValid, [:ptr], :bool
408
+ ffi_func :rl_UnloadRenderTexture, [:ptr], :void
409
+ ffi_func :rl_UpdateTexture, [:ptr, :ptr], :void
410
+ ffi_func :rl_UpdateTextureRec, [:ptr, :ptr, :ptr], :void
411
+ ffi_func :rl_SetTextureFilter, [:ptr, :int], :void
412
+ ffi_func :rl_SetTextureWrap, [:ptr, :int], :void
413
+ ffi_func :rl_DrawTextureV, [:ptr, :ptr, :ptr], :void
414
+ ffi_func :rl_DrawTextureRec, [:ptr, :ptr, :ptr, :ptr], :void
415
+ ffi_func :rl_DrawTexturePro, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
416
+ ffi_func :rl_DrawTextureNPatch, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
417
+ ffi_func :rl_ColorIsEqual, [:ptr, :ptr], :bool
418
+ ffi_func :rl_Fade, [:ptr, :float, :ptr], :void
419
+ ffi_func :rl_ColorToInt, [:ptr], :int
420
+ ffi_func :rl_ColorNormalize, [:ptr, :ptr], :void
421
+ ffi_func :rl_ColorFromNormalized, [:ptr, :ptr], :void
422
+ ffi_func :rl_ColorToHSV, [:ptr, :ptr], :void
423
+ ffi_func :rl_ColorFromHSV, [:float, :float, :float, :ptr], :void
424
+ ffi_func :rl_ColorTint, [:ptr, :ptr, :ptr], :void
425
+ ffi_func :rl_ColorBrightness, [:ptr, :float, :ptr], :void
426
+ ffi_func :rl_ColorContrast, [:ptr, :float, :ptr], :void
427
+ ffi_func :rl_ColorAlpha, [:ptr, :float, :ptr], :void
428
+ ffi_func :rl_ColorAlphaBlend, [:ptr, :ptr, :ptr, :ptr], :void
429
+ ffi_func :rl_ColorLerp, [:ptr, :ptr, :float, :ptr], :void
430
+ ffi_func :rl_GetColor, [:uint, :ptr], :void
431
+ ffi_func :rl_GetPixelColor, [:ptr, :int, :ptr], :void
432
+ ffi_func :rl_SetPixelColor, [:ptr, :ptr, :int], :void
433
+ ffi_func :GetPixelDataSize, [:int, :int, :int], :int
434
+ ffi_func :rl_GetFontDefault, [], :ptr
435
+ ffi_func :rl_FontBaseSize, [:ptr], :float
436
+ ffi_func :rl_DirListCount, [:ptr], :int
437
+ ffi_func :rl_DirListName, %i[ptr int], :str
438
+ # Path accessor for the gem-shaped FilePathList#path (ffi_func so the C
439
+ # return stays const char*; a native_method :str boxes sp_RbVal instead,
440
+ # which mismatches the shim and reads as an empty string). Ruby-side method
441
+ # lives next to `paths` in raylib_handles.rb.
442
+ ffi_func :rl_FilePathList_path, %i[ptr int], :str
443
+ ffi_func :rl_FontTexture_ptr, [:ptr], :ptr
444
+ ffi_func :rl_FontGlyphAdvanceX, [:ptr, :int], :int
445
+ ffi_func :rl_FontGlyphRecWidth, [:ptr, :int], :float
446
+ ffi_func :rl_LoadFontAtlas_ptr, %i[str int int int int int int], :ptr
447
+ ffi_func :rl_Model_material_ptr, [:ptr, :int], :ptr
448
+ ffi_func :rl_Model_transform, [:ptr, :ptr], :void
449
+ ffi_func :rl_Model_set_transform, [:ptr, :ptr], :void
450
+ ffi_func :rl_Model_mesh_ptr, [:ptr, :int], :ptr
451
+ ffi_func :rl_Model_meshCount, [:ptr], :int
452
+ ffi_func :rl_ModelAnimationAt_ptr, [:ptr, :int], :ptr
453
+ ffi_func :rl_ModelAnimation_frameCount, [:ptr], :int
454
+ ffi_func :rl_Model_boneCount, [:ptr], :int
455
+ ffi_func :rl_Model_boneParent, [:ptr, :int], :int
456
+ ffi_func :rl_Model_bindPoseTranslation, [:ptr, :int, :ptr], :void
457
+ ffi_func :rl_ModelAnimation_framePoseTranslation, [:ptr, :int, :int, :ptr], :void
458
+ ffi_func :rl_LoadShaderFS_ptr, [:str], :ptr
459
+ ffi_func :rl_SetShaderValueFloat, [:ptr, :int, :float, :int], :void
460
+ ffi_func :rl_SetShaderValueVec2, [:ptr, :int, :float, :float, :int], :void
461
+ ffi_func :rl_SetShaderValueVec3, [:ptr, :int, :float, :float, :float, :int], :void
462
+ ffi_func :rl_SetShaderValueVec4, [:ptr, :int, :float, :float, :float, :float, :int], :void
463
+ ffi_func :rl_SetShaderValueInt, [:ptr, :int, :int, :int], :void
464
+ ffi_func :rl_SetShaderValueColor, [:ptr, :int, :ptr, :int], :void
465
+ ffi_func :rl_Shader_setLoc, [:ptr, :int, :int], :void
466
+ ffi_func :rl_Material_set_shader, [:ptr, :ptr], :void
467
+ # Diffuse texture poke: Material.maps[] is embedded in the Material struct,
468
+ # so Ruby cannot reach maps[MAP_DIFFUSE].texture. Both return 1 on success,
469
+ # 0 on a NULL / out-of-range handle.
470
+ ffi_func :rl_Material_set_diffuse, [:ptr, :ptr], :int
471
+ ffi_func :rl_ModelSetDiffuseTexture, %i[ptr int ptr], :int
472
+ ffi_func :rl_RayCollision_point, [:ptr, :ptr], :void
473
+ ffi_func :rl_RayCollision_normal, [:ptr, :ptr], :void
474
+ ffi_func :rl_BoundingBox_min_ptr, [:ptr], :ptr
475
+ ffi_func :rl_BoundingBox_max_ptr, [:ptr], :ptr
476
+ ffi_func :rl_Transform_t_ptr, [:ptr], :ptr
477
+ ffi_func :rl_Transform_r_ptr, [:ptr], :ptr
478
+ ffi_func :rl_Transform_s_ptr, [:ptr], :ptr
479
+ ffi_func :rl_Camera2D_offset_ptr, [:ptr], :ptr
480
+ ffi_func :rl_Camera2D_target_ptr, [:ptr], :ptr
481
+ ffi_func :rl_rlMultMatrixf_matrix, [:ptr], :void
482
+ ffi_func :rl_Camera_position_ptr, [:ptr], :ptr
483
+ ffi_func :rl_Camera_target_ptr, [:ptr], :ptr
484
+ ffi_func :rl_Camera_up_ptr, [:ptr], :ptr
485
+ ffi_func :rl_Camera_position_x, [:ptr], :float
486
+ ffi_func :rl_Camera_position_y, [:ptr], :float
487
+ ffi_func :rl_Camera_position_z, [:ptr], :float
488
+ ffi_func :rl_Camera_target_x, [:ptr], :float
489
+ ffi_func :rl_Camera_target_y, [:ptr], :float
490
+ ffi_func :rl_Camera_target_z, [:ptr], :float
491
+ ffi_func :rl_ImageColorR, [:ptr, :int], :int
492
+ ffi_func :rl_MatrixRotateXYZ, [:ptr, :ptr], :void
493
+ ffi_func :rl_IntAlloc, [], :ptr
494
+ ffi_func :rl_IntGet, [:ptr], :int
495
+ ffi_func :rl_IntFree, [:ptr], :void
496
+ ffi_func :rl_ImageWidth, [:ptr], :int
497
+ ffi_func :rl_ImageHeight, [:ptr], :int
498
+ ffi_func :rl_ImageFrameData, [:ptr, :int], :ptr
499
+ ffi_func :rl_Camera_position_from_bounds, %i[ptr ptr float], :void
500
+ ffi_func :rl_RenderTexture_texture_ptr, [:ptr], :ptr
501
+ ffi_func :rl_TextureWidth, [:ptr], :int
502
+ ffi_func :rl_TextureHeight, [:ptr], :int
503
+ ffi_func :rl_Camera3DCreate, %i[float float float float float float float float float float int], :ptr
504
+ ffi_func :rl_EndMode3D, [], :void
505
+ ffi_func :rl_DrawGrid, [:int, :float], :void
506
+ ffi_func :rl_DrawRenderTexture, [:ptr, :ptr], :void
507
+ ffi_func :rl_DrawRenderTextureAt, [:ptr, :int, :int, :ptr], :void
508
+ ffi_func :rl_DrawRenderTexturePro, %i[ptr float ptr], :void
509
+ ffi_func :rl_LoadImageFromRenderTexture, [:ptr], :ptr
510
+ def self.SaveRenderTextureImage(target, path)
511
+ image = Raylib.rl_LoadImageFromRenderTexture(target)
512
+ Raylib.ImageFlipVertical(image)
513
+ Raylib.rl_ExportImage(image, path)
514
+ Raylib.rl_UnloadImage(image)
515
+ end
516
+ ffi_func :rl_LoadFont, [:str], :ptr
517
+ ffi_func :rl_LoadFontEx, [:str, :int, :ptr, :int], :ptr
518
+ ffi_func :rl_LoadFontFromImage, [:ptr, :ptr, :int], :ptr
519
+ ffi_func :rl_LoadFontFromMemory, [:str, :ptr, :int, :int, :ptr, :int], :ptr
520
+ ffi_func :rl_IsFontValid, [:ptr], :bool
521
+ ffi_func :rl_GenImageFontAtlas, [:ptr, :ptr, :int, :int, :int, :int], :ptr
522
+ ffi_func :UnloadFontData, [:ptr, :int], :void
523
+ ffi_func :rl_UnloadFont, [:ptr], :void
524
+ ffi_func :rl_ExportFontAsCode, [:ptr, :str], :bool
525
+ ffi_func :rl_DrawTextEx, [:ptr, :str, :ptr, :float, :float, :ptr], :void
526
+ ffi_func :rl_DrawTextPro, [:ptr, :str, :ptr, :ptr, :float, :float, :float, :ptr], :void
527
+ ffi_func :rl_DrawTextCodepoint, [:ptr, :int, :ptr, :float, :ptr], :void
528
+ ffi_func :rl_DrawTextCodepoints, [:ptr, :ptr, :int, :ptr, :float, :float, :ptr], :void
529
+ ffi_func :SetTextLineSpacing, [:int], :void
530
+ ffi_func :MeasureText, [:str, :int], :int
531
+ ffi_func :rl_MeasureTextEx, [:ptr, :str, :float, :float, :ptr], :void
532
+ ffi_func :rl_MeasureTextCodepoints, [:ptr, :ptr, :int, :float, :float, :ptr], :void
533
+ ffi_func :rl_GetGlyphIndex, [:ptr, :int], :int
534
+ ffi_func :rl_GetGlyphInfo, [:ptr, :int], :ptr
535
+ ffi_func :rl_GetGlyphAtlasRec, [:ptr, :int, :ptr], :void
536
+ ffi_func :LoadUTF8, [:ptr, :int], :str
537
+ ffi_func :UnloadUTF8, [:str], :void
538
+ ffi_func :UnloadCodepoints, [:ptr], :void
539
+ ffi_func :GetCodepointCount, [:str], :int
540
+ ffi_func :GetCodepoint, [:str, :ptr], :int
541
+ ffi_func :GetCodepointNext, [:str, :ptr], :int
542
+ ffi_func :GetCodepointPrevious, [:str, :ptr], :int
543
+ ffi_func :CodepointToUTF8, [:int, :ptr], :str
544
+ ffi_func :LoadTextLines, [:str, :ptr], :ptr
545
+ ffi_func :UnloadTextLines, [:ptr, :int], :void
546
+ ffi_func :TextCopy, [:str, :str], :int
547
+ ffi_func :TextIsEqual, [:str, :str], :bool
548
+ ffi_func :TextLength, [:str], :uint
549
+ ffi_func :TextSubtext, [:str, :int, :int], :str
550
+ ffi_func :TextRemoveSpaces, [:str], :str
551
+ ffi_func :GetTextBetween, [:str, :str, :str], :str
552
+ ffi_func :TextReplace, [:str, :str, :str], :str
553
+ ffi_func :TextReplaceAlloc, [:str, :str, :str], :str
554
+ ffi_func :TextReplaceBetween, [:str, :str, :str, :str], :str
555
+ ffi_func :TextReplaceBetweenAlloc, [:str, :str, :str, :str], :str
556
+ ffi_func :TextInsert, [:str, :str, :int], :str
557
+ ffi_func :TextInsertAlloc, [:str, :str, :int], :str
558
+ ffi_func :TextJoin, [:ptr, :int, :str], :str
559
+ ffi_func :TextSplit, [:str, :char, :ptr], :ptr
560
+ ffi_func :TextAppend, [:str, :str, :ptr], :void
561
+ ffi_func :TextFindIndex, [:str, :str], :int
562
+ ffi_func :TextToUpper, [:str], :str
563
+ ffi_func :TextToLower, [:str], :str
564
+ ffi_func :TextToPascal, [:str], :str
565
+ ffi_func :TextToSnake, [:str], :str
566
+ ffi_func :TextToCamel, [:str], :str
567
+ ffi_func :TextToInteger, [:str], :int
568
+ ffi_func :TextToFloat, [:str], :float
569
+ ffi_func :rl_DrawLine3D, [:ptr, :ptr, :ptr], :void
570
+ ffi_func :rl_DrawPoint3D, [:ptr, :ptr], :void
571
+ ffi_func :rl_DrawCircle3D, [:ptr, :float, :ptr, :float, :ptr], :void
572
+ ffi_func :rl_DrawTriangle3D, [:ptr, :ptr, :ptr, :ptr], :void
573
+ ffi_func :rl_DrawTriangleStrip3D, [:ptr, :int, :ptr], :void
574
+ ffi_func :rl_DrawCubeV, [:ptr, :ptr, :ptr], :void
575
+ ffi_func :rl_DrawCubeWiresV, [:ptr, :ptr, :ptr], :void
576
+ ffi_func :rl_DrawSphere, [:ptr, :float, :ptr], :void
577
+ ffi_func :rl_DrawSphereEx, [:ptr, :float, :int, :int, :ptr], :void
578
+ ffi_func :rl_DrawSphereWires, [:ptr, :float, :int, :int, :ptr], :void
579
+ ffi_func :rl_DrawCylinder, [:ptr, :float, :float, :float, :int, :ptr], :void
580
+ ffi_func :rl_DrawCylinderEx, [:ptr, :ptr, :float, :float, :int, :ptr], :void
581
+ ffi_func :rl_DrawCylinderWires, [:ptr, :float, :float, :float, :int, :ptr], :void
582
+ ffi_func :rl_DrawCylinderWiresEx, [:ptr, :ptr, :float, :float, :int, :ptr], :void
583
+ ffi_func :rl_DrawCapsule, [:ptr, :ptr, :float, :int, :int, :ptr], :void
584
+ ffi_func :rl_DrawCapsuleWires, [:ptr, :ptr, :float, :int, :int, :ptr], :void
585
+ ffi_func :rl_DrawRay, [:ptr, :ptr], :void
586
+ ffi_func :DrawGrid, [:int, :float], :void
587
+ ffi_func :rl_LoadModel, [:str], :ptr
588
+ ffi_func :rl_LoadModelFromMesh, [:ptr], :ptr
589
+ ffi_func :rl_IsModelValid, [:ptr], :bool
590
+ ffi_func :rl_UnloadModel, [:ptr], :void
591
+ ffi_func :rl_GetModelBoundingBox, [:ptr, :ptr], :void
592
+ ffi_func :rl_DrawModel, [:ptr, :ptr, :float, :ptr], :void
593
+ ffi_func :rl_DrawModelEx, [:ptr, :ptr, :ptr, :float, :ptr, :ptr], :void
594
+ ffi_func :rl_DrawModelWires, [:ptr, :ptr, :float, :ptr], :void
595
+ ffi_func :rl_DrawModelWiresEx, [:ptr, :ptr, :ptr, :float, :ptr, :ptr], :void
596
+ ffi_func :rl_DrawBoundingBox, [:ptr, :ptr], :void
597
+ ffi_func :rl_DrawBillboard, [:ptr, :ptr, :ptr, :float, :ptr], :void
598
+ ffi_func :rl_DrawBillboardRec, [:ptr, :ptr, :ptr, :ptr, :ptr, :ptr], :void
599
+ ffi_func :rl_DrawBillboardPro, [:ptr, :ptr, :ptr, :ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
600
+ ffi_func :rl_UpdateMeshBuffer, [:ptr, :int, :ptr, :int, :int], :void
601
+ ffi_func :rl_UnloadMesh, [:ptr], :void
602
+ ffi_func :rl_DrawMesh, [:ptr, :ptr, :ptr], :void
603
+ ffi_func :rl_DrawMeshInstanced, [:ptr, :ptr, :ptr, :int], :void
604
+ ffi_func :rl_GetMeshBoundingBox, [:ptr, :ptr], :void
605
+ ffi_func :rl_ExportMesh, [:ptr, :str], :bool
606
+ ffi_func :rl_ExportMeshAsCode, [:ptr, :str], :bool
607
+ ffi_func :rl_GenMeshPoly, [:int, :float], :ptr
608
+ ffi_func :rl_GenMeshPlane, [:float, :float, :int, :int], :ptr
609
+ ffi_func :rl_GenMeshCube, [:float, :float, :float], :ptr
610
+ ffi_func :rl_GenMeshSphere, [:float, :int, :int], :ptr
611
+ ffi_func :rl_GenMeshHemiSphere, [:float, :int, :int], :ptr
612
+ ffi_func :rl_GenMeshCylinder, [:float, :float, :int], :ptr
613
+ ffi_func :rl_GenMeshCone, [:float, :float, :int], :ptr
614
+ ffi_func :rl_GenMeshTorus, [:float, :float, :int, :int], :ptr
615
+ ffi_func :rl_GenMeshKnot, [:float, :float, :int, :int], :ptr
616
+ ffi_func :rl_GenMeshHeightmap, [:ptr, :ptr], :ptr
617
+ ffi_func :rl_GenMeshCubicmap, [:ptr, :ptr], :ptr
618
+ ffi_func :LoadMaterials, [:str, :ptr], :ptr
619
+ ffi_func :rl_LoadMaterialDefault, [], :ptr
620
+ ffi_func :rl_IsMaterialValid, [:ptr], :bool
621
+ ffi_func :rl_UnloadMaterial, [:ptr], :void
622
+ ffi_func :rl_SetMaterialTexture, [:ptr, :int, :ptr], :void
623
+ ffi_func :rl_UpdateModelAnimation, [:ptr, :ptr, :float], :void
624
+ ffi_func :rl_UpdateModelAnimationEx, [:ptr, :ptr, :float, :ptr, :float, :float], :void
625
+ ffi_func :UnloadModelAnimations, [:ptr, :int], :void
626
+ ffi_func :rl_IsModelAnimationValid, [:ptr, :ptr], :bool
627
+ ffi_func :rl_CheckCollisionSpheres, [:ptr, :float, :ptr, :float], :bool
628
+ ffi_func :rl_CheckCollisionBoxes, [:ptr, :ptr], :bool
629
+ ffi_func :rl_CheckCollisionBoxSphere, [:ptr, :ptr, :float], :bool
630
+ ffi_func :rl_GetRayCollisionSphere, [:ptr, :ptr, :float, :ptr], :void
631
+ ffi_func :rl_GetRayCollisionBox, [:ptr, :ptr, :ptr], :void
632
+ ffi_func :rl_GetRayCollisionMesh, [:ptr, :ptr, :ptr, :ptr], :void
633
+ ffi_func :rl_GetRayCollisionTriangle, [:ptr, :ptr, :ptr, :ptr, :ptr], :void
634
+ ffi_func :rl_GetRayCollisionQuad, [:ptr, :ptr, :ptr, :ptr, :ptr, :ptr], :void
635
+ ffi_func :InitAudioDevice, [], :void
636
+ ffi_func :CloseAudioDevice, [], :void
637
+ ffi_func :IsAudioDeviceReady, [], :bool
638
+ ffi_func :SetMasterVolume, [:float], :void
639
+ ffi_func :GetMasterVolume, [], :float
640
+ ffi_func :rl_LoadWave, [:str], :ptr
641
+ ffi_func :rl_LoadWaveFromMemory, [:str, :ptr, :int], :ptr
642
+ ffi_func :rl_IsWaveValid, [:ptr], :bool
643
+ ffi_func :rl_LoadSound, [:str], :ptr
644
+ ffi_func :rl_LoadSoundFromWave, [:ptr], :ptr
645
+ ffi_func :rl_LoadSoundAlias, [:ptr], :ptr
646
+ ffi_func :rl_IsSoundValid, [:ptr], :bool
647
+ ffi_func :rl_UpdateSound, [:ptr, :ptr, :int], :void
648
+ ffi_func :rl_UnloadWave, [:ptr], :void
649
+ ffi_func :rl_UnloadSound, [:ptr], :void
650
+ ffi_func :rl_UnloadSoundAlias, [:ptr], :void
651
+ ffi_func :rl_ExportWave, [:ptr, :str], :bool
652
+ ffi_func :rl_ExportWaveAsCode, [:ptr, :str], :bool
653
+ ffi_func :rl_PlaySound, [:ptr], :void
654
+ ffi_func :rl_StopSound, [:ptr], :void
655
+ ffi_func :rl_PauseSound, [:ptr], :void
656
+ ffi_func :rl_ResumeSound, [:ptr], :void
657
+ ffi_func :rl_IsSoundPlaying, [:ptr], :bool
658
+ ffi_func :rl_SetSoundVolume, [:ptr, :float], :void
659
+ ffi_func :rl_SetSoundPitch, [:ptr, :float], :void
660
+ ffi_func :rl_SetSoundPan, [:ptr, :float], :void
661
+ ffi_func :rl_WaveCopy, [:ptr], :ptr
662
+ ffi_func :WaveCrop, [:ptr, :int, :int], :void
663
+ ffi_func :WaveFormat, [:ptr, :int, :int, :int], :void
664
+ ffi_func :rl_LoadWaveSamples, [:ptr], :ptr
665
+ ffi_func :UnloadWaveSamples, [:ptr], :void
666
+ ffi_func :rl_LoadMusicStream, [:str], :ptr
667
+ ffi_func :rl_LoadMusicStreamFromMemory, [:str, :ptr, :int], :ptr
668
+ ffi_func :rl_IsMusicValid, [:ptr], :bool
669
+ ffi_func :rl_UnloadMusicStream, [:ptr], :void
670
+ ffi_func :rl_PlayMusicStream, [:ptr], :void
671
+ ffi_func :rl_IsMusicStreamPlaying, [:ptr], :bool
672
+ ffi_func :rl_UpdateMusicStream, [:ptr], :void
673
+ ffi_func :rl_StopMusicStream, [:ptr], :void
674
+ ffi_func :rl_PauseMusicStream, [:ptr], :void
675
+ ffi_func :rl_ResumeMusicStream, [:ptr], :void
676
+ ffi_func :rl_SeekMusicStream, [:ptr, :float], :void
677
+ ffi_func :rl_SetMusicVolume, [:ptr, :float], :void
678
+ ffi_func :rl_SetMusicPitch, [:ptr, :float], :void
679
+ ffi_func :rl_SetMusicPan, [:ptr, :float], :void
680
+ ffi_func :rl_GetMusicTimeLength, [:ptr], :float
681
+ ffi_func :rl_GetMusicTimePlayed, [:ptr], :float
682
+ ffi_func :rl_LoadAudioStream, [:uint, :uint, :uint], :ptr
683
+ ffi_func :rl_IsAudioStreamValid, [:ptr], :bool
684
+ ffi_func :rl_UnloadAudioStream, [:ptr], :void
685
+ ffi_func :rl_UpdateAudioStream, [:ptr, :str, :int], :void
686
+ ffi_func :rl_IsAudioStreamProcessed, [:ptr], :bool
687
+ ffi_func :rl_PlayAudioStream, [:ptr], :void
688
+ ffi_func :rl_PauseAudioStream, [:ptr], :void
689
+ ffi_func :rl_ResumeAudioStream, [:ptr], :void
690
+ ffi_func :rl_IsAudioStreamPlaying, [:ptr], :bool
691
+ ffi_func :rl_StopAudioStream, [:ptr], :void
692
+ ffi_func :rl_SetAudioStreamVolume, [:ptr, :float], :void
693
+ ffi_func :rl_SetAudioStreamPitch, [:ptr, :float], :void
694
+ ffi_func :rl_SetAudioStreamPan, [:ptr, :float], :void
695
+ ffi_func :SetAudioStreamBufferSizeDefault, [:int], :void
696
+ ffi_func :rl_SetAudioStreamCallback, [:ptr, :ptr], :void
697
+ ffi_func :rl_AttachAudioStreamProcessor, [:ptr, :ptr], :void
698
+ ffi_func :rl_DetachAudioStreamProcessor, [:ptr, :ptr], :void
699
+ ffi_func :rl_AttachAudioMixedProcessor, [:ptr], :void
700
+ ffi_func :rl_DetachAudioMixedProcessor, [:ptr], :void
701
+ native_struct "Vector4", "rl_Vector4"
702
+ native_new [], "rl_Vector4_new"
703
+ native_new [:ptr, :any], "rl_Vector4_view"
704
+ native_new [:any], "rl_Vector4_view_addr"
705
+ native_method :x, [], :float, "rl_Vector4_x"
706
+ native_method :x=, [:float], :float, "rl_Vector4_set_x"
707
+ native_method :y, [], :float, "rl_Vector4_y"
708
+ native_method :y=, [:float], :float, "rl_Vector4_set_y"
709
+ native_method :z, [], :float, "rl_Vector4_z"
710
+ native_method :z=, [:float], :float, "rl_Vector4_set_z"
711
+ native_method :w, [], :float, "rl_Vector4_w"
712
+ native_method :w=, [:float], :float, "rl_Vector4_set_w"
713
+ native_struct "Rectangle", "rl_Rectangle"
714
+ native_new [], "rl_Rectangle_new"
715
+ # Address view (gem: Rectangle.new(font.recs + i * Rectangle.size)).
716
+ native_new [:any], "rl_Rectangle_view_addr"
717
+ native_method :x, [], :float, "rl_Rectangle_x"
718
+ native_method :x=, [:float], :float, "rl_Rectangle_set_x"
719
+ native_method :y, [], :float, "rl_Rectangle_y"
720
+ native_method :y=, [:float], :float, "rl_Rectangle_set_y"
721
+ native_method :width, [], :float, "rl_Rectangle_width"
722
+ native_method :width=, [:float], :float, "rl_Rectangle_set_width"
723
+ native_method :height, [], :float, "rl_Rectangle_height"
724
+ native_method :height=, [:float], :float, "rl_Rectangle_set_height"
725
+ native_struct "Camera2D", "rl_Camera2D"
726
+ native_new [], "rl_Camera2D_new"
727
+ native_method :offset_ptr, [], :ptr, "rl_Camera2D_offset_ptr"
728
+ native_method :target_ptr, [], :ptr, "rl_Camera2D_target_ptr"
729
+ # Vector2 views (gem: camera.offset.x), address form like Camera#position.
730
+ class Camera2D
731
+ def offset = Vector2.new(Raylib.rl_Camera2D_offset_ptr(self))
732
+ def target = Vector2.new(Raylib.rl_Camera2D_target_ptr(self))
733
+ end
734
+ native_method :rotation, [], :float, "rl_Camera2D_rotation"
735
+ native_method :rotation=, [:float], :float, "rl_Camera2D_set_rotation"
736
+ native_method :zoom, [], :float, "rl_Camera2D_zoom"
737
+ native_method :zoom=, [:float], :float, "rl_Camera2D_set_zoom"
738
+ # Gem-shaped fluent builders (raylib_helper.rb Camera2D#with_*).
739
+ native_method :with_target, [:float, :float], :self, "rl_Camera2D_with_target"
740
+ native_method :with_offset, [:float, :float], :self, "rl_Camera2D_with_offset"
741
+ native_method :with_rotation, [:float], :self, "rl_Camera2D_with_rotation"
742
+ native_method :with_zoom, [:float], :self, "rl_Camera2D_with_zoom"
743
+ native_struct "BoundingBox", "rl_BoundingBox"
744
+ native_new [], "rl_BoundingBox_new"
745
+ native_method :with_min, %i[float float float], :self, "rl_BoundingBox_with_min"
746
+ native_method :with_max, %i[float float float], :self, "rl_BoundingBox_with_max"
747
+ native_method :min_ptr, [], :ptr, "rl_BoundingBox_min_ptr"
748
+ native_method :max_ptr, [], :ptr, "rl_BoundingBox_max_ptr"
749
+ class BoundingBox
750
+ def min = Vector3.new(Raylib.rl_BoundingBox_min_ptr(self))
751
+ def max = Vector3.new(Raylib.rl_BoundingBox_max_ptr(self))
752
+ end
753
+ # Transform (3 Vector3s): the gem helper class, views for t/r/s.
754
+ native_struct "Transform", "rl_Transform"
755
+ native_new [], "rl_Transform_new"
756
+ native_method :t_ptr, [], :ptr, "rl_Transform_t_ptr"
757
+ native_method :r_ptr, [], :ptr, "rl_Transform_r_ptr"
758
+ native_method :s_ptr, [], :ptr, "rl_Transform_s_ptr"
759
+ # Gem helper names (raylib_helper.rb Transform#t/#r/#s), address views.
760
+ class Transform
761
+ def t = Vector3.new(Raylib.rl_Transform_t_ptr(self))
762
+ def translation = t
763
+ def r = Vector4.new(Raylib.rl_Transform_r_ptr(self))
764
+ def rotation = r
765
+ def s = Vector3.new(Raylib.rl_Transform_s_ptr(self))
766
+ def scale = s
767
+ end
768
+ native_struct "Ray", "rl_Ray"
769
+ native_new [], "rl_Ray_new"
770
+ native_struct "RayCollision", "rl_RayCollision"
771
+ native_new [], "rl_RayCollision_new"
772
+ native_method :hit, [], :int, "rl_RayCollision_hit"
773
+ native_method :hit=, [:int], :int, "rl_RayCollision_set_hit"
774
+ native_method :distance, [], :float, "rl_RayCollision_distance"
775
+ native_method :distance=, [:float], :float, "rl_RayCollision_set_distance"
776
+ # collision.point / collision.normal live in raylib_handles.rb (value copies
777
+ # from the out-param shims).
778
+ native_struct "Matrix", "rl_Matrix"
779
+ native_new [], "rl_Matrix_new"
780
+ native_method :m0, [], :float, "rl_Matrix_m0"
781
+ native_method :m0=, [:float], :float, "rl_Matrix_set_m0"
782
+ native_method :m4, [], :float, "rl_Matrix_m4"
783
+ native_method :m4=, [:float], :float, "rl_Matrix_set_m4"
784
+ native_method :m8, [], :float, "rl_Matrix_m8"
785
+ native_method :m8=, [:float], :float, "rl_Matrix_set_m8"
786
+ native_method :m12, [], :float, "rl_Matrix_m12"
787
+ native_method :m12=, [:float], :float, "rl_Matrix_set_m12"
788
+ native_method :m1, [], :float, "rl_Matrix_m1"
789
+ native_method :m1=, [:float], :float, "rl_Matrix_set_m1"
790
+ native_method :m5, [], :float, "rl_Matrix_m5"
791
+ native_method :m5=, [:float], :float, "rl_Matrix_set_m5"
792
+ native_method :m9, [], :float, "rl_Matrix_m9"
793
+ native_method :m9=, [:float], :float, "rl_Matrix_set_m9"
794
+ native_method :m13, [], :float, "rl_Matrix_m13"
795
+ native_method :m13=, [:float], :float, "rl_Matrix_set_m13"
796
+ native_method :m2, [], :float, "rl_Matrix_m2"
797
+ native_method :m2=, [:float], :float, "rl_Matrix_set_m2"
798
+ native_method :m6, [], :float, "rl_Matrix_m6"
799
+ native_method :m6=, [:float], :float, "rl_Matrix_set_m6"
800
+ native_method :m10, [], :float, "rl_Matrix_m10"
801
+ native_method :m10=, [:float], :float, "rl_Matrix_set_m10"
802
+ native_method :m14, [], :float, "rl_Matrix_m14"
803
+ native_method :m14=, [:float], :float, "rl_Matrix_set_m14"
804
+ native_method :m3, [], :float, "rl_Matrix_m3"
805
+ native_method :m3=, [:float], :float, "rl_Matrix_set_m3"
806
+ native_method :m7, [], :float, "rl_Matrix_m7"
807
+ native_method :m7=, [:float], :float, "rl_Matrix_set_m7"
808
+ native_method :m11, [], :float, "rl_Matrix_m11"
809
+ native_method :m11=, [:float], :float, "rl_Matrix_set_m11"
810
+ native_method :m15, [], :float, "rl_Matrix_m15"
811
+ native_method :m15=, [:float], :float, "rl_Matrix_set_m15"
812
+ native_struct "NPatchInfo", "rl_NPatchInfo"
813
+ native_new [], "rl_NPatchInfo_new"
814
+ native_method :left, [], :int, "rl_NPatchInfo_left"
815
+ native_method :left=, [:int], :int, "rl_NPatchInfo_set_left"
816
+ native_method :top, [], :int, "rl_NPatchInfo_top"
817
+ native_method :top=, [:int], :int, "rl_NPatchInfo_set_top"
818
+ native_method :right, [], :int, "rl_NPatchInfo_right"
819
+ native_method :right=, [:int], :int, "rl_NPatchInfo_set_right"
820
+ native_method :bottom, [], :int, "rl_NPatchInfo_bottom"
821
+ native_method :bottom=, [:int], :int, "rl_NPatchInfo_set_bottom"
822
+ native_method :layout, [], :int, "rl_NPatchInfo_layout"
823
+ native_method :layout=, [:int], :int, "rl_NPatchInfo_set_layout"
824
+ native_struct "VrDeviceInfo", "rl_VrDeviceInfo"
825
+ native_new [], "rl_VrDeviceInfo_new"
826
+ native_method :hResolution, [], :int, "rl_VrDeviceInfo_hResolution"
827
+ native_method :hResolution=, [:int], :int, "rl_VrDeviceInfo_set_hResolution"
828
+ native_method :vResolution, [], :int, "rl_VrDeviceInfo_vResolution"
829
+ native_method :vResolution=, [:int], :int, "rl_VrDeviceInfo_set_vResolution"
830
+ native_method :hScreenSize, [], :float, "rl_VrDeviceInfo_hScreenSize"
831
+ native_method :hScreenSize=, [:float], :float, "rl_VrDeviceInfo_set_hScreenSize"
832
+ native_method :vScreenSize, [], :float, "rl_VrDeviceInfo_vScreenSize"
833
+ native_method :vScreenSize=, [:float], :float, "rl_VrDeviceInfo_set_vScreenSize"
834
+ native_method :eyeToScreenDistance, [], :float, "rl_VrDeviceInfo_eyeToScreenDistance"
835
+ native_method :eyeToScreenDistance=, [:float], :float, "rl_VrDeviceInfo_set_eyeToScreenDistance"
836
+ native_method :lensSeparationDistance, [], :float, "rl_VrDeviceInfo_lensSeparationDistance"
837
+ native_method :lensSeparationDistance=, [:float], :float, "rl_VrDeviceInfo_set_lensSeparationDistance"
838
+ native_method :interpupillaryDistance, [], :float, "rl_VrDeviceInfo_interpupillaryDistance"
839
+ native_method :interpupillaryDistance=, [:float], :float, "rl_VrDeviceInfo_set_interpupillaryDistance"
840
+ native_struct "VrStereoConfig", "rl_VrStereoConfig"
841
+ native_new [], "rl_VrStereoConfig_new"
842
+ native_struct "FilePathList", "rl_FilePathList"
843
+ native_new [], "rl_FilePathList_new"
844
+ native_method :count, [], :int, "rl_FilePathList_count"
845
+ native_method :count=, [:int], :int, "rl_FilePathList_set_count"
846
+ native_struct "AutomationEvent", "rl_AutomationEvent"
847
+ native_new [], "rl_AutomationEvent_new"
848
+ native_new [:any, :any], "rl_AutomationEvent_view_any"
849
+ native_new [:any], "rl_AutomationEvent_view_addr"
850
+ native_method :frame, [], :int, "rl_AutomationEvent_frame"
851
+ native_method :frame=, [:int], :int, "rl_AutomationEvent_set_frame"
852
+ native_method :type, [], :int, "rl_AutomationEvent_type"
853
+ native_method :type=, [:int], :int, "rl_AutomationEvent_set_type"
854
+ native_struct "AutomationEventList", "rl_AutomationEventList"
855
+ native_new [], "rl_AutomationEventList_new"
856
+ native_new [:any, :any], "rl_AutomationEventList_view_any"
857
+ native_new [:any], "rl_AutomationEventList_view_addr"
858
+ ffi_func :rl_AutomationEventList_events_addr, [:ptr], :long
859
+ native_method :capacity, [], :int, "rl_AutomationEventList_capacity"
860
+ native_method :capacity=, [:int], :int, "rl_AutomationEventList_set_capacity"
861
+ native_method :count, [], :int, "rl_AutomationEventList_count"
862
+ native_method :count=, [:int], :int, "rl_AutomationEventList_set_count"
863
+ native_struct "Vector2", "rl_Vector2"
864
+ native_new [], "rl_Vector2_new"
865
+ native_new [:any], "rl_Vector2_view_addr"
866
+ # View constructor: payload pointer + owner (kept alive by the view's scan).
867
+ native_new [:ptr, :any], "rl_Vector2_view"
868
+ native_method :x, [], :float, "rl_Vector2_x"
869
+ native_method :x=, [:float], :float, "rl_Vector2_set_x"
870
+ native_method :y, [], :float, "rl_Vector2_y"
871
+ native_method :y=, [:float], :float, "rl_Vector2_set_y"
872
+
873
+ # Window
874
+ ffi_func :InitWindow, %i[int int str], :void
875
+ ffi_func :CloseWindow, [], :void
876
+ # Bool-returning raylib functions go through rl_ shims (see
877
+ # raylib_adapter.c — _Bool returns only define AL on x86-64).
878
+ # Spinel marshals :bool results as real true/false objects.
879
+ ffi_func :WindowShouldClose, [], :bool
880
+ ffi_func :SetTargetFPS, [:int], :void
881
+ ffi_func :EnableCursor, [], :void
882
+ ffi_func :GetScreenWidth, [], :int
883
+ ffi_func :GetScreenHeight, [], :int
884
+
885
+ # Vector2 helpers (custom — not raylib functions)
886
+ ffi_func :Vector2Create, %i[float float], :ptr
887
+ ffi_func :Vector2GetX, [:ptr], :float
888
+ ffi_func :Vector2GetY, [:ptr], :float
889
+ ffi_func :Vector2SetX, %i[ptr float], :void
890
+ ffi_func :Vector2SetY, %i[ptr float], :void
891
+
892
+ # Drawing
893
+ # Color/vector-taking raylib functions are redeclared as rl_ shims
894
+ # (pointers only) — see raylib_adapter.c. Color structs are
895
+ # heap-allocated via ffi_struct and passed as void*.
896
+ ffi_func :BeginDrawing, [], :void
897
+ ffi_func :EndDrawing, [], :void
898
+ ffi_func :rl_ClearBackground, [:ptr], :void
899
+ ffi_func :rl_DrawCircleV, %i[ptr float ptr], :void
900
+ ffi_func :rl_DrawTriangle, %i[ptr ptr ptr ptr], :void
901
+ ffi_func :rl_DrawText, %i[str int int int ptr], :void
902
+ ffi_func :rl_DrawTextInt, %i[str int int int int ptr], :void
903
+ ffi_func :DrawFPS, %i[int int], :void
904
+
905
+ # Input
906
+ ffi_func :IsKeyDown, [:int], :bool
907
+ ffi_func :IsKeyPressed, [:int], :bool
908
+ ffi_func :IsMouseButtonDown, [:int], :bool
909
+ ffi_func :IsGamepadButtonDown, %i[int int], :bool
910
+ ffi_func :GetMouseX, [], :int
911
+ ffi_func :GetMouseY, [], :int
912
+
913
+ # Time
914
+ ffi_func :GetFrameTime, [], :float
915
+ ffi_func :GetTime, [], :double # raylib returns double
916
+ ffi_func :GetFPS, [], :int
917
+
918
+ # Color is a native (C-backed) GC-managed class (see raylib_adapter.c:
919
+ # rl_Color embeds the raylib Color struct). Instances live in spinel's GC
920
+ # heap, so a color is reclaimed automatically when the last reference
921
+ # (e.g. a Bunny) is collected — no manual Color.free is needed.
922
+ #
923
+ # Spinel cannot pass a native object to an ffi_func :ptr/:any argument
924
+ # (only as a native_method receiver), so every color-consuming draw call
925
+ # is a method on the Color itself (the color is the receiver).
926
+ native_struct "Color", "rl_Color"
927
+ native_new [:int, :int, :int, :int], "rl_Color_new"
928
+ native_new [], "rl_Color_new0"
929
+ # Views: Color.new(ptr, owner) / Color.new(addr) (gem code indexes
930
+ # LoadImageColors with Color.new(mapPixels + Color.size * i)).
931
+ native_new [:ptr, :any], "rl_Color_view"
932
+ native_new [:any], "rl_Color_view_addr"
933
+ native_method :r, [], :int, "rl_Color_r"
934
+ native_method :g, [], :int, "rl_Color_g"
935
+ native_method :b, [], :int, "rl_Color_b"
936
+ native_method :a, [], :int, "rl_Color_a"
937
+ native_method :r=, [:int], :int, "rl_Color_set_r"
938
+ native_method :g=, [:int], :int, "rl_Color_set_g"
939
+ native_method :b=, [:int], :int, "rl_Color_set_b"
940
+ native_method :a=, [:int], :int, "rl_Color_set_a"
941
+ # Texture (opaque pointer — rl_LoadTexture mallocs Texture2D)
942
+ ffi_func :rl_LoadTexture, [:str], :ptr
943
+ ffi_func :rl_DrawTexture, %i[ptr int int ptr], :void
944
+ # Tint passed as a packed 0xRRGGBBAA int (data-oriented sprite pools).
945
+ ffi_func :rl_DrawTexturePacked, %i[ptr int int int], :void
946
+ ffi_func :rl_DrawTextureEx, %i[ptr float float float float ptr], :void
947
+ ffi_func :rl_UnloadTexture, [:ptr], :void
948
+
949
+ # Input / misc (plain raylib functions — no struct args)
950
+ ffi_func :GetRandomValue, %i[int int], :int
951
+ ffi_func :DisableCursor, [], :void
952
+ ffi_func :EndMode3D, [], :void
953
+
954
+ # 3D / extra drawing (Vector3, Vector2, Camera3D, Color passed as pointers)
955
+ ffi_func :rl_BeginMode3D, [:ptr], :void
956
+ ffi_func :rl_UpdateCamera, %i[ptr int], :void
957
+ ffi_func :rl_DrawPlane, %i[ptr ptr ptr], :void
958
+ ffi_func :rl_DrawCube, %i[ptr float float float ptr], :void
959
+ ffi_func :rl_DrawCubeWires, %i[ptr float float float ptr], :void
960
+ ffi_func :rl_DrawRectangle, %i[int int int int ptr], :void
961
+ ffi_func :rl_DrawRectangleLines, %i[int int int int ptr], :void
962
+ ffi_func :rl_DrawPixel, %i[int int ptr], :void
963
+ # Color passed as a packed 0xRRGGBBAA int (data-oriented particle pools).
964
+ ffi_func :rl_DrawPixelPacked, %i[int int int], :void
965
+ # Batch-draw a whole pool in one call: parallel x/y FloatArrays and a packed
966
+ # color IntArray (passed as their flat data pointers by the FFI).
967
+ ffi_func :rl_DrawPixelsPacked, %i[float_array float_array int_array int], :void
968
+
969
+ # Vector3 — native GC object (mirrors Color). Passed to the 3D shims as its
970
+ # pointer; field-read with .x/.y/.z.
971
+ native_struct "Vector3", "rl_Vector3"
972
+ native_new [:float, :float, :float], "rl_Vector3_new"
973
+ native_new [:any], "rl_Vector3_view_addr"
974
+ native_new [:ptr, :any], "rl_Vector3_view"
975
+ native_method :x, [], :float, "rl_Vector3_x"
976
+ native_method :y, [], :float, "rl_Vector3_y"
977
+ native_method :z, [], :float, "rl_Vector3_z"
978
+ native_method :x=, [:float], :float, "rl_Vector3_set_x"
979
+ native_method :y=, [:float], :float, "rl_Vector3_set_y"
980
+ native_method :z=, [:float], :float, "rl_Vector3_set_z"
981
+
982
+ # Camera — native GC object wrapping Camera3D. Built with the with_* chain,
983
+ # mutated by rl_UpdateCamera, passed to rl_BeginMode3D.
984
+ native_struct "Camera", "rl_Camera"
985
+ native_new [], "rl_Camera_new"
986
+ native_method :with_position, [:float, :float, :float], :self, "rl_Camera_with_position"
987
+ native_method :with_target, [:float, :float, :float], :self, "rl_Camera_with_target"
988
+ native_method :with_up, [:float, :float, :float], :self, "rl_Camera_with_up"
989
+ native_method :with_fovy, [:float], :self, "rl_Camera_with_fovy"
990
+ native_method :with_projection, [:int], :self, "rl_Camera_with_projection"
991
+ # Gem-shaped field access (sub-struct views; see raylib_structs.rb).
992
+ native_method :position_ptr, [], :ptr, "rl_Camera_position_ptr"
993
+ native_method :target_ptr, [], :ptr, "rl_Camera_target_ptr"
994
+ native_method :up_ptr, [], :ptr, "rl_Camera_up_ptr"
995
+ # Vector3 views (gem: camera.position.x). ffi_func form: a native_method :ptr
996
+ # return is boxed and produces a zeroed view when fed to Vector3.new.
997
+ # Camera position/target components. Spinel emits a *field* dispatch for
998
+ # `position` once any native struct has a field of that name (physac's
999
+ # PhysicsBodyData does, and the `require "raylib"` entry loads it), which
1000
+ # leaves the Camera arm out and breaks `camera.position.x` on polymorphic
1001
+ # receivers. These helpers go through the component shims instead, so they
1002
+ # work on typed and polymorphic receivers alike (mirrored on CRuby in
1003
+ # raylib_ruby.rb).
1004
+ # Font glyph metrics. A polymorphic receiver cannot reach Font#glyphs /
1005
+ # #recs in every TU shape (the name is a native struct field, and the
1006
+ # require "raylib" entry degrades the send to an empty field dispatch), so
1007
+ # scenes go through these shim wrappers (mirrored on CRuby).
1008
+ # Render texture / bounding box / path-list views through their shims, for
1009
+ # polymorphic receivers (the Ruby accessors on native classes do not survive
1010
+ # every TU shape; see FontTexture above). Mirrored on CRuby.
1011
+ # rlgl matrix multiply from a Matrix view (the raw Rlgl.rlMultMatrixf ffi_func
1012
+ # passes the view header under AOT; the gem's takes a pointer to floats).
1013
+ # Gamepad device name (the gem's binding returns a pointer; CRuby mirror in
1014
+ # raylib_ruby.rb reads the string).
1015
+ def self.GamepadName(gamepad)
1016
+ Raylib.GetGamepadName(gamepad)
1017
+ end
1018
+
1019
+ def self.MultMatrixf(matrix)
1020
+ Raylib.rl_rlMultMatrixf_matrix(matrix)
1021
+ end
1022
+
1023
+ def self.RenderTextureTexture(target)
1024
+ Texture2D.new(Raylib.rl_RenderTexture_texture_ptr(target), target)
1025
+ end
1026
+
1027
+ def self.BoundingBoxMin(box) = Vector3.new(Raylib.rl_BoundingBox_min_ptr(box))
1028
+ def self.BoundingBoxMax(box) = Vector3.new(Raylib.rl_BoundingBox_max_ptr(box))
1029
+
1030
+ def self.FilePathListPath(list, index)
1031
+ Raylib.rl_FilePathList_path(list, index)
1032
+ end
1033
+
1034
+ def self.TransformTranslation(xform) = Vector3.new(Raylib.rl_Transform_t_ptr(xform))
1035
+
1036
+ # Font texture view through the shim (Font#texture is a native struct field
1037
+ # name, and a polymorphic receiver degrades the Ruby accessor in some TU
1038
+ # shapes; mirrored on CRuby).
1039
+ def self.FontTexture(font)
1040
+ Raylib.rl_FontTexture(font)
1041
+ end
1042
+
1043
+ def self.FontGlyphAdvanceX(font, index)
1044
+ Raylib.rl_FontGlyphAdvanceX(font, index)
1045
+ end
1046
+
1047
+ def self.FontGlyphRecWidth(font, index)
1048
+ Raylib.rl_FontGlyphRecWidth(font, index)
1049
+ end
1050
+
1051
+ def self.CameraPositionX(camera) = Raylib.rl_Camera_position_x(camera)
1052
+ def self.CameraPositionY(camera) = Raylib.rl_Camera_position_y(camera)
1053
+ def self.CameraPositionZ(camera) = Raylib.rl_Camera_position_z(camera)
1054
+ def self.CameraTargetX(camera) = Raylib.rl_Camera_target_x(camera)
1055
+ def self.CameraTargetY(camera) = Raylib.rl_Camera_target_y(camera)
1056
+ def self.CameraTargetZ(camera) = Raylib.rl_Camera_target_z(camera)
1057
+
1058
+ class Camera
1059
+ # The address-view constructor (the 2-arg form wants a raw void*, which an
1060
+ # ffi_func :ptr result is not). The camera outlives these views in scenes.
1061
+ def position = Vector3.new(Raylib.rl_Camera_position_ptr(self))
1062
+ def target = Vector3.new(Raylib.rl_Camera_target_ptr(self))
1063
+ def up = Vector3.new(Raylib.rl_Camera_up_ptr(self))
1064
+ end
1065
+ native_method :fovy, [], :float, "rl_Camera_fovy"
1066
+ native_method :fovy=, [:float], :float, "rl_Camera_set_fovy"
1067
+ native_method :projection, [], :int, "rl_Camera_projection"
1068
+ native_method :projection=, [:int], :int, "rl_Camera_set_projection"
1069
+
1070
+ # Constants — only define under Spinel (MRI gets them from the gem).
1071
+ # RUBY_ENGINE is a compile-time constant under AOT ("spinel") and "ruby"
1072
+ # under MRI, so the branch is folded away instead of being a runtime
1073
+ # condition wrapping method definitions (which newer Spinel rejects).
1074
+ if RUBY_ENGINE == "spinel"
1075
+ # KeyboardKey enum — mirrors raylib.h (raylib 5.0), same order
1076
+ KEY_NULL = 0
1077
+ KEY_APOSTROPHE = 39
1078
+ KEY_COMMA = 44
1079
+ KEY_MINUS = 45
1080
+ KEY_PERIOD = 46
1081
+ KEY_SLASH = 47
1082
+ KEY_ZERO = 48
1083
+ KEY_ONE = 49
1084
+ KEY_TWO = 50
1085
+ KEY_THREE = 51
1086
+ KEY_FOUR = 52
1087
+ KEY_FIVE = 53
1088
+ KEY_SIX = 54
1089
+ KEY_SEVEN = 55
1090
+ KEY_EIGHT = 56
1091
+ KEY_NINE = 57
1092
+ KEY_SEMICOLON = 59
1093
+ KEY_EQUAL = 61
1094
+ KEY_A = 65
1095
+ KEY_B = 66
1096
+ KEY_C = 67
1097
+ KEY_D = 68
1098
+ KEY_E = 69
1099
+ KEY_F = 70
1100
+ KEY_G = 71
1101
+ KEY_H = 72
1102
+ KEY_I = 73
1103
+ KEY_J = 74
1104
+ KEY_K = 75
1105
+ KEY_L = 76
1106
+ KEY_M = 77
1107
+ KEY_N = 78
1108
+ KEY_O = 79
1109
+ KEY_P = 80
1110
+ KEY_Q = 81
1111
+ KEY_R = 82
1112
+ KEY_S = 83
1113
+ KEY_T = 84
1114
+ KEY_U = 85
1115
+ KEY_V = 86
1116
+ KEY_W = 87
1117
+ KEY_X = 88
1118
+ KEY_Y = 89
1119
+ KEY_Z = 90
1120
+ KEY_LEFT_BRACKET = 91
1121
+ KEY_BACKSLASH = 92
1122
+ KEY_RIGHT_BRACKET = 93
1123
+ KEY_GRAVE = 96
1124
+ KEY_SPACE = 32
1125
+ KEY_ESCAPE = 256
1126
+ KEY_ENTER = 257
1127
+ KEY_TAB = 258
1128
+ KEY_BACKSPACE = 259
1129
+ KEY_INSERT = 260
1130
+ KEY_DELETE = 261
1131
+ KEY_RIGHT = 262
1132
+ KEY_LEFT = 263
1133
+ KEY_DOWN = 264
1134
+ KEY_UP = 265
1135
+ KEY_PAGE_UP = 266
1136
+ KEY_PAGE_DOWN = 267
1137
+ KEY_HOME = 268
1138
+ KEY_END = 269
1139
+ KEY_CAPS_LOCK = 280
1140
+ KEY_SCROLL_LOCK = 281
1141
+ KEY_NUM_LOCK = 282
1142
+ KEY_PRINT_SCREEN = 283
1143
+ KEY_PAUSE = 284
1144
+ KEY_F1 = 290
1145
+ KEY_F2 = 291
1146
+ KEY_F3 = 292
1147
+ KEY_F4 = 293
1148
+ KEY_F5 = 294
1149
+ KEY_F6 = 295
1150
+ KEY_F7 = 296
1151
+ KEY_F8 = 297
1152
+ KEY_F9 = 298
1153
+ KEY_F10 = 299
1154
+ KEY_F11 = 300
1155
+ KEY_F12 = 301
1156
+ KEY_LEFT_SHIFT = 340
1157
+ KEY_LEFT_CONTROL = 341
1158
+ KEY_LEFT_ALT = 342
1159
+ KEY_LEFT_SUPER = 343
1160
+ KEY_RIGHT_SHIFT = 344
1161
+ KEY_RIGHT_CONTROL = 345
1162
+ KEY_RIGHT_ALT = 346
1163
+ KEY_RIGHT_SUPER = 347
1164
+ KEY_KB_MENU = 348
1165
+ KEY_KP_0 = 320
1166
+ KEY_KP_1 = 321
1167
+ KEY_KP_2 = 322
1168
+ KEY_KP_3 = 323
1169
+ KEY_KP_4 = 324
1170
+ KEY_KP_5 = 325
1171
+ KEY_KP_6 = 326
1172
+ KEY_KP_7 = 327
1173
+ KEY_KP_8 = 328
1174
+ KEY_KP_9 = 329
1175
+ KEY_KP_DECIMAL = 330
1176
+ KEY_KP_DIVIDE = 331
1177
+ KEY_KP_MULTIPLY = 332
1178
+ KEY_KP_SUBTRACT = 333
1179
+ KEY_KP_ADD = 334
1180
+ KEY_KP_ENTER = 335
1181
+ KEY_KP_EQUAL = 336
1182
+ KEY_BACK = 4
1183
+ KEY_MENU = 5
1184
+ KEY_VOLUME_UP = 24
1185
+ KEY_VOLUME_DOWN = 25
1186
+
1187
+ GAMEPAD_BUTTON_LEFT_FACE_LEFT = 1
1188
+ GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 3
1189
+ GAMEPAD_BUTTON_LEFT_FACE_UP = 0
1190
+ GAMEPAD_BUTTON_LEFT_FACE_DOWN = 2
1191
+ GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 4
1192
+
1193
+ GAMEPAD_BUTTON_UNKNOWN = 0
1194
+ GAMEPAD_BUTTON_LEFT_FACE_UP = 1
1195
+ GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2
1196
+ GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3
1197
+ GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4
1198
+ GAMEPAD_BUTTON_RIGHT_FACE_UP = 5
1199
+ GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6
1200
+ GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7
1201
+ GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8
1202
+ GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9
1203
+ GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10
1204
+ GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11
1205
+ GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12
1206
+ GAMEPAD_BUTTON_MIDDLE_LEFT = 13
1207
+ GAMEPAD_BUTTON_MIDDLE = 14
1208
+ GAMEPAD_BUTTON_MIDDLE_RIGHT = 15
1209
+ GAMEPAD_BUTTON_LEFT_THUMB = 16
1210
+ GAMEPAD_BUTTON_RIGHT_THUMB = 17
1211
+
1212
+ CAMERA_CUSTOM = 0
1213
+ CAMERA_FREE = 1
1214
+ CAMERA_ORBITAL = 2
1215
+ CAMERA_FIRST_PERSON = 3
1216
+ CAMERA_THIRD_PERSON = 4
1217
+ CAMERA_ORTHOGRAPHIC = 1
1218
+ CAMERA_PERSPECTIVE = 0
1219
+ CAMERA_RIGHT_HAND_XYZ = 0
1220
+
1221
+ MOUSE_BUTTON_LEFT = 0
1222
+ MOUSE_BUTTON_RIGHT = 1
1223
+ MOUSE_BUTTON_MIDDLE = 2
1224
+ MOUSE_BUTTON_SIDE = 3
1225
+ MOUSE_BUTTON_EXTRA = 4
1226
+ MOUSE_BUTTON_FORWARD = 5
1227
+ MOUSE_BUTTON_BACK = 6
1228
+
1229
+ MOUSE_CURSOR_DEFAULT = 0
1230
+ MOUSE_CURSOR_ARROW = 1
1231
+ MOUSE_CURSOR_IBEAM = 2
1232
+ MOUSE_CURSOR_CROSSHAIR = 3
1233
+ MOUSE_CURSOR_POINTING_HAND = 4
1234
+ MOUSE_CURSOR_RESIZE_EW = 5
1235
+ MOUSE_CURSOR_RESIZE_NS = 6
1236
+ MOUSE_CURSOR_RESIZE_NWSE = 7
1237
+ MOUSE_CURSOR_RESIZE_NESW = 8
1238
+ MOUSE_CURSOR_RESIZE_ALL = 9
1239
+ MOUSE_CURSOR_NOT_ALLOWED = 10
1240
+
1241
+
1242
+ # Wrappers accepting Color pointers (game code stays backend-agnostic;
1243
+ # MRI gets these from the gem, which marshals structs itself).
1244
+ def self.ClearBackground(color)
1245
+ Raylib.rl_ClearBackground(color)
1246
+ end
1247
+
1248
+ def self.DrawText(text, x, y, size, color)
1249
+ Raylib.rl_DrawText(text, x, y, size, color)
1250
+ end
1251
+
1252
+ def self.DrawTextInt(text, n, x, y, size, color)
1253
+ Raylib.rl_DrawTextInt(text, n, x, y, size, color)
1254
+ end
1255
+ def self.DrawTexture(texture, x, y, color)
1256
+ Raylib.rl_DrawTexture(texture, (x || 0).to_i, (y || 0).to_i, color)
1257
+ end
1258
+
1259
+ # Draw a sprite with a packed 0xRRGGBBAA tint (no Color per sprite on the
1260
+ # Ruby side); mirrored on CRuby in raylib_ruby.rb.
1261
+ def self.DrawTexturePacked(texture, x, y, rgba)
1262
+ Raylib.rl_DrawTexturePacked(texture, x, y, rgba)
1263
+ end
1264
+
1265
+ def self.DrawTextureEx(texture, position, rotation, scale, color)
1266
+ Raylib.rl_DrawTextureEx(texture, position.x, position.y, rotation, scale,
1267
+ color)
1268
+ end
1269
+
1270
+ def self.LoadTexture(path)
1271
+ Texture2D.new(Raylib.rl_LoadTexture(path), nil)
1272
+ end
1273
+
1274
+ def self.UnloadTexture(texture)
1275
+ Raylib.rl_UnloadTexture(texture)
1276
+ end
1277
+
1278
+ def self.DrawCircleV(center, radius, color)
1279
+ Raylib.rl_DrawCircleV(center, radius, color)
1280
+ end
1281
+
1282
+ def self.DrawTriangle(v1, v2, v3, color)
1283
+ Raylib.rl_DrawTriangle(v1, v2, v3, color)
1284
+ end
1285
+
1286
+ def self.BeginMode3D(camera)
1287
+ Raylib.rl_BeginMode3D(camera)
1288
+ end
1289
+
1290
+ def self.EndMode3D()
1291
+ Raylib.rl_EndMode3D()
1292
+ end
1293
+
1294
+ def self.DrawGrid(slices, spacing)
1295
+ Raylib.rl_DrawGrid(slices, spacing)
1296
+ end
1297
+
1298
+ def self.UpdateCamera(camera, mode)
1299
+ Raylib.rl_UpdateCamera(camera, mode)
1300
+ end
1301
+
1302
+ def self.DrawPlane(center_pos, size, color)
1303
+ Raylib.rl_DrawPlane(center_pos, size, color)
1304
+ end
1305
+
1306
+ def self.DrawCube(position, width, height, length, color)
1307
+ Raylib.rl_DrawCube(position, width, height, length, color)
1308
+ end
1309
+
1310
+ def self.DrawCubeWires(position, width, height, length, color)
1311
+ Raylib.rl_DrawCubeWires(position, (width || 0.0).to_f,
1312
+ (height || 0.0).to_f, (length || 0.0).to_f,
1313
+ color)
1314
+ end
1315
+
1316
+ def self.DrawRectangle(x, y, width, height, color)
1317
+ Raylib.rl_DrawRectangle(x, y, width, height, color)
1318
+ end
1319
+
1320
+ def self.DrawRectangleLines(x, y, width, height, color)
1321
+ Raylib.rl_DrawRectangleLines(x, y, width, height, color)
1322
+ end
1323
+
1324
+ def self.DrawPixelPacked(x, y, rgba)
1325
+ Raylib.rl_DrawPixelPacked(x, y, rgba)
1326
+ end
1327
+
1328
+ def self.DrawPixelsPacked(xs, ys, colors, count)
1329
+ Raylib.rl_DrawPixelsPacked(xs, ys, colors, count)
1330
+ end
1331
+
1332
+ def self.DrawPixel(x, y, color)
1333
+ Raylib.rl_DrawPixel(x, y, color)
1334
+ end
1335
+
1336
+ # Predicate wrappers return true/false in both backends: the gem
1337
+ # binds raylib's bool directly; here spinel marshals the shims'
1338
+ # 0/1 ints via the :bool declarations above.
1339
+ # def self.WindowShouldClose
1340
+ # Raylib.rl_WindowShouldClose
1341
+ # end
1342
+ #
1343
+ # def self.IsKeyDown(key)
1344
+ # Raylib.rl_IsKeyDown(key)
1345
+ # end
1346
+ #
1347
+ # def self.IsKeyPressed(key)
1348
+ # Raylib.rl_IsKeyPressed(key)
1349
+ # end
1350
+ #
1351
+ # def self.IsMouseButtonDown(button)
1352
+ # Raylib.rl_IsMouseButtonDown(button)
1353
+ # end
1354
+ #
1355
+ # def self.IsGamepadButtonDown(gamepad, button)
1356
+ # Raylib.rl_IsGamepadButtonDown(gamepad, button)
1357
+ # end
1358
+
1359
+ LIGHTGRAY = Color.new(200, 200, 200, 255)
1360
+ GRAY = Color.new(130, 130, 130, 255)
1361
+ DARKGRAY = Color.new(80, 80, 80, 255)
1362
+ YELLOW = Color.new(253, 249, 0, 255)
1363
+ GOLD = Color.new(255, 203, 0, 255)
1364
+ ORANGE = Color.new(255, 161, 0, 255)
1365
+ PINK = Color.new(255, 109, 194, 255)
1366
+ RED = Color.new(230, 41, 55, 255)
1367
+ MAROON = Color.new(190, 33, 55, 255)
1368
+ GREEN = Color.new(0, 228, 48, 255)
1369
+ LIME = Color.new(0, 158, 47, 255)
1370
+ DARKGREEN = Color.new(0, 117, 44, 255)
1371
+ SKYBLUE = Color.new(102, 191, 255, 255)
1372
+ BLUE = Color.new(0, 121, 241, 255)
1373
+ DARKBLUE = Color.new(0, 82, 172, 255)
1374
+ PURPLE = Color.new(200, 122, 255, 255)
1375
+ VIOLET = Color.new(135, 60, 190, 255)
1376
+ DARKPURPLE = Color.new(112, 31, 126, 255)
1377
+ BEIGE = Color.new(211, 176, 131, 255)
1378
+ BROWN = Color.new(127, 106, 79, 255)
1379
+
1380
+
1381
+ DARKBROWN = Color.new(76, 63, 47, 255)
1382
+
1383
+ WHITE = Color.new(255, 255, 255, 255)
1384
+ BLACK = Color.new(0, 0, 0, 255)
1385
+ BLANK = Color.new(0, 0, 0, 0)
1386
+ MAGENTA = Color.new(255, 0, 255, 255)
1387
+ RAYWHITE = Color.new(245, 245, 245, 255)
1388
+
1389
+ # Color factories — thin wrappers over the native ctor (Color.new lowers to
1390
+ # rl_Color_new). Kept here (Spinel side) so they compile as Ruby methods on
1391
+ # the native class; MRI gets the identical helpers in raylib_ruby.rb.
1392
+ class Color
1393
+ def self.from_u8(r = 0, g = 0, b = 0, a = 255)
1394
+ Color.new(r.to_i, g.to_i, b.to_i, a.to_i)
1395
+ end
1396
+
1397
+ def self.from_u32(rgba = 255)
1398
+ Color.new(
1399
+ (rgba >> 24) & 0xFF,
1400
+ (rgba >> 16) & 0xFF,
1401
+ (rgba >> 8) & 0xFF,
1402
+ rgba & 0xFF
1403
+ )
1404
+ end
1405
+
1406
+ # The gem's class-level Color.set(rgba) is dead code upstream: its body
1407
+ # does self[:r] = on the CLASS, and MRI raises for that (measured on
1408
+ # Ruby 4.0.6 + raylib-bindings 0.8.5: NoMethodError, undefined method
1409
+ # '[]=' for class Raylib::Color). Parity therefore means "exists and
1410
+ # raises NoMethodError"; a working class-level setter would diverge
1411
+ # from MRI. The message matches this box's MRI (3.4+ quoting style).
1412
+ def self.set(rgba)
1413
+ raise NoMethodError, "undefined method '[]=' for class Raylib::Color"
1414
+ end
1415
+
1416
+ # Instance helpers: same behaviour as the gem's raylib_helper.rb. They
1417
+ # live here (not in raylib_structs.rb) because that file is only loaded
1418
+ # via the `require "raylib"` entry, and scenes using `require
1419
+ # "raylib-spinel"` must get them too.
1420
+ def set(r, g, b, a)
1421
+ self.r = r.to_i
1422
+ self.g = g.to_i
1423
+ self.b = b.to_i
1424
+ self.a = a.to_i
1425
+ self
1426
+ end
1427
+
1428
+ def copy(other)
1429
+ self.r = other.r
1430
+ self.g = other.g
1431
+ self.b = other.b
1432
+ self.a = other.a
1433
+ self
1434
+ end
1435
+ end
1436
+
1437
+ # Positional factories (Vector2/Vector4/Matrix).
1438
+ # The core native ctors for these are no-arg (they are mostly out-params),
1439
+ # and Spinel inlines Klass.new(args) straight to the native ctor, so a Ruby
1440
+ # `.new` override can never carry the values. Positional construction lives
1441
+ # here instead; MRI gets identical helpers in raylib_ruby.rb.
1442
+ #
1443
+ # Construction goes through C fill helpers (rl_*Fill in raylib_adapter.c):
1444
+ # Spinel's type analysis can degrade the accessor writers (v.x = x) to
1445
+ # generic ivar dispatch when other classes share those field names, which
1446
+ # miscompiles against the incomplete native struct in larger programs.
1447
+ # (ffi_func declarations live at the top of the module, with the others.)
1448
+
1449
+ def self.Vector2(x, y)
1450
+ o = Vector2.new
1451
+ Raylib.rl_Vector2Fill(o, x, y)
1452
+ o
1453
+ end
1454
+
1455
+ def self.Rectangle(x, y, w, h)
1456
+ o = Rectangle.new
1457
+ Raylib.rl_RectangleFill(o, x, y, w, h)
1458
+ o
1459
+ end
1460
+
1461
+ def self.Vector4(x, y, z, w)
1462
+ o = Vector4.new
1463
+ Raylib.rl_Vector4Fill(o, x, y, z, w)
1464
+ o
1465
+ end
1466
+
1467
+ def self.Matrix(values)
1468
+ m = Matrix.new
1469
+ Raylib.rl_MatrixFill(m, values[0], values[1], values[2], values[3],
1470
+ values[4], values[5], values[6], values[7],
1471
+ values[8], values[9], values[10], values[11],
1472
+ values[12], values[13], values[14], values[15])
1473
+ m
1474
+ end
1475
+
1476
+ # Gem-shaped `.create` factories (raylib_helper.rb in the real gem; gem
1477
+ # code reaches for Raylib::Vector2.create / Raylib::Rectangle.create). They
1478
+ # used to live only in raylib_structs.rb, which `require "raylib-spinel"`
1479
+ # never loads, and were moved here so every entry point provides them. The
1480
+ # bodies delegate to the fill factories above -- AGENTS §A: construct
1481
+ # through the rl_*Fill shims, never new + field writes -- and `to_f` keeps
1482
+ # the float FFI args safe at Integer-literal call sites (§B4).
1483
+ class Vector2
1484
+ def self.create(x = 0.0, y = 0.0)
1485
+ Raylib.Vector2(x.to_f, y.to_f)
1486
+ end
1487
+ end
1488
+
1489
+ class Rectangle
1490
+ def self.create(x = 0.0, y = 0.0, width = 0.0, height = 0.0)
1491
+ Raylib.Rectangle(x.to_f, y.to_f, width.to_f, height.to_f)
1492
+ end
1493
+ end
1494
+
1495
+ # ====== generated: wrappers + constants ======
1496
+ def self.SetWindowIcon(image)
1497
+ Raylib.rl_SetWindowIcon(image)
1498
+ end
1499
+ def self.GetMonitorPosition(monitor)
1500
+ _out = Vector2.new
1501
+ Raylib.rl_GetMonitorPosition(monitor, _out)
1502
+ _out
1503
+ end
1504
+ def self.GetWindowPosition()
1505
+ _out = Vector2.new
1506
+ Raylib.rl_GetWindowPosition(_out)
1507
+ _out
1508
+ end
1509
+ def self.GetWindowScaleDPI()
1510
+ _out = Vector2.new
1511
+ Raylib.rl_GetWindowScaleDPI(_out)
1512
+ _out
1513
+ end
1514
+ def self.GetClipboardImage()
1515
+ Image.new(Raylib.rl_GetClipboardImage(), nil)
1516
+ end
1517
+ def self.BeginMode2D(camera)
1518
+ Raylib.rl_BeginMode2D(camera)
1519
+ end
1520
+ def self.BeginTextureMode(target)
1521
+ Raylib.rl_BeginTextureMode(target)
1522
+ end
1523
+ def self.BeginShaderMode(shader)
1524
+ Raylib.rl_BeginShaderMode(shader)
1525
+ end
1526
+ def self.BeginVrStereoMode(config)
1527
+ Raylib.rl_BeginVrStereoMode(config)
1528
+ end
1529
+ def self.LoadVrStereoConfig(device)
1530
+ _out = VrStereoConfig.new
1531
+ Raylib.rl_LoadVrStereoConfig(device, _out)
1532
+ _out
1533
+ end
1534
+ def self.UnloadVrStereoConfig(config)
1535
+ Raylib.rl_UnloadVrStereoConfig(config)
1536
+ end
1537
+ # File-text pointer pair (gem-spelled wrappers over the pointer-preserving
1538
+ # shims; the flat UnloadFileText(:str) would free a copy).
1539
+ def self.LoadFileTextPtr(file_name)
1540
+ Raylib.rl_LoadFileTextPtr(file_name)
1541
+ end
1542
+
1543
+ def self.PtrToString(ptr)
1544
+ Raylib.rl_PtrToString(ptr)
1545
+ end
1546
+
1547
+ def self.UnloadFileTextPtr(ptr)
1548
+ Raylib.rl_UnloadFileTextPtr(ptr)
1549
+ end
1550
+
1551
+ def self.LoadShader(vsFileName, fsFileName)
1552
+ Shader.new(Raylib.rl_LoadShader(vsFileName, fsFileName), nil)
1553
+ end
1554
+ def self.LoadShaderFromMemory(vsCode, fsCode)
1555
+ Shader.new(Raylib.rl_LoadShaderFromMemory(vsCode, fsCode), nil)
1556
+ end
1557
+ def self.IsShaderValid(shader)
1558
+ Raylib.rl_IsShaderValid(shader)
1559
+ end
1560
+ def self.GetShaderLocation(shader, uniformName)
1561
+ Raylib.rl_GetShaderLocation(shader, uniformName)
1562
+ end
1563
+ def self.GetShaderLocationAttrib(shader, attribName)
1564
+ Raylib.rl_GetShaderLocationAttrib(shader, attribName)
1565
+ end
1566
+ def self.SetShaderValue(shader, locIndex, value, uniformType)
1567
+ # A packed String is the gem's spelling for the uniform bytes
1568
+ # (`SetShaderValue(s, loc, [x, y].pack("f2"), SHADER_UNIFORM_VEC2)`).
1569
+ # `ptr_addr` cannot carry it: a dynamically built String boxes as a
1570
+ # STRBUF handle, and a `:ptr` slot reads the box's payload -- the
1571
+ # sp_String header -- so raylib saw a pointer to the handle instead of
1572
+ # the bytes and every uniform became garbage (ShadersRaymarching and
1573
+ # ShadersBasicLighting both rendered nonsense). The `:str` shim hands
1574
+ # over the characters; pointer-shaped values keep the address path.
1575
+ loc = (locIndex || 0).to_i
1576
+ type = (uniformType || 0).to_i
1577
+ if value.is_a?(String)
1578
+ Raylib.rl_SetShaderValueStr(shader, loc, value, type)
1579
+ else
1580
+ Raylib.rl_SetShaderValue(shader, loc, Raylib.ptr_addr(value), type)
1581
+ end
1582
+ end
1583
+ def self.SetShaderValueV(shader, locIndex, value, uniformType, count)
1584
+ Raylib.rl_SetShaderValueV(shader, locIndex, value, uniformType, count)
1585
+ end
1586
+ def self.SetShaderValueMatrix(shader, locIndex, mat)
1587
+ Raylib.rl_SetShaderValueMatrix(shader, locIndex, mat)
1588
+ end
1589
+ def self.SetShaderValueTexture(shader, locIndex, texture)
1590
+ Raylib.rl_SetShaderValueTexture(shader, locIndex, texture)
1591
+ end
1592
+ def self.UnloadShader(shader)
1593
+ Raylib.rl_UnloadShader(shader)
1594
+ end
1595
+ def self.GetScreenToWorldRay(position, camera)
1596
+ _out = Ray.new
1597
+ Raylib.rl_GetScreenToWorldRay(position, camera, _out)
1598
+ _out
1599
+ end
1600
+ def self.GetScreenToWorldRayEx(position, camera, width, height)
1601
+ _out = Ray.new
1602
+ Raylib.rl_GetScreenToWorldRayEx(position, camera, width, height, _out)
1603
+ _out
1604
+ end
1605
+ def self.GetWorldToScreen(position, camera)
1606
+ _out = Vector2.new
1607
+ Raylib.rl_GetWorldToScreen(position, camera, _out)
1608
+ _out
1609
+ end
1610
+ def self.GetWorldToScreenEx(position, camera, width, height)
1611
+ _out = Vector2.new
1612
+ Raylib.rl_GetWorldToScreenEx(position, camera, width, height, _out)
1613
+ _out
1614
+ end
1615
+ def self.GetWorldToScreen2D(position, camera)
1616
+ _out = Vector2.new
1617
+ Raylib.rl_GetWorldToScreen2D(position, camera, _out)
1618
+ _out
1619
+ end
1620
+ def self.GetScreenToWorld2D(position, camera)
1621
+ _out = Vector2.new
1622
+ Raylib.rl_GetScreenToWorld2D(position, camera, _out)
1623
+ _out
1624
+ end
1625
+ def self.GetCameraMatrix(camera)
1626
+ _out = Matrix.new
1627
+ Raylib.rl_GetCameraMatrix(camera, _out)
1628
+ _out
1629
+ end
1630
+ def self.GetCameraMatrix2D(camera)
1631
+ _out = Matrix.new
1632
+ Raylib.rl_GetCameraMatrix2D(camera, _out)
1633
+ _out
1634
+ end
1635
+ def self.SetTraceLogCallback(callback)
1636
+ Raylib.rl_SetTraceLogCallback(callback)
1637
+ end
1638
+ def self.SetLoadFileDataCallback(callback)
1639
+ Raylib.rl_SetLoadFileDataCallback(callback)
1640
+ end
1641
+ def self.SetSaveFileDataCallback(callback)
1642
+ Raylib.rl_SetSaveFileDataCallback(callback)
1643
+ end
1644
+ def self.SetLoadFileTextCallback(callback)
1645
+ Raylib.rl_SetLoadFileTextCallback(callback)
1646
+ end
1647
+ def self.SetSaveFileTextCallback(callback)
1648
+ Raylib.rl_SetSaveFileTextCallback(callback)
1649
+ end
1650
+ def self.LoadDirectoryFiles(dirPath)
1651
+ _out = FilePathList.new
1652
+ Raylib.rl_LoadDirectoryFiles(dirPath, _out)
1653
+ _out
1654
+ end
1655
+ def self.LoadDirectoryFilesEx(basePath, filter, scanSubdirs)
1656
+ _out = FilePathList.new
1657
+ Raylib.rl_LoadDirectoryFilesEx(basePath, filter, scanSubdirs, _out)
1658
+ _out
1659
+ end
1660
+ def self.UnloadDirectoryFiles(files)
1661
+ Raylib.rl_UnloadDirectoryFiles(files)
1662
+ end
1663
+ def self.LoadDroppedFiles()
1664
+ _out = FilePathList.new
1665
+ Raylib.rl_LoadDroppedFiles(_out)
1666
+ _out
1667
+ end
1668
+ def self.UnloadDroppedFiles(files)
1669
+ Raylib.rl_UnloadDroppedFiles(files)
1670
+ end
1671
+ def self.LoadAutomationEventList(fileName)
1672
+ _out = AutomationEventList.new
1673
+ Raylib.rl_LoadAutomationEventList(fileName, _out)
1674
+ _out
1675
+ end
1676
+ def self.UnloadAutomationEventList(list)
1677
+ Raylib.rl_UnloadAutomationEventList(list)
1678
+ end
1679
+ def self.ExportAutomationEventList(list, fileName)
1680
+ Raylib.rl_ExportAutomationEventList(list, fileName)
1681
+ end
1682
+ def self.SetAutomationEventList(list)
1683
+ Raylib.rl_SetAutomationEventList(list)
1684
+ end
1685
+ def self.PlayAutomationEvent(event)
1686
+ Raylib.rl_PlayAutomationEvent(event)
1687
+ end
1688
+ def self.GetMousePosition()
1689
+ _out = Vector2.new
1690
+ Raylib.rl_GetMousePosition(_out)
1691
+ _out
1692
+ end
1693
+ def self.GetMouseDelta()
1694
+ _out = Vector2.new
1695
+ Raylib.rl_GetMouseDelta(_out)
1696
+ _out
1697
+ end
1698
+ def self.GetMouseWheelMoveV()
1699
+ _out = Vector2.new
1700
+ Raylib.rl_GetMouseWheelMoveV(_out)
1701
+ _out
1702
+ end
1703
+ def self.GetTouchPosition(index)
1704
+ _out = Vector2.new
1705
+ Raylib.rl_GetTouchPosition(index, _out)
1706
+ _out
1707
+ end
1708
+ def self.GetGestureDragVector()
1709
+ _out = Vector2.new
1710
+ Raylib.rl_GetGestureDragVector(_out)
1711
+ _out
1712
+ end
1713
+ def self.GetGesturePinchVector()
1714
+ _out = Vector2.new
1715
+ Raylib.rl_GetGesturePinchVector(_out)
1716
+ _out
1717
+ end
1718
+ def self.UpdateCameraPro(camera, movement, rotation, zoom)
1719
+ Raylib.rl_UpdateCameraPro(camera, movement, rotation, zoom)
1720
+ end
1721
+ def self.SetShapesTexture(texture, rec)
1722
+ Raylib.rl_SetShapesTexture(texture, rec)
1723
+ end
1724
+ def self.GetShapesTexture()
1725
+ Texture2D.new(Raylib.rl_GetShapesTexture(), nil)
1726
+ end
1727
+ def self.GetShapesTextureRectangle()
1728
+ _out = Rectangle.new
1729
+ Raylib.rl_GetShapesTextureRectangle(_out)
1730
+ _out
1731
+ end
1732
+ def self.DrawPixelV(position, color)
1733
+ Raylib.rl_DrawPixelV(position, color)
1734
+ end
1735
+ def self.DrawLine(startPosX, startPosY, endPosX, endPosY, color)
1736
+ Raylib.rl_DrawLine(startPosX, startPosY, endPosX, endPosY, color)
1737
+ end
1738
+ def self.DrawLineV(startPos, endPos, color)
1739
+ Raylib.rl_DrawLineV(startPos, endPos, color)
1740
+ end
1741
+ def self.DrawLineEx(startPos, endPos, thick, color)
1742
+ Raylib.rl_DrawLineEx(startPos, endPos, thick, color)
1743
+ end
1744
+ def self.DrawLineStrip(points, pointCount, color)
1745
+ Raylib.rl_DrawLineStrip(Raylib.ptr_addr(points), pointCount, color)
1746
+ end
1747
+ def self.DrawLineBezier(startPos, endPos, thick, color)
1748
+ Raylib.rl_DrawLineBezier(startPos, endPos, thick, color)
1749
+ end
1750
+ def self.DrawLineDashed(startPos, endPos, dashSize, spaceSize, color)
1751
+ Raylib.rl_DrawLineDashed(startPos, endPos, dashSize, spaceSize, color)
1752
+ end
1753
+ def self.DrawTriangleGradient(v1, v2, v3, c1, c2, c3)
1754
+ Raylib.rl_DrawTriangleGradient(v1, v2, v3, c1, c2, c3)
1755
+ end
1756
+ def self.DrawTriangleLines(v1, v2, v3, color)
1757
+ Raylib.rl_DrawTriangleLines(v1, v2, v3, color)
1758
+ end
1759
+ def self.DrawTriangleLinesEx(v1, v2, v3, thick, color)
1760
+ Raylib.rl_DrawTriangleLinesEx(v1, v2, v3, thick, color)
1761
+ end
1762
+ def self.DrawTriangleFan(points, pointCount, color)
1763
+ Raylib.rl_DrawTriangleFan(Raylib.ptr_addr(points), pointCount, color)
1764
+ end
1765
+ def self.DrawTriangleStrip(points, pointCount, color)
1766
+ Raylib.rl_DrawTriangleStrip(Raylib.ptr_addr(points), pointCount, color)
1767
+ end
1768
+ def self.DrawRectangleV(position, size, color)
1769
+ Raylib.rl_DrawRectangleV(position, size, color)
1770
+ end
1771
+ def self.DrawRectangleRec(rec, color)
1772
+ Raylib.rl_DrawRectangleRec(rec, color)
1773
+ end
1774
+ def self.DrawRectanglePro(rec, origin, rotation, color)
1775
+ Raylib.rl_DrawRectanglePro(rec, origin, rotation, color)
1776
+ end
1777
+ def self.DrawRectangleGradientV(posX, posY, width, height, top, bottom)
1778
+ Raylib.rl_DrawRectangleGradientV(posX, posY, width, height, top, bottom)
1779
+ end
1780
+ def self.DrawRectangleGradientH(posX, posY, width, height, left, right)
1781
+ Raylib.rl_DrawRectangleGradientH(posX, posY, width, height, left, right)
1782
+ end
1783
+ def self.DrawRectangleGradientEx(rec, col1, col2, col3, col4)
1784
+ Raylib.rl_DrawRectangleGradientEx(rec, col1, col2, col3, col4)
1785
+ end
1786
+ def self.DrawRectangleLinesEx(rec, thick, color)
1787
+ Raylib.rl_DrawRectangleLinesEx(rec, thick, color)
1788
+ end
1789
+ def self.DrawRectangleRounded(rec, roundness, segments, color)
1790
+ Raylib.rl_DrawRectangleRounded(rec, roundness, segments, color)
1791
+ end
1792
+ def self.DrawRectangleRoundedLines(rec, roundness, segments, color)
1793
+ Raylib.rl_DrawRectangleRoundedLines(rec, roundness, segments, color)
1794
+ end
1795
+ def self.DrawRectangleRoundedLinesEx(rec, roundness, segments, thick, color)
1796
+ Raylib.rl_DrawRectangleRoundedLinesEx(rec, roundness, segments, thick, color)
1797
+ end
1798
+ def self.DrawPoly(center, sides, radius, rotation, color)
1799
+ Raylib.rl_DrawPoly(center, sides, radius, rotation, color)
1800
+ end
1801
+ def self.DrawPolyLines(center, sides, radius, rotation, color)
1802
+ Raylib.rl_DrawPolyLines(center, sides, radius, rotation, color)
1803
+ end
1804
+ def self.DrawPolyLinesEx(center, sides, radius, rotation, thick, color)
1805
+ Raylib.rl_DrawPolyLinesEx(center, sides, radius, rotation, thick, color)
1806
+ end
1807
+ def self.DrawCircle(centerX, centerY, radius, color)
1808
+ Raylib.rl_DrawCircle(centerX, centerY, radius, color)
1809
+ end
1810
+ def self.DrawCircleGradient(center, radius, inner, outer)
1811
+ Raylib.rl_DrawCircleGradient(center, radius, inner, outer)
1812
+ end
1813
+ def self.DrawCircleSector(center, radius, startAngle, endAngle, segments, color)
1814
+ Raylib.rl_DrawCircleSector(center, radius, startAngle, endAngle, segments, color)
1815
+ end
1816
+ def self.DrawCircleSectorLines(center, radius, startAngle, endAngle, segments, color)
1817
+ Raylib.rl_DrawCircleSectorLines(center, radius, startAngle, endAngle, segments, color)
1818
+ end
1819
+ def self.DrawCircleSectorLinesEx(center, radius, startAngle, endAngle, segments, thick, color)
1820
+ Raylib.rl_DrawCircleSectorLinesEx(center, radius, startAngle, endAngle, segments, thick, color)
1821
+ end
1822
+ def self.DrawCircleLines(centerX, centerY, radius, color)
1823
+ Raylib.rl_DrawCircleLines(centerX, centerY, radius, color)
1824
+ end
1825
+ def self.DrawCircleLinesV(center, radius, color)
1826
+ Raylib.rl_DrawCircleLinesV(center, radius, color)
1827
+ end
1828
+ def self.DrawCircleLinesEx(center, radius, thick, color)
1829
+ Raylib.rl_DrawCircleLinesEx(center, radius, thick, color)
1830
+ end
1831
+ def self.DrawEllipse(centerX, centerY, radiusH, radiusV, color)
1832
+ Raylib.rl_DrawEllipse(centerX, centerY, radiusH, radiusV, color)
1833
+ end
1834
+ def self.DrawEllipseV(center, radiusH, radiusV, color)
1835
+ Raylib.rl_DrawEllipseV(center, radiusH, radiusV, color)
1836
+ end
1837
+ def self.DrawEllipseLines(centerX, centerY, radiusH, radiusV, color)
1838
+ Raylib.rl_DrawEllipseLines(centerX, centerY, radiusH, radiusV, color)
1839
+ end
1840
+ def self.DrawEllipseLinesV(center, radiusH, radiusV, color)
1841
+ Raylib.rl_DrawEllipseLinesV(center, radiusH, radiusV, color)
1842
+ end
1843
+ def self.DrawEllipseLinesEx(center, radiusH, radiusV, thick, color)
1844
+ Raylib.rl_DrawEllipseLinesEx(center, radiusH, radiusV, thick, color)
1845
+ end
1846
+ def self.DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, segments, color)
1847
+ Raylib.rl_DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, segments, color)
1848
+ end
1849
+ def self.DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, segments, color)
1850
+ Raylib.rl_DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, segments, color)
1851
+ end
1852
+ def self.DrawRingLinesEx(center, innerRadius, outerRadius, startAngle, endAngle, segments, thick, color)
1853
+ Raylib.rl_DrawRingLinesEx(center, innerRadius, outerRadius, startAngle, endAngle, segments, thick, color)
1854
+ end
1855
+ def self.DrawSplineLinear(points, pointCount, thick, color)
1856
+ Raylib.rl_DrawSplineLinear(Raylib.ptr_addr(points), pointCount, thick, color)
1857
+ end
1858
+ def self.DrawSplineBasis(points, pointCount, thick, color)
1859
+ Raylib.rl_DrawSplineBasis(Raylib.ptr_addr(points), pointCount, thick, color)
1860
+ end
1861
+ def self.DrawSplineCatmullRom(points, pointCount, thick, color)
1862
+ Raylib.rl_DrawSplineCatmullRom(Raylib.ptr_addr(points), pointCount, thick, color)
1863
+ end
1864
+ def self.DrawSplineBezierQuadratic(points, pointCount, thick, color)
1865
+ Raylib.rl_DrawSplineBezierQuadratic(Raylib.ptr_addr(points), pointCount, thick, color)
1866
+ end
1867
+ def self.DrawSplineBezierCubic(points, pointCount, thick, color)
1868
+ Raylib.rl_DrawSplineBezierCubic(Raylib.ptr_addr(points), pointCount, thick, color)
1869
+ end
1870
+ def self.DrawSplineSegmentLinear(p1, p2, thick, color)
1871
+ Raylib.rl_DrawSplineSegmentLinear(p1, p2, thick, color)
1872
+ end
1873
+ def self.DrawSplineSegmentBasis(p1, p2, p3, p4, thick, color)
1874
+ Raylib.rl_DrawSplineSegmentBasis(p1, p2, p3, p4, thick, color)
1875
+ end
1876
+ def self.DrawSplineSegmentCatmullRom(p1, p2, p3, p4, thick, color)
1877
+ Raylib.rl_DrawSplineSegmentCatmullRom(p1, p2, p3, p4, thick, color)
1878
+ end
1879
+ def self.DrawSplineSegmentBezierQuadratic(p1, c2, p3, thick, color)
1880
+ Raylib.rl_DrawSplineSegmentBezierQuadratic(p1, c2, p3, thick, color)
1881
+ end
1882
+ def self.DrawSplineSegmentBezierCubic(p1, c2, c3, p4, thick, color)
1883
+ Raylib.rl_DrawSplineSegmentBezierCubic(p1, c2, c3, p4, thick, color)
1884
+ end
1885
+ def self.GetSplinePointLinear(startPos, endPos, t)
1886
+ _out = Vector2.new
1887
+ Raylib.rl_GetSplinePointLinear(startPos, endPos, t, _out)
1888
+ _out
1889
+ end
1890
+ def self.GetSplinePointBasis(p1, p2, p3, p4, t)
1891
+ _out = Vector2.new
1892
+ Raylib.rl_GetSplinePointBasis(p1, p2, p3, p4, t, _out)
1893
+ _out
1894
+ end
1895
+ def self.GetSplinePointCatmullRom(p1, p2, p3, p4, t)
1896
+ _out = Vector2.new
1897
+ Raylib.rl_GetSplinePointCatmullRom(p1, p2, p3, p4, t, _out)
1898
+ _out
1899
+ end
1900
+ def self.GetSplinePointBezierQuadratic(p1, c2, p3, t)
1901
+ _out = Vector2.new
1902
+ Raylib.rl_GetSplinePointBezierQuadratic(p1, c2, p3, t, _out)
1903
+ _out
1904
+ end
1905
+ def self.GetSplinePointBezierCubic(p1, c2, c3, p4, t)
1906
+ _out = Vector2.new
1907
+ Raylib.rl_GetSplinePointBezierCubic(p1, c2, c3, p4, t, _out)
1908
+ _out
1909
+ end
1910
+ def self.CheckCollisionRecs(rec1, rec2)
1911
+ Raylib.rl_CheckCollisionRecs(rec1, rec2)
1912
+ end
1913
+ def self.CheckCollisionCircles(center1, radius1, center2, radius2)
1914
+ Raylib.rl_CheckCollisionCircles(center1, radius1, center2, radius2)
1915
+ end
1916
+ def self.CheckCollisionCircleRec(center, radius, rec)
1917
+ Raylib.rl_CheckCollisionCircleRec(center, radius, rec)
1918
+ end
1919
+ def self.CheckCollisionCircleLine(center, radius, p1, p2)
1920
+ Raylib.rl_CheckCollisionCircleLine(center, radius, p1, p2)
1921
+ end
1922
+ def self.CheckCollisionPointRec(point, rec)
1923
+ Raylib.rl_CheckCollisionPointRec(point, rec)
1924
+ end
1925
+ def self.CheckCollisionPointCircle(point, center, radius)
1926
+ Raylib.rl_CheckCollisionPointCircle(point, center, radius)
1927
+ end
1928
+ def self.CheckCollisionPointTriangle(point, p1, p2, p3)
1929
+ Raylib.rl_CheckCollisionPointTriangle(point, p1, p2, p3)
1930
+ end
1931
+ def self.CheckCollisionPointLine(point, p1, p2, threshold)
1932
+ Raylib.rl_CheckCollisionPointLine(point, p1, p2, threshold)
1933
+ end
1934
+ def self.CheckCollisionPointPoly(point, points, pointCount)
1935
+ Raylib.rl_CheckCollisionPointPoly(point, Raylib.ptr_addr(points), pointCount)
1936
+ end
1937
+ def self.CheckCollisionLines(startPos1, endPos1, startPos2, endPos2, collisionPoint)
1938
+ Raylib.rl_CheckCollisionLines(startPos1, endPos1, startPos2, endPos2, collisionPoint)
1939
+ end
1940
+ def self.GetCollisionRec(rec1, rec2)
1941
+ _out = Rectangle.new
1942
+ Raylib.rl_GetCollisionRec(rec1, rec2, _out)
1943
+ _out
1944
+ end
1945
+ def self.LoadImage(fileName)
1946
+ Image.new(Raylib.rl_LoadImage(fileName), nil)
1947
+ end
1948
+ def self.LoadImageRaw(fileName, width, height, format, headerSize)
1949
+ Image.new(Raylib.rl_LoadImageRaw(fileName, width, height, format, headerSize), nil)
1950
+ end
1951
+ def self.LoadImageAnim(fileName, frames)
1952
+ Image.new(Raylib.rl_LoadImageAnim(fileName, Raylib.ptr_addr(frames)), nil)
1953
+
1954
+ end
1955
+ def self.LoadImageAnimFromMemory(fileType, fileData, dataSize, frames)
1956
+ Image.new(Raylib.rl_LoadImageAnimFromMemory(fileType, fileData, dataSize, Raylib.ptr_addr(frames)), nil)
1957
+
1958
+ end
1959
+ def self.LoadImageFromMemory(fileType, fileData, dataSize)
1960
+ Image.new(Raylib.rl_LoadImageFromMemory(fileType, Raylib.ptr_addr(fileData), dataSize), nil)
1961
+
1962
+ end
1963
+ def self.LoadImageFromTexture(texture)
1964
+ Image.new(Raylib.rl_LoadImageFromTexture(texture), nil)
1965
+ end
1966
+ def self.LoadImageFromScreen()
1967
+ Image.new(Raylib.rl_LoadImageFromScreen(), nil)
1968
+ end
1969
+ def self.IsImageValid(image)
1970
+ Raylib.rl_IsImageValid(image)
1971
+ end
1972
+ def self.UnloadImage(image)
1973
+ Raylib.rl_UnloadImage(image)
1974
+ end
1975
+ def self.ExportImage(image, fileName)
1976
+ Raylib.rl_ExportImage(image, fileName)
1977
+ end
1978
+ def self.ExportImageToMemory(image, fileType, fileSize)
1979
+ Raylib.rl_ExportImageToMemory(image, fileType, fileSize)
1980
+ end
1981
+ def self.ExportImageAsCode(image, fileName)
1982
+ Raylib.rl_ExportImageAsCode(image, fileName)
1983
+ end
1984
+ def self.GenImageColor(width, height, color)
1985
+ Image.new(Raylib.rl_GenImageColor(width, height, color), nil)
1986
+ end
1987
+ def self.GenImageGradientLinear(width, height, direction, start, kw_end)
1988
+ Image.new(Raylib.rl_GenImageGradientLinear(width, height, direction, start, kw_end), nil)
1989
+ end
1990
+ def self.GenImageGradientRadial(width, height, density, inner, outer)
1991
+ Image.new(Raylib.rl_GenImageGradientRadial(width, height, density, inner, outer), nil)
1992
+ end
1993
+ def self.GenImageGradientSquare(width, height, density, inner, outer)
1994
+ Image.new(Raylib.rl_GenImageGradientSquare(width, height, density, inner, outer), nil)
1995
+ end
1996
+ def self.GenImageChecked(width, height, checksX, checksY, col1, col2)
1997
+ Image.new(Raylib.rl_GenImageChecked(width, height, checksX, checksY, col1, col2), nil)
1998
+ end
1999
+ def self.GenImageWhiteNoise(width, height, factor)
2000
+ Image.new(Raylib.rl_GenImageWhiteNoise(width, height, factor), nil)
2001
+ end
2002
+ def self.GenImagePerlinNoise(width, height, offsetX, offsetY, scale)
2003
+ Image.new(Raylib.rl_GenImagePerlinNoise(width, height, offsetX, offsetY, scale), nil)
2004
+ end
2005
+ def self.GenImageCellular(width, height, tileSize)
2006
+ Image.new(Raylib.rl_GenImageCellular(width, height, tileSize), nil)
2007
+ end
2008
+ def self.GenImageText(width, height, text)
2009
+ Image.new(Raylib.rl_GenImageText(width, height, text), nil)
2010
+ end
2011
+ def self.ImageCopy(image)
2012
+ Image.new(Raylib.rl_ImageCopy(image), nil)
2013
+ end
2014
+ def self.ImageFromImage(image, rec)
2015
+ Image.new(Raylib.rl_ImageFromImage(image, rec), nil)
2016
+ end
2017
+ def self.ImageFromChannel(image, selectedChannel)
2018
+ Image.new(Raylib.rl_ImageFromChannel(image, selectedChannel), nil)
2019
+ end
2020
+ def self.ImageText(text, fontSize, color)
2021
+ Image.new(Raylib.rl_ImageText(text, fontSize, color), nil)
2022
+ end
2023
+ def self.ImageTextEx(font, text, fontSize, spacing, tint)
2024
+ Image.new(Raylib.rl_ImageTextEx(font, text, fontSize, spacing, tint), nil)
2025
+ end
2026
+ def self.ImageToPOT(image, fill)
2027
+ Raylib.rl_ImageToPOT(image, fill)
2028
+ end
2029
+ def self.ImageCrop(image, crop)
2030
+ Raylib.rl_ImageCrop(image, crop)
2031
+ end
2032
+ def self.ImageAlphaClear(image, color, threshold)
2033
+ Raylib.rl_ImageAlphaClear(image, color, threshold)
2034
+ end
2035
+ def self.ImageAlphaMask(image, alphaMask)
2036
+ Raylib.rl_ImageAlphaMask(image, alphaMask)
2037
+ end
2038
+ def self.ImageResizeCanvas(image, newWidth, newHeight, offsetX, offsetY, fill)
2039
+ Raylib.rl_ImageResizeCanvas(image, newWidth, newHeight, offsetX, offsetY, fill)
2040
+ end
2041
+ def self.ImageColorTint(image, color)
2042
+ Raylib.rl_ImageColorTint(image, color)
2043
+ end
2044
+ def self.ImageColorReplace(image, color, replace)
2045
+ Raylib.rl_ImageColorReplace(image, color, replace)
2046
+ end
2047
+ def self.LoadImageColors(image)
2048
+ Raylib.rl_LoadImageColors(image)
2049
+ end
2050
+ def self.LoadImagePalette(image, maxPaletteSize, colorCount)
2051
+ Raylib.rl_LoadImagePalette(image, maxPaletteSize, Raylib.ptr_addr(colorCount))
2052
+ end
2053
+ def self.UnloadImageColors(colors)
2054
+ Raylib.rl_UnloadImageColors(colors)
2055
+ end
2056
+ def self.UnloadImagePalette(colors)
2057
+ Raylib.rl_UnloadImagePalette(colors)
2058
+ end
2059
+ def self.GetImageAlphaBorder(image, threshold)
2060
+ _out = Rectangle.new
2061
+ Raylib.rl_GetImageAlphaBorder(image, threshold, _out)
2062
+ _out
2063
+ end
2064
+ def self.GetImageColor(image, x, y)
2065
+ _out = Color.new(0, 0, 0, 0)
2066
+ Raylib.rl_GetImageColor(image, x, y, _out)
2067
+ _out
2068
+ end
2069
+ def self.ImageClearBackground(dst, color)
2070
+ Raylib.rl_ImageClearBackground(dst, color)
2071
+ end
2072
+ def self.ImageDrawPixel(dst, posX, posY, color)
2073
+ Raylib.rl_ImageDrawPixel(dst, posX, posY, color)
2074
+ end
2075
+ def self.ImageDrawPixelV(dst, position, color)
2076
+ Raylib.rl_ImageDrawPixelV(dst, position, color)
2077
+ end
2078
+ def self.ImageDrawLine(dst, startPosX, startPosY, endPosX, endPosY, color)
2079
+ Raylib.rl_ImageDrawLine(dst, startPosX, startPosY, endPosX, endPosY, color)
2080
+ end
2081
+ def self.ImageDrawLineV(dst, start, kw_end, color)
2082
+ Raylib.rl_ImageDrawLineV(dst, start, kw_end, color)
2083
+ end
2084
+ def self.ImageDrawLineEx(dst, start, kw_end, thick, color)
2085
+ Raylib.rl_ImageDrawLineEx(dst, start, kw_end, thick, color)
2086
+ end
2087
+ def self.ImageDrawLineStrip(dst, points, pointCount, color)
2088
+ Raylib.rl_ImageDrawLineStrip(dst, Raylib.ptr_addr(points), pointCount, color)
2089
+ end
2090
+ def self.ImageDrawTriangle(dst, v1, v2, v3, color)
2091
+ Raylib.rl_ImageDrawTriangle(dst, v1, v2, v3, color)
2092
+ end
2093
+ def self.ImageDrawTriangleGradient(dst, v1, v2, v3, c1, c2, c3)
2094
+ Raylib.rl_ImageDrawTriangleGradient(dst, v1, v2, v3, c1, c2, c3)
2095
+ end
2096
+ def self.ImageDrawTriangleLines(dst, v1, v2, v3, color)
2097
+ Raylib.rl_ImageDrawTriangleLines(dst, v1, v2, v3, color)
2098
+ end
2099
+ def self.ImageDrawTriangleFan(dst, points, pointCount, color)
2100
+ Raylib.rl_ImageDrawTriangleFan(dst, Raylib.ptr_addr(points), pointCount, color)
2101
+ end
2102
+ def self.ImageDrawTriangleStrip(dst, points, pointCount, color)
2103
+ Raylib.rl_ImageDrawTriangleStrip(dst, Raylib.ptr_addr(points), pointCount, color)
2104
+ end
2105
+ def self.ImageDrawRectangle(dst, posX, posY, width, height, color)
2106
+ Raylib.rl_ImageDrawRectangle(dst, posX, posY, width, height, color)
2107
+ end
2108
+ def self.ImageDrawRectangleV(dst, position, size, color)
2109
+ Raylib.rl_ImageDrawRectangleV(dst, position, size, color)
2110
+ end
2111
+ def self.ImageDrawRectangleRec(dst, rec, color)
2112
+ Raylib.rl_ImageDrawRectangleRec(dst, rec, color)
2113
+ end
2114
+ def self.ImageDrawRectanglePro(dst, rec, origin, rotation, color)
2115
+ Raylib.rl_ImageDrawRectanglePro(dst, rec, origin, rotation, color)
2116
+ end
2117
+ def self.ImageDrawRectangleLines(dst, posX, posY, width, height, color)
2118
+ Raylib.rl_ImageDrawRectangleLines(dst, posX, posY, width, height, color)
2119
+ end
2120
+ def self.ImageDrawRectangleLinesEx(dst, rec, thick, color)
2121
+ Raylib.rl_ImageDrawRectangleLinesEx(dst, rec, thick, color)
2122
+ end
2123
+ def self.ImageDrawRectangleGradientEx(dst, rec, col1, col2, col3, col4)
2124
+ Raylib.rl_ImageDrawRectangleGradientEx(dst, rec, col1, col2, col3, col4)
2125
+ end
2126
+ def self.ImageDrawCircle(dst, centerX, centerY, radius, color)
2127
+ Raylib.rl_ImageDrawCircle(dst, centerX, centerY, radius, color)
2128
+ end
2129
+ def self.ImageDrawCircleV(dst, center, radius, color)
2130
+ Raylib.rl_ImageDrawCircleV(dst, center, radius, color)
2131
+ end
2132
+ def self.ImageDrawCircleLines(dst, centerX, centerY, radius, color)
2133
+ Raylib.rl_ImageDrawCircleLines(dst, centerX, centerY, radius, color)
2134
+ end
2135
+ def self.ImageDrawCircleLinesV(dst, center, radius, color)
2136
+ Raylib.rl_ImageDrawCircleLinesV(dst, center, radius, color)
2137
+ end
2138
+ def self.ImageDrawCircleGradient(dst, center, radius, inner, outer)
2139
+ Raylib.rl_ImageDrawCircleGradient(dst, center, radius, inner, outer)
2140
+ end
2141
+ def self.ImageDrawImage(dst, src, posX, posY, tint)
2142
+ Raylib.rl_ImageDrawImage(dst, src, posX, posY, tint)
2143
+ end
2144
+ def self.ImageDrawImageEx(dst, src, position, rotation, scale, tint)
2145
+ Raylib.rl_ImageDrawImageEx(dst, src, position, rotation, scale, tint)
2146
+ end
2147
+ def self.ImageDrawImageRec(dst, src, srcRec, position, tint)
2148
+ Raylib.rl_ImageDrawImageRec(dst, src, srcRec, position, tint)
2149
+ end
2150
+ def self.ImageDrawImagePro(dst, src, srcRec, dstRec, origin, rotation, tint)
2151
+ Raylib.rl_ImageDrawImagePro(dst, src, srcRec, dstRec, origin, rotation, tint)
2152
+ end
2153
+ def self.ImageDrawText(dst, text, posX, posY, fontSize, color)
2154
+ Raylib.rl_ImageDrawText(dst, text, posX, posY, fontSize, color)
2155
+ end
2156
+ def self.ImageDrawTextEx(dst, font, text, position, fontSize, spacing, tint)
2157
+ Raylib.rl_ImageDrawTextEx(dst, font, text, position, fontSize, spacing, tint)
2158
+ end
2159
+ def self.ImageDrawTextPro(dst, font, text, position, origin, rotation, fontSize, spacing, tint)
2160
+ Raylib.rl_ImageDrawTextPro(dst, font, text, position, origin, rotation, fontSize, spacing, tint)
2161
+ end
2162
+ def self.LoadTextureFromImage(image)
2163
+ Texture2D.new(Raylib.rl_LoadTextureFromImage(image), nil)
2164
+ end
2165
+ def self.LoadTextureCubemap(image, layout)
2166
+ Texture2D.new(Raylib.rl_LoadTextureCubemap(image, layout), nil)
2167
+ end
2168
+ def self.LoadRenderTexture(width, height)
2169
+ RenderTexture.new(Raylib.rl_LoadRenderTexture(width, height), nil)
2170
+ end
2171
+ def self.LoadRenderTextureEx(width, height, format)
2172
+ RenderTexture.new(Raylib.rl_LoadRenderTextureEx(width, height, format), nil)
2173
+ end
2174
+ def self.IsTextureValid(texture)
2175
+ Raylib.rl_IsTextureValid(texture)
2176
+ end
2177
+ def self.IsRenderTextureValid(target)
2178
+ Raylib.rl_IsRenderTextureValid(target)
2179
+ end
2180
+ def self.UnloadRenderTexture(target)
2181
+ Raylib.rl_UnloadRenderTexture(target)
2182
+ end
2183
+ def self.UpdateTexture(texture, pixels)
2184
+ Raylib.rl_UpdateTexture(texture, Raylib.ptr_int(pixels))
2185
+ end
2186
+ def self.UpdateTextureRec(texture, rec, pixels)
2187
+ Raylib.rl_UpdateTextureRec(texture, rec, Raylib.ptr_int(pixels))
2188
+ end
2189
+ def self.SetTextureFilter(texture, filter)
2190
+ Raylib.rl_SetTextureFilter(texture, filter)
2191
+ end
2192
+ def self.SetTextureWrap(texture, wrap)
2193
+ Raylib.rl_SetTextureWrap(texture, wrap)
2194
+ end
2195
+ def self.DrawTextureV(texture, position, tint)
2196
+ Raylib.rl_DrawTextureV(texture, position, tint)
2197
+ end
2198
+ def self.DrawTextureRec(texture, rec, position, tint)
2199
+ Raylib.rl_DrawTextureRec(texture, rec, position, tint)
2200
+ end
2201
+ def self.DrawTexturePro(texture, srcrec, dstrec, origin, rotation, tint)
2202
+ Raylib.rl_DrawTexturePro(texture, srcrec, dstrec, origin, rotation, tint)
2203
+ end
2204
+ def self.DrawTextureNPatch(texture, nPatchInfo, dstrec, origin, rotation, tint)
2205
+ Raylib.rl_DrawTextureNPatch(texture, nPatchInfo, dstrec, origin, rotation, tint)
2206
+ end
2207
+ def self.ColorIsEqual(col1, col2)
2208
+ Raylib.rl_ColorIsEqual(col1, col2)
2209
+ end
2210
+ def self.Fade(color, alpha)
2211
+ _out = Color.new(0, 0, 0, 0)
2212
+ Raylib.rl_Fade(color, alpha, _out)
2213
+ _out
2214
+ end
2215
+ def self.ColorToInt(color)
2216
+ Raylib.rl_ColorToInt(color)
2217
+ end
2218
+ def self.ColorNormalize(color)
2219
+ _out = Vector4.new
2220
+ Raylib.rl_ColorNormalize(color, _out)
2221
+ _out
2222
+ end
2223
+ def self.ColorFromNormalized(normalized)
2224
+ _out = Color.new(0, 0, 0, 0)
2225
+ Raylib.rl_ColorFromNormalized(normalized, _out)
2226
+ _out
2227
+ end
2228
+ def self.ColorToHSV(color)
2229
+ _out = Vector3.new(0.0, 0.0, 0.0)
2230
+ Raylib.rl_ColorToHSV(color, _out)
2231
+ _out
2232
+ end
2233
+ def self.ColorFromHSV(hue, saturation, value)
2234
+ _out = Color.new(0, 0, 0, 0)
2235
+ Raylib.rl_ColorFromHSV(hue, saturation, value, _out)
2236
+ _out
2237
+ end
2238
+ def self.ColorTint(color, tint)
2239
+ _out = Color.new(0, 0, 0, 0)
2240
+ Raylib.rl_ColorTint(color, tint, _out)
2241
+ _out
2242
+ end
2243
+ def self.ColorBrightness(color, factor)
2244
+ _out = Color.new(0, 0, 0, 0)
2245
+ Raylib.rl_ColorBrightness(color, factor, _out)
2246
+ _out
2247
+ end
2248
+ def self.ColorContrast(color, contrast)
2249
+ _out = Color.new(0, 0, 0, 0)
2250
+ Raylib.rl_ColorContrast(color, contrast, _out)
2251
+ _out
2252
+ end
2253
+ def self.ColorAlpha(color, alpha)
2254
+ _out = Color.new(0, 0, 0, 0)
2255
+ Raylib.rl_ColorAlpha(color, alpha, _out)
2256
+ _out
2257
+ end
2258
+ def self.ColorAlphaBlend(dst, src, tint)
2259
+ _out = Color.new(0, 0, 0, 0)
2260
+ Raylib.rl_ColorAlphaBlend(dst, src, tint, _out)
2261
+ _out
2262
+ end
2263
+ def self.ColorLerp(color1, color2, factor)
2264
+ _out = Color.new(0, 0, 0, 0)
2265
+ Raylib.rl_ColorLerp(color1, color2, factor, _out)
2266
+ _out
2267
+ end
2268
+ def self.GetColor(hexValue)
2269
+ _out = Color.new(0, 0, 0, 0)
2270
+ Raylib.rl_GetColor(hexValue, _out)
2271
+ _out
2272
+ end
2273
+ def self.GetPixelColor(srcPtr, format)
2274
+ _out = Color.new(0, 0, 0, 0)
2275
+
2276
+ Raylib.rl_GetPixelColor(srcPtr, format, _out)
2277
+ _out
2278
+ end
2279
+ def self.SetPixelColor(dstPtr, color, format)
2280
+ Raylib.rl_SetPixelColor(dstPtr, color, format)
2281
+ end
2282
+ def self.GetFontDefault()
2283
+ Font.new(Raylib.rl_GetFontDefault(), nil)
2284
+ end
2285
+ def self.LoadFont(fileName)
2286
+ Font.new(Raylib.rl_LoadFont(fileName), nil)
2287
+ end
2288
+ def self.LoadFontEx(fileName, fontSize, codepoints, codepointCount)
2289
+ Font.new(Raylib.rl_LoadFontEx(fileName, fontSize, codepoints, codepointCount), nil)
2290
+ end
2291
+ def self.LoadFontFromImage(image, key, firstChar)
2292
+ Font.new(Raylib.rl_LoadFontFromImage(image, key, firstChar), nil)
2293
+ end
2294
+ def self.LoadFontFromMemory(fileType, fileData, dataSize, fontSize, codepoints, codepointCount)
2295
+ Font.new(Raylib.rl_LoadFontFromMemory(fileType, Raylib.ptr_addr(fileData), dataSize, fontSize, codepoints, codepointCount), nil)
2296
+
2297
+ end
2298
+ def self.IsFontValid(font)
2299
+ Raylib.rl_IsFontValid(font)
2300
+ end
2301
+ def self.GenImageFontAtlas(glyphs, glyphRecs, glyphCount, fontSize, padding, packMethod)
2302
+ Image.new(Raylib.rl_GenImageFontAtlas(Raylib.ptr_addr(glyphs), Raylib.ptr_addr(glyphRecs), glyphCount, fontSize, padding, packMethod), nil)
2303
+
2304
+ end
2305
+ def self.UnloadFont(font)
2306
+ Raylib.rl_UnloadFont(font)
2307
+ end
2308
+ def self.ExportFontAsCode(font, fileName)
2309
+ Raylib.rl_ExportFontAsCode(font, fileName)
2310
+ end
2311
+ def self.DrawTextEx(font, text, position, fontSize, spacing, tint)
2312
+ Raylib.rl_DrawTextEx(font, text, position, fontSize, spacing, tint)
2313
+ end
2314
+ def self.DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint)
2315
+ Raylib.rl_DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint)
2316
+ end
2317
+ def self.DrawTextCodepoint(font, codepoint, position, fontSize, tint)
2318
+ Raylib.rl_DrawTextCodepoint(font, codepoint, position, fontSize, tint)
2319
+ end
2320
+ def self.DrawTextCodepoints(font, codepoints, codepointCount, position, fontSize, spacing, tint)
2321
+ Raylib.rl_DrawTextCodepoints(font, codepoints, codepointCount, position, fontSize, spacing, tint)
2322
+ end
2323
+ def self.MeasureTextEx(font, text, fontSize, spacing)
2324
+ _out = Vector2.new
2325
+ Raylib.rl_MeasureTextEx(font, text, fontSize, spacing, _out)
2326
+ _out
2327
+ end
2328
+ def self.MeasureTextCodepoints(font, codepoints, length, fontSize, spacing)
2329
+ _out = Vector2.new
2330
+ Raylib.rl_MeasureTextCodepoints(font, codepoints, length, fontSize, spacing, _out)
2331
+ _out
2332
+ end
2333
+ def self.GetGlyphIndex(font, codepoint)
2334
+ Raylib.rl_GetGlyphIndex(font, codepoint)
2335
+ end
2336
+ def self.GetGlyphInfo(font, codepoint)
2337
+ GlyphInfo.new(Raylib.rl_GetGlyphInfo(font, codepoint), nil)
2338
+ end
2339
+ def self.GetGlyphAtlasRec(font, codepoint)
2340
+ _out = Rectangle.new
2341
+ Raylib.rl_GetGlyphAtlasRec(font, codepoint, _out)
2342
+ _out
2343
+ end
2344
+ def self.DrawLine3D(startPos, endPos, color)
2345
+ Raylib.rl_DrawLine3D(startPos, endPos, color)
2346
+ end
2347
+ def self.DrawPoint3D(position, color)
2348
+ Raylib.rl_DrawPoint3D(position, color)
2349
+ end
2350
+ def self.DrawCircle3D(center, radius, rotationAxis, rotationAngle, color)
2351
+ Raylib.rl_DrawCircle3D(center, radius, rotationAxis, rotationAngle, color)
2352
+ end
2353
+ def self.DrawTriangle3D(v1, v2, v3, color)
2354
+ Raylib.rl_DrawTriangle3D(v1, v2, v3, color)
2355
+ end
2356
+ def self.DrawTriangleStrip3D(points, pointCount, color)
2357
+ Raylib.rl_DrawTriangleStrip3D(Raylib.ptr_addr(points), pointCount, color)
2358
+ end
2359
+ def self.DrawCubeV(position, size, color)
2360
+ Raylib.rl_DrawCubeV(position, size, color)
2361
+ end
2362
+ def self.DrawCubeWiresV(position, size, color)
2363
+ Raylib.rl_DrawCubeWiresV(position, size, color)
2364
+ end
2365
+ def self.DrawSphere(centerPos, radius, color)
2366
+ Raylib.rl_DrawSphere(centerPos, radius, color)
2367
+ end
2368
+ def self.DrawSphereEx(centerPos, radius, rings, slices, color)
2369
+ Raylib.rl_DrawSphereEx(centerPos, radius, rings, slices, color)
2370
+ end
2371
+ def self.DrawSphereWires(centerPos, radius, rings, slices, color)
2372
+ Raylib.rl_DrawSphereWires(centerPos, radius, rings, slices, color)
2373
+ end
2374
+ def self.DrawCylinder(position, radiusTop, radiusBottom, height, sides, color)
2375
+ Raylib.rl_DrawCylinder(position, radiusTop, radiusBottom, height, sides, color)
2376
+ end
2377
+ def self.DrawCylinderEx(startPos, endPos, startRadius, endRadius, sides, color)
2378
+ Raylib.rl_DrawCylinderEx(startPos, endPos, startRadius, endRadius, sides, color)
2379
+ end
2380
+ def self.DrawCylinderWires(position, radiusTop, radiusBottom, height, sides, color)
2381
+ Raylib.rl_DrawCylinderWires(position, radiusTop, radiusBottom, height, sides, color)
2382
+ end
2383
+ def self.DrawCylinderWiresEx(startPos, endPos, startRadius, endRadius, sides, color)
2384
+ Raylib.rl_DrawCylinderWiresEx(startPos, endPos, startRadius, endRadius, sides, color)
2385
+ end
2386
+ def self.DrawCapsule(startPos, endPos, radius, rings, slices, color)
2387
+ Raylib.rl_DrawCapsule(startPos, endPos, radius, rings, slices, color)
2388
+ end
2389
+ def self.DrawCapsuleWires(startPos, endPos, radius, rings, slices, color)
2390
+ Raylib.rl_DrawCapsuleWires(startPos, endPos, radius, rings, slices, color)
2391
+ end
2392
+ def self.DrawRay(ray, color)
2393
+ Raylib.rl_DrawRay(ray, color)
2394
+ end
2395
+ def self.LoadModel(fileName)
2396
+ ModelRef.new(Model.new(Raylib.rl_LoadModel(fileName), nil))
2397
+ end
2398
+ def self.LoadModelFromMesh(mesh)
2399
+ ModelRef.new(Model.new(Raylib.rl_LoadModelFromMesh(mesh), nil))
2400
+ end
2401
+ def self.IsModelValid(model)
2402
+ model = model.model
2403
+ Raylib.rl_IsModelValid(model)
2404
+ end
2405
+ def self.UnloadModel(model)
2406
+ model = model.model
2407
+ Raylib.rl_UnloadModel(model)
2408
+ end
2409
+ def self.GetModelBoundingBox(model)
2410
+ model = model.model
2411
+ _out = BoundingBox.new
2412
+ Raylib.rl_GetModelBoundingBox(model, _out)
2413
+ _out
2414
+ end
2415
+ def self.DrawModel(model, position, scale, tint)
2416
+ model = model.model
2417
+ Raylib.rl_DrawModel(model, position, scale, tint)
2418
+ end
2419
+ def self.DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint)
2420
+ model = model.model
2421
+ Raylib.rl_DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint)
2422
+ end
2423
+ def self.DrawModelWires(model, position, scale, tint)
2424
+ model = model.model
2425
+ Raylib.rl_DrawModelWires(model, position, scale, tint)
2426
+ end
2427
+ def self.DrawModelWiresEx(model, position, rotationAxis, rotationAngle, scale, tint)
2428
+ model = model.model
2429
+ Raylib.rl_DrawModelWiresEx(model, position, rotationAxis, rotationAngle, scale, tint)
2430
+ end
2431
+ def self.DrawBoundingBox(box, color)
2432
+ Raylib.rl_DrawBoundingBox(box, color)
2433
+ end
2434
+ def self.DrawBillboard(camera, texture, position, scale, tint)
2435
+ Raylib.rl_DrawBillboard(camera, texture, position, scale, tint)
2436
+ end
2437
+ def self.DrawBillboardRec(camera, texture, rec, position, size, tint)
2438
+ Raylib.rl_DrawBillboardRec(camera, texture, rec, position, size, tint)
2439
+ end
2440
+ def self.DrawBillboardPro(camera, texture, rec, position, up, size, origin, rotation, tint)
2441
+ Raylib.rl_DrawBillboardPro(camera, texture, rec, position, up, size, origin, rotation, tint)
2442
+ end
2443
+ def self.UpdateMeshBuffer(mesh, index, data, dataSize, offset)
2444
+ Raylib.rl_UpdateMeshBuffer(mesh, index, Raylib.ptr_addr(data), dataSize, offset)
2445
+ end
2446
+ def self.UnloadMesh(mesh)
2447
+ Raylib.rl_UnloadMesh(mesh)
2448
+ end
2449
+ def self.DrawMesh(mesh, material, transform)
2450
+ Raylib.rl_DrawMesh(mesh, material, transform)
2451
+ end
2452
+ def self.DrawMeshInstanced(mesh, material, transforms, instances)
2453
+ Raylib.rl_DrawMeshInstanced(mesh, material, transforms, instances)
2454
+ end
2455
+ def self.GetMeshBoundingBox(mesh)
2456
+ _out = BoundingBox.new
2457
+ Raylib.rl_GetMeshBoundingBox(mesh, _out)
2458
+ _out
2459
+ end
2460
+ def self.ExportMesh(mesh, fileName)
2461
+ Raylib.rl_ExportMesh(mesh, fileName)
2462
+ end
2463
+ def self.ExportMeshAsCode(mesh, fileName)
2464
+ Raylib.rl_ExportMeshAsCode(mesh, fileName)
2465
+ end
2466
+ def self.GenMeshPoly(sides, radius)
2467
+ Mesh.new(Raylib.rl_GenMeshPoly(sides, radius), nil)
2468
+ end
2469
+ def self.GenMeshPlane(width, length, resX, resZ)
2470
+ Mesh.new(Raylib.rl_GenMeshPlane(width, length, resX, resZ), nil)
2471
+ end
2472
+ def self.GenMeshCube(width, height, length)
2473
+ Mesh.new(Raylib.rl_GenMeshCube(width, height, length), nil)
2474
+ end
2475
+ def self.GenMeshSphere(radius, rings, slices)
2476
+ Mesh.new(Raylib.rl_GenMeshSphere(radius, rings, slices), nil)
2477
+ end
2478
+ def self.GenMeshHemiSphere(radius, rings, slices)
2479
+ Mesh.new(Raylib.rl_GenMeshHemiSphere(radius, rings, slices), nil)
2480
+ end
2481
+ def self.GenMeshCylinder(radius, height, slices)
2482
+ Mesh.new(Raylib.rl_GenMeshCylinder(radius, height, slices), nil)
2483
+ end
2484
+ def self.GenMeshCone(radius, height, slices)
2485
+ Mesh.new(Raylib.rl_GenMeshCone(radius, height, slices), nil)
2486
+ end
2487
+ def self.GenMeshTorus(radius, size, radSeg, sides)
2488
+ Mesh.new(Raylib.rl_GenMeshTorus(radius, size, radSeg, sides), nil)
2489
+ end
2490
+ def self.GenMeshKnot(radius, size, radSeg, sides)
2491
+ Mesh.new(Raylib.rl_GenMeshKnot(radius, size, radSeg, sides), nil)
2492
+ end
2493
+ def self.GenMeshHeightmap(heightmap, size)
2494
+ Mesh.new(Raylib.rl_GenMeshHeightmap(heightmap, size), nil)
2495
+ end
2496
+ def self.GenMeshCubicmap(cubicmap, cubeSize)
2497
+ Mesh.new(Raylib.rl_GenMeshCubicmap(cubicmap, cubeSize), nil)
2498
+ end
2499
+ def self.LoadMaterialDefault()
2500
+ Material.new(Raylib.rl_LoadMaterialDefault(), nil)
2501
+ end
2502
+ def self.IsMaterialValid(material)
2503
+ Raylib.rl_IsMaterialValid(material)
2504
+ end
2505
+ def self.UnloadMaterial(material)
2506
+ Raylib.rl_UnloadMaterial(material)
2507
+ end
2508
+ def self.SetMaterialTexture(material, mapType, texture)
2509
+ Raylib.rl_SetMaterialTexture(material, mapType, texture)
2510
+ end
2511
+ def self.UpdateModelAnimation(model, anim, frame)
2512
+ model = model.model
2513
+ Raylib.rl_UpdateModelAnimation(model, anim, frame)
2514
+ end
2515
+ def self.UpdateModelAnimationEx(model, animA, frameA, animB, frameB, blend)
2516
+ model = model.model
2517
+ Raylib.rl_UpdateModelAnimationEx(model, animA, (frameA || 0.0).to_f,
2518
+ animB, (frameB || 0.0).to_f,
2519
+ (blend || 0.0).to_f)
2520
+ end
2521
+ def self.IsModelAnimationValid(model, anim)
2522
+ model = model.model
2523
+ Raylib.rl_IsModelAnimationValid(model, anim)
2524
+ end
2525
+ def self.CheckCollisionSpheres(center1, radius1, center2, radius2)
2526
+ Raylib.rl_CheckCollisionSpheres(center1, radius1, center2, radius2)
2527
+ end
2528
+ def self.CheckCollisionBoxes(box1, box2)
2529
+ Raylib.rl_CheckCollisionBoxes(box1, box2)
2530
+ end
2531
+ def self.CheckCollisionBoxSphere(box, center, radius)
2532
+ Raylib.rl_CheckCollisionBoxSphere(box, center, radius)
2533
+ end
2534
+ def self.GetRayCollisionSphere(ray, center, radius)
2535
+ _out = RayCollision.new
2536
+ Raylib.rl_GetRayCollisionSphere(ray, center, radius, _out)
2537
+ _out
2538
+ end
2539
+ def self.GetRayCollisionBox(ray, box)
2540
+ _out = RayCollision.new
2541
+ Raylib.rl_GetRayCollisionBox(ray, box, _out)
2542
+ _out
2543
+ end
2544
+ def self.GetRayCollisionMesh(ray, mesh, transform)
2545
+ _out = RayCollision.new
2546
+ Raylib.rl_GetRayCollisionMesh(ray, mesh, transform, _out)
2547
+ _out
2548
+ end
2549
+ def self.GetRayCollisionTriangle(ray, p1, p2, p3)
2550
+ _out = RayCollision.new
2551
+ Raylib.rl_GetRayCollisionTriangle(ray, p1, p2, p3, _out)
2552
+ _out
2553
+ end
2554
+ def self.GetRayCollisionQuad(ray, p1, p2, p3, p4)
2555
+ _out = RayCollision.new
2556
+ Raylib.rl_GetRayCollisionQuad(ray, p1, p2, p3, p4, _out)
2557
+ _out
2558
+ end
2559
+ def self.LoadWave(fileName)
2560
+ Wave.new(Raylib.rl_LoadWave(fileName), nil)
2561
+ end
2562
+ def self.LoadWaveFromMemory(fileType, fileData, dataSize)
2563
+ Wave.new(Raylib.rl_audio_LoadWaveFromMemory(fileType, fileData, dataSize), nil)
2564
+ end
2565
+ def self.IsWaveValid(wave)
2566
+ Raylib.rl_audio_IsWaveValid(wave) != 0
2567
+ end
2568
+ def self.LoadSound(fileName)
2569
+ Sound.new(Raylib.rl_audio_LoadSound(fileName), nil)
2570
+ end
2571
+ def self.LoadSoundFromWave(wave)
2572
+ Sound.new(Raylib.rl_audio_LoadSoundFromWave(wave), nil)
2573
+ end
2574
+ def self.LoadSoundAlias(source)
2575
+ Sound.new(Raylib.rl_LoadSoundAlias(source), nil)
2576
+ end
2577
+ def self.IsSoundValid(sound)
2578
+ Raylib.rl_audio_IsSoundValid(sound) != 0
2579
+ end
2580
+ def self.UpdateSound(sound, data, frameCount)
2581
+ Raylib.rl_UpdateSound(sound, data, frameCount)
2582
+ end
2583
+ def self.UnloadWave(wave)
2584
+ Raylib.rl_audio_UnloadWave(wave)
2585
+ end
2586
+ def self.UnloadSound(sound)
2587
+ Raylib.rl_audio_UnloadSound(sound)
2588
+ end
2589
+ def self.UnloadSoundAlias(kw_alias)
2590
+ Raylib.rl_UnloadSoundAlias(kw_alias)
2591
+ end
2592
+ def self.ExportWave(wave, fileName)
2593
+ Raylib.rl_ExportWave(wave, fileName)
2594
+ end
2595
+ def self.ExportWaveAsCode(wave, fileName)
2596
+ Raylib.rl_ExportWaveAsCode(wave, fileName)
2597
+ end
2598
+ def self.PlaySound(sound)
2599
+ Raylib.rl_audio_PlaySound(sound)
2600
+ end
2601
+ def self.StopSound(sound)
2602
+ Raylib.rl_audio_StopSound(sound)
2603
+ end
2604
+ def self.PauseSound(sound)
2605
+ Raylib.rl_PauseSound(sound)
2606
+ end
2607
+ def self.ResumeSound(sound)
2608
+ Raylib.rl_ResumeSound(sound)
2609
+ end
2610
+ def self.IsSoundPlaying(sound)
2611
+ Raylib.rl_audio_IsSoundPlaying(sound) != 0
2612
+ end
2613
+ def self.SetSoundVolume(sound, volume)
2614
+ Raylib.rl_audio_SetSoundVolume(sound, volume)
2615
+ end
2616
+ def self.SetSoundPitch(sound, pitch)
2617
+ Raylib.rl_audio_SetSoundPitch(sound, pitch)
2618
+ end
2619
+ def self.SetSoundPan(sound, pan)
2620
+ Raylib.rl_SetSoundPan(sound, pan)
2621
+ end
2622
+ def self.WaveCopy(wave)
2623
+ Wave.new(Raylib.rl_WaveCopy(wave), nil)
2624
+ end
2625
+ def self.LoadWaveSamples(wave)
2626
+ Raylib.rl_LoadWaveSamples(wave)
2627
+ end
2628
+ def self.LoadMusicStream(fileName)
2629
+ Music.new(Raylib.rl_LoadMusicStream(fileName), nil)
2630
+ end
2631
+ def self.LoadMusicStreamFromMemory(fileType, data, dataSize)
2632
+ Music.new(Raylib.rl_LoadMusicStreamFromMemory(fileType, data, dataSize), nil)
2633
+ end
2634
+ def self.IsMusicValid(music)
2635
+ Raylib.rl_audio_IsMusicValid(music) != 0
2636
+ end
2637
+ def self.UnloadMusicStream(music)
2638
+ Raylib.rl_UnloadMusicStream(music)
2639
+ end
2640
+ def self.PlayMusicStream(music)
2641
+ Raylib.rl_PlayMusicStream(music)
2642
+ end
2643
+ def self.IsMusicStreamPlaying(music)
2644
+ Raylib.rl_IsMusicStreamPlaying(music)
2645
+ end
2646
+ def self.UpdateMusicStream(music)
2647
+ Raylib.rl_UpdateMusicStream(music)
2648
+ end
2649
+ def self.StopMusicStream(music)
2650
+ Raylib.rl_StopMusicStream(music)
2651
+ end
2652
+ def self.PauseMusicStream(music)
2653
+ Raylib.rl_PauseMusicStream(music)
2654
+ end
2655
+ def self.ResumeMusicStream(music)
2656
+ Raylib.rl_ResumeMusicStream(music)
2657
+ end
2658
+ def self.SeekMusicStream(music, position)
2659
+ Raylib.rl_SeekMusicStream(music, position)
2660
+ end
2661
+ def self.SetMusicVolume(music, volume)
2662
+ Raylib.rl_SetMusicVolume(music, volume)
2663
+ end
2664
+ def self.SetMusicPitch(music, pitch)
2665
+ Raylib.rl_SetMusicPitch(music, pitch)
2666
+ end
2667
+ def self.SetMusicPan(music, pan)
2668
+ Raylib.rl_SetMusicPan(music, pan)
2669
+ end
2670
+ def self.GetMusicTimeLength(music)
2671
+ Raylib.rl_GetMusicTimeLength(music)
2672
+ end
2673
+ def self.GetMusicTimePlayed(music)
2674
+ Raylib.rl_GetMusicTimePlayed(music)
2675
+ end
2676
+ def self.LoadAudioStream(sampleRate, sampleSize, channels)
2677
+ AudioStream.new(Raylib.rl_audio_LoadAudioStream(sampleRate, sampleSize, channels), nil)
2678
+ end
2679
+ def self.IsAudioStreamValid(stream)
2680
+ Raylib.rl_audio_IsAudioStreamValid(stream) != 0
2681
+ end
2682
+ def self.UnloadAudioStream(stream)
2683
+ Raylib.rl_audio_UnloadAudioStream(stream)
2684
+ end
2685
+ # The gem's data argument is a pointer object (MRI's :pointer refuses a
2686
+ # raw Integer). AOT ffi_func params cannot take objects (raylib_ffi Color
2687
+ # note; :any even generates a C `void` param), so take the address here:
2688
+ # FFI::MemoryPointer (carried ffi package) and Raylib::Ptr both return the
2689
+ # forced INT box from #address, which is what the :long shim consumes.
2690
+ # Call sites pass the object. Canonical body enforced by wrap_audio.rb.
2691
+ def self.UpdateAudioStream(stream, data, frameCount)
2692
+ Raylib.rl_audio_UpdateAudioStream(stream, data.address, frameCount)
2693
+ end
2694
+ def self.IsAudioStreamProcessed(stream)
2695
+ Raylib.rl_IsAudioStreamProcessed(stream)
2696
+ end
2697
+ def self.PlayAudioStream(stream)
2698
+ Raylib.rl_audio_PlayAudioStream(stream)
2699
+ end
2700
+ def self.PauseAudioStream(stream)
2701
+ Raylib.rl_PauseAudioStream(stream)
2702
+ end
2703
+ def self.ResumeAudioStream(stream)
2704
+ Raylib.rl_ResumeAudioStream(stream)
2705
+ end
2706
+ def self.IsAudioStreamPlaying(stream)
2707
+ Raylib.rl_audio_IsAudioStreamPlaying(stream) != 0
2708
+ end
2709
+ def self.StopAudioStream(stream)
2710
+ Raylib.rl_audio_StopAudioStream(stream)
2711
+ end
2712
+ def self.SetAudioStreamVolume(stream, volume)
2713
+ Raylib.rl_SetAudioStreamVolume(stream, volume)
2714
+ end
2715
+ def self.SetAudioStreamPitch(stream, pitch)
2716
+ Raylib.rl_SetAudioStreamPitch(stream, pitch)
2717
+ end
2718
+ def self.SetAudioStreamPan(stream, pan)
2719
+ Raylib.rl_SetAudioStreamPan(stream, pan)
2720
+ end
2721
+ def self.SetAudioStreamCallback(stream, callback)
2722
+ Raylib.rl_SetAudioStreamCallback(stream, callback)
2723
+ end
2724
+ def self.AttachAudioStreamProcessor(stream, processor)
2725
+ Raylib.rl_AttachAudioStreamProcessor(stream, processor)
2726
+ end
2727
+ def self.DetachAudioStreamProcessor(stream, processor)
2728
+ Raylib.rl_DetachAudioStreamProcessor(stream, processor)
2729
+ end
2730
+ def self.AttachAudioMixedProcessor(processor)
2731
+ Raylib.rl_AttachAudioMixedProcessor(processor)
2732
+ end
2733
+ def self.DetachAudioMixedProcessor(processor)
2734
+ Raylib.rl_DetachAudioMixedProcessor(processor)
2735
+ end
2736
+ FLAG_VSYNC_HINT = 64
2737
+ FLAG_FULLSCREEN_MODE = 2
2738
+ FLAG_WINDOW_RESIZABLE = 4
2739
+ FLAG_WINDOW_UNDECORATED = 8
2740
+ FLAG_WINDOW_HIDDEN = 128
2741
+ FLAG_WINDOW_MINIMIZED = 512
2742
+ FLAG_WINDOW_MAXIMIZED = 1024
2743
+ FLAG_WINDOW_UNFOCUSED = 2048
2744
+ FLAG_WINDOW_TOPMOST = 4096
2745
+ FLAG_WINDOW_ALWAYS_RUN = 256
2746
+ FLAG_WINDOW_TRANSPARENT = 16
2747
+ FLAG_WINDOW_HIGHDPI = 8192
2748
+ FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384
2749
+ FLAG_BORDERLESS_WINDOWED_MODE = 32768
2750
+ FLAG_MSAA_4X_HINT = 32
2751
+ FLAG_INTERLACED_HINT = 65536
2752
+ LOG_ALL = 0
2753
+ LOG_TRACE = 1
2754
+ LOG_DEBUG = 2
2755
+ LOG_INFO = 3
2756
+ LOG_WARNING = 4
2757
+ LOG_ERROR = 5
2758
+ LOG_FATAL = 6
2759
+ LOG_NONE = 7
2760
+ GAMEPAD_AXIS_LEFT_X = 0
2761
+ GAMEPAD_AXIS_LEFT_Y = 1
2762
+ GAMEPAD_AXIS_RIGHT_X = 2
2763
+ GAMEPAD_AXIS_RIGHT_Y = 3
2764
+ GAMEPAD_AXIS_LEFT_TRIGGER = 4
2765
+ GAMEPAD_AXIS_RIGHT_TRIGGER = 5
2766
+ MATERIAL_MAP_ALBEDO = 0
2767
+ MATERIAL_MAP_METALNESS = 1
2768
+ MATERIAL_MAP_NORMAL = 2
2769
+ MATERIAL_MAP_ROUGHNESS = 3
2770
+ MATERIAL_MAP_OCCLUSION = 4
2771
+ MATERIAL_MAP_EMISSION = 5
2772
+ MATERIAL_MAP_HEIGHT = 6
2773
+ MATERIAL_MAP_CUBEMAP = 7
2774
+ MATERIAL_MAP_IRRADIANCE = 8
2775
+ MATERIAL_MAP_PREFILTER = 9
2776
+ MATERIAL_MAP_BRDF = 10
2777
+ SHADER_LOC_VERTEX_POSITION = 0
2778
+ SHADER_LOC_VERTEX_TEXCOORD01 = 1
2779
+ SHADER_LOC_VERTEX_TEXCOORD02 = 2
2780
+ SHADER_LOC_VERTEX_NORMAL = 3
2781
+ SHADER_LOC_VERTEX_TANGENT = 4
2782
+ SHADER_LOC_VERTEX_COLOR = 5
2783
+ SHADER_LOC_MATRIX_MVP = 6
2784
+ SHADER_LOC_MATRIX_VIEW = 7
2785
+ SHADER_LOC_MATRIX_PROJECTION = 8
2786
+ SHADER_LOC_MATRIX_MODEL = 9
2787
+ SHADER_LOC_MATRIX_NORMAL = 10
2788
+ SHADER_LOC_VECTOR_VIEW = 11
2789
+ SHADER_LOC_COLOR_DIFFUSE = 12
2790
+ SHADER_LOC_COLOR_SPECULAR = 13
2791
+ SHADER_LOC_COLOR_AMBIENT = 14
2792
+ SHADER_LOC_MAP_ALBEDO = 15
2793
+ SHADER_LOC_MAP_METALNESS = 16
2794
+ SHADER_LOC_MAP_NORMAL = 17
2795
+ SHADER_LOC_MAP_ROUGHNESS = 18
2796
+ SHADER_LOC_MAP_OCCLUSION = 19
2797
+ SHADER_LOC_MAP_EMISSION = 20
2798
+ SHADER_LOC_MAP_HEIGHT = 21
2799
+ SHADER_LOC_MAP_CUBEMAP = 22
2800
+ SHADER_LOC_MAP_IRRADIANCE = 23
2801
+ SHADER_LOC_MAP_PREFILTER = 24
2802
+ SHADER_LOC_MAP_BRDF = 25
2803
+ SHADER_LOC_VERTEX_BONEIDS = 26
2804
+ SHADER_LOC_VERTEX_BONEWEIGHTS = 27
2805
+ SHADER_LOC_MATRIX_BONETRANSFORMS = 28
2806
+ SHADER_LOC_VERTEX_INSTANCETRANSFORM = 29
2807
+ SHADER_UNIFORM_FLOAT = 0
2808
+ SHADER_UNIFORM_VEC2 = 1
2809
+ SHADER_UNIFORM_VEC3 = 2
2810
+ SHADER_UNIFORM_VEC4 = 3
2811
+ SHADER_UNIFORM_INT = 4
2812
+ SHADER_UNIFORM_IVEC2 = 5
2813
+ SHADER_UNIFORM_IVEC3 = 6
2814
+ SHADER_UNIFORM_IVEC4 = 7
2815
+ SHADER_UNIFORM_UINT = 8
2816
+ SHADER_UNIFORM_UIVEC2 = 9
2817
+ SHADER_UNIFORM_UIVEC3 = 10
2818
+ SHADER_UNIFORM_UIVEC4 = 11
2819
+ SHADER_UNIFORM_SAMPLER2D = 12
2820
+ SHADER_ATTRIB_FLOAT = 0
2821
+ SHADER_ATTRIB_VEC2 = 1
2822
+ SHADER_ATTRIB_VEC3 = 2
2823
+ SHADER_ATTRIB_VEC4 = 3
2824
+ PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1
2825
+ PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2
2826
+ PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3
2827
+ PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4
2828
+ PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5
2829
+ PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6
2830
+ PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7
2831
+ PIXELFORMAT_UNCOMPRESSED_R32 = 8
2832
+ PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
2833
+ PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
2834
+ PIXELFORMAT_UNCOMPRESSED_R16 = 11
2835
+ PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12
2836
+ PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13
2837
+ PIXELFORMAT_COMPRESSED_DXT1_RGB = 14
2838
+ PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15
2839
+ PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16
2840
+ PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17
2841
+ PIXELFORMAT_COMPRESSED_ETC1_RGB = 18
2842
+ PIXELFORMAT_COMPRESSED_ETC2_RGB = 19
2843
+ PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20
2844
+ PIXELFORMAT_COMPRESSED_PVRT_RGB = 21
2845
+ PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22
2846
+ PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23
2847
+ PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24
2848
+ TEXTURE_FILTER_POINT = 0
2849
+ TEXTURE_FILTER_BILINEAR = 1
2850
+ TEXTURE_FILTER_TRILINEAR = 2
2851
+ TEXTURE_FILTER_ANISOTROPIC_4X = 3
2852
+ TEXTURE_FILTER_ANISOTROPIC_8X = 4
2853
+ TEXTURE_FILTER_ANISOTROPIC_16X = 5
2854
+ TEXTURE_WRAP_REPEAT = 0
2855
+ TEXTURE_WRAP_CLAMP = 1
2856
+ TEXTURE_WRAP_MIRROR_REPEAT = 2
2857
+ TEXTURE_WRAP_MIRROR_CLAMP = 3
2858
+ CUBEMAP_LAYOUT_AUTO_DETECT = 0
2859
+ CUBEMAP_LAYOUT_LINE_VERTICAL = 1
2860
+ CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2
2861
+ CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3
2862
+ CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4
2863
+ FONT_DEFAULT = 0
2864
+ FONT_BITMAP = 1
2865
+ FONT_SDF = 2
2866
+ BLEND_ALPHA = 0
2867
+ BLEND_ADDITIVE = 1
2868
+ BLEND_MULTIPLIED = 2
2869
+ BLEND_ADD_COLORS = 3
2870
+ BLEND_SUBTRACT_COLORS = 4
2871
+ BLEND_ALPHA_PREMULTIPLY = 5
2872
+ BLEND_CUSTOM = 6
2873
+ BLEND_CUSTOM_SEPARATE = 7
2874
+ GESTURE_NONE = 0
2875
+ GESTURE_TAP = 1
2876
+ GESTURE_DOUBLETAP = 2
2877
+ GESTURE_HOLD = 4
2878
+ GESTURE_DRAG = 8
2879
+ GESTURE_SWIPE_RIGHT = 16
2880
+ GESTURE_SWIPE_LEFT = 32
2881
+ GESTURE_SWIPE_UP = 64
2882
+ GESTURE_SWIPE_DOWN = 128
2883
+ GESTURE_PINCH_IN = 256
2884
+ GESTURE_PINCH_OUT = 512
2885
+ NPATCH_NINE_PATCH = 0
2886
+ NPATCH_THREE_PATCH_VERTICAL = 1
2887
+ NPATCH_THREE_PATCH_HORIZONTAL = 2
2888
+ RAYLIB_VERSION_MAJOR = 6
2889
+ RAYLIB_VERSION_MINOR = 2
2890
+ RAYLIB_VERSION_PATCH = 0
2891
+ PI = 3.141592653589793
2892
+ end
2893
+
2894
+ # ====== generated: snake_case aliases (MRI gem naming) ======
2895
+ def self.init_window(p0, p1, p2)
2896
+ Raylib.InitWindow(p0, p1, p2)
2897
+ end
2898
+ def self.close_window()
2899
+ Raylib.CloseWindow()
2900
+ end
2901
+ def self.is_window_ready()
2902
+ Raylib.IsWindowReady()
2903
+ end
2904
+ def self.is_window_fullscreen()
2905
+ Raylib.IsWindowFullscreen()
2906
+ end
2907
+ def self.is_window_hidden()
2908
+ Raylib.IsWindowHidden()
2909
+ end
2910
+ def self.is_window_minimized()
2911
+ Raylib.IsWindowMinimized()
2912
+ end
2913
+ def self.is_window_maximized()
2914
+ Raylib.IsWindowMaximized()
2915
+ end
2916
+ def self.is_window_focused()
2917
+ Raylib.IsWindowFocused()
2918
+ end
2919
+ def self.is_window_resized()
2920
+ Raylib.IsWindowResized()
2921
+ end
2922
+ def self.is_window_state(p0)
2923
+ Raylib.IsWindowState(p0)
2924
+ end
2925
+ def self.set_window_state(p0)
2926
+ Raylib.SetWindowState(p0)
2927
+ end
2928
+ def self.clear_window_state(p0)
2929
+ Raylib.ClearWindowState(p0)
2930
+ end
2931
+ def self.toggle_fullscreen()
2932
+ Raylib.ToggleFullscreen()
2933
+ end
2934
+ def self.toggle_borderless_windowed()
2935
+ Raylib.ToggleBorderlessWindowed()
2936
+ end
2937
+ def self.maximize_window()
2938
+ Raylib.MaximizeWindow()
2939
+ end
2940
+ def self.minimize_window()
2941
+ Raylib.MinimizeWindow()
2942
+ end
2943
+ def self.restore_window()
2944
+ Raylib.RestoreWindow()
2945
+ end
2946
+ def self.set_window_icons(p0, p1)
2947
+ Raylib.SetWindowIcons(p0, p1)
2948
+ end
2949
+ def self.set_window_title(p0)
2950
+ Raylib.SetWindowTitle(p0)
2951
+ end
2952
+ def self.set_window_position(p0, p1)
2953
+ Raylib.SetWindowPosition(p0, p1)
2954
+ end
2955
+ def self.set_window_monitor(p0)
2956
+ Raylib.SetWindowMonitor(p0)
2957
+ end
2958
+ def self.set_window_min_size(p0, p1)
2959
+ Raylib.SetWindowMinSize(p0, p1)
2960
+ end
2961
+ def self.set_window_max_size(p0, p1)
2962
+ Raylib.SetWindowMaxSize(p0, p1)
2963
+ end
2964
+ def self.set_window_size(p0, p1)
2965
+ Raylib.SetWindowSize(p0, p1)
2966
+ end
2967
+ def self.set_window_opacity(p0)
2968
+ Raylib.SetWindowOpacity(p0)
2969
+ end
2970
+ def self.set_window_focused()
2971
+ Raylib.SetWindowFocused()
2972
+ end
2973
+ def self.get_window_handle()
2974
+ Raylib.GetWindowHandle()
2975
+ end
2976
+ def self.get_screen_width()
2977
+ Raylib.GetScreenWidth()
2978
+ end
2979
+ def self.get_screen_height()
2980
+ Raylib.GetScreenHeight()
2981
+ end
2982
+ def self.get_render_width()
2983
+ Raylib.GetRenderWidth()
2984
+ end
2985
+ def self.get_render_height()
2986
+ Raylib.GetRenderHeight()
2987
+ end
2988
+ def self.get_monitor_count()
2989
+ Raylib.GetMonitorCount()
2990
+ end
2991
+ def self.get_current_monitor()
2992
+ Raylib.GetCurrentMonitor()
2993
+ end
2994
+ def self.get_monitor_width(p0)
2995
+ Raylib.GetMonitorWidth(p0)
2996
+ end
2997
+ def self.get_monitor_height(p0)
2998
+ Raylib.GetMonitorHeight(p0)
2999
+ end
3000
+ def self.get_monitor_physical_width(p0)
3001
+ Raylib.GetMonitorPhysicalWidth(p0)
3002
+ end
3003
+ def self.get_monitor_physical_height(p0)
3004
+ Raylib.GetMonitorPhysicalHeight(p0)
3005
+ end
3006
+ def self.get_monitor_refresh_rate(p0)
3007
+ Raylib.GetMonitorRefreshRate(p0)
3008
+ end
3009
+ def self.get_monitor_name(p0)
3010
+ Raylib.GetMonitorName(p0)
3011
+ end
3012
+ def self.set_clipboard_text(p0)
3013
+ Raylib.SetClipboardText(p0)
3014
+ end
3015
+ def self.get_clipboard_text()
3016
+ Raylib.GetClipboardText()
3017
+ end
3018
+ def self.enable_event_waiting()
3019
+ Raylib.EnableEventWaiting()
3020
+ end
3021
+ def self.disable_event_waiting()
3022
+ Raylib.DisableEventWaiting()
3023
+ end
3024
+ def self.show_cursor()
3025
+ Raylib.ShowCursor()
3026
+ end
3027
+ def self.hide_cursor()
3028
+ Raylib.HideCursor()
3029
+ end
3030
+ def self.is_cursor_hidden()
3031
+ Raylib.IsCursorHidden()
3032
+ end
3033
+ def self.enable_cursor()
3034
+ Raylib.EnableCursor()
3035
+ end
3036
+ def self.disable_cursor()
3037
+ Raylib.DisableCursor()
3038
+ end
3039
+ def self.is_cursor_on_screen()
3040
+ Raylib.IsCursorOnScreen()
3041
+ end
3042
+ def self.begin_drawing()
3043
+ Raylib.BeginDrawing()
3044
+ end
3045
+ def self.end_drawing()
3046
+ Raylib.EndDrawing()
3047
+ end
3048
+ def self.end_mode_2d()
3049
+ Raylib.EndMode2D()
3050
+ end
3051
+ def self.end_mode_3d()
3052
+ Raylib.rl_EndMode3D()
3053
+ end
3054
+ def self.end_texture_mode()
3055
+ Raylib.EndTextureMode()
3056
+ end
3057
+ def self.end_shader_mode()
3058
+ Raylib.EndShaderMode()
3059
+ end
3060
+ def self.begin_blend_mode(p0)
3061
+ Raylib.BeginBlendMode(p0)
3062
+ end
3063
+ def self.end_blend_mode()
3064
+ Raylib.EndBlendMode()
3065
+ end
3066
+ def self.begin_scissor_mode(p0, p1, p2, p3)
3067
+ Raylib.BeginScissorMode(p0, p1, p2, p3)
3068
+ end
3069
+ def self.end_scissor_mode()
3070
+ Raylib.EndScissorMode()
3071
+ end
3072
+ def self.end_vr_stereo_mode()
3073
+ Raylib.EndVrStereoMode()
3074
+ end
3075
+ def self.set_target_fps(p0)
3076
+ Raylib.SetTargetFPS(p0)
3077
+ end
3078
+ def self.get_frame_time()
3079
+ Raylib.GetFrameTime()
3080
+ end
3081
+ def self.get_time()
3082
+ Raylib.GetTime()
3083
+ end
3084
+ def self.get_fps()
3085
+ Raylib.GetFPS()
3086
+ end
3087
+ def self.swap_screen_buffer()
3088
+ Raylib.SwapScreenBuffer()
3089
+ end
3090
+ def self.poll_input_events()
3091
+ Raylib.PollInputEvents()
3092
+ end
3093
+ def self.wait_time(p0)
3094
+ Raylib.WaitTime(p0)
3095
+ end
3096
+ def self.set_random_seed(p0)
3097
+ Raylib.SetRandomSeed(p0)
3098
+ end
3099
+ def self.get_random_value(p0, p1)
3100
+ Raylib.GetRandomValue(p0, p1)
3101
+ end
3102
+ def self.load_random_sequence(p0, p1, p2)
3103
+ Raylib.LoadRandomSequence(p0, p1, p2)
3104
+ end
3105
+ def self.unload_random_sequence(p0)
3106
+ Raylib.UnloadRandomSequence(p0)
3107
+ end
3108
+ def self.take_screenshot(p0)
3109
+ Raylib.TakeScreenshot(p0)
3110
+ end
3111
+ def self.set_config_flags(p0)
3112
+ Raylib.SetConfigFlags(p0)
3113
+ end
3114
+ def self.open_url(p0)
3115
+ Raylib.OpenURL(p0)
3116
+ end
3117
+ def self.set_trace_log_level(p0)
3118
+ Raylib.SetTraceLogLevel(p0)
3119
+ end
3120
+ def self.mem_alloc(p0)
3121
+ Raylib.MemAlloc(p0)
3122
+ end
3123
+ def self.mem_realloc(p0, p1)
3124
+ Raylib.MemRealloc(p0, p1)
3125
+ end
3126
+ def self.mem_free(p0)
3127
+ Raylib.MemFree(p0)
3128
+ end
3129
+ def self.load_file_data(p0, p1)
3130
+ Raylib.LoadFileData(p0, p1)
3131
+ end
3132
+ def self.unload_file_data(p0)
3133
+ Raylib.UnloadFileData(p0)
3134
+ end
3135
+ def self.save_file_data(p0, p1, p2)
3136
+ Raylib.SaveFileData(p0, p1, p2)
3137
+ end
3138
+ def self.export_data_as_code(p0, p1, p2)
3139
+ Raylib.ExportDataAsCode(p0, p1, p2)
3140
+ end
3141
+ def self.load_file_text(p0)
3142
+ Raylib.LoadFileText(p0)
3143
+ end
3144
+ def self.unload_file_text(p0)
3145
+ Raylib.UnloadFileText(p0)
3146
+ end
3147
+ def self.save_file_text(p0, p1)
3148
+ Raylib.SaveFileText(p0, p1)
3149
+ end
3150
+ def self.file_rename(p0, p1)
3151
+ Raylib.FileRename(p0, p1)
3152
+ end
3153
+ def self.file_remove(p0)
3154
+ Raylib.FileRemove(p0)
3155
+ end
3156
+ def self.file_copy(p0, p1)
3157
+ Raylib.FileCopy(p0, p1)
3158
+ end
3159
+ def self.file_move(p0, p1)
3160
+ Raylib.FileMove(p0, p1)
3161
+ end
3162
+ def self.file_text_replace(p0, p1, p2)
3163
+ Raylib.FileTextReplace(p0, p1, p2)
3164
+ end
3165
+ def self.file_text_find_index(p0, p1)
3166
+ Raylib.FileTextFindIndex(p0, p1)
3167
+ end
3168
+ def self.file_exists(p0)
3169
+ Raylib.FileExists(p0)
3170
+ end
3171
+ def self.directory_exists(p0)
3172
+ Raylib.DirectoryExists(p0)
3173
+ end
3174
+ def self.is_file_extension(p0, p1)
3175
+ Raylib.IsFileExtension(p0, p1)
3176
+ end
3177
+ def self.is_file_hidden(p0)
3178
+ Raylib.IsFileHidden(p0)
3179
+ end
3180
+ def self.get_file_length(p0)
3181
+ Raylib.GetFileLength(p0)
3182
+ end
3183
+ def self.get_file_mod_time(p0)
3184
+ Raylib.GetFileModTime(p0)
3185
+ end
3186
+ def self.get_file_extension(p0)
3187
+ Raylib.GetFileExtension(p0)
3188
+ end
3189
+ def self.get_file_name(p0)
3190
+ Raylib.GetFileName(p0)
3191
+ end
3192
+ def self.get_file_name_without_ext(p0)
3193
+ Raylib.GetFileNameWithoutExt(p0)
3194
+ end
3195
+ def self.get_directory_path(p0)
3196
+ Raylib.GetDirectoryPath(p0)
3197
+ end
3198
+ def self.get_prev_directory_path(p0)
3199
+ Raylib.GetPrevDirectoryPath(p0)
3200
+ end
3201
+ def self.get_working_directory()
3202
+ Raylib.GetWorkingDirectory()
3203
+ end
3204
+ def self.get_application_directory()
3205
+ Raylib.GetApplicationDirectory()
3206
+ end
3207
+ def self.make_directory(p0)
3208
+ Raylib.MakeDirectory(p0)
3209
+ end
3210
+ def self.change_directory(p0)
3211
+ Raylib.ChangeDirectory(p0)
3212
+ end
3213
+ def self.is_path_file(p0)
3214
+ Raylib.IsPathFile(p0)
3215
+ end
3216
+ def self.is_path_directory(p0)
3217
+ Raylib.IsPathDirectory(p0)
3218
+ end
3219
+ def self.is_path_absolute(p0)
3220
+ Raylib.IsPathAbsolute(p0)
3221
+ end
3222
+ def self.is_file_name_valid(p0)
3223
+ Raylib.IsFileNameValid(p0)
3224
+ end
3225
+ def self.is_file_dropped()
3226
+ Raylib.IsFileDropped()
3227
+ end
3228
+ def self.get_directory_file_count(p0)
3229
+ Raylib.GetDirectoryFileCount(p0)
3230
+ end
3231
+ def self.get_directory_file_count_ex(p0, p1, p2)
3232
+ Raylib.GetDirectoryFileCountEx(p0, p1, p2)
3233
+ end
3234
+ def self.compress_data(p0, p1, p2)
3235
+ Raylib.CompressData(p0, p1, p2)
3236
+ end
3237
+ def self.decompress_data(p0, p1, p2)
3238
+ Raylib.DecompressData(p0, p1, p2)
3239
+ end
3240
+ def self.encode_data_base_64(p0, p1, p2)
3241
+ Raylib.EncodeDataBase64(p0, p1, p2)
3242
+ end
3243
+ def self.decode_data_base_64(p0, p1)
3244
+ Raylib.DecodeDataBase64(p0, p1)
3245
+ end
3246
+ def self.compute_crc3_2(p0, p1)
3247
+ Raylib.ComputeCRC32(p0, p1)
3248
+ end
3249
+ def self.compute_md5(p0, p1)
3250
+ Raylib.ComputeMD5(p0, p1)
3251
+ end
3252
+ def self.compute_sha1(p0, p1)
3253
+ Raylib.ComputeSHA1(p0, p1)
3254
+ end
3255
+ def self.compute_sha2_56(p0, p1)
3256
+ Raylib.ComputeSHA256(p0, p1)
3257
+ end
3258
+ def self.set_automation_event_base_frame(p0)
3259
+ Raylib.SetAutomationEventBaseFrame(p0)
3260
+ end
3261
+ def self.start_automation_event_recording()
3262
+ Raylib.StartAutomationEventRecording()
3263
+ end
3264
+ def self.stop_automation_event_recording()
3265
+ Raylib.StopAutomationEventRecording()
3266
+ end
3267
+ def self.is_key_pressed_repeat(p0)
3268
+ Raylib.IsKeyPressedRepeat(p0)
3269
+ end
3270
+ def self.is_key_released(p0)
3271
+ Raylib.IsKeyReleased(p0)
3272
+ end
3273
+ def self.is_key_up(p0)
3274
+ Raylib.IsKeyUp(p0)
3275
+ end
3276
+ def self.get_key_pressed()
3277
+ Raylib.GetKeyPressed()
3278
+ end
3279
+ def self.get_char_pressed()
3280
+ Raylib.GetCharPressed()
3281
+ end
3282
+ def self.get_key_name(p0)
3283
+ Raylib.GetKeyName(p0)
3284
+ end
3285
+ def self.set_exit_key(p0)
3286
+ Raylib.SetExitKey(p0)
3287
+ end
3288
+ def self.is_gamepad_available(p0)
3289
+ Raylib.IsGamepadAvailable(p0)
3290
+ end
3291
+ def self.get_gamepad_name(p0)
3292
+ Raylib.GetGamepadName(p0)
3293
+ end
3294
+ def self.is_gamepad_button_pressed(p0, p1)
3295
+ Raylib.IsGamepadButtonPressed(p0, p1)
3296
+ end
3297
+ def self.is_gamepad_button_released(p0, p1)
3298
+ Raylib.IsGamepadButtonReleased(p0, p1)
3299
+ end
3300
+ def self.is_gamepad_button_up(p0, p1)
3301
+ Raylib.IsGamepadButtonUp(p0, p1)
3302
+ end
3303
+ def self.get_gamepad_button_pressed()
3304
+ Raylib.GetGamepadButtonPressed()
3305
+ end
3306
+ def self.get_gamepad_axis_count(p0)
3307
+ Raylib.GetGamepadAxisCount(p0)
3308
+ end
3309
+ def self.get_gamepad_axis_movement(p0, p1)
3310
+ Raylib.GetGamepadAxisMovement(p0, p1)
3311
+ end
3312
+ def self.set_gamepad_mappings(p0)
3313
+ Raylib.SetGamepadMappings(p0)
3314
+ end
3315
+ def self.set_gamepad_vibration(p0, p1, p2, p3)
3316
+ Raylib.SetGamepadVibration(p0, p1, p2, p3)
3317
+ end
3318
+ def self.is_mouse_button_pressed(p0)
3319
+ Raylib.IsMouseButtonPressed(p0)
3320
+ end
3321
+ def self.is_mouse_button_released(p0)
3322
+ Raylib.IsMouseButtonReleased(p0)
3323
+ end
3324
+ def self.is_mouse_button_up(p0)
3325
+ Raylib.IsMouseButtonUp(p0)
3326
+ end
3327
+ def self.get_mouse_x()
3328
+ Raylib.GetMouseX()
3329
+ end
3330
+ def self.get_mouse_y()
3331
+ Raylib.GetMouseY()
3332
+ end
3333
+ def self.set_mouse_position(p0, p1)
3334
+ Raylib.SetMousePosition(p0, p1)
3335
+ end
3336
+ def self.set_mouse_offset(p0, p1)
3337
+ Raylib.SetMouseOffset(p0, p1)
3338
+ end
3339
+ def self.set_mouse_scale(p0, p1)
3340
+ Raylib.SetMouseScale(p0, p1)
3341
+ end
3342
+ def self.get_mouse_wheel_move()
3343
+ Raylib.GetMouseWheelMove()
3344
+ end
3345
+ def self.set_mouse_cursor(p0)
3346
+ Raylib.SetMouseCursor(p0)
3347
+ end
3348
+ def self.get_touch_x()
3349
+ Raylib.GetTouchX()
3350
+ end
3351
+ def self.get_touch_y()
3352
+ Raylib.GetTouchY()
3353
+ end
3354
+ def self.get_touch_point_id(p0)
3355
+ Raylib.GetTouchPointId(p0)
3356
+ end
3357
+ def self.get_touch_point_count()
3358
+ Raylib.GetTouchPointCount()
3359
+ end
3360
+ def self.set_gestures_enabled(p0)
3361
+ Raylib.SetGesturesEnabled(p0)
3362
+ end
3363
+ def self.is_gesture_detected(p0)
3364
+ Raylib.IsGestureDetected(p0)
3365
+ end
3366
+ def self.get_gesture_detected()
3367
+ Raylib.GetGestureDetected()
3368
+ end
3369
+ def self.get_gesture_hold_duration()
3370
+ Raylib.GetGestureHoldDuration()
3371
+ end
3372
+ def self.get_gesture_drag_angle()
3373
+ Raylib.GetGestureDragAngle()
3374
+ end
3375
+ def self.get_gesture_pinch_angle()
3376
+ Raylib.GetGesturePinchAngle()
3377
+ end
3378
+ def self.image_format(p0, p1)
3379
+ Raylib.ImageFormat(p0, p1)
3380
+ end
3381
+ def self.image_alpha_crop(p0, p1)
3382
+ Raylib.ImageAlphaCrop(p0, p1)
3383
+ end
3384
+ def self.image_alpha_premultiply(p0)
3385
+ Raylib.ImageAlphaPremultiply(p0)
3386
+ end
3387
+ def self.image_blur_gaussian(p0, p1)
3388
+ Raylib.ImageBlurGaussian(p0, p1)
3389
+ end
3390
+ def self.image_kernel_convolution(p0, p1, p2)
3391
+ Raylib.ImageKernelConvolution(p0, p1, p2)
3392
+ end
3393
+ def self.image_resize(p0, p1, p2)
3394
+ Raylib.ImageResize(p0, p1, p2)
3395
+ end
3396
+ def self.image_resize_nn(p0, p1, p2)
3397
+ Raylib.ImageResizeNN(p0, p1, p2)
3398
+ end
3399
+ def self.image_mipmaps(p0)
3400
+ Raylib.ImageMipmaps(p0)
3401
+ end
3402
+ def self.image_dither(p0, p1, p2, p3, p4)
3403
+ Raylib.ImageDither(p0, p1, p2, p3, p4)
3404
+ end
3405
+ def self.image_flip_vertical(p0)
3406
+ Raylib.ImageFlipVertical(p0)
3407
+ end
3408
+ def self.image_flip_horizontal(p0)
3409
+ Raylib.ImageFlipHorizontal(p0)
3410
+ end
3411
+ def self.image_rotate(p0, p1)
3412
+ Raylib.ImageRotate(p0, p1)
3413
+ end
3414
+ def self.image_rotate_cw(p0)
3415
+ Raylib.ImageRotateCW(p0)
3416
+ end
3417
+ def self.image_rotate_ccw(p0)
3418
+ Raylib.ImageRotateCCW(p0)
3419
+ end
3420
+ def self.image_color_invert(p0)
3421
+ Raylib.ImageColorInvert(p0)
3422
+ end
3423
+ def self.image_color_grayscale(p0)
3424
+ Raylib.ImageColorGrayscale(p0)
3425
+ end
3426
+ def self.image_color_contrast(p0, p1)
3427
+ Raylib.ImageColorContrast(p0, p1)
3428
+ end
3429
+ def self.image_color_brightness(p0, p1)
3430
+ Raylib.ImageColorBrightness(p0, p1)
3431
+ end
3432
+ def self.gen_texture_mipmaps(p0)
3433
+ Raylib.GenTextureMipmaps(p0)
3434
+ end
3435
+ def self.get_pixel_data_size(p0, p1, p2)
3436
+ Raylib.GetPixelDataSize(p0, p1, p2)
3437
+ end
3438
+ def self.load_font_data(p0, p1, p2, p3, p4, p5, p6)
3439
+ Raylib.LoadFontData(p0, p1, p2, p3, p4, p5, p6)
3440
+ end
3441
+ def self.unload_font_data(p0, p1)
3442
+ Raylib.UnloadFontData(p0, p1)
3443
+ end
3444
+ def self.draw_fps(p0, p1)
3445
+ Raylib.DrawFPS(p0, p1)
3446
+ end
3447
+ def self.set_text_line_spacing(p0)
3448
+ Raylib.SetTextLineSpacing(p0)
3449
+ end
3450
+ def self.measure_text(p0, p1)
3451
+ Raylib.MeasureText(p0, p1)
3452
+ end
3453
+ def self.load_utf8(p0, p1)
3454
+ Raylib.LoadUTF8(p0, p1)
3455
+ end
3456
+ def self.unload_utf8(p0)
3457
+ Raylib.UnloadUTF8(p0)
3458
+ end
3459
+ def self.load_codepoints(p0, p1)
3460
+ Raylib.LoadCodepoints(p0, p1)
3461
+ end
3462
+ def self.unload_codepoints(p0)
3463
+ Raylib.UnloadCodepoints(p0)
3464
+ end
3465
+ def self.get_codepoint_count(p0)
3466
+ Raylib.GetCodepointCount(p0)
3467
+ end
3468
+ def self.get_codepoint(p0, p1)
3469
+ Raylib.GetCodepoint(p0, p1)
3470
+ end
3471
+ def self.get_codepoint_next(p0, p1)
3472
+ Raylib.GetCodepointNext(p0, p1)
3473
+ end
3474
+ def self.get_codepoint_previous(p0, p1)
3475
+ Raylib.GetCodepointPrevious(p0, p1)
3476
+ end
3477
+ def self.codepoint_to_utf8(p0, p1)
3478
+ Raylib.CodepointToUTF8(p0, p1)
3479
+ end
3480
+ def self.load_text_lines(p0, p1)
3481
+ Raylib.LoadTextLines(p0, p1)
3482
+ end
3483
+ def self.unload_text_lines(p0, p1)
3484
+ Raylib.UnloadTextLines(p0, p1)
3485
+ end
3486
+ def self.text_copy(p0, p1)
3487
+ Raylib.TextCopy(p0, p1)
3488
+ end
3489
+ def self.text_is_equal(p0, p1)
3490
+ Raylib.TextIsEqual(p0, p1)
3491
+ end
3492
+ def self.text_length(p0)
3493
+ Raylib.TextLength(p0)
3494
+ end
3495
+ def self.text_subtext(p0, p1, p2)
3496
+ Raylib.TextSubtext(p0, p1, p2)
3497
+ end
3498
+ def self.text_remove_spaces(p0)
3499
+ Raylib.TextRemoveSpaces(p0)
3500
+ end
3501
+ def self.get_text_between(p0, p1, p2)
3502
+ Raylib.GetTextBetween(p0, p1, p2)
3503
+ end
3504
+ def self.text_replace(p0, p1, p2)
3505
+ Raylib.TextReplace(p0, p1, p2)
3506
+ end
3507
+ def self.text_replace_alloc(p0, p1, p2)
3508
+ Raylib.TextReplaceAlloc(p0, p1, p2)
3509
+ end
3510
+ def self.text_replace_between(p0, p1, p2, p3)
3511
+ Raylib.TextReplaceBetween(p0, p1, p2, p3)
3512
+ end
3513
+ def self.text_replace_between_alloc(p0, p1, p2, p3)
3514
+ Raylib.TextReplaceBetweenAlloc(p0, p1, p2, p3)
3515
+ end
3516
+ def self.text_insert(p0, p1, p2)
3517
+ Raylib.TextInsert(p0, p1, p2)
3518
+ end
3519
+ def self.text_insert_alloc(p0, p1, p2)
3520
+ Raylib.TextInsertAlloc(p0, p1, p2)
3521
+ end
3522
+ def self.text_join(p0, p1, p2)
3523
+ Raylib.TextJoin(p0, p1, p2)
3524
+ end
3525
+ def self.text_split(p0, p1, p2)
3526
+ Raylib.TextSplit(p0, p1, p2)
3527
+ end
3528
+ def self.text_append(p0, p1, p2)
3529
+ Raylib.TextAppend(p0, p1, p2)
3530
+ end
3531
+ def self.text_find_index(p0, p1)
3532
+ Raylib.TextFindIndex(p0, p1)
3533
+ end
3534
+ def self.text_to_upper(p0)
3535
+ Raylib.TextToUpper(p0)
3536
+ end
3537
+ def self.text_to_lower(p0)
3538
+ Raylib.TextToLower(p0)
3539
+ end
3540
+ def self.text_to_pascal(p0)
3541
+ Raylib.TextToPascal(p0)
3542
+ end
3543
+ def self.text_to_snake(p0)
3544
+ Raylib.TextToSnake(p0)
3545
+ end
3546
+ def self.text_to_camel(p0)
3547
+ Raylib.TextToCamel(p0)
3548
+ end
3549
+ def self.text_to_integer(p0)
3550
+ Raylib.TextToInteger(p0)
3551
+ end
3552
+ def self.text_to_float(p0)
3553
+ Raylib.TextToFloat(p0)
3554
+ end
3555
+ def self.draw_grid(p0, p1)
3556
+ Raylib.rl_DrawGrid(p0, p1)
3557
+ end
3558
+ def self.upload_mesh(p0, p1)
3559
+ Raylib.UploadMesh(p0, p1)
3560
+ end
3561
+ def self.gen_mesh_tangents(p0)
3562
+ Raylib.GenMeshTangents(p0)
3563
+ end
3564
+ def self.load_materials(p0, p1)
3565
+ Raylib.LoadMaterials(p0, p1)
3566
+ end
3567
+ def self.set_model_mesh_material(p0, p1, p2)
3568
+ Raylib.SetModelMeshMaterial(p0, p1, p2)
3569
+ end
3570
+ def self.load_model_animations(p0, p1)
3571
+ Raylib.LoadModelAnimations(p0, p1)
3572
+ end
3573
+ def self.unload_model_animations(p0, p1)
3574
+ Raylib.UnloadModelAnimations(p0, p1)
3575
+ end
3576
+ def self.init_audio_device()
3577
+ Raylib.InitAudioDevice()
3578
+ end
3579
+ def self.close_audio_device()
3580
+ Raylib.CloseAudioDevice()
3581
+ end
3582
+ def self.is_audio_device_ready()
3583
+ Raylib.IsAudioDeviceReady()
3584
+ end
3585
+ def self.set_master_volume(p0)
3586
+ Raylib.SetMasterVolume(p0)
3587
+ end
3588
+ def self.get_master_volume()
3589
+ Raylib.GetMasterVolume()
3590
+ end
3591
+ def self.wave_crop(p0, p1, p2)
3592
+ Raylib.WaveCrop(p0, p1, p2)
3593
+ end
3594
+ def self.wave_format(p0, p1, p2, p3)
3595
+ Raylib.WaveFormat(p0, p1, p2, p3)
3596
+ end
3597
+ def self.unload_wave_samples(p0)
3598
+ Raylib.UnloadWaveSamples(p0)
3599
+ end
3600
+ def self.set_audio_stream_buffer_size_default(p0)
3601
+ Raylib.SetAudioStreamBufferSizeDefault(p0)
3602
+ end
3603
+ # Forwarding wrappers (not aliases): the targets are ffi_func declarations,
3604
+ # which Spinel cannot alias.
3605
+ def self.window_should_close()
3606
+ Raylib.WindowShouldClose()
3607
+ end
3608
+ def self.is_key_pressed(p0)
3609
+ Raylib.IsKeyPressed(p0)
3610
+ end
3611
+ def self.is_key_down(p0)
3612
+ Raylib.IsKeyDown(p0)
3613
+ end
3614
+ def self.is_gamepad_button_down(p0, p1)
3615
+ Raylib.IsGamepadButtonDown(p0, p1)
3616
+ end
3617
+ def self.is_mouse_button_down(p0)
3618
+ Raylib.IsMouseButtonDown(p0)
3619
+ end
3620
+ class << self
3621
+ alias_method :set_window_icon, :SetWindowIcon
3622
+ alias_method :get_monitor_position, :GetMonitorPosition
3623
+ alias_method :get_window_position, :GetWindowPosition
3624
+ alias_method :get_window_scale_dpi, :GetWindowScaleDPI
3625
+ alias_method :get_clipboard_image, :GetClipboardImage
3626
+ alias_method :clear_background, :ClearBackground
3627
+ alias_method :begin_mode_2d, :BeginMode2D
3628
+ alias_method :begin_mode_3d, :BeginMode3D
3629
+ alias_method :begin_texture_mode, :BeginTextureMode
3630
+ alias_method :begin_shader_mode, :BeginShaderMode
3631
+ alias_method :begin_vr_stereo_mode, :BeginVrStereoMode
3632
+ alias_method :load_vr_stereo_config, :LoadVrStereoConfig
3633
+ alias_method :unload_vr_stereo_config, :UnloadVrStereoConfig
3634
+ alias_method :load_shader, :LoadShader
3635
+ alias_method :load_shader_from_memory, :LoadShaderFromMemory
3636
+ alias_method :is_shader_valid, :IsShaderValid
3637
+ alias_method :get_shader_location, :GetShaderLocation
3638
+ alias_method :get_shader_location_attrib, :GetShaderLocationAttrib
3639
+ alias_method :set_shader_value, :SetShaderValue
3640
+ alias_method :set_shader_value_v, :SetShaderValueV
3641
+ alias_method :set_shader_value_matrix, :SetShaderValueMatrix
3642
+ alias_method :set_shader_value_texture, :SetShaderValueTexture
3643
+ alias_method :unload_shader, :UnloadShader
3644
+ alias_method :get_screen_to_world_ray, :GetScreenToWorldRay
3645
+ alias_method :get_screen_to_world_ray_ex, :GetScreenToWorldRayEx
3646
+ alias_method :get_world_to_screen, :GetWorldToScreen
3647
+ alias_method :get_world_to_screen_ex, :GetWorldToScreenEx
3648
+ alias_method :get_world_to_screen_2d, :GetWorldToScreen2D
3649
+ alias_method :get_screen_to_world_2d, :GetScreenToWorld2D
3650
+ alias_method :get_camera_matrix, :GetCameraMatrix
3651
+ alias_method :get_camera_matrix_2d, :GetCameraMatrix2D
3652
+ alias_method :set_trace_log_callback, :SetTraceLogCallback
3653
+ alias_method :set_load_file_data_callback, :SetLoadFileDataCallback
3654
+ alias_method :set_save_file_data_callback, :SetSaveFileDataCallback
3655
+ alias_method :set_load_file_text_callback, :SetLoadFileTextCallback
3656
+ alias_method :set_save_file_text_callback, :SetSaveFileTextCallback
3657
+ alias_method :load_directory_files, :LoadDirectoryFiles
3658
+ alias_method :load_directory_files_ex, :LoadDirectoryFilesEx
3659
+ alias_method :unload_directory_files, :UnloadDirectoryFiles
3660
+ alias_method :load_dropped_files, :LoadDroppedFiles
3661
+ alias_method :unload_dropped_files, :UnloadDroppedFiles
3662
+ alias_method :load_automation_event_list, :LoadAutomationEventList
3663
+ alias_method :unload_automation_event_list, :UnloadAutomationEventList
3664
+ alias_method :export_automation_event_list, :ExportAutomationEventList
3665
+ alias_method :set_automation_event_list, :SetAutomationEventList
3666
+ alias_method :play_automation_event, :PlayAutomationEvent
3667
+ alias_method :get_mouse_position, :GetMousePosition
3668
+ alias_method :get_mouse_delta, :GetMouseDelta
3669
+ alias_method :get_mouse_wheel_move_v, :GetMouseWheelMoveV
3670
+ alias_method :get_touch_position, :GetTouchPosition
3671
+ alias_method :get_gesture_drag_vector, :GetGestureDragVector
3672
+ alias_method :get_gesture_pinch_vector, :GetGesturePinchVector
3673
+ alias_method :update_camera, :UpdateCamera
3674
+ alias_method :update_camera_pro, :UpdateCameraPro
3675
+ alias_method :set_shapes_texture, :SetShapesTexture
3676
+ alias_method :get_shapes_texture, :GetShapesTexture
3677
+ alias_method :get_shapes_texture_rectangle, :GetShapesTextureRectangle
3678
+ alias_method :draw_pixel, :DrawPixel
3679
+ alias_method :draw_pixel_v, :DrawPixelV
3680
+ alias_method :draw_line, :DrawLine
3681
+ alias_method :draw_line_v, :DrawLineV
3682
+ alias_method :draw_line_ex, :DrawLineEx
3683
+ alias_method :draw_line_strip, :DrawLineStrip
3684
+ alias_method :draw_line_bezier, :DrawLineBezier
3685
+ alias_method :draw_line_dashed, :DrawLineDashed
3686
+ alias_method :draw_triangle, :DrawTriangle
3687
+ alias_method :draw_triangle_gradient, :DrawTriangleGradient
3688
+ alias_method :draw_triangle_lines, :DrawTriangleLines
3689
+ alias_method :draw_triangle_lines_ex, :DrawTriangleLinesEx
3690
+ alias_method :draw_triangle_fan, :DrawTriangleFan
3691
+ alias_method :draw_triangle_strip, :DrawTriangleStrip
3692
+ alias_method :draw_rectangle, :DrawRectangle
3693
+ alias_method :draw_rectangle_v, :DrawRectangleV
3694
+ alias_method :draw_rectangle_rec, :DrawRectangleRec
3695
+ alias_method :draw_rectangle_pro, :DrawRectanglePro
3696
+ alias_method :draw_rectangle_gradient_v, :DrawRectangleGradientV
3697
+ alias_method :draw_rectangle_gradient_h, :DrawRectangleGradientH
3698
+ alias_method :draw_rectangle_gradient_ex, :DrawRectangleGradientEx
3699
+ alias_method :draw_rectangle_lines, :DrawRectangleLines
3700
+ alias_method :draw_rectangle_lines_ex, :DrawRectangleLinesEx
3701
+ alias_method :draw_rectangle_rounded, :DrawRectangleRounded
3702
+ alias_method :draw_rectangle_rounded_lines, :DrawRectangleRoundedLines
3703
+ alias_method :draw_rectangle_rounded_lines_ex, :DrawRectangleRoundedLinesEx
3704
+ alias_method :draw_poly, :DrawPoly
3705
+ alias_method :draw_poly_lines, :DrawPolyLines
3706
+ alias_method :draw_poly_lines_ex, :DrawPolyLinesEx
3707
+ alias_method :draw_circle, :DrawCircle
3708
+ alias_method :draw_circle_v, :DrawCircleV
3709
+ alias_method :draw_circle_gradient, :DrawCircleGradient
3710
+ alias_method :draw_circle_sector, :DrawCircleSector
3711
+ alias_method :draw_circle_sector_lines, :DrawCircleSectorLines
3712
+ alias_method :draw_circle_sector_lines_ex, :DrawCircleSectorLinesEx
3713
+ alias_method :draw_circle_lines, :DrawCircleLines
3714
+ alias_method :draw_circle_lines_v, :DrawCircleLinesV
3715
+ alias_method :draw_circle_lines_ex, :DrawCircleLinesEx
3716
+ alias_method :draw_ellipse, :DrawEllipse
3717
+ alias_method :draw_ellipse_v, :DrawEllipseV
3718
+ alias_method :draw_ellipse_lines, :DrawEllipseLines
3719
+ alias_method :draw_ellipse_lines_v, :DrawEllipseLinesV
3720
+ alias_method :draw_ellipse_lines_ex, :DrawEllipseLinesEx
3721
+ alias_method :draw_ring, :DrawRing
3722
+ alias_method :draw_ring_lines, :DrawRingLines
3723
+ alias_method :draw_ring_lines_ex, :DrawRingLinesEx
3724
+ alias_method :draw_spline_linear, :DrawSplineLinear
3725
+ alias_method :draw_spline_basis, :DrawSplineBasis
3726
+ alias_method :draw_spline_catmull_rom, :DrawSplineCatmullRom
3727
+ alias_method :draw_spline_bezier_quadratic, :DrawSplineBezierQuadratic
3728
+ alias_method :draw_spline_bezier_cubic, :DrawSplineBezierCubic
3729
+ alias_method :draw_spline_segment_linear, :DrawSplineSegmentLinear
3730
+ alias_method :draw_spline_segment_basis, :DrawSplineSegmentBasis
3731
+ alias_method :draw_spline_segment_catmull_rom, :DrawSplineSegmentCatmullRom
3732
+ alias_method :draw_spline_segment_bezier_quadratic, :DrawSplineSegmentBezierQuadratic
3733
+ alias_method :draw_spline_segment_bezier_cubic, :DrawSplineSegmentBezierCubic
3734
+ alias_method :get_spline_point_linear, :GetSplinePointLinear
3735
+ alias_method :get_spline_point_basis, :GetSplinePointBasis
3736
+ alias_method :get_spline_point_catmull_rom, :GetSplinePointCatmullRom
3737
+ alias_method :get_spline_point_bezier_quadratic, :GetSplinePointBezierQuadratic
3738
+ alias_method :get_spline_point_bezier_cubic, :GetSplinePointBezierCubic
3739
+ alias_method :check_collision_recs, :CheckCollisionRecs
3740
+ alias_method :check_collision_circles, :CheckCollisionCircles
3741
+ alias_method :check_collision_circle_rec, :CheckCollisionCircleRec
3742
+ alias_method :check_collision_circle_line, :CheckCollisionCircleLine
3743
+ alias_method :check_collision_point_rec, :CheckCollisionPointRec
3744
+ alias_method :check_collision_point_circle, :CheckCollisionPointCircle
3745
+ alias_method :check_collision_point_triangle, :CheckCollisionPointTriangle
3746
+ alias_method :check_collision_point_line, :CheckCollisionPointLine
3747
+ alias_method :check_collision_point_poly, :CheckCollisionPointPoly
3748
+ alias_method :check_collision_lines, :CheckCollisionLines
3749
+ alias_method :get_collision_rec, :GetCollisionRec
3750
+ alias_method :load_image, :LoadImage
3751
+ alias_method :load_image_raw, :LoadImageRaw
3752
+ alias_method :load_image_anim, :LoadImageAnim
3753
+ alias_method :load_image_anim_from_memory, :LoadImageAnimFromMemory
3754
+ alias_method :load_image_from_memory, :LoadImageFromMemory
3755
+ alias_method :load_image_from_texture, :LoadImageFromTexture
3756
+ alias_method :load_image_from_screen, :LoadImageFromScreen
3757
+ alias_method :is_image_valid, :IsImageValid
3758
+ alias_method :unload_image, :UnloadImage
3759
+ alias_method :export_image, :ExportImage
3760
+ alias_method :export_image_to_memory, :ExportImageToMemory
3761
+ alias_method :export_image_as_code, :ExportImageAsCode
3762
+ alias_method :gen_image_color, :GenImageColor
3763
+ alias_method :gen_image_gradient_linear, :GenImageGradientLinear
3764
+ alias_method :gen_image_gradient_radial, :GenImageGradientRadial
3765
+ alias_method :gen_image_gradient_square, :GenImageGradientSquare
3766
+ alias_method :gen_image_checked, :GenImageChecked
3767
+ alias_method :gen_image_white_noise, :GenImageWhiteNoise
3768
+ alias_method :gen_image_perlin_noise, :GenImagePerlinNoise
3769
+ alias_method :gen_image_cellular, :GenImageCellular
3770
+ alias_method :gen_image_text, :GenImageText
3771
+ alias_method :image_copy, :ImageCopy
3772
+ alias_method :image_from_image, :ImageFromImage
3773
+ alias_method :image_from_channel, :ImageFromChannel
3774
+ alias_method :image_text, :ImageText
3775
+ alias_method :image_text_ex, :ImageTextEx
3776
+ alias_method :image_to_pot, :ImageToPOT
3777
+ alias_method :image_crop, :ImageCrop
3778
+ alias_method :image_alpha_clear, :ImageAlphaClear
3779
+ alias_method :image_alpha_mask, :ImageAlphaMask
3780
+ alias_method :image_resize_canvas, :ImageResizeCanvas
3781
+ alias_method :image_color_tint, :ImageColorTint
3782
+ alias_method :image_color_replace, :ImageColorReplace
3783
+ alias_method :load_image_colors, :LoadImageColors
3784
+ alias_method :load_image_palette, :LoadImagePalette
3785
+ alias_method :unload_image_colors, :UnloadImageColors
3786
+ alias_method :unload_image_palette, :UnloadImagePalette
3787
+ alias_method :get_image_alpha_border, :GetImageAlphaBorder
3788
+ alias_method :get_image_color, :GetImageColor
3789
+ alias_method :image_clear_background, :ImageClearBackground
3790
+ alias_method :image_draw_pixel, :ImageDrawPixel
3791
+ alias_method :image_draw_pixel_v, :ImageDrawPixelV
3792
+ alias_method :image_draw_line, :ImageDrawLine
3793
+ alias_method :image_draw_line_v, :ImageDrawLineV
3794
+ alias_method :image_draw_line_ex, :ImageDrawLineEx
3795
+ alias_method :image_draw_line_strip, :ImageDrawLineStrip
3796
+ alias_method :image_draw_triangle, :ImageDrawTriangle
3797
+ alias_method :image_draw_triangle_gradient, :ImageDrawTriangleGradient
3798
+ alias_method :image_draw_triangle_lines, :ImageDrawTriangleLines
3799
+ alias_method :image_draw_triangle_fan, :ImageDrawTriangleFan
3800
+ alias_method :image_draw_triangle_strip, :ImageDrawTriangleStrip
3801
+ alias_method :image_draw_rectangle, :ImageDrawRectangle
3802
+ alias_method :image_draw_rectangle_v, :ImageDrawRectangleV
3803
+ alias_method :image_draw_rectangle_rec, :ImageDrawRectangleRec
3804
+ alias_method :image_draw_rectangle_pro, :ImageDrawRectanglePro
3805
+ alias_method :image_draw_rectangle_lines, :ImageDrawRectangleLines
3806
+ alias_method :image_draw_rectangle_lines_ex, :ImageDrawRectangleLinesEx
3807
+ alias_method :image_draw_rectangle_gradient_ex, :ImageDrawRectangleGradientEx
3808
+ alias_method :image_draw_circle, :ImageDrawCircle
3809
+ alias_method :image_draw_circle_v, :ImageDrawCircleV
3810
+ alias_method :image_draw_circle_lines, :ImageDrawCircleLines
3811
+ alias_method :image_draw_circle_lines_v, :ImageDrawCircleLinesV
3812
+ alias_method :image_draw_circle_gradient, :ImageDrawCircleGradient
3813
+ alias_method :image_draw_image, :ImageDrawImage
3814
+ alias_method :image_draw_image_ex, :ImageDrawImageEx
3815
+ alias_method :image_draw_image_rec, :ImageDrawImageRec
3816
+ alias_method :image_draw_image_pro, :ImageDrawImagePro
3817
+ alias_method :image_draw_text, :ImageDrawText
3818
+ alias_method :image_draw_text_ex, :ImageDrawTextEx
3819
+ alias_method :image_draw_text_pro, :ImageDrawTextPro
3820
+ alias_method :load_texture, :LoadTexture
3821
+ alias_method :load_texture_from_image, :LoadTextureFromImage
3822
+ alias_method :load_texture_cubemap, :LoadTextureCubemap
3823
+ alias_method :load_render_texture, :LoadRenderTexture
3824
+ alias_method :load_render_texture_ex, :LoadRenderTextureEx
3825
+ alias_method :is_texture_valid, :IsTextureValid
3826
+ alias_method :unload_texture, :UnloadTexture
3827
+ alias_method :is_render_texture_valid, :IsRenderTextureValid
3828
+ alias_method :unload_render_texture, :UnloadRenderTexture
3829
+ alias_method :update_texture, :UpdateTexture
3830
+ alias_method :update_texture_rec, :UpdateTextureRec
3831
+ alias_method :set_texture_filter, :SetTextureFilter
3832
+ alias_method :set_texture_wrap, :SetTextureWrap
3833
+ alias_method :draw_texture, :DrawTexture
3834
+ alias_method :draw_texture_v, :DrawTextureV
3835
+ alias_method :draw_texture_ex, :DrawTextureEx
3836
+ alias_method :draw_texture_rec, :DrawTextureRec
3837
+ alias_method :draw_texture_pro, :DrawTexturePro
3838
+ alias_method :draw_texture_n_patch, :DrawTextureNPatch
3839
+ alias_method :color_is_equal, :ColorIsEqual
3840
+ alias_method :fade, :Fade
3841
+ alias_method :color_to_int, :ColorToInt
3842
+ alias_method :color_normalize, :ColorNormalize
3843
+ alias_method :color_from_normalized, :ColorFromNormalized
3844
+ alias_method :color_to_hsv, :ColorToHSV
3845
+ alias_method :color_from_hsv, :ColorFromHSV
3846
+ alias_method :color_tint, :ColorTint
3847
+ alias_method :color_brightness, :ColorBrightness
3848
+ alias_method :color_contrast, :ColorContrast
3849
+ alias_method :color_alpha, :ColorAlpha
3850
+ alias_method :color_alpha_blend, :ColorAlphaBlend
3851
+ alias_method :color_lerp, :ColorLerp
3852
+ alias_method :get_color, :GetColor
3853
+ alias_method :get_pixel_color, :GetPixelColor
3854
+ alias_method :set_pixel_color, :SetPixelColor
3855
+ alias_method :get_font_default, :GetFontDefault
3856
+ alias_method :load_font, :LoadFont
3857
+ alias_method :load_font_ex, :LoadFontEx
3858
+ alias_method :load_font_from_image, :LoadFontFromImage
3859
+ alias_method :load_font_from_memory, :LoadFontFromMemory
3860
+ alias_method :is_font_valid, :IsFontValid
3861
+ alias_method :gen_image_font_atlas, :GenImageFontAtlas
3862
+ alias_method :unload_font, :UnloadFont
3863
+ alias_method :export_font_as_code, :ExportFontAsCode
3864
+ alias_method :draw_text, :DrawText
3865
+ alias_method :draw_text_ex, :DrawTextEx
3866
+ alias_method :draw_text_pro, :DrawTextPro
3867
+ alias_method :draw_text_codepoint, :DrawTextCodepoint
3868
+ alias_method :draw_text_codepoints, :DrawTextCodepoints
3869
+ alias_method :measure_text_ex, :MeasureTextEx
3870
+ alias_method :measure_text_codepoints, :MeasureTextCodepoints
3871
+ alias_method :get_glyph_index, :GetGlyphIndex
3872
+ alias_method :get_glyph_info, :GetGlyphInfo
3873
+ alias_method :get_glyph_atlas_rec, :GetGlyphAtlasRec
3874
+ alias_method :draw_line_3d, :DrawLine3D
3875
+ alias_method :draw_point_3d, :DrawPoint3D
3876
+ alias_method :draw_circle_3d, :DrawCircle3D
3877
+ alias_method :draw_triangle_3d, :DrawTriangle3D
3878
+ alias_method :draw_triangle_strip_3d, :DrawTriangleStrip3D
3879
+ alias_method :draw_cube, :DrawCube
3880
+ alias_method :draw_cube_v, :DrawCubeV
3881
+ alias_method :draw_cube_wires, :DrawCubeWires
3882
+ alias_method :draw_cube_wires_v, :DrawCubeWiresV
3883
+ alias_method :draw_sphere, :DrawSphere
3884
+ alias_method :draw_sphere_ex, :DrawSphereEx
3885
+ alias_method :draw_sphere_wires, :DrawSphereWires
3886
+ alias_method :draw_cylinder, :DrawCylinder
3887
+ alias_method :draw_cylinder_ex, :DrawCylinderEx
3888
+ alias_method :draw_cylinder_wires, :DrawCylinderWires
3889
+ alias_method :draw_cylinder_wires_ex, :DrawCylinderWiresEx
3890
+ alias_method :draw_capsule, :DrawCapsule
3891
+ alias_method :draw_capsule_wires, :DrawCapsuleWires
3892
+ alias_method :draw_plane, :DrawPlane
3893
+ alias_method :draw_ray, :DrawRay
3894
+ alias_method :load_model, :LoadModel
3895
+ alias_method :load_model_from_mesh, :LoadModelFromMesh
3896
+ alias_method :is_model_valid, :IsModelValid
3897
+ alias_method :unload_model, :UnloadModel
3898
+ alias_method :get_model_bounding_box, :GetModelBoundingBox
3899
+ alias_method :draw_model, :DrawModel
3900
+ alias_method :draw_model_ex, :DrawModelEx
3901
+ alias_method :draw_model_wires, :DrawModelWires
3902
+ alias_method :draw_model_wires_ex, :DrawModelWiresEx
3903
+ alias_method :draw_bounding_box, :DrawBoundingBox
3904
+ alias_method :draw_billboard, :DrawBillboard
3905
+ alias_method :draw_billboard_rec, :DrawBillboardRec
3906
+ alias_method :draw_billboard_pro, :DrawBillboardPro
3907
+ alias_method :update_mesh_buffer, :UpdateMeshBuffer
3908
+ alias_method :unload_mesh, :UnloadMesh
3909
+ alias_method :draw_mesh, :DrawMesh
3910
+ alias_method :draw_mesh_instanced, :DrawMeshInstanced
3911
+ alias_method :get_mesh_bounding_box, :GetMeshBoundingBox
3912
+ alias_method :export_mesh, :ExportMesh
3913
+ alias_method :export_mesh_as_code, :ExportMeshAsCode
3914
+ alias_method :gen_mesh_poly, :GenMeshPoly
3915
+ alias_method :gen_mesh_plane, :GenMeshPlane
3916
+ alias_method :gen_mesh_cube, :GenMeshCube
3917
+ alias_method :gen_mesh_sphere, :GenMeshSphere
3918
+ alias_method :gen_mesh_hemi_sphere, :GenMeshHemiSphere
3919
+ alias_method :gen_mesh_cylinder, :GenMeshCylinder
3920
+ alias_method :gen_mesh_cone, :GenMeshCone
3921
+ alias_method :gen_mesh_torus, :GenMeshTorus
3922
+ alias_method :gen_mesh_knot, :GenMeshKnot
3923
+ alias_method :gen_mesh_heightmap, :GenMeshHeightmap
3924
+ alias_method :gen_mesh_cubicmap, :GenMeshCubicmap
3925
+ alias_method :load_material_default, :LoadMaterialDefault
3926
+ alias_method :is_material_valid, :IsMaterialValid
3927
+ alias_method :unload_material, :UnloadMaterial
3928
+ alias_method :set_material_texture, :SetMaterialTexture
3929
+ alias_method :update_model_animation, :UpdateModelAnimation
3930
+ alias_method :update_model_animation_ex, :UpdateModelAnimationEx
3931
+ alias_method :is_model_animation_valid, :IsModelAnimationValid
3932
+ alias_method :check_collision_spheres, :CheckCollisionSpheres
3933
+ alias_method :check_collision_boxes, :CheckCollisionBoxes
3934
+ alias_method :check_collision_box_sphere, :CheckCollisionBoxSphere
3935
+ alias_method :get_ray_collision_sphere, :GetRayCollisionSphere
3936
+ alias_method :get_ray_collision_box, :GetRayCollisionBox
3937
+ alias_method :get_ray_collision_mesh, :GetRayCollisionMesh
3938
+ alias_method :get_ray_collision_triangle, :GetRayCollisionTriangle
3939
+ alias_method :get_ray_collision_quad, :GetRayCollisionQuad
3940
+ alias_method :load_wave, :LoadWave
3941
+ alias_method :load_wave_from_memory, :LoadWaveFromMemory
3942
+ alias_method :is_wave_valid, :IsWaveValid
3943
+ alias_method :load_sound, :LoadSound
3944
+ alias_method :load_sound_from_wave, :LoadSoundFromWave
3945
+ alias_method :load_sound_alias, :LoadSoundAlias
3946
+ alias_method :is_sound_valid, :IsSoundValid
3947
+ alias_method :update_sound, :UpdateSound
3948
+ alias_method :unload_wave, :UnloadWave
3949
+ alias_method :unload_sound, :UnloadSound
3950
+ alias_method :unload_sound_alias, :UnloadSoundAlias
3951
+ alias_method :export_wave, :ExportWave
3952
+ alias_method :export_wave_as_code, :ExportWaveAsCode
3953
+ alias_method :play_sound, :PlaySound
3954
+ alias_method :stop_sound, :StopSound
3955
+ alias_method :pause_sound, :PauseSound
3956
+ alias_method :resume_sound, :ResumeSound
3957
+ alias_method :is_sound_playing, :IsSoundPlaying
3958
+ alias_method :set_sound_volume, :SetSoundVolume
3959
+ alias_method :set_sound_pitch, :SetSoundPitch
3960
+ alias_method :set_sound_pan, :SetSoundPan
3961
+ alias_method :wave_copy, :WaveCopy
3962
+ alias_method :load_wave_samples, :LoadWaveSamples
3963
+ alias_method :load_music_stream, :LoadMusicStream
3964
+ alias_method :load_music_stream_from_memory, :LoadMusicStreamFromMemory
3965
+ alias_method :is_music_valid, :IsMusicValid
3966
+ alias_method :unload_music_stream, :UnloadMusicStream
3967
+ alias_method :play_music_stream, :PlayMusicStream
3968
+ alias_method :is_music_stream_playing, :IsMusicStreamPlaying
3969
+ alias_method :update_music_stream, :UpdateMusicStream
3970
+ alias_method :stop_music_stream, :StopMusicStream
3971
+ alias_method :pause_music_stream, :PauseMusicStream
3972
+ alias_method :resume_music_stream, :ResumeMusicStream
3973
+ alias_method :seek_music_stream, :SeekMusicStream
3974
+ alias_method :set_music_volume, :SetMusicVolume
3975
+ alias_method :set_music_pitch, :SetMusicPitch
3976
+ alias_method :set_music_pan, :SetMusicPan
3977
+ alias_method :get_music_time_length, :GetMusicTimeLength
3978
+ alias_method :get_music_time_played, :GetMusicTimePlayed
3979
+ alias_method :load_audio_stream, :LoadAudioStream
3980
+ alias_method :is_audio_stream_valid, :IsAudioStreamValid
3981
+ alias_method :unload_audio_stream, :UnloadAudioStream
3982
+ alias_method :update_audio_stream, :UpdateAudioStream
3983
+ alias_method :is_audio_stream_processed, :IsAudioStreamProcessed
3984
+ alias_method :play_audio_stream, :PlayAudioStream
3985
+ alias_method :pause_audio_stream, :PauseAudioStream
3986
+ alias_method :resume_audio_stream, :ResumeAudioStream
3987
+ alias_method :is_audio_stream_playing, :IsAudioStreamPlaying
3988
+ alias_method :stop_audio_stream, :StopAudioStream
3989
+ alias_method :set_audio_stream_volume, :SetAudioStreamVolume
3990
+ alias_method :set_audio_stream_pitch, :SetAudioStreamPitch
3991
+ alias_method :set_audio_stream_pan, :SetAudioStreamPan
3992
+ alias_method :set_audio_stream_callback, :SetAudioStreamCallback
3993
+ alias_method :attach_audio_stream_processor, :AttachAudioStreamProcessor
3994
+ alias_method :detach_audio_stream_processor, :DetachAudioStreamProcessor
3995
+ alias_method :attach_audio_mixed_processor, :AttachAudioMixedProcessor
3996
+ alias_method :detach_audio_mixed_processor, :DetachAudioMixedProcessor
3997
+
3998
+ # ====== generated: wrappers + constants ======
3999
+ def self.ImageFormat(image, newFormat)
4000
+ Raylib.rl_ImageFormat(image, newFormat)
4001
+ end
4002
+ def self.ImageAlphaCrop(image, threshold)
4003
+ Raylib.rl_ImageAlphaCrop(image, threshold)
4004
+ end
4005
+ def self.ImageAlphaPremultiply(image)
4006
+ Raylib.rl_ImageAlphaPremultiply(image)
4007
+ end
4008
+ def self.ImageBlurGaussian(image, blurSize)
4009
+ Raylib.rl_ImageBlurGaussian(image, blurSize)
4010
+ end
4011
+ def self.ImageKernelConvolution(image, kernel, kernelSize)
4012
+ Raylib.rl_ImageKernelConvolution(image, kernel, kernelSize)
4013
+ end
4014
+ def self.ImageResize(image, newWidth, newHeight)
4015
+ Raylib.rl_ImageResize(image, newWidth, newHeight)
4016
+ end
4017
+ def self.ImageResizeNN(image, newWidth, newHeight)
4018
+ Raylib.rl_ImageResizeNN(image, newWidth, newHeight)
4019
+ end
4020
+ def self.ImageMipmaps(image)
4021
+ Raylib.rl_ImageMipmaps(image)
4022
+ end
4023
+ def self.ImageDither(image, rBpp, gBpp, bBpp, aBpp)
4024
+ Raylib.rl_ImageDither(image, rBpp, gBpp, bBpp, aBpp)
4025
+ end
4026
+ def self.ImageFlipVertical(image)
4027
+ Raylib.rl_ImageFlipVertical(image)
4028
+ end
4029
+ def self.ImageFlipHorizontal(image)
4030
+ Raylib.rl_ImageFlipHorizontal(image)
4031
+ end
4032
+ def self.ImageRotate(image, degrees)
4033
+ Raylib.rl_ImageRotate(image, degrees)
4034
+ end
4035
+ def self.ImageRotateCW(image)
4036
+ Raylib.rl_ImageRotateCW(image)
4037
+ end
4038
+ def self.ImageRotateCCW(image)
4039
+ Raylib.rl_ImageRotateCCW(image)
4040
+ end
4041
+ def self.ImageColorInvert(image)
4042
+ Raylib.rl_ImageColorInvert(image)
4043
+ end
4044
+ def self.ImageColorGrayscale(image)
4045
+ Raylib.rl_ImageColorGrayscale(image)
4046
+ end
4047
+ def self.ImageColorContrast(image, contrast)
4048
+ Raylib.rl_ImageColorContrast(image, contrast)
4049
+ end
4050
+ def self.ImageColorBrightness(image, brightness)
4051
+ Raylib.rl_ImageColorBrightness(image, brightness)
4052
+ end
4053
+ def self.GenTextureMipmaps(texture)
4054
+ Raylib.rl_GenTextureMipmaps(texture)
4055
+ end
4056
+ def self.UploadMesh(mesh, dynamic)
4057
+ Raylib.rl_UploadMesh(mesh, dynamic)
4058
+ end
4059
+ def self.GenMeshTangents(mesh)
4060
+ Raylib.rl_GenMeshTangents(mesh)
4061
+ end
4062
+ def self.SetModelMeshMaterial(model, meshId, materialId)
4063
+ model = model.model
4064
+ Raylib.rl_SetModelMeshMaterial(model, meshId, materialId)
4065
+ end
4066
+ end
4067
+
4068
+ # ====== generated: snake_case aliases (MRI gem naming) ======
4069
+ def self.trace_log(p0, p1, p2)
4070
+ Raylib.TraceLog(p0, p1, p2)
4071
+ end
4072
+
4073
+ # ====== generated: wrappers + constants ======
4074
+ def self.LoadFileData(fileName, dataSize)
4075
+ Raylib.rl_LoadFileData(fileName, Raylib.ptr_addr(dataSize))
4076
+ end
4077
+ def self.EncodeDataBase64(data, dataSize, outputSize)
4078
+ Raylib.rl_EncodeDataBase64(data, dataSize, Raylib.ptr_addr(outputSize))
4079
+ end
4080
+ def self.LoadFontData(fileData, dataSize, fontSize, codepoints, codepointCount, type, glyphCount)
4081
+ Raylib.rl_LoadFontData(Raylib.ptr_addr(fileData), dataSize, fontSize, Raylib.ptr_addr(codepoints), codepointCount, type, glyphCount)
4082
+ end
4083
+ def self.LoadCodepoints(text, count)
4084
+ Raylib.rl_LoadCodepoints(text, Raylib.ptr_addr(count))
4085
+ end
4086
+ def self.LoadModelAnimations(fileName, animCount)
4087
+ Raylib.rl_LoadModelAnimations(fileName, Raylib.ptr_addr(animCount))
4088
+ end
4089
+ end
4090
+
4091
+
4092
+
4093
+