raylib-bindings 0.5.7 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3fbac3602a46b5d91f37bae57e044b14c00a5067d95f7b1175d2a80a0a3c300
4
- data.tar.gz: 3cd2950960e81b4ca50c05754ccf7cfea42da671bb332ab611add263cf2bad07
3
+ metadata.gz: a9c23808535a9a3661cb414878633492267cbec349e77f264d6c2f088b90442a
4
+ data.tar.gz: 9acd2cd76fc8dbcae8429d9928c72c0b40c39485580f4d7352f28333dd63777f
5
5
  SHA512:
6
- metadata.gz: c977faefd030c09b8be636947f760ce868f50e9507d48cd8692beb551a0a291a7c9a4d23b7ab79e2cd362d2323ee631b3de260bfb72dc98586193bfb2b8cf497
7
- data.tar.gz: 444503a05977130ba0422fd7e55c984662305124c9a8c430abbfe45fde7e8f1eba15bb6e4679dd5592050b9952344df430e7aef4266484f19f8c6f57825364e4
6
+ metadata.gz: adcb66a3c8b3a35f4db9e05a2a43f97a33924040bf9a7c9d208a588851a3a816e8783324b11e2362ed36067eea1214cfca63cd37f374ad7e0c920048590b387d
7
+ data.tar.gz: f2aad6eac10ba1230ce74cf59aa65e4831b29a7d19060f5205616aadd0e99d3d128c122be2be6d84a36aec3c6636ba5c22a3ef92eb2a3cfbafe0be9340eeb303
data/ChangeLog CHANGED
@@ -1,3 +1,24 @@
1
+ 2023-11-18 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * Updated with latest raylib ( https://github.com/raysan5/raylib/commit/ae50bfa2cc569c0f8d5bc4315d39db64005b1b08 ) and raygui ( https://github.com/raysan5/raygui/commit/141ae0cd312656b7764b01079e43fc887aaaf4ce )
4
+
5
+ 2023-11-11 vaiorabbit <http://twitter.com/vaiorabbit>
6
+
7
+ * examples/shapes_splines_drawing.rb : Added
8
+
9
+ 2023-11-10 vaiorabbit <http://twitter.com/vaiorabbit>
10
+
11
+ * examples/text_font_sdf.rb : Added
12
+
13
+ 2023-11-09 vaiorabbit <http://twitter.com/vaiorabbit>
14
+
15
+ * Updated with latest raylib ( https://github.com/raysan5/raylib/commit/21dc42d2ad02cafed83cd39afd7305212787c114 ) and raygui ( https://github.com/raysan5/raygui/commit/a2726c8600058cf2b1e6a2660d6d26312b0df424 )
16
+
17
+ 2023-10-28 vaiorabbit <http://twitter.com/vaiorabbit>
18
+
19
+ * Updated with latest raylib ( https://github.com/raysan5/raylib/commit/b46505b13d4a85e26d1d5b6f9fc2a4264bf8b02f ) and raygui ( https://github.com/raysan5/raygui/commit/499e8bf7b1d9b0a92af8f685e646bc61f13c6dff )
20
+ * examples/core_automation_events.rb : Added
21
+
1
22
  2023-10-08 vaiorabbit <http://twitter.com/vaiorabbit>
2
23
 
3
24
  * Updated with latest raylib ( https://github.com/raysan5/raylib/commit/97c2744a16ad7e6cf6b546a7a6416ec6b21e3a6c ) and raygui ( https://github.com/raysan5/raygui/commit/85a5c104f509b183c8cc7db0d90c2ab7a2b198c8)
@@ -8,13 +29,13 @@
8
29
 
9
30
  2023-09-23 vaiorabbit <http://twitter.com/vaiorabbit>
10
31
 
11
- * example/raylib_with_imgui.rb : Added
32
+ * examples/raylib_with_imgui.rb : Added
12
33
 
13
34
  2023-09-16 vaiorabbit <http://twitter.com/vaiorabbit>
14
35
 
15
36
  * lib/raygui_helper.rb: Added more APIs
16
- * example/gui_controls.rb: Added
17
- * example/shaders_basic_lighting.rb: Added
37
+ * examples/gui_controls.rb: Added
38
+ * examples/shaders_basic_lighting.rb: Added
18
39
 
19
40
  2023-09-12 vaiorabbit <http://twitter.com/vaiorabbit>
20
41
 
@@ -23,7 +44,7 @@
23
44
  2023-09-09 vaiorabbit <http://twitter.com/vaiorabbit>
24
45
 
25
46
  * Updated with latest raylib ( https://github.com/raysan5/raylib/commit/37f60e75e72eebd5ff687b8857bf9043d291b0df ) and raygui ( https://github.com/raysan5/raygui/commit/0fccdc61fbd787fdfa9e254fd99def2cdb34fb10 )
26
- * example/template.rb: now calls UpdateCamera only when orbital model is on
47
+ * examples/template.rb: now calls UpdateCamera only when orbital model is on
27
48
 
28
49
  2023-09-02 vaiorabbit <http://twitter.com/vaiorabbit>
29
50
 
@@ -42,7 +63,7 @@
42
63
 
43
64
  2023-07-16 vaiorabbit <http://twitter.com/vaiorabbit>
44
65
 
45
- * example/textures_image_rotate.rb: Added
66
+ * examples/textures_image_rotate.rb: Added
46
67
  * Updated with latest raylib ( https://github.com/raysan5/raylib/commit/22895ba14fab982ca74ec1526b48b924d1174e60 ) and raygui ( https://github.com/raysan5/raygui/commit/848569ce3399a8f6fe00091f968808f3ab042c4b )
47
68
 
48
69
  2023-06-26 vaiorabbit <http://twitter.com/vaiorabbit>
@@ -60,7 +81,7 @@
60
81
 
61
82
  2023-05-22 vaiorabbit <http://twitter.com/vaiorabbit>
62
83
 
63
- * example/textures_image_generation.rb: Added
84
+ * examples/textures_image_generation.rb: Added
64
85
  * Updated with latest raylib ( https://github.com/raysan5/raylib/commit/a4a6d4da8a26d131bc3f3e643f6fe51de281d15f ) and raygui ( https://github.com/raysan5/raygui/commit/135718ee04d57493039fd7b8fb1d73b49f3ec1ea )
65
86
 
66
87
  2023-05-14 vaiorabbit <http://twitter.com/vaiorabbit>
@@ -91,11 +112,11 @@
91
112
 
92
113
  2023-02-18 vaiorabbit <http://twitter.com/vaiorabbit>
93
114
 
94
- * example/generate_heightmap_obj.rb: Added
115
+ * examples/generate_heightmap_obj.rb: Added
95
116
 
96
117
  2023-02-15 vaiorabbit <http://twitter.com/vaiorabbit>
97
118
 
98
- * example/models_heightmap.rb: Added
119
+ * examples/models_heightmap.rb: Added
99
120
 
100
121
  2023-02-04 vaiorabbit <http://twitter.com/vaiorabbit>
101
122
 
@@ -108,7 +129,7 @@
108
129
 
109
130
  2023-01-23 vaiorabbit <http://twitter.com/vaiorabbit>
110
131
 
111
- * example/util/setup_dll.rb: Fixed
132
+ * examples/util/setup_dll.rb: Fixed
112
133
 
113
134
  2023-01-21 vaiorabbit <http://twitter.com/vaiorabbit>
114
135
 
@@ -116,15 +137,15 @@
116
137
 
117
138
  2023-01-03 vaiorabbit <http://twitter.com/vaiorabbit>
118
139
 
119
- * example/models_loading_gltf.rb: Added glTF animation playback
140
+ * examples/models_loading_gltf.rb: Added glTF animation playback
120
141
 
121
142
  2023-01-01 vaiorabbit <http://twitter.com/vaiorabbit>
122
143
 
123
- * example/reversi_board.rb: Added
144
+ * examples/reversi_board.rb: Added
124
145
 
125
146
  2022-12-31 vaiorabbit <http://twitter.com/vaiorabbit>
126
147
 
127
- * example/game_of_life_simple.rb: Added
148
+ * examples/game_of_life_simple.rb: Added
128
149
 
129
150
  2022-12-30 vaiorabbit <http://twitter.com/vaiorabbit>
130
151
 
@@ -152,7 +173,7 @@
152
173
 
153
174
  * Pulled latest raylib ( https://github.com/raysan5/raylib/commit/2c9d116a5ce835328dc3267313f1b34b2e7ad8c9 ) / and raygui ( https://github.com/raysan5/raygui/commit/64179558e425f6e05054d2a70eb12530e0fec103 )
154
175
  * [Windows] Updated DLLs with the latest raylib
155
- * example/rlgl_compute_shader.rb: Fixed API usage
176
+ * examples/rlgl_compute_shader.rb: Fixed API usage
156
177
 
157
178
  2022-10-23 vaiorabbit <http://twitter.com/vaiorabbit>
158
179
 
@@ -162,13 +183,13 @@
162
183
  2022-10-16 vaiorabbit <http://twitter.com/vaiorabbit>
163
184
 
164
185
  * Pulled latest raylib ( https://github.com/raysan5/raylib/commit/c5e89241c515d12a739a0d0bacb6a05395bf2a95 ) / and raygui ( https://github.com/raysan5/raygui/commit/98df231227d87dbf5954520169af29e610cd6a87 )
165
- * example/models_loading_m3d.rb: Added
166
- * example/models_loading_gltf.rb: Fixed model paths
186
+ * examples/models_loading_m3d.rb: Added
187
+ * examples/models_loading_gltf.rb: Fixed model paths
167
188
  * [Windows] Updated DLLs with the latest raylib
168
189
 
169
190
  2022-08-28 vaiorabbit <http://twitter.com/vaiorabbit>
170
191
 
171
- * example/template.rb: Added demonstration program included in gem package
192
+ * examples/template.rb: Added demonstration program included in gem package
172
193
  * lib/raylib.rb: Added method 'Raylib.template' to generate template code
173
194
 
174
195
  2022-08-12 vaiorabbit <http://twitter.com/vaiorabbit>
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # Yet another raylib wrapper for Ruby #
4
4
 
5
5
  * Created : 2021-10-17
6
- * Last modified : 2023-10-08
6
+ * Last modified : 2023-11-18
7
7
 
8
8
  Provides Ruby bindings for raylib-related libraries including:
9
9
 
data/lib/config.rb CHANGED
@@ -18,12 +18,15 @@ module Raylib
18
18
  SUPPORT_MODULE_RAUDIO = 1
19
19
  SUPPORT_CAMERA_SYSTEM = 1
20
20
  SUPPORT_GESTURES_SYSTEM = 1
21
+ SUPPORT_RPRAND_GENERATOR = 1
21
22
  SUPPORT_MOUSE_GESTURES = 1
22
23
  SUPPORT_SSH_KEYBOARD_RPI = 1
23
24
  SUPPORT_WINMM_HIGHRES_TIMER = 1
25
+ SUPPORT_PARTIALBUSY_WAIT_LOOP = 1
24
26
  SUPPORT_SCREEN_CAPTURE = 1
25
27
  SUPPORT_GIF_RECORDING = 1
26
28
  SUPPORT_COMPRESSION_API = 1
29
+ SUPPORT_AUTOMATION_EVENTS = 1
27
30
  MAX_FILEPATH_CAPACITY = 8192 # Maximum file paths capacity
28
31
  MAX_FILEPATH_LENGTH = 4096 # Maximum length for filepaths (Linux PATH_MAX default value)
29
32
  MAX_KEYBOARD_KEYS = 512 # Maximum number of keyboard keys supported
@@ -35,6 +38,7 @@ module Raylib
35
38
  MAX_KEY_PRESSED_QUEUE = 16 # Maximum number of keys in the key input queue
36
39
  MAX_CHAR_PRESSED_QUEUE = 16 # Maximum number of characters in the char input queue
37
40
  MAX_DECOMPRESSION_SIZE = 64 # Max size allocated for decompression in MB
41
+ MAX_AUTOMATION_EVENTS = 16384 # Maximum number of automation events to record
38
42
  RL_DEFAULT_BATCH_BUFFERS = 1 # Default number of batch buffers (multi-buffering)
39
43
  RL_DEFAULT_BATCH_DRAWCALLS = 256 # Default number of batch draw calls (by state changes: mode, texture)
40
44
  RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4 # Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
@@ -58,6 +62,7 @@ module Raylib
58
62
  RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 = "texture1" # texture1 (texture slot active 1)
59
63
  RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 = "texture2" # texture2 (texture slot active 2)
60
64
  SUPPORT_QUADS_DRAW_MODE = 1
65
+ SPLINE_SEGMENT_DIVISIONS = 24 # Spline segments subdivisions
61
66
  SUPPORT_FILEFORMAT_PNG = 1
62
67
  SUPPORT_FILEFORMAT_GIF = 1
63
68
  SUPPORT_FILEFORMAT_QOI = 1
data/lib/physac.rb CHANGED
@@ -18,7 +18,6 @@ module Raylib
18
18
  PHYSAC_COLLISION_ITERATIONS = 100
19
19
  PHYSAC_PENETRATION_ALLOWANCE = 0.05
20
20
  PHYSAC_PENETRATION_CORRECTION = 0.4
21
- PHYSAC_PI = 3.14159265358979323846
22
21
 
23
22
  # Enum
24
23
 
data/lib/raylib_helper.rb CHANGED
@@ -75,6 +75,10 @@ module Raylib
75
75
  self[:y] = y
76
76
  self
77
77
  end
78
+
79
+ def to_a
80
+ [x, y]
81
+ end
78
82
  end
79
83
 
80
84
  class Vector3
@@ -92,6 +96,10 @@ module Raylib
92
96
  self[:z] = z
93
97
  self
94
98
  end
99
+
100
+ def to_a
101
+ [x, y, z]
102
+ end
95
103
  end
96
104
 
97
105
  class Vector4
@@ -110,6 +118,10 @@ module Raylib
110
118
  self[:w] = w
111
119
  self
112
120
  end
121
+
122
+ def to_a
123
+ [x, y, z, w]
124
+ end
113
125
  end
114
126
 
115
127
  class Quaternion
@@ -128,6 +140,10 @@ module Raylib
128
140
  self[:w] = w
129
141
  self
130
142
  end
143
+
144
+ def to_a
145
+ [x, y, z, w]
146
+ end
131
147
  end
132
148
 
133
149
  class Rectangle
data/lib/raylib_main.rb CHANGED
@@ -11,12 +11,10 @@ module Raylib
11
11
 
12
12
  # Define/Macro
13
13
 
14
- RAYLIB_VERSION_MAJOR = 4
15
- RAYLIB_VERSION_MINOR = 6
14
+ RAYLIB_VERSION_MAJOR = 5
15
+ RAYLIB_VERSION_MINOR = 0
16
16
  RAYLIB_VERSION_PATCH = 0
17
- RAYLIB_VERSION = "4.6-dev"
18
- DEG2RAD = Math::PI / 180.0
19
- RAD2DEG = 180.0 / Math::PI
17
+ RAYLIB_VERSION = "5.0"
20
18
 
21
19
  # Enum
22
20
 
@@ -1095,6 +1093,36 @@ module Raylib
1095
1093
  def paths=(v) self[:paths] = v end
1096
1094
  end
1097
1095
 
1096
+ # Automation event
1097
+ class AutomationEvent < FFI::Struct
1098
+ layout(
1099
+ :frame, :uint, # Event frame
1100
+ :type, :uint, # Event type (AutomationEventType)
1101
+ :params, [:int, 4], # Event parameters (if required)
1102
+ )
1103
+ def frame = self[:frame]
1104
+ def frame=(v) self[:frame] = v end
1105
+ def type = self[:type]
1106
+ def type=(v) self[:type] = v end
1107
+ def params = self[:params]
1108
+ def params=(v) self[:params] = v end
1109
+ end
1110
+
1111
+ # Automation event list
1112
+ class AutomationEventList < FFI::Struct
1113
+ layout(
1114
+ :capacity, :uint, # Events max entries (MAX_AUTOMATION_EVENTS)
1115
+ :count, :uint, # Events entries count
1116
+ :events, :pointer, # Events entries
1117
+ )
1118
+ def capacity = self[:capacity]
1119
+ def capacity=(v) self[:capacity] = v end
1120
+ def count = self[:count]
1121
+ def count=(v) self[:count] = v end
1122
+ def events = self[:events]
1123
+ def events=(v) self[:events] = v end
1124
+ end
1125
+
1098
1126
 
1099
1127
  # Function
1100
1128
 
@@ -1109,16 +1137,16 @@ module Raylib
1109
1137
  # @return [void]
1110
1138
  [:InitWindow, :InitWindow, [:int, :int, :pointer], :void],
1111
1139
 
1112
- # @!method WindowShouldClose()
1113
- # WindowShouldClose : Check if KEY_ESCAPE pressed or Close icon pressed
1114
- # @return [bool]
1115
- [:WindowShouldClose, :WindowShouldClose, [], :bool],
1116
-
1117
1140
  # @!method CloseWindow()
1118
1141
  # CloseWindow : Close window and unload OpenGL context
1119
1142
  # @return [void]
1120
1143
  [:CloseWindow, :CloseWindow, [], :void],
1121
1144
 
1145
+ # @!method WindowShouldClose()
1146
+ # WindowShouldClose : Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
1147
+ # @return [bool]
1148
+ [:WindowShouldClose, :WindowShouldClose, [], :bool],
1149
+
1122
1150
  # @!method IsWindowReady()
1123
1151
  # IsWindowReady : Check if window has been initialized successfully
1124
1152
  # @return [bool]
@@ -1369,22 +1397,6 @@ module Raylib
1369
1397
  # @return [void]
1370
1398
  [:DisableEventWaiting, :DisableEventWaiting, [], :void],
1371
1399
 
1372
- # @!method SwapScreenBuffer()
1373
- # SwapScreenBuffer : Swap back buffer with front buffer (screen drawing)
1374
- # @return [void]
1375
- [:SwapScreenBuffer, :SwapScreenBuffer, [], :void],
1376
-
1377
- # @!method PollInputEvents()
1378
- # PollInputEvents : Register all input events
1379
- # @return [void]
1380
- [:PollInputEvents, :PollInputEvents, [], :void],
1381
-
1382
- # @!method WaitTime(seconds)
1383
- # WaitTime : Wait for some time (halt program execution)
1384
- # @param seconds [double]
1385
- # @return [void]
1386
- [:WaitTime, :WaitTime, [:double], :void],
1387
-
1388
1400
  # @!method ShowCursor()
1389
1401
  # ShowCursor : Shows cursor
1390
1402
  # @return [void]
@@ -1653,11 +1665,6 @@ module Raylib
1653
1665
  # @return [void]
1654
1666
  [:SetTargetFPS, :SetTargetFPS, [:int], :void],
1655
1667
 
1656
- # @!method GetFPS()
1657
- # GetFPS : Get current FPS
1658
- # @return [int]
1659
- [:GetFPS, :GetFPS, [], :int],
1660
-
1661
1668
  # @!method GetFrameTime()
1662
1669
  # GetFrameTime : Get time in seconds for last frame drawn (delta time)
1663
1670
  # @return [float]
@@ -1668,6 +1675,33 @@ module Raylib
1668
1675
  # @return [double]
1669
1676
  [:GetTime, :GetTime, [], :double],
1670
1677
 
1678
+ # @!method GetFPS()
1679
+ # GetFPS : Get current FPS
1680
+ # @return [int]
1681
+ [:GetFPS, :GetFPS, [], :int],
1682
+
1683
+ # @!method SwapScreenBuffer()
1684
+ # SwapScreenBuffer : Swap back buffer with front buffer (screen drawing)
1685
+ # @return [void]
1686
+ [:SwapScreenBuffer, :SwapScreenBuffer, [], :void],
1687
+
1688
+ # @!method PollInputEvents()
1689
+ # PollInputEvents : Register all input events
1690
+ # @return [void]
1691
+ [:PollInputEvents, :PollInputEvents, [], :void],
1692
+
1693
+ # @!method WaitTime(seconds)
1694
+ # WaitTime : Wait for some time (halt program execution)
1695
+ # @param seconds [double]
1696
+ # @return [void]
1697
+ [:WaitTime, :WaitTime, [:double], :void],
1698
+
1699
+ # @!method SetRandomSeed(seed)
1700
+ # SetRandomSeed : Set the seed for the random number generator
1701
+ # @param seed [unsigned int]
1702
+ # @return [void]
1703
+ [:SetRandomSeed, :SetRandomSeed, [:uint], :void],
1704
+
1671
1705
  # @!method GetRandomValue(min, max)
1672
1706
  # GetRandomValue : Get a random value between min and max (both included)
1673
1707
  # @param min [int]
@@ -1675,11 +1709,19 @@ module Raylib
1675
1709
  # @return [int]
1676
1710
  [:GetRandomValue, :GetRandomValue, [:int, :int], :int],
1677
1711
 
1678
- # @!method SetRandomSeed(seed)
1679
- # SetRandomSeed : Set the seed for the random number generator
1680
- # @param seed [unsigned int]
1712
+ # @!method LoadRandomSequence(count, min, max)
1713
+ # LoadRandomSequence : Load random values sequence, no values repeated
1714
+ # @param count [unsigned int]
1715
+ # @param min [int]
1716
+ # @param max [int]
1717
+ # @return [int *]
1718
+ [:LoadRandomSequence, :LoadRandomSequence, [:uint, :int, :int], :pointer],
1719
+
1720
+ # @!method UnloadRandomSequence(sequence)
1721
+ # UnloadRandomSequence : Unload random values sequence
1722
+ # @param sequence [int *]
1681
1723
  # @return [void]
1682
- [:SetRandomSeed, :SetRandomSeed, [:uint], :void],
1724
+ [:UnloadRandomSequence, :UnloadRandomSequence, [:pointer], :void],
1683
1725
 
1684
1726
  # @!method TakeScreenshot(fileName)
1685
1727
  # TakeScreenshot : Takes a screenshot of current screen (filename extension defines format)
@@ -1693,6 +1735,12 @@ module Raylib
1693
1735
  # @return [void]
1694
1736
  [:SetConfigFlags, :SetConfigFlags, [:uint], :void],
1695
1737
 
1738
+ # @!method OpenURL(url)
1739
+ # OpenURL : Open URL with default system browser (if available)
1740
+ # @param url [const char *]
1741
+ # @return [void]
1742
+ [:OpenURL, :OpenURL, [:pointer], :void],
1743
+
1696
1744
  # @!method TraceLog(logLevel, text, ...)
1697
1745
  # TraceLog : Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
1698
1746
  # @param logLevel [int]
@@ -1726,12 +1774,6 @@ module Raylib
1726
1774
  # @return [void]
1727
1775
  [:MemFree, :MemFree, [:pointer], :void],
1728
1776
 
1729
- # @!method OpenURL(url)
1730
- # OpenURL : Open URL with default system browser (if available)
1731
- # @param url [const char *]
1732
- # @return [void]
1733
- [:OpenURL, :OpenURL, [:pointer], :void],
1734
-
1735
1777
  # @!method SetTraceLogCallback(callback)
1736
1778
  # SetTraceLogCallback : Set custom trace log
1737
1779
  # @param callback [TraceLogCallback]
@@ -1960,6 +2002,53 @@ module Raylib
1960
2002
  # @return [unsigned char *]
1961
2003
  [:DecodeDataBase64, :DecodeDataBase64, [:pointer, :pointer], :pointer],
1962
2004
 
2005
+ # @!method LoadAutomationEventList(fileName)
2006
+ # LoadAutomationEventList : Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
2007
+ # @param fileName [const char *]
2008
+ # @return [AutomationEventList]
2009
+ [:LoadAutomationEventList, :LoadAutomationEventList, [:pointer], AutomationEventList.by_value],
2010
+
2011
+ # @!method UnloadAutomationEventList(list)
2012
+ # UnloadAutomationEventList : Unload automation events list from file
2013
+ # @param list [AutomationEventList *]
2014
+ # @return [void]
2015
+ [:UnloadAutomationEventList, :UnloadAutomationEventList, [:pointer], :void],
2016
+
2017
+ # @!method ExportAutomationEventList(list, fileName)
2018
+ # ExportAutomationEventList : Export automation events list as text file
2019
+ # @param list [AutomationEventList]
2020
+ # @param fileName [const char *]
2021
+ # @return [bool]
2022
+ [:ExportAutomationEventList, :ExportAutomationEventList, [AutomationEventList.by_value, :pointer], :bool],
2023
+
2024
+ # @!method SetAutomationEventList(list)
2025
+ # SetAutomationEventList : Set automation event list to record to
2026
+ # @param list [AutomationEventList *]
2027
+ # @return [void]
2028
+ [:SetAutomationEventList, :SetAutomationEventList, [:pointer], :void],
2029
+
2030
+ # @!method SetAutomationEventBaseFrame(frame)
2031
+ # SetAutomationEventBaseFrame : Set automation event internal base frame to start recording
2032
+ # @param frame [int]
2033
+ # @return [void]
2034
+ [:SetAutomationEventBaseFrame, :SetAutomationEventBaseFrame, [:int], :void],
2035
+
2036
+ # @!method StartAutomationEventRecording()
2037
+ # StartAutomationEventRecording : Start recording automation events (AutomationEventList must be set)
2038
+ # @return [void]
2039
+ [:StartAutomationEventRecording, :StartAutomationEventRecording, [], :void],
2040
+
2041
+ # @!method StopAutomationEventRecording()
2042
+ # StopAutomationEventRecording : Stop recording automation events
2043
+ # @return [void]
2044
+ [:StopAutomationEventRecording, :StopAutomationEventRecording, [], :void],
2045
+
2046
+ # @!method PlayAutomationEvent(event)
2047
+ # PlayAutomationEvent : Play a recorded automation event
2048
+ # @param event [AutomationEvent]
2049
+ # @return [void]
2050
+ [:PlayAutomationEvent, :PlayAutomationEvent, [AutomationEvent.by_value], :void],
2051
+
1963
2052
  # @!method IsKeyPressed(key)
1964
2053
  # IsKeyPressed : Check if a key has been pressed once
1965
2054
  # @param key [int]
@@ -1990,12 +2079,6 @@ module Raylib
1990
2079
  # @return [bool]
1991
2080
  [:IsKeyUp, :IsKeyUp, [:int], :bool],
1992
2081
 
1993
- # @!method SetExitKey(key)
1994
- # SetExitKey : Set a custom key to exit program (default is ESC)
1995
- # @param key [int]
1996
- # @return [void]
1997
- [:SetExitKey, :SetExitKey, [:int], :void],
1998
-
1999
2082
  # @!method GetKeyPressed()
2000
2083
  # GetKeyPressed : Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
2001
2084
  # @return [int]
@@ -2006,6 +2089,12 @@ module Raylib
2006
2089
  # @return [int]
2007
2090
  [:GetCharPressed, :GetCharPressed, [], :int],
2008
2091
 
2092
+ # @!method SetExitKey(key)
2093
+ # SetExitKey : Set a custom key to exit program (default is ESC)
2094
+ # @param key [int]
2095
+ # @return [void]
2096
+ [:SetExitKey, :SetExitKey, [:int], :void],
2097
+
2009
2098
  # @!method IsGamepadAvailable(gamepad)
2010
2099
  # IsGamepadAvailable : Check if a gamepad is available
2011
2100
  # @param gamepad [int]
@@ -2269,7 +2358,7 @@ module Raylib
2269
2358
  [:DrawLine, :DrawLine, [:int, :int, :int, :int, Color.by_value], :void],
2270
2359
 
2271
2360
  # @!method DrawLineV(startPos, endPos, color)
2272
- # DrawLineV : Draw a line (Vector version)
2361
+ # DrawLineV : Draw a line (using gl lines)
2273
2362
  # @param startPos [Vector2]
2274
2363
  # @param endPos [Vector2]
2275
2364
  # @param color [Color]
@@ -2277,7 +2366,7 @@ module Raylib
2277
2366
  [:DrawLineV, :DrawLineV, [Vector2.by_value, Vector2.by_value, Color.by_value], :void],
2278
2367
 
2279
2368
  # @!method DrawLineEx(startPos, endPos, thick, color)
2280
- # DrawLineEx : Draw a line defining thickness
2369
+ # DrawLineEx : Draw a line (using triangles/quads)
2281
2370
  # @param startPos [Vector2]
2282
2371
  # @param endPos [Vector2]
2283
2372
  # @param thick [float]
@@ -2285,61 +2374,22 @@ module Raylib
2285
2374
  # @return [void]
2286
2375
  [:DrawLineEx, :DrawLineEx, [Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2287
2376
 
2288
- # @!method DrawLineBezier(startPos, endPos, thick, color)
2289
- # DrawLineBezier : Draw a line using cubic-bezier curves in-out
2290
- # @param startPos [Vector2]
2291
- # @param endPos [Vector2]
2292
- # @param thick [float]
2293
- # @param color [Color]
2294
- # @return [void]
2295
- [:DrawLineBezier, :DrawLineBezier, [Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2296
-
2297
- # @!method DrawLineBezierQuad(startPos, endPos, controlPos, thick, color)
2298
- # DrawLineBezierQuad : Draw line using quadratic bezier curves with a control point
2299
- # @param startPos [Vector2]
2300
- # @param endPos [Vector2]
2301
- # @param controlPos [Vector2]
2302
- # @param thick [float]
2303
- # @param color [Color]
2304
- # @return [void]
2305
- [:DrawLineBezierQuad, :DrawLineBezierQuad, [Vector2.by_value, Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2306
-
2307
- # @!method DrawLineBezierCubic(startPos, endPos, startControlPos, endControlPos, thick, color)
2308
- # DrawLineBezierCubic : Draw line using cubic bezier curves with 2 control points
2309
- # @param startPos [Vector2]
2310
- # @param endPos [Vector2]
2311
- # @param startControlPos [Vector2]
2312
- # @param endControlPos [Vector2]
2313
- # @param thick [float]
2314
- # @param color [Color]
2315
- # @return [void]
2316
- [:DrawLineBezierCubic, :DrawLineBezierCubic, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2317
-
2318
- # @!method DrawLineBSpline(points, pointCount, thick, color)
2319
- # DrawLineBSpline : Draw a B-Spline line, minimum 4 points
2377
+ # @!method DrawLineStrip(points, pointCount, color)
2378
+ # DrawLineStrip : Draw lines sequence (using gl lines)
2320
2379
  # @param points [Vector2 *]
2321
2380
  # @param pointCount [int]
2322
- # @param thick [float]
2323
2381
  # @param color [Color]
2324
2382
  # @return [void]
2325
- [:DrawLineBSpline, :DrawLineBSpline, [:pointer, :int, :float, Color.by_value], :void],
2383
+ [:DrawLineStrip, :DrawLineStrip, [:pointer, :int, Color.by_value], :void],
2326
2384
 
2327
- # @!method DrawLineCatmullRom(points, pointCount, thick, color)
2328
- # DrawLineCatmullRom : Draw a Catmull Rom spline line, minimum 4 points
2329
- # @param points [Vector2 *]
2330
- # @param pointCount [int]
2385
+ # @!method DrawLineBezier(startPos, endPos, thick, color)
2386
+ # DrawLineBezier : Draw line segment cubic-bezier in-out interpolation
2387
+ # @param startPos [Vector2]
2388
+ # @param endPos [Vector2]
2331
2389
  # @param thick [float]
2332
2390
  # @param color [Color]
2333
2391
  # @return [void]
2334
- [:DrawLineCatmullRom, :DrawLineCatmullRom, [:pointer, :int, :float, Color.by_value], :void],
2335
-
2336
- # @!method DrawLineStrip(points, pointCount, color)
2337
- # DrawLineStrip : Draw lines sequence
2338
- # @param points [Vector2 *]
2339
- # @param pointCount [int]
2340
- # @param color [Color]
2341
- # @return [void]
2342
- [:DrawLineStrip, :DrawLineStrip, [:pointer, :int, Color.by_value], :void],
2392
+ [:DrawLineBezier, :DrawLineBezier, [Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2343
2393
 
2344
2394
  # @!method DrawCircle(centerX, centerY, radius, color)
2345
2395
  # DrawCircle : Draw a color-filled circle
@@ -2399,6 +2449,14 @@ module Raylib
2399
2449
  # @return [void]
2400
2450
  [:DrawCircleLines, :DrawCircleLines, [:int, :int, :float, Color.by_value], :void],
2401
2451
 
2452
+ # @!method DrawCircleLinesV(center, radius, color)
2453
+ # DrawCircleLinesV : Draw circle outline (Vector version)
2454
+ # @param center [Vector2]
2455
+ # @param radius [float]
2456
+ # @param color [Color]
2457
+ # @return [void]
2458
+ [:DrawCircleLinesV, :DrawCircleLinesV, [Vector2.by_value, :float, Color.by_value], :void],
2459
+
2402
2460
  # @!method DrawEllipse(centerX, centerY, radiusH, radiusV, color)
2403
2461
  # DrawEllipse : Draw ellipse
2404
2462
  # @param centerX [int]
@@ -2611,6 +2669,150 @@ module Raylib
2611
2669
  # @return [void]
2612
2670
  [:DrawPolyLinesEx, :DrawPolyLinesEx, [Vector2.by_value, :int, :float, :float, :float, Color.by_value], :void],
2613
2671
 
2672
+ # @!method DrawSplineLinear(points, pointCount, thick, color)
2673
+ # DrawSplineLinear : Draw spline: Linear, minimum 2 points
2674
+ # @param points [Vector2 *]
2675
+ # @param pointCount [int]
2676
+ # @param thick [float]
2677
+ # @param color [Color]
2678
+ # @return [void]
2679
+ [:DrawSplineLinear, :DrawSplineLinear, [:pointer, :int, :float, Color.by_value], :void],
2680
+
2681
+ # @!method DrawSplineBasis(points, pointCount, thick, color)
2682
+ # DrawSplineBasis : Draw spline: B-Spline, minimum 4 points
2683
+ # @param points [Vector2 *]
2684
+ # @param pointCount [int]
2685
+ # @param thick [float]
2686
+ # @param color [Color]
2687
+ # @return [void]
2688
+ [:DrawSplineBasis, :DrawSplineBasis, [:pointer, :int, :float, Color.by_value], :void],
2689
+
2690
+ # @!method DrawSplineCatmullRom(points, pointCount, thick, color)
2691
+ # DrawSplineCatmullRom : Draw spline: Catmull-Rom, minimum 4 points
2692
+ # @param points [Vector2 *]
2693
+ # @param pointCount [int]
2694
+ # @param thick [float]
2695
+ # @param color [Color]
2696
+ # @return [void]
2697
+ [:DrawSplineCatmullRom, :DrawSplineCatmullRom, [:pointer, :int, :float, Color.by_value], :void],
2698
+
2699
+ # @!method DrawSplineBezierQuadratic(points, pointCount, thick, color)
2700
+ # DrawSplineBezierQuadratic : Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
2701
+ # @param points [Vector2 *]
2702
+ # @param pointCount [int]
2703
+ # @param thick [float]
2704
+ # @param color [Color]
2705
+ # @return [void]
2706
+ [:DrawSplineBezierQuadratic, :DrawSplineBezierQuadratic, [:pointer, :int, :float, Color.by_value], :void],
2707
+
2708
+ # @!method DrawSplineBezierCubic(points, pointCount, thick, color)
2709
+ # DrawSplineBezierCubic : Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
2710
+ # @param points [Vector2 *]
2711
+ # @param pointCount [int]
2712
+ # @param thick [float]
2713
+ # @param color [Color]
2714
+ # @return [void]
2715
+ [:DrawSplineBezierCubic, :DrawSplineBezierCubic, [:pointer, :int, :float, Color.by_value], :void],
2716
+
2717
+ # @!method DrawSplineSegmentLinear(p1, p2, thick, color)
2718
+ # DrawSplineSegmentLinear : Draw spline segment: Linear, 2 points
2719
+ # @param p1 [Vector2]
2720
+ # @param p2 [Vector2]
2721
+ # @param thick [float]
2722
+ # @param color [Color]
2723
+ # @return [void]
2724
+ [:DrawSplineSegmentLinear, :DrawSplineSegmentLinear, [Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2725
+
2726
+ # @!method DrawSplineSegmentBasis(p1, p2, p3, p4, thick, color)
2727
+ # DrawSplineSegmentBasis : Draw spline segment: B-Spline, 4 points
2728
+ # @param p1 [Vector2]
2729
+ # @param p2 [Vector2]
2730
+ # @param p3 [Vector2]
2731
+ # @param p4 [Vector2]
2732
+ # @param thick [float]
2733
+ # @param color [Color]
2734
+ # @return [void]
2735
+ [:DrawSplineSegmentBasis, :DrawSplineSegmentBasis, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2736
+
2737
+ # @!method DrawSplineSegmentCatmullRom(p1, p2, p3, p4, thick, color)
2738
+ # DrawSplineSegmentCatmullRom : Draw spline segment: Catmull-Rom, 4 points
2739
+ # @param p1 [Vector2]
2740
+ # @param p2 [Vector2]
2741
+ # @param p3 [Vector2]
2742
+ # @param p4 [Vector2]
2743
+ # @param thick [float]
2744
+ # @param color [Color]
2745
+ # @return [void]
2746
+ [:DrawSplineSegmentCatmullRom, :DrawSplineSegmentCatmullRom, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2747
+
2748
+ # @!method DrawSplineSegmentBezierQuadratic(p1, c2, p3, thick, color)
2749
+ # DrawSplineSegmentBezierQuadratic : Draw spline segment: Quadratic Bezier, 2 points, 1 control point
2750
+ # @param p1 [Vector2]
2751
+ # @param c2 [Vector2]
2752
+ # @param p3 [Vector2]
2753
+ # @param thick [float]
2754
+ # @param color [Color]
2755
+ # @return [void]
2756
+ [:DrawSplineSegmentBezierQuadratic, :DrawSplineSegmentBezierQuadratic, [Vector2.by_value, Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2757
+
2758
+ # @!method DrawSplineSegmentBezierCubic(p1, c2, c3, p4, thick, color)
2759
+ # DrawSplineSegmentBezierCubic : Draw spline segment: Cubic Bezier, 2 points, 2 control points
2760
+ # @param p1 [Vector2]
2761
+ # @param c2 [Vector2]
2762
+ # @param c3 [Vector2]
2763
+ # @param p4 [Vector2]
2764
+ # @param thick [float]
2765
+ # @param color [Color]
2766
+ # @return [void]
2767
+ [:DrawSplineSegmentBezierCubic, :DrawSplineSegmentBezierCubic, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void],
2768
+
2769
+ # @!method GetSplinePointLinear(startPos, endPos, t)
2770
+ # GetSplinePointLinear : Get (evaluate) spline point: Linear
2771
+ # @param startPos [Vector2]
2772
+ # @param endPos [Vector2]
2773
+ # @param t [float]
2774
+ # @return [Vector2]
2775
+ [:GetSplinePointLinear, :GetSplinePointLinear, [Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
2776
+
2777
+ # @!method GetSplinePointBasis(p1, p2, p3, p4, t)
2778
+ # GetSplinePointBasis : Get (evaluate) spline point: B-Spline
2779
+ # @param p1 [Vector2]
2780
+ # @param p2 [Vector2]
2781
+ # @param p3 [Vector2]
2782
+ # @param p4 [Vector2]
2783
+ # @param t [float]
2784
+ # @return [Vector2]
2785
+ [:GetSplinePointBasis, :GetSplinePointBasis, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
2786
+
2787
+ # @!method GetSplinePointCatmullRom(p1, p2, p3, p4, t)
2788
+ # GetSplinePointCatmullRom : Get (evaluate) spline point: Catmull-Rom
2789
+ # @param p1 [Vector2]
2790
+ # @param p2 [Vector2]
2791
+ # @param p3 [Vector2]
2792
+ # @param p4 [Vector2]
2793
+ # @param t [float]
2794
+ # @return [Vector2]
2795
+ [:GetSplinePointCatmullRom, :GetSplinePointCatmullRom, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
2796
+
2797
+ # @!method GetSplinePointBezierQuad(p1, c2, p3, t)
2798
+ # GetSplinePointBezierQuad : Get (evaluate) spline point: Quadratic Bezier
2799
+ # @param p1 [Vector2]
2800
+ # @param c2 [Vector2]
2801
+ # @param p3 [Vector2]
2802
+ # @param t [float]
2803
+ # @return [Vector2]
2804
+ [:GetSplinePointBezierQuad, :GetSplinePointBezierQuad, [Vector2.by_value, Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
2805
+
2806
+ # @!method GetSplinePointBezierCubic(p1, c2, c3, p4, t)
2807
+ # GetSplinePointBezierCubic : Get (evaluate) spline point: Cubic Bezier
2808
+ # @param p1 [Vector2]
2809
+ # @param c2 [Vector2]
2810
+ # @param c3 [Vector2]
2811
+ # @param p4 [Vector2]
2812
+ # @param t [float]
2813
+ # @return [Vector2]
2814
+ [:GetSplinePointBezierCubic, :GetSplinePointBezierCubic, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
2815
+
2614
2816
  # @!method CheckCollisionRecs(rec1, rec2)
2615
2817
  # CheckCollisionRecs : Check collision between two rectangles
2616
2818
  # @param rec1 [Rectangle]
@@ -4476,6 +4678,11 @@ module Raylib
4476
4678
  # @return [void]
4477
4679
  [:SetMasterVolume, :SetMasterVolume, [:float], :void],
4478
4680
 
4681
+ # @!method GetMasterVolume()
4682
+ # GetMasterVolume : Get master volume (listener)
4683
+ # @return [float]
4684
+ [:GetMasterVolume, :GetMasterVolume, [], :float],
4685
+
4479
4686
  # @!method LoadWave(fileName)
4480
4687
  # LoadWave : Load wave data from file
4481
4688
  # @param fileName [const char *]
data/lib/rlgl.rb CHANGED
@@ -590,6 +590,20 @@ module Raylib
590
590
  # @return [void]
591
591
  [:rlActiveDrawBuffers, :rlActiveDrawBuffers, [:int], :void],
592
592
 
593
+ # @!method rlBlitFramebuffer(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask)
594
+ # rlBlitFramebuffer : Blit active framebuffer to main framebuffer
595
+ # @param srcX [int]
596
+ # @param srcY [int]
597
+ # @param srcWidth [int]
598
+ # @param srcHeight [int]
599
+ # @param dstX [int]
600
+ # @param dstY [int]
601
+ # @param dstWidth [int]
602
+ # @param dstHeight [int]
603
+ # @param bufferMask [int]
604
+ # @return [void]
605
+ [:rlBlitFramebuffer, :rlBlitFramebuffer, [:int, :int, :int, :int, :int, :int, :int, :int, :int], :void],
606
+
593
607
  # @!method rlEnableColorBlend()
594
608
  # rlEnableColorBlend : Enable color blending
595
609
  # @return [void]
@@ -660,8 +674,13 @@ module Raylib
660
674
  # @return [void]
661
675
  [:rlEnableWireMode, :rlEnableWireMode, [], :void],
662
676
 
677
+ # @!method rlEnablePointMode()
678
+ # rlEnablePointMode : Enable point mode
679
+ # @return [void]
680
+ [:rlEnablePointMode, :rlEnablePointMode, [], :void],
681
+
663
682
  # @!method rlDisableWireMode()
664
- # rlDisableWireMode : Disable wire mode
683
+ # rlDisableWireMode : Disable wire mode ( and point ) maybe rename
665
684
  # @return [void]
666
685
  [:rlDisableWireMode, :rlDisableWireMode, [], :void],
667
686
 
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.5.7
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-10 00:00:00.000000000 Z
11
+ date: 2023-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -38,7 +38,9 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2'
41
- description: 'Ruby bindings for Raylib ( https://github.com/raysan5/raylib ).
41
+ description: 'Ruby bindings for raylib ( https://github.com/raysan5/raylib ), raygui
42
+ ( https://github.com/raysan5/raygui ) and Physac ( https://github.com/raysan5/physac
43
+ ).
42
44
 
43
45
  '
44
46
  email:
@@ -52,19 +54,7 @@ files:
52
54
  - README.md
53
55
  - examples/template.rb
54
56
  - lib/config.rb
55
- - lib/libraylib.aarch64.so
56
- - lib/libraylib.dll
57
- - lib/libraylib.dylib
58
- - lib/libraylib.x86_64.so
59
- - lib/physac.aarch64.so
60
- - lib/physac.dll
61
- - lib/physac.dylib
62
57
  - lib/physac.rb
63
- - lib/physac.x86_64.so
64
- - lib/raygui.aarch64.so
65
- - lib/raygui.dll
66
- - lib/raygui.dylib
67
- - lib/raygui.x86_64.so
68
58
  - lib/raygui_helper.rb
69
59
  - lib/raygui_main.rb
70
60
  - lib/raylib.rb
@@ -95,5 +85,5 @@ requirements: []
95
85
  rubygems_version: 3.4.20
96
86
  signing_key:
97
87
  specification_version: 4
98
- summary: Provides latest raylib API for Ruby
88
+ summary: Ruby bindings for raylib, raygui and Physac
99
89
  test_files: []
Binary file
data/lib/libraylib.dll DELETED
Binary file
data/lib/libraylib.dylib DELETED
Binary file
Binary file
Binary file
data/lib/physac.dll DELETED
Binary file
data/lib/physac.dylib DELETED
Binary file
data/lib/physac.x86_64.so DELETED
Binary file
Binary file
data/lib/raygui.dll DELETED
Binary file
data/lib/raygui.dylib DELETED
Binary file
data/lib/raygui.x86_64.so DELETED
Binary file