box2d-bindings 0.1.0-x64-mingw → 0.1.2-x64-mingw

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.
@@ -1,47 +0,0 @@
1
- # Ruby-Box2D : Yet another Box2D wrapper for Ruby
2
- #
3
- # * https://github.com/vaiorabbit/box2d-bindings
4
- #
5
- # [NOTICE] Autogenerated. Do not edit.
6
-
7
- require 'ffi'
8
-
9
- module Box2D
10
- extend FFI::Library
11
- # Define/Macro
12
-
13
-
14
- # Enum
15
-
16
-
17
- # Typedef
18
-
19
-
20
- # Struct
21
-
22
-
23
- # Function
24
-
25
- def self.setup_collision_inline_symbols(method_naming: :original)
26
- entries = [
27
- [:DynamicTree_GetUserData, :b2DynamicTree_GetUserData, [:pointer, :int], :int],
28
- [:DynamicTree_GetAABB, :b2DynamicTree_GetAABB, [:pointer, :int], AABB.by_value],
29
- ]
30
- entries.each do |entry|
31
- api_name = if method_naming == :snake_case
32
- snake_case_name = entry[0].to_s.gsub(/([A-Z]+)([A-Z0-9][a-z])/, '\1_\2').gsub(/([a-z\d])([A-Z0-9])/, '\1_\2').downcase
33
- snake_case_name.gsub!('vector_3', 'vector3_') if snake_case_name.include?('vector_3')
34
- snake_case_name.gsub!('vector_2', 'vector2_') if snake_case_name.include?('vector_2')
35
- snake_case_name.chop! if snake_case_name.end_with?('_')
36
- snake_case_name.to_sym
37
- else
38
- entry[0]
39
- end
40
- attach_function api_name, entry[1], entry[2], entry[3]
41
- rescue FFI::NotFoundError => e
42
- warn "[Warning] Failed to import #{entry[0]} (#{e})."
43
- end
44
- end
45
-
46
- end
47
-