sdl2-bindings 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/README.md +1 -1
- data/lib/sdl2.rb +2 -0
- data/lib/sdl2_cpuinfo.rb +2 -2
- data/lib/sdl2_main.rb +0 -2
- data/lib/sdl2_mixer.rb +3 -0
- data/lib/sdl2_rwops.rb +11 -11
- data/lib/sdl2_stdinc.rb +363 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b44a4c524258b47321ec0f533bf0cfbc403e70344709753642d12065767bdca
|
4
|
+
data.tar.gz: 8f58559080ee9ac74cad9ebd5bb45f5749f7113c3ed56edfd2a3279e7ca9909c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3b06dce293a4e46e6622fc2a8334029c280f08a0b86824b9d2107e4ff9a2b6472c047480324c88f2962d3a177334178ffc278512d7012c83bba37dd05654230
|
7
|
+
data.tar.gz: bc54d5210d40ab20587d89fa7cdb9d58d0e180b290bc8597f7b0b0aa037d8b628e467df696b3790e5af3b0afdee3e3d5c95e07bbf3337a1dd1b7513aaf90138b
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
data/lib/sdl2.rb
CHANGED
@@ -29,6 +29,7 @@ require_relative 'sdl2_render.rb'
|
|
29
29
|
require_relative 'sdl2_rwops.rb'
|
30
30
|
require_relative 'sdl2_scancode.rb'
|
31
31
|
require_relative 'sdl2_shape.rb'
|
32
|
+
require_relative 'sdl2_stdinc.rb'
|
32
33
|
require_relative 'sdl2_surface.rb'
|
33
34
|
require_relative 'sdl2_timer.rb'
|
34
35
|
require_relative 'sdl2_touch.rb'
|
@@ -113,6 +114,7 @@ module SDL2
|
|
113
114
|
setup_scancode_symbols()
|
114
115
|
setup_shape_symbols()
|
115
116
|
setup_surface_symbols()
|
117
|
+
setup_stdinc_symbols()
|
116
118
|
setup_timer_symbols()
|
117
119
|
setup_touch_symbols()
|
118
120
|
setup_version_symbols()
|
data/lib/sdl2_cpuinfo.rb
CHANGED
@@ -63,7 +63,7 @@ module SDL2
|
|
63
63
|
:SDL_HasNEON => [],
|
64
64
|
:SDL_GetSystemRAM => [],
|
65
65
|
:SDL_SIMDGetAlignment => [],
|
66
|
-
:SDL_SIMDAlloc => [:
|
66
|
+
:SDL_SIMDAlloc => [:int],
|
67
67
|
:SDL_SIMDFree => [:pointer],
|
68
68
|
}
|
69
69
|
retvals = {
|
@@ -83,7 +83,7 @@ module SDL2
|
|
83
83
|
:SDL_HasAVX512F => :int,
|
84
84
|
:SDL_HasNEON => :int,
|
85
85
|
:SDL_GetSystemRAM => :int,
|
86
|
-
:SDL_SIMDGetAlignment => :
|
86
|
+
:SDL_SIMDGetAlignment => :int,
|
87
87
|
:SDL_SIMDAlloc => :pointer,
|
88
88
|
:SDL_SIMDFree => :void,
|
89
89
|
}
|
data/lib/sdl2_main.rb
CHANGED
data/lib/sdl2_mixer.rb
CHANGED
data/lib/sdl2_rwops.rb
CHANGED
@@ -145,8 +145,8 @@ module SDL2
|
|
145
145
|
:SDL_RWsize => [:pointer],
|
146
146
|
:SDL_RWseek => [:pointer, :long_long, :int],
|
147
147
|
:SDL_RWtell => [:pointer],
|
148
|
-
:SDL_RWread => [:pointer, :pointer, :
|
149
|
-
:SDL_RWwrite => [:pointer, :pointer, :
|
148
|
+
:SDL_RWread => [:pointer, :pointer, :int, :int],
|
149
|
+
:SDL_RWwrite => [:pointer, :pointer, :int, :int],
|
150
150
|
:SDL_RWclose => [:pointer],
|
151
151
|
:SDL_LoadFile_RW => [:pointer, :pointer, :int],
|
152
152
|
:SDL_LoadFile => [:pointer, :pointer],
|
@@ -175,8 +175,8 @@ module SDL2
|
|
175
175
|
:SDL_RWsize => :long_long,
|
176
176
|
:SDL_RWseek => :long_long,
|
177
177
|
:SDL_RWtell => :long_long,
|
178
|
-
:SDL_RWread => :
|
179
|
-
:SDL_RWwrite => :
|
178
|
+
:SDL_RWread => :int,
|
179
|
+
:SDL_RWwrite => :int,
|
180
180
|
:SDL_RWclose => :int,
|
181
181
|
:SDL_LoadFile_RW => :pointer,
|
182
182
|
:SDL_LoadFile => :pointer,
|
@@ -187,13 +187,13 @@ module SDL2
|
|
187
187
|
:SDL_ReadBE32 => :uint,
|
188
188
|
:SDL_ReadLE64 => :ulong_long,
|
189
189
|
:SDL_ReadBE64 => :ulong_long,
|
190
|
-
:SDL_WriteU8 => :
|
191
|
-
:SDL_WriteLE16 => :
|
192
|
-
:SDL_WriteBE16 => :
|
193
|
-
:SDL_WriteLE32 => :
|
194
|
-
:SDL_WriteBE32 => :
|
195
|
-
:SDL_WriteLE64 => :
|
196
|
-
:SDL_WriteBE64 => :
|
190
|
+
:SDL_WriteU8 => :int,
|
191
|
+
:SDL_WriteLE16 => :int,
|
192
|
+
:SDL_WriteBE16 => :int,
|
193
|
+
:SDL_WriteLE32 => :int,
|
194
|
+
:SDL_WriteBE32 => :int,
|
195
|
+
:SDL_WriteLE64 => :int,
|
196
|
+
:SDL_WriteBE64 => :int,
|
197
197
|
}
|
198
198
|
symbols.each do |sym|
|
199
199
|
begin
|
data/lib/sdl2_stdinc.rb
ADDED
@@ -0,0 +1,363 @@
|
|
1
|
+
# Ruby-SDL2 : Yet another SDL2 wrapper for Ruby
|
2
|
+
#
|
3
|
+
# * https://github.com/vaiorabbit/sdl2-bindings
|
4
|
+
#
|
5
|
+
# [NOTICE] This is an automatically generated file.
|
6
|
+
|
7
|
+
require 'ffi'
|
8
|
+
|
9
|
+
module SDL2
|
10
|
+
extend FFI::Library
|
11
|
+
# Define/Macro
|
12
|
+
|
13
|
+
|
14
|
+
# Enum
|
15
|
+
|
16
|
+
SDL_FALSE = 0
|
17
|
+
SDL_TRUE = 1
|
18
|
+
|
19
|
+
# Typedef
|
20
|
+
|
21
|
+
typedef :char, :int8_t
|
22
|
+
typedef :short, :int16_t
|
23
|
+
typedef :int, :int32_t
|
24
|
+
typedef :long_long, :int64_t
|
25
|
+
typedef :uchar, :uint8_t
|
26
|
+
typedef :ushort, :uint16_t
|
27
|
+
typedef :uint, :uint32_t
|
28
|
+
typedef :ulong_long, :uint64_t
|
29
|
+
typedef :int, :SDL_bool
|
30
|
+
typedef :char, :Sint8
|
31
|
+
typedef :uchar, :Uint8
|
32
|
+
typedef :short, :Sint16
|
33
|
+
typedef :ushort, :Uint16
|
34
|
+
typedef :int, :Sint32
|
35
|
+
typedef :uint, :Uint32
|
36
|
+
typedef :long_long, :Sint64
|
37
|
+
typedef :ulong_long, :Uint64
|
38
|
+
callback :SDL_malloc_func, [:int], :pointer
|
39
|
+
callback :SDL_calloc_func, [:int, :int], :pointer
|
40
|
+
callback :SDL_realloc_func, [:pointer, :int], :pointer
|
41
|
+
callback :SDL_free_func, [:pointer], :void
|
42
|
+
typedef :pointer, :SDL_iconv_t
|
43
|
+
|
44
|
+
# Struct
|
45
|
+
|
46
|
+
|
47
|
+
# Function
|
48
|
+
|
49
|
+
def self.setup_stdinc_symbols()
|
50
|
+
symbols = [
|
51
|
+
:SDL_malloc,
|
52
|
+
:SDL_calloc,
|
53
|
+
:SDL_realloc,
|
54
|
+
:SDL_free,
|
55
|
+
:SDL_GetMemoryFunctions,
|
56
|
+
:SDL_SetMemoryFunctions,
|
57
|
+
:SDL_GetNumAllocations,
|
58
|
+
:SDL_getenv,
|
59
|
+
:SDL_setenv,
|
60
|
+
:SDL_qsort,
|
61
|
+
:SDL_abs,
|
62
|
+
:SDL_isdigit,
|
63
|
+
:SDL_isspace,
|
64
|
+
:SDL_toupper,
|
65
|
+
:SDL_tolower,
|
66
|
+
:SDL_memset,
|
67
|
+
:SDL_memset4,
|
68
|
+
:SDL_memcpy,
|
69
|
+
:SDL_memmove,
|
70
|
+
:SDL_memcmp,
|
71
|
+
:SDL_wcsdup,
|
72
|
+
:SDL_wcslen,
|
73
|
+
:SDL_wcslcpy,
|
74
|
+
:SDL_wcslcat,
|
75
|
+
:SDL_wcscmp,
|
76
|
+
:SDL_strlen,
|
77
|
+
:SDL_strlcpy,
|
78
|
+
:SDL_utf8strlcpy,
|
79
|
+
:SDL_strlcat,
|
80
|
+
:SDL_strdup,
|
81
|
+
:SDL_strrev,
|
82
|
+
:SDL_strupr,
|
83
|
+
:SDL_strlwr,
|
84
|
+
:SDL_strchr,
|
85
|
+
:SDL_strrchr,
|
86
|
+
:SDL_strstr,
|
87
|
+
:SDL_utf8strlen,
|
88
|
+
:SDL_itoa,
|
89
|
+
:SDL_uitoa,
|
90
|
+
:SDL_ltoa,
|
91
|
+
:SDL_ultoa,
|
92
|
+
:SDL_lltoa,
|
93
|
+
:SDL_ulltoa,
|
94
|
+
:SDL_atoi,
|
95
|
+
:SDL_atof,
|
96
|
+
:SDL_strtol,
|
97
|
+
:SDL_strtoul,
|
98
|
+
:SDL_strtoll,
|
99
|
+
:SDL_strtoull,
|
100
|
+
:SDL_strtod,
|
101
|
+
:SDL_strcmp,
|
102
|
+
:SDL_strncmp,
|
103
|
+
:SDL_strcasecmp,
|
104
|
+
:SDL_strncasecmp,
|
105
|
+
:SDL_sscanf,
|
106
|
+
:SDL_vsscanf,
|
107
|
+
:SDL_snprintf,
|
108
|
+
:SDL_vsnprintf,
|
109
|
+
:SDL_acos,
|
110
|
+
:SDL_acosf,
|
111
|
+
:SDL_asin,
|
112
|
+
:SDL_asinf,
|
113
|
+
:SDL_atan,
|
114
|
+
:SDL_atanf,
|
115
|
+
:SDL_atan2,
|
116
|
+
:SDL_atan2f,
|
117
|
+
:SDL_ceil,
|
118
|
+
:SDL_ceilf,
|
119
|
+
:SDL_copysign,
|
120
|
+
:SDL_copysignf,
|
121
|
+
:SDL_cos,
|
122
|
+
:SDL_cosf,
|
123
|
+
:SDL_exp,
|
124
|
+
:SDL_expf,
|
125
|
+
:SDL_fabs,
|
126
|
+
:SDL_fabsf,
|
127
|
+
:SDL_floor,
|
128
|
+
:SDL_floorf,
|
129
|
+
:SDL_fmod,
|
130
|
+
:SDL_fmodf,
|
131
|
+
:SDL_log,
|
132
|
+
:SDL_logf,
|
133
|
+
:SDL_log10,
|
134
|
+
:SDL_log10f,
|
135
|
+
:SDL_pow,
|
136
|
+
:SDL_powf,
|
137
|
+
:SDL_scalbn,
|
138
|
+
:SDL_scalbnf,
|
139
|
+
:SDL_sin,
|
140
|
+
:SDL_sinf,
|
141
|
+
:SDL_sqrt,
|
142
|
+
:SDL_sqrtf,
|
143
|
+
:SDL_tan,
|
144
|
+
:SDL_tanf,
|
145
|
+
:SDL_iconv_open,
|
146
|
+
:SDL_iconv_close,
|
147
|
+
:SDL_iconv,
|
148
|
+
:SDL_iconv_string,
|
149
|
+
:SDL_memcpy4,
|
150
|
+
]
|
151
|
+
args = {
|
152
|
+
:SDL_malloc => [:int],
|
153
|
+
:SDL_calloc => [:int, :int],
|
154
|
+
:SDL_realloc => [:pointer, :int],
|
155
|
+
:SDL_free => [:pointer],
|
156
|
+
:SDL_GetMemoryFunctions => [:pointer, :pointer, :pointer, :pointer],
|
157
|
+
:SDL_SetMemoryFunctions => [:pointer, :pointer, :pointer, :pointer],
|
158
|
+
:SDL_GetNumAllocations => [],
|
159
|
+
:SDL_getenv => [:pointer],
|
160
|
+
:SDL_setenv => [:pointer, :pointer, :int],
|
161
|
+
:SDL_qsort => [:pointer, :int, :int, :pointer],
|
162
|
+
:SDL_abs => [:int],
|
163
|
+
:SDL_isdigit => [:int],
|
164
|
+
:SDL_isspace => [:int],
|
165
|
+
:SDL_toupper => [:int],
|
166
|
+
:SDL_tolower => [:int],
|
167
|
+
:SDL_memset => [:pointer, :int, :int],
|
168
|
+
:SDL_memset4 => [:pointer, :uint, :int],
|
169
|
+
:SDL_memcpy => [:pointer, :pointer, :int],
|
170
|
+
:SDL_memmove => [:pointer, :pointer, :int],
|
171
|
+
:SDL_memcmp => [:pointer, :pointer, :int],
|
172
|
+
:SDL_wcsdup => [:pointer],
|
173
|
+
:SDL_wcslen => [:pointer],
|
174
|
+
:SDL_wcslcpy => [:pointer, :pointer, :int],
|
175
|
+
:SDL_wcslcat => [:pointer, :pointer, :int],
|
176
|
+
:SDL_wcscmp => [:pointer, :pointer],
|
177
|
+
:SDL_strlen => [:pointer],
|
178
|
+
:SDL_strlcpy => [:pointer, :pointer, :int],
|
179
|
+
:SDL_utf8strlcpy => [:pointer, :pointer, :int],
|
180
|
+
:SDL_strlcat => [:pointer, :pointer, :int],
|
181
|
+
:SDL_strdup => [:pointer],
|
182
|
+
:SDL_strrev => [:pointer],
|
183
|
+
:SDL_strupr => [:pointer],
|
184
|
+
:SDL_strlwr => [:pointer],
|
185
|
+
:SDL_strchr => [:pointer, :int],
|
186
|
+
:SDL_strrchr => [:pointer, :int],
|
187
|
+
:SDL_strstr => [:pointer, :pointer],
|
188
|
+
:SDL_utf8strlen => [:pointer],
|
189
|
+
:SDL_itoa => [:int, :pointer, :int],
|
190
|
+
:SDL_uitoa => [:uint, :pointer, :int],
|
191
|
+
:SDL_ltoa => [:long, :pointer, :int],
|
192
|
+
:SDL_ultoa => [:ulong, :pointer, :int],
|
193
|
+
:SDL_lltoa => [:long_long, :pointer, :int],
|
194
|
+
:SDL_ulltoa => [:ulong_long, :pointer, :int],
|
195
|
+
:SDL_atoi => [:pointer],
|
196
|
+
:SDL_atof => [:pointer],
|
197
|
+
:SDL_strtol => [:pointer, :pointer, :int],
|
198
|
+
:SDL_strtoul => [:pointer, :pointer, :int],
|
199
|
+
:SDL_strtoll => [:pointer, :pointer, :int],
|
200
|
+
:SDL_strtoull => [:pointer, :pointer, :int],
|
201
|
+
:SDL_strtod => [:pointer, :pointer],
|
202
|
+
:SDL_strcmp => [:pointer, :pointer],
|
203
|
+
:SDL_strncmp => [:pointer, :pointer, :int],
|
204
|
+
:SDL_strcasecmp => [:pointer, :pointer],
|
205
|
+
:SDL_strncasecmp => [:pointer, :pointer, :int],
|
206
|
+
:SDL_sscanf => [:pointer, :pointer],
|
207
|
+
:SDL_vsscanf => [:pointer, :pointer, :int],
|
208
|
+
:SDL_snprintf => [:pointer, :int, :pointer],
|
209
|
+
:SDL_vsnprintf => [:pointer, :int, :pointer, :int],
|
210
|
+
:SDL_acos => [:double],
|
211
|
+
:SDL_acosf => [:float],
|
212
|
+
:SDL_asin => [:double],
|
213
|
+
:SDL_asinf => [:float],
|
214
|
+
:SDL_atan => [:double],
|
215
|
+
:SDL_atanf => [:float],
|
216
|
+
:SDL_atan2 => [:double, :double],
|
217
|
+
:SDL_atan2f => [:float, :float],
|
218
|
+
:SDL_ceil => [:double],
|
219
|
+
:SDL_ceilf => [:float],
|
220
|
+
:SDL_copysign => [:double, :double],
|
221
|
+
:SDL_copysignf => [:float, :float],
|
222
|
+
:SDL_cos => [:double],
|
223
|
+
:SDL_cosf => [:float],
|
224
|
+
:SDL_exp => [:double],
|
225
|
+
:SDL_expf => [:float],
|
226
|
+
:SDL_fabs => [:double],
|
227
|
+
:SDL_fabsf => [:float],
|
228
|
+
:SDL_floor => [:double],
|
229
|
+
:SDL_floorf => [:float],
|
230
|
+
:SDL_fmod => [:double, :double],
|
231
|
+
:SDL_fmodf => [:float, :float],
|
232
|
+
:SDL_log => [:double],
|
233
|
+
:SDL_logf => [:float],
|
234
|
+
:SDL_log10 => [:double],
|
235
|
+
:SDL_log10f => [:float],
|
236
|
+
:SDL_pow => [:double, :double],
|
237
|
+
:SDL_powf => [:float, :float],
|
238
|
+
:SDL_scalbn => [:double, :int],
|
239
|
+
:SDL_scalbnf => [:float, :int],
|
240
|
+
:SDL_sin => [:double],
|
241
|
+
:SDL_sinf => [:float],
|
242
|
+
:SDL_sqrt => [:double],
|
243
|
+
:SDL_sqrtf => [:float],
|
244
|
+
:SDL_tan => [:double],
|
245
|
+
:SDL_tanf => [:float],
|
246
|
+
:SDL_iconv_open => [:pointer, :pointer],
|
247
|
+
:SDL_iconv_close => [:pointer],
|
248
|
+
:SDL_iconv => [:pointer, :pointer, :pointer, :pointer, :pointer],
|
249
|
+
:SDL_iconv_string => [:pointer, :pointer, :pointer, :int],
|
250
|
+
:SDL_memcpy4 => [:pointer, :pointer, :int],
|
251
|
+
}
|
252
|
+
retvals = {
|
253
|
+
:SDL_malloc => :pointer,
|
254
|
+
:SDL_calloc => :pointer,
|
255
|
+
:SDL_realloc => :pointer,
|
256
|
+
:SDL_free => :void,
|
257
|
+
:SDL_GetMemoryFunctions => :void,
|
258
|
+
:SDL_SetMemoryFunctions => :int,
|
259
|
+
:SDL_GetNumAllocations => :int,
|
260
|
+
:SDL_getenv => :pointer,
|
261
|
+
:SDL_setenv => :int,
|
262
|
+
:SDL_qsort => :void,
|
263
|
+
:SDL_abs => :int,
|
264
|
+
:SDL_isdigit => :int,
|
265
|
+
:SDL_isspace => :int,
|
266
|
+
:SDL_toupper => :int,
|
267
|
+
:SDL_tolower => :int,
|
268
|
+
:SDL_memset => :pointer,
|
269
|
+
:SDL_memset4 => :void,
|
270
|
+
:SDL_memcpy => :pointer,
|
271
|
+
:SDL_memmove => :pointer,
|
272
|
+
:SDL_memcmp => :int,
|
273
|
+
:SDL_wcsdup => :pointer,
|
274
|
+
:SDL_wcslen => :int,
|
275
|
+
:SDL_wcslcpy => :int,
|
276
|
+
:SDL_wcslcat => :int,
|
277
|
+
:SDL_wcscmp => :int,
|
278
|
+
:SDL_strlen => :int,
|
279
|
+
:SDL_strlcpy => :int,
|
280
|
+
:SDL_utf8strlcpy => :int,
|
281
|
+
:SDL_strlcat => :int,
|
282
|
+
:SDL_strdup => :pointer,
|
283
|
+
:SDL_strrev => :pointer,
|
284
|
+
:SDL_strupr => :pointer,
|
285
|
+
:SDL_strlwr => :pointer,
|
286
|
+
:SDL_strchr => :pointer,
|
287
|
+
:SDL_strrchr => :pointer,
|
288
|
+
:SDL_strstr => :pointer,
|
289
|
+
:SDL_utf8strlen => :int,
|
290
|
+
:SDL_itoa => :pointer,
|
291
|
+
:SDL_uitoa => :pointer,
|
292
|
+
:SDL_ltoa => :pointer,
|
293
|
+
:SDL_ultoa => :pointer,
|
294
|
+
:SDL_lltoa => :pointer,
|
295
|
+
:SDL_ulltoa => :pointer,
|
296
|
+
:SDL_atoi => :int,
|
297
|
+
:SDL_atof => :double,
|
298
|
+
:SDL_strtol => :long,
|
299
|
+
:SDL_strtoul => :ulong,
|
300
|
+
:SDL_strtoll => :long_long,
|
301
|
+
:SDL_strtoull => :ulong_long,
|
302
|
+
:SDL_strtod => :double,
|
303
|
+
:SDL_strcmp => :int,
|
304
|
+
:SDL_strncmp => :int,
|
305
|
+
:SDL_strcasecmp => :int,
|
306
|
+
:SDL_strncasecmp => :int,
|
307
|
+
:SDL_sscanf => :int,
|
308
|
+
:SDL_vsscanf => :int,
|
309
|
+
:SDL_snprintf => :int,
|
310
|
+
:SDL_vsnprintf => :int,
|
311
|
+
:SDL_acos => :double,
|
312
|
+
:SDL_acosf => :float,
|
313
|
+
:SDL_asin => :double,
|
314
|
+
:SDL_asinf => :float,
|
315
|
+
:SDL_atan => :double,
|
316
|
+
:SDL_atanf => :float,
|
317
|
+
:SDL_atan2 => :double,
|
318
|
+
:SDL_atan2f => :float,
|
319
|
+
:SDL_ceil => :double,
|
320
|
+
:SDL_ceilf => :float,
|
321
|
+
:SDL_copysign => :double,
|
322
|
+
:SDL_copysignf => :float,
|
323
|
+
:SDL_cos => :double,
|
324
|
+
:SDL_cosf => :float,
|
325
|
+
:SDL_exp => :double,
|
326
|
+
:SDL_expf => :float,
|
327
|
+
:SDL_fabs => :double,
|
328
|
+
:SDL_fabsf => :float,
|
329
|
+
:SDL_floor => :double,
|
330
|
+
:SDL_floorf => :float,
|
331
|
+
:SDL_fmod => :double,
|
332
|
+
:SDL_fmodf => :float,
|
333
|
+
:SDL_log => :double,
|
334
|
+
:SDL_logf => :float,
|
335
|
+
:SDL_log10 => :double,
|
336
|
+
:SDL_log10f => :float,
|
337
|
+
:SDL_pow => :double,
|
338
|
+
:SDL_powf => :float,
|
339
|
+
:SDL_scalbn => :double,
|
340
|
+
:SDL_scalbnf => :float,
|
341
|
+
:SDL_sin => :double,
|
342
|
+
:SDL_sinf => :float,
|
343
|
+
:SDL_sqrt => :double,
|
344
|
+
:SDL_sqrtf => :float,
|
345
|
+
:SDL_tan => :double,
|
346
|
+
:SDL_tanf => :float,
|
347
|
+
:SDL_iconv_open => :pointer,
|
348
|
+
:SDL_iconv_close => :int,
|
349
|
+
:SDL_iconv => :int,
|
350
|
+
:SDL_iconv_string => :pointer,
|
351
|
+
:SDL_memcpy4 => :pointer,
|
352
|
+
}
|
353
|
+
symbols.each do |sym|
|
354
|
+
begin
|
355
|
+
attach_function sym, args[sym], retvals[sym]
|
356
|
+
rescue FFI::NotFoundError => error
|
357
|
+
$stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
|
358
|
+
end
|
359
|
+
end
|
360
|
+
end
|
361
|
+
|
362
|
+
end
|
363
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sdl2-bindings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaiorabbit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Ruby bindings for SDL2.
|
14
14
|
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/sdl2_rwops.rb
|
56
56
|
- lib/sdl2_scancode.rb
|
57
57
|
- lib/sdl2_shape.rb
|
58
|
+
- lib/sdl2_stdinc.rb
|
58
59
|
- lib/sdl2_surface.rb
|
59
60
|
- lib/sdl2_timer.rb
|
60
61
|
- lib/sdl2_touch.rb
|