raylib-bindings 0.0.5 → 0.0.9
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.
- checksums.yaml +4 -4
- data/ChangeLog +30 -0
- data/README.md +53 -20
- data/lib/libraylib.dll +0 -0
- data/lib/libraylib.dylib +0 -0
- data/lib/physac.dll +0 -0
- data/lib/physac.dylib +0 -0
- data/lib/physac.rb +22 -23
- data/lib/raygui.dll +0 -0
- data/lib/raygui.dylib +0 -0
- data/lib/raygui.rb +270 -267
- data/lib/raylib_main.rb +59 -33
- data/lib/raymath.rb +43 -3
- data/lib/rlgl.rb +7 -1
- metadata +2 -2
data/lib/raylib_main.rb
CHANGED
@@ -10,7 +10,7 @@ module Raylib
|
|
10
10
|
extend FFI::Library
|
11
11
|
# Define/Macro
|
12
12
|
|
13
|
-
RAYLIB_VERSION = "4.
|
13
|
+
RAYLIB_VERSION = "4.2-dev"
|
14
14
|
DEG2RAD = Math::PI / 180.0
|
15
15
|
RAD2DEG = 180.0 / Math::PI
|
16
16
|
|
@@ -28,6 +28,7 @@ module Raylib
|
|
28
28
|
FLAG_WINDOW_ALWAYS_RUN = 256
|
29
29
|
FLAG_WINDOW_TRANSPARENT = 16
|
30
30
|
FLAG_WINDOW_HIGHDPI = 8192
|
31
|
+
FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384
|
31
32
|
FLAG_MSAA_4X_HINT = 32
|
32
33
|
FLAG_INTERLACED_HINT = 65536
|
33
34
|
LOG_ALL = 0
|
@@ -285,7 +286,7 @@ module Raylib
|
|
285
286
|
BLEND_MULTIPLIED = 2
|
286
287
|
BLEND_ADD_COLORS = 3
|
287
288
|
BLEND_SUBTRACT_COLORS = 4
|
288
|
-
|
289
|
+
BLEND_ALPHA_PREMULTIPLY = 5
|
289
290
|
BLEND_CUSTOM = 6
|
290
291
|
GESTURE_NONE = 0
|
291
292
|
GESTURE_TAP = 1
|
@@ -337,6 +338,7 @@ module Raylib
|
|
337
338
|
callback :SaveFileDataCallback, [:pointer, :pointer, :uint], :bool
|
338
339
|
callback :LoadFileTextCallback, [:pointer], :pointer
|
339
340
|
callback :SaveFileTextCallback, [:pointer, :pointer], :bool
|
341
|
+
callback :AudioCallback, [:pointer, :uint], :void
|
340
342
|
|
341
343
|
# Struct
|
342
344
|
|
@@ -608,6 +610,7 @@ module Raylib
|
|
608
610
|
class AudioStream < FFI::Struct
|
609
611
|
layout(
|
610
612
|
:buffer, :pointer,
|
613
|
+
:processor, :pointer,
|
611
614
|
:sampleRate, :uint,
|
612
615
|
:sampleSize, :uint,
|
613
616
|
:channels, :uint,
|
@@ -659,6 +662,14 @@ module Raylib
|
|
659
662
|
)
|
660
663
|
end
|
661
664
|
|
665
|
+
class FilePathList < FFI::Struct
|
666
|
+
layout(
|
667
|
+
:capacity, :uint,
|
668
|
+
:count, :uint,
|
669
|
+
:paths, :pointer,
|
670
|
+
)
|
671
|
+
end
|
672
|
+
|
662
673
|
|
663
674
|
# Function
|
664
675
|
|
@@ -706,6 +717,8 @@ module Raylib
|
|
706
717
|
:GetMonitorName,
|
707
718
|
:SetClipboardText,
|
708
719
|
:GetClipboardText,
|
720
|
+
:EnableEventWaiting,
|
721
|
+
:DisableEventWaiting,
|
709
722
|
:SwapScreenBuffer,
|
710
723
|
:PollInputEvents,
|
711
724
|
:WaitTime,
|
@@ -747,9 +760,9 @@ module Raylib
|
|
747
760
|
:GetCameraMatrix,
|
748
761
|
:GetCameraMatrix2D,
|
749
762
|
:GetWorldToScreen,
|
763
|
+
:GetScreenToWorld2D,
|
750
764
|
:GetWorldToScreenEx,
|
751
765
|
:GetWorldToScreen2D,
|
752
|
-
:GetScreenToWorld2D,
|
753
766
|
:SetTargetFPS,
|
754
767
|
:GetFPS,
|
755
768
|
:GetFrameTime,
|
@@ -763,6 +776,7 @@ module Raylib
|
|
763
776
|
:MemAlloc,
|
764
777
|
:MemRealloc,
|
765
778
|
:MemFree,
|
779
|
+
:OpenURL,
|
766
780
|
:SetTraceLogCallback,
|
767
781
|
:SetLoadFileDataCallback,
|
768
782
|
:SetSaveFileDataCallback,
|
@@ -771,6 +785,7 @@ module Raylib
|
|
771
785
|
:LoadFileData,
|
772
786
|
:UnloadFileData,
|
773
787
|
:SaveFileData,
|
788
|
+
:ExportDataAsCode,
|
774
789
|
:LoadFileText,
|
775
790
|
:UnloadFileText,
|
776
791
|
:SaveFileText,
|
@@ -785,20 +800,19 @@ module Raylib
|
|
785
800
|
:GetPrevDirectoryPath,
|
786
801
|
:GetWorkingDirectory,
|
787
802
|
:GetApplicationDirectory,
|
788
|
-
:GetDirectoryFiles,
|
789
|
-
:ClearDirectoryFiles,
|
790
803
|
:ChangeDirectory,
|
804
|
+
:IsPathFile,
|
805
|
+
:LoadDirectoryFiles,
|
806
|
+
:LoadDirectoryFilesEx,
|
807
|
+
:UnloadDirectoryFiles,
|
791
808
|
:IsFileDropped,
|
792
|
-
:
|
793
|
-
:
|
809
|
+
:LoadDroppedFiles,
|
810
|
+
:UnloadDroppedFiles,
|
794
811
|
:GetFileModTime,
|
795
812
|
:CompressData,
|
796
813
|
:DecompressData,
|
797
814
|
:EncodeDataBase64,
|
798
815
|
:DecodeDataBase64,
|
799
|
-
:SaveStorageValue,
|
800
|
-
:LoadStorageValue,
|
801
|
-
:OpenURL,
|
802
816
|
:IsKeyPressed,
|
803
817
|
:IsKeyDown,
|
804
818
|
:IsKeyReleased,
|
@@ -828,6 +842,7 @@ module Raylib
|
|
828
842
|
:SetMouseOffset,
|
829
843
|
:SetMouseScale,
|
830
844
|
:GetMouseWheelMove,
|
845
|
+
:GetMouseWheelMoveV,
|
831
846
|
:SetMouseCursor,
|
832
847
|
:GetTouchX,
|
833
848
|
:GetTouchY,
|
@@ -1073,7 +1088,6 @@ module Raylib
|
|
1073
1088
|
:ExportMesh,
|
1074
1089
|
:GetMeshBoundingBox,
|
1075
1090
|
:GenMeshTangents,
|
1076
|
-
:GenMeshBinormals,
|
1077
1091
|
:GenMeshPoly,
|
1078
1092
|
:GenMeshPlane,
|
1079
1093
|
:GenMeshCube,
|
@@ -1100,7 +1114,6 @@ module Raylib
|
|
1100
1114
|
:CheckCollisionBoxSphere,
|
1101
1115
|
:GetRayCollisionSphere,
|
1102
1116
|
:GetRayCollisionBox,
|
1103
|
-
:GetRayCollisionModel,
|
1104
1117
|
:GetRayCollisionMesh,
|
1105
1118
|
:GetRayCollisionTriangle,
|
1106
1119
|
:GetRayCollisionQuad,
|
@@ -1161,6 +1174,9 @@ module Raylib
|
|
1161
1174
|
:SetAudioStreamPitch,
|
1162
1175
|
:SetAudioStreamPan,
|
1163
1176
|
:SetAudioStreamBufferSizeDefault,
|
1177
|
+
:SetAudioStreamCallback,
|
1178
|
+
:AttachAudioStreamProcessor,
|
1179
|
+
:DetachAudioStreamProcessor,
|
1164
1180
|
]
|
1165
1181
|
args = {
|
1166
1182
|
:InitWindow => [:int, :int, :pointer],
|
@@ -1205,9 +1221,11 @@ module Raylib
|
|
1205
1221
|
:GetMonitorName => [:int],
|
1206
1222
|
:SetClipboardText => [:pointer],
|
1207
1223
|
:GetClipboardText => [],
|
1224
|
+
:EnableEventWaiting => [],
|
1225
|
+
:DisableEventWaiting => [],
|
1208
1226
|
:SwapScreenBuffer => [],
|
1209
1227
|
:PollInputEvents => [],
|
1210
|
-
:WaitTime => [:
|
1228
|
+
:WaitTime => [:double],
|
1211
1229
|
:ShowCursor => [],
|
1212
1230
|
:HideCursor => [],
|
1213
1231
|
:IsCursorHidden => [],
|
@@ -1246,9 +1264,9 @@ module Raylib
|
|
1246
1264
|
:GetCameraMatrix => [Camera.by_value],
|
1247
1265
|
:GetCameraMatrix2D => [Camera2D.by_value],
|
1248
1266
|
:GetWorldToScreen => [Vector3.by_value, Camera.by_value],
|
1267
|
+
:GetScreenToWorld2D => [Vector2.by_value, Camera2D.by_value],
|
1249
1268
|
:GetWorldToScreenEx => [Vector3.by_value, Camera.by_value, :int, :int],
|
1250
1269
|
:GetWorldToScreen2D => [Vector2.by_value, Camera2D.by_value],
|
1251
|
-
:GetScreenToWorld2D => [Vector2.by_value, Camera2D.by_value],
|
1252
1270
|
:SetTargetFPS => [:int],
|
1253
1271
|
:GetFPS => [],
|
1254
1272
|
:GetFrameTime => [],
|
@@ -1262,6 +1280,7 @@ module Raylib
|
|
1262
1280
|
:MemAlloc => [:int],
|
1263
1281
|
:MemRealloc => [:pointer, :int],
|
1264
1282
|
:MemFree => [:pointer],
|
1283
|
+
:OpenURL => [:pointer],
|
1265
1284
|
:SetTraceLogCallback => [:TraceLogCallback],
|
1266
1285
|
:SetLoadFileDataCallback => [:LoadFileDataCallback],
|
1267
1286
|
:SetSaveFileDataCallback => [:SaveFileDataCallback],
|
@@ -1270,6 +1289,7 @@ module Raylib
|
|
1270
1289
|
:LoadFileData => [:pointer, :pointer],
|
1271
1290
|
:UnloadFileData => [:pointer],
|
1272
1291
|
:SaveFileData => [:pointer, :pointer, :uint],
|
1292
|
+
:ExportDataAsCode => [:pointer, :uint, :pointer],
|
1273
1293
|
:LoadFileText => [:pointer],
|
1274
1294
|
:UnloadFileText => [:pointer],
|
1275
1295
|
:SaveFileText => [:pointer, :pointer],
|
@@ -1284,20 +1304,19 @@ module Raylib
|
|
1284
1304
|
:GetPrevDirectoryPath => [:pointer],
|
1285
1305
|
:GetWorkingDirectory => [],
|
1286
1306
|
:GetApplicationDirectory => [],
|
1287
|
-
:GetDirectoryFiles => [:pointer, :pointer],
|
1288
|
-
:ClearDirectoryFiles => [],
|
1289
1307
|
:ChangeDirectory => [:pointer],
|
1308
|
+
:IsPathFile => [:pointer],
|
1309
|
+
:LoadDirectoryFiles => [:pointer],
|
1310
|
+
:LoadDirectoryFilesEx => [:pointer, :pointer, :bool],
|
1311
|
+
:UnloadDirectoryFiles => [FilePathList.by_value],
|
1290
1312
|
:IsFileDropped => [],
|
1291
|
-
:
|
1292
|
-
:
|
1313
|
+
:LoadDroppedFiles => [],
|
1314
|
+
:UnloadDroppedFiles => [FilePathList.by_value],
|
1293
1315
|
:GetFileModTime => [:pointer],
|
1294
1316
|
:CompressData => [:pointer, :int, :pointer],
|
1295
1317
|
:DecompressData => [:pointer, :int, :pointer],
|
1296
1318
|
:EncodeDataBase64 => [:pointer, :int, :pointer],
|
1297
1319
|
:DecodeDataBase64 => [:pointer, :pointer],
|
1298
|
-
:SaveStorageValue => [:uint, :int],
|
1299
|
-
:LoadStorageValue => [:uint],
|
1300
|
-
:OpenURL => [:pointer],
|
1301
1320
|
:IsKeyPressed => [:int],
|
1302
1321
|
:IsKeyDown => [:int],
|
1303
1322
|
:IsKeyReleased => [:int],
|
@@ -1327,6 +1346,7 @@ module Raylib
|
|
1327
1346
|
:SetMouseOffset => [:int, :int],
|
1328
1347
|
:SetMouseScale => [:float, :float],
|
1329
1348
|
:GetMouseWheelMove => [],
|
1349
|
+
:GetMouseWheelMoveV => [],
|
1330
1350
|
:SetMouseCursor => [:int],
|
1331
1351
|
:GetTouchX => [],
|
1332
1352
|
:GetTouchY => [],
|
@@ -1572,7 +1592,6 @@ module Raylib
|
|
1572
1592
|
:ExportMesh => [Mesh.by_value, :pointer],
|
1573
1593
|
:GetMeshBoundingBox => [Mesh.by_value],
|
1574
1594
|
:GenMeshTangents => [:pointer],
|
1575
|
-
:GenMeshBinormals => [:pointer],
|
1576
1595
|
:GenMeshPoly => [:int, :float],
|
1577
1596
|
:GenMeshPlane => [:float, :float, :int, :int],
|
1578
1597
|
:GenMeshCube => [:float, :float, :float],
|
@@ -1599,7 +1618,6 @@ module Raylib
|
|
1599
1618
|
:CheckCollisionBoxSphere => [BoundingBox.by_value, Vector3.by_value, :float],
|
1600
1619
|
:GetRayCollisionSphere => [Ray.by_value, Vector3.by_value, :float],
|
1601
1620
|
:GetRayCollisionBox => [Ray.by_value, BoundingBox.by_value],
|
1602
|
-
:GetRayCollisionModel => [Ray.by_value, Model.by_value],
|
1603
1621
|
:GetRayCollisionMesh => [Ray.by_value, Mesh.by_value, Matrix.by_value],
|
1604
1622
|
:GetRayCollisionTriangle => [Ray.by_value, Vector3.by_value, Vector3.by_value, Vector3.by_value],
|
1605
1623
|
:GetRayCollisionQuad => [Ray.by_value, Vector3.by_value, Vector3.by_value, Vector3.by_value, Vector3.by_value],
|
@@ -1660,6 +1678,9 @@ module Raylib
|
|
1660
1678
|
:SetAudioStreamPitch => [AudioStream.by_value, :float],
|
1661
1679
|
:SetAudioStreamPan => [AudioStream.by_value, :float],
|
1662
1680
|
:SetAudioStreamBufferSizeDefault => [:int],
|
1681
|
+
:SetAudioStreamCallback => [AudioStream.by_value, :AudioCallback],
|
1682
|
+
:AttachAudioStreamProcessor => [AudioStream.by_value, :AudioCallback],
|
1683
|
+
:DetachAudioStreamProcessor => [AudioStream.by_value, :AudioCallback],
|
1663
1684
|
}
|
1664
1685
|
retvals = {
|
1665
1686
|
:InitWindow => :void,
|
@@ -1704,6 +1725,8 @@ module Raylib
|
|
1704
1725
|
:GetMonitorName => :pointer,
|
1705
1726
|
:SetClipboardText => :void,
|
1706
1727
|
:GetClipboardText => :pointer,
|
1728
|
+
:EnableEventWaiting => :void,
|
1729
|
+
:DisableEventWaiting => :void,
|
1707
1730
|
:SwapScreenBuffer => :void,
|
1708
1731
|
:PollInputEvents => :void,
|
1709
1732
|
:WaitTime => :void,
|
@@ -1745,9 +1768,9 @@ module Raylib
|
|
1745
1768
|
:GetCameraMatrix => Matrix.by_value,
|
1746
1769
|
:GetCameraMatrix2D => Matrix.by_value,
|
1747
1770
|
:GetWorldToScreen => Vector2.by_value,
|
1771
|
+
:GetScreenToWorld2D => Vector2.by_value,
|
1748
1772
|
:GetWorldToScreenEx => Vector2.by_value,
|
1749
1773
|
:GetWorldToScreen2D => Vector2.by_value,
|
1750
|
-
:GetScreenToWorld2D => Vector2.by_value,
|
1751
1774
|
:SetTargetFPS => :void,
|
1752
1775
|
:GetFPS => :int,
|
1753
1776
|
:GetFrameTime => :float,
|
@@ -1761,6 +1784,7 @@ module Raylib
|
|
1761
1784
|
:MemAlloc => :pointer,
|
1762
1785
|
:MemRealloc => :pointer,
|
1763
1786
|
:MemFree => :void,
|
1787
|
+
:OpenURL => :void,
|
1764
1788
|
:SetTraceLogCallback => :void,
|
1765
1789
|
:SetLoadFileDataCallback => :void,
|
1766
1790
|
:SetSaveFileDataCallback => :void,
|
@@ -1769,6 +1793,7 @@ module Raylib
|
|
1769
1793
|
:LoadFileData => :pointer,
|
1770
1794
|
:UnloadFileData => :void,
|
1771
1795
|
:SaveFileData => :bool,
|
1796
|
+
:ExportDataAsCode => :bool,
|
1772
1797
|
:LoadFileText => :pointer,
|
1773
1798
|
:UnloadFileText => :void,
|
1774
1799
|
:SaveFileText => :bool,
|
@@ -1783,20 +1808,19 @@ module Raylib
|
|
1783
1808
|
:GetPrevDirectoryPath => :pointer,
|
1784
1809
|
:GetWorkingDirectory => :pointer,
|
1785
1810
|
:GetApplicationDirectory => :pointer,
|
1786
|
-
:GetDirectoryFiles => :pointer,
|
1787
|
-
:ClearDirectoryFiles => :void,
|
1788
1811
|
:ChangeDirectory => :bool,
|
1812
|
+
:IsPathFile => :bool,
|
1813
|
+
:LoadDirectoryFiles => FilePathList.by_value,
|
1814
|
+
:LoadDirectoryFilesEx => FilePathList.by_value,
|
1815
|
+
:UnloadDirectoryFiles => :void,
|
1789
1816
|
:IsFileDropped => :bool,
|
1790
|
-
:
|
1791
|
-
:
|
1817
|
+
:LoadDroppedFiles => FilePathList.by_value,
|
1818
|
+
:UnloadDroppedFiles => :void,
|
1792
1819
|
:GetFileModTime => :long,
|
1793
1820
|
:CompressData => :pointer,
|
1794
1821
|
:DecompressData => :pointer,
|
1795
1822
|
:EncodeDataBase64 => :pointer,
|
1796
1823
|
:DecodeDataBase64 => :pointer,
|
1797
|
-
:SaveStorageValue => :bool,
|
1798
|
-
:LoadStorageValue => :int,
|
1799
|
-
:OpenURL => :void,
|
1800
1824
|
:IsKeyPressed => :bool,
|
1801
1825
|
:IsKeyDown => :bool,
|
1802
1826
|
:IsKeyReleased => :bool,
|
@@ -1826,6 +1850,7 @@ module Raylib
|
|
1826
1850
|
:SetMouseOffset => :void,
|
1827
1851
|
:SetMouseScale => :void,
|
1828
1852
|
:GetMouseWheelMove => :float,
|
1853
|
+
:GetMouseWheelMoveV => Vector2.by_value,
|
1829
1854
|
:SetMouseCursor => :void,
|
1830
1855
|
:GetTouchX => :int,
|
1831
1856
|
:GetTouchY => :int,
|
@@ -2071,7 +2096,6 @@ module Raylib
|
|
2071
2096
|
:ExportMesh => :bool,
|
2072
2097
|
:GetMeshBoundingBox => BoundingBox.by_value,
|
2073
2098
|
:GenMeshTangents => :void,
|
2074
|
-
:GenMeshBinormals => :void,
|
2075
2099
|
:GenMeshPoly => Mesh.by_value,
|
2076
2100
|
:GenMeshPlane => Mesh.by_value,
|
2077
2101
|
:GenMeshCube => Mesh.by_value,
|
@@ -2098,7 +2122,6 @@ module Raylib
|
|
2098
2122
|
:CheckCollisionBoxSphere => :bool,
|
2099
2123
|
:GetRayCollisionSphere => RayCollision.by_value,
|
2100
2124
|
:GetRayCollisionBox => RayCollision.by_value,
|
2101
|
-
:GetRayCollisionModel => RayCollision.by_value,
|
2102
2125
|
:GetRayCollisionMesh => RayCollision.by_value,
|
2103
2126
|
:GetRayCollisionTriangle => RayCollision.by_value,
|
2104
2127
|
:GetRayCollisionQuad => RayCollision.by_value,
|
@@ -2159,6 +2182,9 @@ module Raylib
|
|
2159
2182
|
:SetAudioStreamPitch => :void,
|
2160
2183
|
:SetAudioStreamPan => :void,
|
2161
2184
|
:SetAudioStreamBufferSizeDefault => :void,
|
2185
|
+
:SetAudioStreamCallback => :void,
|
2186
|
+
:AttachAudioStreamProcessor => :void,
|
2187
|
+
:DetachAudioStreamProcessor => :void,
|
2162
2188
|
}
|
2163
2189
|
symbols.each do |sym|
|
2164
2190
|
begin
|
data/lib/raymath.rb
CHANGED
@@ -10,6 +10,7 @@ module Raylib
|
|
10
10
|
extend FFI::Library
|
11
11
|
# Define/Macro
|
12
12
|
|
13
|
+
EPSILON = 0.000001
|
13
14
|
|
14
15
|
# Enum
|
15
16
|
|
@@ -40,6 +41,8 @@ module Raylib
|
|
40
41
|
:Lerp,
|
41
42
|
:Normalize,
|
42
43
|
:Remap,
|
44
|
+
:Wrap,
|
45
|
+
:FloatEquals,
|
43
46
|
:Vector2Zero,
|
44
47
|
:Vector2One,
|
45
48
|
:Vector2Add,
|
@@ -50,6 +53,7 @@ module Raylib
|
|
50
53
|
:Vector2LengthSqr,
|
51
54
|
:Vector2DotProduct,
|
52
55
|
:Vector2Distance,
|
56
|
+
:Vector2DistanceSqr,
|
53
57
|
:Vector2Angle,
|
54
58
|
:Vector2Scale,
|
55
59
|
:Vector2Multiply,
|
@@ -61,6 +65,10 @@ module Raylib
|
|
61
65
|
:Vector2Reflect,
|
62
66
|
:Vector2Rotate,
|
63
67
|
:Vector2MoveTowards,
|
68
|
+
:Vector2Invert,
|
69
|
+
:Vector2Clamp,
|
70
|
+
:Vector2ClampValue,
|
71
|
+
:Vector2Equals,
|
64
72
|
:Vector3Zero,
|
65
73
|
:Vector3One,
|
66
74
|
:Vector3Add,
|
@@ -75,6 +83,7 @@ module Raylib
|
|
75
83
|
:Vector3LengthSqr,
|
76
84
|
:Vector3DotProduct,
|
77
85
|
:Vector3Distance,
|
86
|
+
:Vector3DistanceSqr,
|
78
87
|
:Vector3Angle,
|
79
88
|
:Vector3Negate,
|
80
89
|
:Vector3Divide,
|
@@ -89,11 +98,15 @@ module Raylib
|
|
89
98
|
:Vector3Barycenter,
|
90
99
|
:Vector3Unproject,
|
91
100
|
:Vector3ToFloatV,
|
101
|
+
:Vector3Invert,
|
102
|
+
:Vector3Clamp,
|
103
|
+
:Vector3ClampValue,
|
104
|
+
:Vector3Equals,
|
105
|
+
:Vector3Refract,
|
92
106
|
:MatrixDeterminant,
|
93
107
|
:MatrixTrace,
|
94
108
|
:MatrixTranspose,
|
95
109
|
:MatrixInvert,
|
96
|
-
:MatrixNormalize,
|
97
110
|
:MatrixIdentity,
|
98
111
|
:MatrixAdd,
|
99
112
|
:MatrixSubtract,
|
@@ -133,12 +146,15 @@ module Raylib
|
|
133
146
|
:QuaternionFromEuler,
|
134
147
|
:QuaternionToEuler,
|
135
148
|
:QuaternionTransform,
|
149
|
+
:QuaternionEquals,
|
136
150
|
]
|
137
151
|
args = {
|
138
152
|
:Clamp => [:float, :float, :float],
|
139
153
|
:Lerp => [:float, :float, :float],
|
140
154
|
:Normalize => [:float, :float, :float],
|
141
155
|
:Remap => [:float, :float, :float, :float, :float],
|
156
|
+
:Wrap => [:float, :float, :float],
|
157
|
+
:FloatEquals => [:float, :float],
|
142
158
|
:Vector2Zero => [],
|
143
159
|
:Vector2One => [],
|
144
160
|
:Vector2Add => [Vector2.by_value, Vector2.by_value],
|
@@ -149,6 +165,7 @@ module Raylib
|
|
149
165
|
:Vector2LengthSqr => [Vector2.by_value],
|
150
166
|
:Vector2DotProduct => [Vector2.by_value, Vector2.by_value],
|
151
167
|
:Vector2Distance => [Vector2.by_value, Vector2.by_value],
|
168
|
+
:Vector2DistanceSqr => [Vector2.by_value, Vector2.by_value],
|
152
169
|
:Vector2Angle => [Vector2.by_value, Vector2.by_value],
|
153
170
|
:Vector2Scale => [Vector2.by_value, :float],
|
154
171
|
:Vector2Multiply => [Vector2.by_value, Vector2.by_value],
|
@@ -160,6 +177,10 @@ module Raylib
|
|
160
177
|
:Vector2Reflect => [Vector2.by_value, Vector2.by_value],
|
161
178
|
:Vector2Rotate => [Vector2.by_value, :float],
|
162
179
|
:Vector2MoveTowards => [Vector2.by_value, Vector2.by_value, :float],
|
180
|
+
:Vector2Invert => [Vector2.by_value],
|
181
|
+
:Vector2Clamp => [Vector2.by_value, Vector2.by_value, Vector2.by_value],
|
182
|
+
:Vector2ClampValue => [Vector2.by_value, :float, :float],
|
183
|
+
:Vector2Equals => [Vector2.by_value, Vector2.by_value],
|
163
184
|
:Vector3Zero => [],
|
164
185
|
:Vector3One => [],
|
165
186
|
:Vector3Add => [Vector3.by_value, Vector3.by_value],
|
@@ -174,6 +195,7 @@ module Raylib
|
|
174
195
|
:Vector3LengthSqr => [Vector3.by_value],
|
175
196
|
:Vector3DotProduct => [Vector3.by_value, Vector3.by_value],
|
176
197
|
:Vector3Distance => [Vector3.by_value, Vector3.by_value],
|
198
|
+
:Vector3DistanceSqr => [Vector3.by_value, Vector3.by_value],
|
177
199
|
:Vector3Angle => [Vector3.by_value, Vector3.by_value],
|
178
200
|
:Vector3Negate => [Vector3.by_value],
|
179
201
|
:Vector3Divide => [Vector3.by_value, Vector3.by_value],
|
@@ -188,11 +210,15 @@ module Raylib
|
|
188
210
|
:Vector3Barycenter => [Vector3.by_value, Vector3.by_value, Vector3.by_value, Vector3.by_value],
|
189
211
|
:Vector3Unproject => [Vector3.by_value, Matrix.by_value, Matrix.by_value],
|
190
212
|
:Vector3ToFloatV => [Vector3.by_value],
|
213
|
+
:Vector3Invert => [Vector3.by_value],
|
214
|
+
:Vector3Clamp => [Vector3.by_value, Vector3.by_value, Vector3.by_value],
|
215
|
+
:Vector3ClampValue => [Vector3.by_value, :float, :float],
|
216
|
+
:Vector3Equals => [Vector3.by_value, Vector3.by_value],
|
217
|
+
:Vector3Refract => [Vector3.by_value, Vector3.by_value, :float],
|
191
218
|
:MatrixDeterminant => [Matrix.by_value],
|
192
219
|
:MatrixTrace => [Matrix.by_value],
|
193
220
|
:MatrixTranspose => [Matrix.by_value],
|
194
221
|
:MatrixInvert => [Matrix.by_value],
|
195
|
-
:MatrixNormalize => [Matrix.by_value],
|
196
222
|
:MatrixIdentity => [],
|
197
223
|
:MatrixAdd => [Matrix.by_value, Matrix.by_value],
|
198
224
|
:MatrixSubtract => [Matrix.by_value, Matrix.by_value],
|
@@ -232,12 +258,15 @@ module Raylib
|
|
232
258
|
:QuaternionFromEuler => [:float, :float, :float],
|
233
259
|
:QuaternionToEuler => [Quaternion.by_value],
|
234
260
|
:QuaternionTransform => [Quaternion.by_value, Matrix.by_value],
|
261
|
+
:QuaternionEquals => [Quaternion.by_value, Quaternion.by_value],
|
235
262
|
}
|
236
263
|
retvals = {
|
237
264
|
:Clamp => :float,
|
238
265
|
:Lerp => :float,
|
239
266
|
:Normalize => :float,
|
240
267
|
:Remap => :float,
|
268
|
+
:Wrap => :float,
|
269
|
+
:FloatEquals => :int,
|
241
270
|
:Vector2Zero => Vector2.by_value,
|
242
271
|
:Vector2One => Vector2.by_value,
|
243
272
|
:Vector2Add => Vector2.by_value,
|
@@ -248,6 +277,7 @@ module Raylib
|
|
248
277
|
:Vector2LengthSqr => :float,
|
249
278
|
:Vector2DotProduct => :float,
|
250
279
|
:Vector2Distance => :float,
|
280
|
+
:Vector2DistanceSqr => :float,
|
251
281
|
:Vector2Angle => :float,
|
252
282
|
:Vector2Scale => Vector2.by_value,
|
253
283
|
:Vector2Multiply => Vector2.by_value,
|
@@ -259,6 +289,10 @@ module Raylib
|
|
259
289
|
:Vector2Reflect => Vector2.by_value,
|
260
290
|
:Vector2Rotate => Vector2.by_value,
|
261
291
|
:Vector2MoveTowards => Vector2.by_value,
|
292
|
+
:Vector2Invert => Vector2.by_value,
|
293
|
+
:Vector2Clamp => Vector2.by_value,
|
294
|
+
:Vector2ClampValue => Vector2.by_value,
|
295
|
+
:Vector2Equals => :int,
|
262
296
|
:Vector3Zero => Vector3.by_value,
|
263
297
|
:Vector3One => Vector3.by_value,
|
264
298
|
:Vector3Add => Vector3.by_value,
|
@@ -273,6 +307,7 @@ module Raylib
|
|
273
307
|
:Vector3LengthSqr => :float,
|
274
308
|
:Vector3DotProduct => :float,
|
275
309
|
:Vector3Distance => :float,
|
310
|
+
:Vector3DistanceSqr => :float,
|
276
311
|
:Vector3Angle => :float,
|
277
312
|
:Vector3Negate => Vector3.by_value,
|
278
313
|
:Vector3Divide => Vector3.by_value,
|
@@ -287,11 +322,15 @@ module Raylib
|
|
287
322
|
:Vector3Barycenter => Vector3.by_value,
|
288
323
|
:Vector3Unproject => Vector3.by_value,
|
289
324
|
:Vector3ToFloatV => Float3.by_value,
|
325
|
+
:Vector3Invert => Vector3.by_value,
|
326
|
+
:Vector3Clamp => Vector3.by_value,
|
327
|
+
:Vector3ClampValue => Vector3.by_value,
|
328
|
+
:Vector3Equals => :int,
|
329
|
+
:Vector3Refract => Vector3.by_value,
|
290
330
|
:MatrixDeterminant => :float,
|
291
331
|
:MatrixTrace => :float,
|
292
332
|
:MatrixTranspose => Matrix.by_value,
|
293
333
|
:MatrixInvert => Matrix.by_value,
|
294
|
-
:MatrixNormalize => Matrix.by_value,
|
295
334
|
:MatrixIdentity => Matrix.by_value,
|
296
335
|
:MatrixAdd => Matrix.by_value,
|
297
336
|
:MatrixSubtract => Matrix.by_value,
|
@@ -331,6 +370,7 @@ module Raylib
|
|
331
370
|
:QuaternionFromEuler => Quaternion.by_value,
|
332
371
|
:QuaternionToEuler => Vector3.by_value,
|
333
372
|
:QuaternionTransform => Quaternion.by_value,
|
373
|
+
:QuaternionEquals => :int,
|
334
374
|
}
|
335
375
|
symbols.each do |sym|
|
336
376
|
begin
|
data/lib/rlgl.rb
CHANGED
@@ -120,7 +120,7 @@ module Raylib
|
|
120
120
|
RL_BLEND_MULTIPLIED = 2
|
121
121
|
RL_BLEND_ADD_COLORS = 3
|
122
122
|
RL_BLEND_SUBTRACT_COLORS = 4
|
123
|
-
|
123
|
+
RL_BLEND_ALPHA_PREMULTIPLY = 5
|
124
124
|
RL_BLEND_CUSTOM = 6
|
125
125
|
RL_SHADER_LOC_VERTEX_POSITION = 0
|
126
126
|
RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1
|
@@ -283,7 +283,9 @@ module Raylib
|
|
283
283
|
:rlglClose,
|
284
284
|
:rlLoadExtensions,
|
285
285
|
:rlGetVersion,
|
286
|
+
:rlSetFramebufferWidth,
|
286
287
|
:rlGetFramebufferWidth,
|
288
|
+
:rlSetFramebufferHeight,
|
287
289
|
:rlGetFramebufferHeight,
|
288
290
|
:rlGetTextureIdDefault,
|
289
291
|
:rlGetShaderIdDefault,
|
@@ -425,7 +427,9 @@ module Raylib
|
|
425
427
|
:rlglClose => [],
|
426
428
|
:rlLoadExtensions => [:pointer],
|
427
429
|
:rlGetVersion => [],
|
430
|
+
:rlSetFramebufferWidth => [:int],
|
428
431
|
:rlGetFramebufferWidth => [],
|
432
|
+
:rlSetFramebufferHeight => [:int],
|
429
433
|
:rlGetFramebufferHeight => [],
|
430
434
|
:rlGetTextureIdDefault => [],
|
431
435
|
:rlGetShaderIdDefault => [],
|
@@ -567,7 +571,9 @@ module Raylib
|
|
567
571
|
:rlglClose => :void,
|
568
572
|
:rlLoadExtensions => :void,
|
569
573
|
:rlGetVersion => :int,
|
574
|
+
:rlSetFramebufferWidth => :void,
|
570
575
|
:rlGetFramebufferWidth => :int,
|
576
|
+
:rlSetFramebufferHeight => :void,
|
571
577
|
:rlGetFramebufferHeight => :int,
|
572
578
|
:rlGetTextureIdDefault => :uint,
|
573
579
|
:rlGetShaderIdDefault => :uint,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raylib-bindings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaiorabbit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|