raylib-bindings 0.0.8 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8593b9ef115baafa884f5d0e2b8e47248b415f0070c0d30bda2159e544cc41a9
4
- data.tar.gz: 6338b99322c0abc4f6404e80ca9b7cecd98c3a9b1b6ab8a1455e00f638cff3f0
3
+ metadata.gz: 0ae2ed8883b7178ae1ba22db3f15ebad4a38c43958211feb7af947c2ed66869f
4
+ data.tar.gz: e8cec377cb402a7e4ef9b6625628fc13ccac1c2d82b46a9285094ceac8c06a11
5
5
  SHA512:
6
- metadata.gz: 378cc6b3cf55d646b6c4295db4e1581cf4772e32cad2e1ecc3bc2aab147bafd9552cd75517aa2191b6c8fc3e75ba4d60907e731f27c234bb21cdf46075861d4d
7
- data.tar.gz: b3ac769d989b37e4a5501bdff70fc8bdda35a7fc08eba28b1b9073fb210356cea0be750b6599cc73923b22a348adb7928fe0cbcfeeb872e048b4794c98b5c1fa
6
+ metadata.gz: a283d8d05d6b3be982147569bca5384b46d192a3232131b6385f4596bcb285be8c07553646261180ea85437bfa3978ff3557b56adf95a26526fb1925e895a53d
7
+ data.tar.gz: 86be92151b1a124a90f82471dce30e97d621681fe6c97991cda889be13944d5e3d68a6052f7acd1e229f2f72586d2442550b68be45a6c8d5132d10b55adf3f58
data/ChangeLog CHANGED
@@ -1,3 +1,16 @@
1
+ 2022-07-18 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * examples/core_storage_values.rb: Removed ( see https://github.com/raysan5/raylib/commit/e722a8dbef59cf0ecccf141af61e1e1c8a24849f )
4
+ * examples/core_drop_files.rb: Updated ( see https://github.com/raysan5/raylib/commit/b8f67c628553cb9199f51efc9b20eb5991d58e8f )
5
+ * Updated DLLs
6
+ * examples/textures_sprite_anim.rb: Added
7
+ * examples/textures_gif_player.rb: Added
8
+
9
+ 2022-07-17 vaiorabbit <http://twitter.com/vaiorabbit>
10
+
11
+ * Pulled latest raylib ( https://github.com/raysan5/raylib/commit/49a534b5d478fd2f195380143ded4f0ab764c228 ) / and raygui ( https://github.com/raysan5/raygui/commit/9c826f213f5b287159a0b0e1a0670a27c09dcc7e )
12
+ * physac_dll now refers new repository ( https://github.com/raysan5/physac )
13
+
1
14
  2022-06-08 vaiorabbit <http://twitter.com/vaiorabbit>
2
15
 
3
16
  * Pulled latest raylib ( https://github.com/raysan5/raylib/commit/70ec71a373db426685590127122e77bfd66cbf69 ) / and raygui ( https://github.com/raysan5/raygui/commit/47269f30ce55f0399096d1bee4188b8b8c0d7186 )
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 : 2022-06-08
6
+ * Last modified : 2022-07-18
7
7
 
8
8
  Provides Ruby bindings for raylib-related libraries including:
9
9
 
@@ -12,7 +12,7 @@ Provides Ruby bindings for raylib-related libraries including:
12
12
  * raymath
13
13
  * rlgl
14
14
  * [raygui](https://github.com/raysan5/raygui)
15
- * [Physac](https://github.com/victorfisac/Physac)
15
+ * [Physac](https://github.com/raysan5/physac)
16
16
 
17
17
  ## Features ##
18
18
 
@@ -33,8 +33,9 @@ Provides Ruby bindings for raylib-related libraries including:
33
33
  * Tested on:
34
34
  * [macOS] clang
35
35
 
36
- Apple clang version 13.0.0 (clang-1300.0.29.3)
37
- Target: arm64-apple-darwin20.6.0
36
+ $ clang --version
37
+ Apple clang version 13.1.6 (clang-1316.0.21.2.3)
38
+ Target: arm64-apple-darwin21.5.0
38
39
  Thread model: posix
39
40
  InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
40
41
 
data/lib/libraylib.dll CHANGED
Binary file
data/lib/libraylib.dylib CHANGED
Binary file
data/lib/physac.dll CHANGED
Binary file
data/lib/physac.dylib CHANGED
Binary file
data/lib/physac.rb CHANGED
@@ -13,7 +13,6 @@ module Raylib
13
13
  PHYSAC_MAX_BODIES = 64
14
14
  PHYSAC_MAX_MANIFOLDS = 4096
15
15
  PHYSAC_MAX_VERTICES = 24
16
- PHYSAC_CIRCLE_VERTICES = 24
17
16
  PHYSAC_COLLISION_ITERATIONS = 100
18
17
  PHYSAC_PENETRATION_ALLOWANCE = 0.05
19
18
  PHYSAC_PENETRATION_CORRECTION = 0.4
@@ -32,7 +31,7 @@ module Raylib
32
31
 
33
32
  # Struct
34
33
 
35
- class Mat2 < FFI::Struct
34
+ class Matrix2x2 < FFI::Struct
36
35
  layout(
37
36
  :m00, :float,
38
37
  :m01, :float,
@@ -41,7 +40,7 @@ module Raylib
41
40
  )
42
41
  end
43
42
 
44
- class PolygonData < FFI::Struct
43
+ class PhysicsVertexData < FFI::Struct
45
44
  layout(
46
45
  :vertexCount, :uint,
47
46
  :positions, [Vector2, 24],
@@ -53,9 +52,9 @@ module Raylib
53
52
  layout(
54
53
  :type, :int,
55
54
  :body, :pointer,
55
+ :vertexData, PhysicsVertexData,
56
56
  :radius, :float,
57
- :transform, Mat2,
58
- :vertexData, PolygonData,
57
+ :transform, Matrix2x2,
59
58
  )
60
59
  end
61
60
 
@@ -104,66 +103,66 @@ module Raylib
104
103
  def self.setup_physac_symbols()
105
104
  symbols = [
106
105
  :InitPhysics,
107
- :RunPhysicsStep,
106
+ :UpdatePhysics,
107
+ :ResetPhysics,
108
+ :ClosePhysics,
108
109
  :SetPhysicsTimeStep,
109
- :IsPhysicsEnabled,
110
110
  :SetPhysicsGravity,
111
111
  :CreatePhysicsBodyCircle,
112
112
  :CreatePhysicsBodyRectangle,
113
113
  :CreatePhysicsBodyPolygon,
114
+ :DestroyPhysicsBody,
114
115
  :PhysicsAddForce,
115
116
  :PhysicsAddTorque,
116
117
  :PhysicsShatter,
117
- :GetPhysicsBodiesCount,
118
+ :SetPhysicsBodyRotation,
118
119
  :GetPhysicsBody,
120
+ :GetPhysicsBodiesCount,
119
121
  :GetPhysicsShapeType,
120
122
  :GetPhysicsShapeVerticesCount,
121
123
  :GetPhysicsShapeVertex,
122
- :SetPhysicsBodyRotation,
123
- :DestroyPhysicsBody,
124
- :ClosePhysics,
125
124
  ]
126
125
  args = {
127
126
  :InitPhysics => [],
128
- :RunPhysicsStep => [],
127
+ :UpdatePhysics => [],
128
+ :ResetPhysics => [],
129
+ :ClosePhysics => [],
129
130
  :SetPhysicsTimeStep => [:double],
130
- :IsPhysicsEnabled => [],
131
131
  :SetPhysicsGravity => [:float, :float],
132
132
  :CreatePhysicsBodyCircle => [Vector2.by_value, :float, :float],
133
133
  :CreatePhysicsBodyRectangle => [Vector2.by_value, :float, :float, :float],
134
134
  :CreatePhysicsBodyPolygon => [Vector2.by_value, :float, :int, :float],
135
+ :DestroyPhysicsBody => [:pointer],
135
136
  :PhysicsAddForce => [:pointer, Vector2.by_value],
136
137
  :PhysicsAddTorque => [:pointer, :float],
137
138
  :PhysicsShatter => [:pointer, Vector2.by_value, :float],
138
- :GetPhysicsBodiesCount => [],
139
+ :SetPhysicsBodyRotation => [:pointer, :float],
139
140
  :GetPhysicsBody => [:int],
141
+ :GetPhysicsBodiesCount => [],
140
142
  :GetPhysicsShapeType => [:int],
141
143
  :GetPhysicsShapeVerticesCount => [:int],
142
144
  :GetPhysicsShapeVertex => [:pointer, :int],
143
- :SetPhysicsBodyRotation => [:pointer, :float],
144
- :DestroyPhysicsBody => [:pointer],
145
- :ClosePhysics => [],
146
145
  }
147
146
  retvals = {
148
147
  :InitPhysics => :void,
149
- :RunPhysicsStep => :void,
148
+ :UpdatePhysics => :void,
149
+ :ResetPhysics => :void,
150
+ :ClosePhysics => :void,
150
151
  :SetPhysicsTimeStep => :void,
151
- :IsPhysicsEnabled => :bool,
152
152
  :SetPhysicsGravity => :void,
153
153
  :CreatePhysicsBodyCircle => :pointer,
154
154
  :CreatePhysicsBodyRectangle => :pointer,
155
155
  :CreatePhysicsBodyPolygon => :pointer,
156
+ :DestroyPhysicsBody => :void,
156
157
  :PhysicsAddForce => :void,
157
158
  :PhysicsAddTorque => :void,
158
159
  :PhysicsShatter => :void,
159
- :GetPhysicsBodiesCount => :int,
160
+ :SetPhysicsBodyRotation => :void,
160
161
  :GetPhysicsBody => :pointer,
162
+ :GetPhysicsBodiesCount => :int,
161
163
  :GetPhysicsShapeType => :int,
162
164
  :GetPhysicsShapeVerticesCount => :int,
163
165
  :GetPhysicsShapeVertex => Vector2.by_value,
164
- :SetPhysicsBodyRotation => :void,
165
- :DestroyPhysicsBody => :void,
166
- :ClosePhysics => :void,
167
166
  }
168
167
  symbols.each do |sym|
169
168
  begin
data/lib/raygui.dll CHANGED
Binary file
data/lib/raygui.dylib CHANGED
Binary file
data/lib/raylib_main.rb CHANGED
@@ -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
@@ -661,6 +662,14 @@ module Raylib
661
662
  )
662
663
  end
663
664
 
665
+ class FilePathList < FFI::Struct
666
+ layout(
667
+ :capacity, :uint,
668
+ :count, :uint,
669
+ :paths, :pointer,
670
+ )
671
+ end
672
+
664
673
 
665
674
  # Function
666
675
 
@@ -767,6 +776,7 @@ module Raylib
767
776
  :MemAlloc,
768
777
  :MemRealloc,
769
778
  :MemFree,
779
+ :OpenURL,
770
780
  :SetTraceLogCallback,
771
781
  :SetLoadFileDataCallback,
772
782
  :SetSaveFileDataCallback,
@@ -791,7 +801,9 @@ module Raylib
791
801
  :GetWorkingDirectory,
792
802
  :GetApplicationDirectory,
793
803
  :ChangeDirectory,
804
+ :IsPathFile,
794
805
  :LoadDirectoryFiles,
806
+ :LoadDirectoryFilesEx,
795
807
  :UnloadDirectoryFiles,
796
808
  :IsFileDropped,
797
809
  :LoadDroppedFiles,
@@ -801,9 +813,6 @@ module Raylib
801
813
  :DecompressData,
802
814
  :EncodeDataBase64,
803
815
  :DecodeDataBase64,
804
- :SaveStorageValue,
805
- :LoadStorageValue,
806
- :OpenURL,
807
816
  :IsKeyPressed,
808
817
  :IsKeyDown,
809
818
  :IsKeyReleased,
@@ -833,6 +842,7 @@ module Raylib
833
842
  :SetMouseOffset,
834
843
  :SetMouseScale,
835
844
  :GetMouseWheelMove,
845
+ :GetMouseWheelMoveV,
836
846
  :SetMouseCursor,
837
847
  :GetTouchX,
838
848
  :GetTouchY,
@@ -1078,7 +1088,6 @@ module Raylib
1078
1088
  :ExportMesh,
1079
1089
  :GetMeshBoundingBox,
1080
1090
  :GenMeshTangents,
1081
- :GenMeshBinormals,
1082
1091
  :GenMeshPoly,
1083
1092
  :GenMeshPlane,
1084
1093
  :GenMeshCube,
@@ -1271,6 +1280,7 @@ module Raylib
1271
1280
  :MemAlloc => [:int],
1272
1281
  :MemRealloc => [:pointer, :int],
1273
1282
  :MemFree => [:pointer],
1283
+ :OpenURL => [:pointer],
1274
1284
  :SetTraceLogCallback => [:TraceLogCallback],
1275
1285
  :SetLoadFileDataCallback => [:LoadFileDataCallback],
1276
1286
  :SetSaveFileDataCallback => [:SaveFileDataCallback],
@@ -1295,19 +1305,18 @@ module Raylib
1295
1305
  :GetWorkingDirectory => [],
1296
1306
  :GetApplicationDirectory => [],
1297
1307
  :ChangeDirectory => [:pointer],
1298
- :LoadDirectoryFiles => [:pointer, :pointer],
1299
- :UnloadDirectoryFiles => [],
1308
+ :IsPathFile => [:pointer],
1309
+ :LoadDirectoryFiles => [:pointer],
1310
+ :LoadDirectoryFilesEx => [:pointer, :pointer, :bool],
1311
+ :UnloadDirectoryFiles => [FilePathList.by_value],
1300
1312
  :IsFileDropped => [],
1301
- :LoadDroppedFiles => [:pointer],
1302
- :UnloadDroppedFiles => [],
1313
+ :LoadDroppedFiles => [],
1314
+ :UnloadDroppedFiles => [FilePathList.by_value],
1303
1315
  :GetFileModTime => [:pointer],
1304
1316
  :CompressData => [:pointer, :int, :pointer],
1305
1317
  :DecompressData => [:pointer, :int, :pointer],
1306
1318
  :EncodeDataBase64 => [:pointer, :int, :pointer],
1307
1319
  :DecodeDataBase64 => [:pointer, :pointer],
1308
- :SaveStorageValue => [:uint, :int],
1309
- :LoadStorageValue => [:uint],
1310
- :OpenURL => [:pointer],
1311
1320
  :IsKeyPressed => [:int],
1312
1321
  :IsKeyDown => [:int],
1313
1322
  :IsKeyReleased => [:int],
@@ -1337,6 +1346,7 @@ module Raylib
1337
1346
  :SetMouseOffset => [:int, :int],
1338
1347
  :SetMouseScale => [:float, :float],
1339
1348
  :GetMouseWheelMove => [],
1349
+ :GetMouseWheelMoveV => [],
1340
1350
  :SetMouseCursor => [:int],
1341
1351
  :GetTouchX => [],
1342
1352
  :GetTouchY => [],
@@ -1582,7 +1592,6 @@ module Raylib
1582
1592
  :ExportMesh => [Mesh.by_value, :pointer],
1583
1593
  :GetMeshBoundingBox => [Mesh.by_value],
1584
1594
  :GenMeshTangents => [:pointer],
1585
- :GenMeshBinormals => [:pointer],
1586
1595
  :GenMeshPoly => [:int, :float],
1587
1596
  :GenMeshPlane => [:float, :float, :int, :int],
1588
1597
  :GenMeshCube => [:float, :float, :float],
@@ -1775,6 +1784,7 @@ module Raylib
1775
1784
  :MemAlloc => :pointer,
1776
1785
  :MemRealloc => :pointer,
1777
1786
  :MemFree => :void,
1787
+ :OpenURL => :void,
1778
1788
  :SetTraceLogCallback => :void,
1779
1789
  :SetLoadFileDataCallback => :void,
1780
1790
  :SetSaveFileDataCallback => :void,
@@ -1799,19 +1809,18 @@ module Raylib
1799
1809
  :GetWorkingDirectory => :pointer,
1800
1810
  :GetApplicationDirectory => :pointer,
1801
1811
  :ChangeDirectory => :bool,
1802
- :LoadDirectoryFiles => :pointer,
1812
+ :IsPathFile => :bool,
1813
+ :LoadDirectoryFiles => FilePathList.by_value,
1814
+ :LoadDirectoryFilesEx => FilePathList.by_value,
1803
1815
  :UnloadDirectoryFiles => :void,
1804
1816
  :IsFileDropped => :bool,
1805
- :LoadDroppedFiles => :pointer,
1817
+ :LoadDroppedFiles => FilePathList.by_value,
1806
1818
  :UnloadDroppedFiles => :void,
1807
1819
  :GetFileModTime => :long,
1808
1820
  :CompressData => :pointer,
1809
1821
  :DecompressData => :pointer,
1810
1822
  :EncodeDataBase64 => :pointer,
1811
1823
  :DecodeDataBase64 => :pointer,
1812
- :SaveStorageValue => :bool,
1813
- :LoadStorageValue => :int,
1814
- :OpenURL => :void,
1815
1824
  :IsKeyPressed => :bool,
1816
1825
  :IsKeyDown => :bool,
1817
1826
  :IsKeyReleased => :bool,
@@ -1841,6 +1850,7 @@ module Raylib
1841
1850
  :SetMouseOffset => :void,
1842
1851
  :SetMouseScale => :void,
1843
1852
  :GetMouseWheelMove => :float,
1853
+ :GetMouseWheelMoveV => Vector2.by_value,
1844
1854
  :SetMouseCursor => :void,
1845
1855
  :GetTouchX => :int,
1846
1856
  :GetTouchY => :int,
@@ -2086,7 +2096,6 @@ module Raylib
2086
2096
  :ExportMesh => :bool,
2087
2097
  :GetMeshBoundingBox => BoundingBox.by_value,
2088
2098
  :GenMeshTangents => :void,
2089
- :GenMeshBinormals => :void,
2090
2099
  :GenMeshPoly => Mesh.by_value,
2091
2100
  :GenMeshPlane => Mesh.by_value,
2092
2101
  :GenMeshCube => Mesh.by_value,
data/lib/raymath.rb CHANGED
@@ -41,6 +41,7 @@ module Raylib
41
41
  :Lerp,
42
42
  :Normalize,
43
43
  :Remap,
44
+ :Wrap,
44
45
  :FloatEquals,
45
46
  :Vector2Zero,
46
47
  :Vector2One,
@@ -152,6 +153,7 @@ module Raylib
152
153
  :Lerp => [:float, :float, :float],
153
154
  :Normalize => [:float, :float, :float],
154
155
  :Remap => [:float, :float, :float, :float, :float],
156
+ :Wrap => [:float, :float, :float],
155
157
  :FloatEquals => [:float, :float],
156
158
  :Vector2Zero => [],
157
159
  :Vector2One => [],
@@ -263,6 +265,7 @@ module Raylib
263
265
  :Lerp => :float,
264
266
  :Normalize => :float,
265
267
  :Remap => :float,
268
+ :Wrap => :float,
266
269
  :FloatEquals => :int,
267
270
  :Vector2Zero => Vector2.by_value,
268
271
  :Vector2One => Vector2.by_value,
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.8
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-06-08 00:00:00.000000000 Z
11
+ date: 2022-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi