raylib-spinel 0.1.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.
@@ -0,0 +1,593 @@
1
+ # frozen_string_literal: true
2
+
3
+ # raylib_field_index.rb -- generated by tools/gen_field_index.py.
4
+ #
5
+ # FFI::Struct#[] / #[]= over the named accessors, so gem code that
6
+ # indexes structs (model[:materials], node[:position],
7
+ # mesh[:vertexCount] = 1) works on our views. Expanded per class on
8
+ # purpose: a dynamic send() would widen every dispatch under AOT.
9
+
10
+ module Raylib
11
+ class AutomationEvent
12
+ def [](key)
13
+ case key
14
+ when :frame then frame
15
+ when :type then type
16
+ else raise KeyError, "no such field: #{key}"
17
+ end
18
+ end
19
+
20
+ def []=(key, value)
21
+ case key
22
+ when :frame then self.frame = value
23
+ when :type then self.type = value
24
+ else raise KeyError, "no writable field: #{key}"
25
+ end
26
+ end
27
+ end
28
+ end
29
+
30
+ module Raylib
31
+ class AutomationEventList
32
+ def [](key)
33
+ case key
34
+ when :capacity then capacity
35
+ when :count then count
36
+ else raise KeyError, "no such field: #{key}"
37
+ end
38
+ end
39
+
40
+ def []=(key, value)
41
+ case key
42
+ when :capacity then self.capacity = value
43
+ when :count then self.count = value
44
+ else raise KeyError, "no writable field: #{key}"
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ module Raylib
51
+ class BoneInfo
52
+ def [](key)
53
+ case key
54
+ when :parent_bone_index then parent_bone_index
55
+ else raise KeyError, "no such field: #{key}"
56
+ end
57
+ end
58
+
59
+ def []=(key, value)
60
+ case key
61
+ when :parent_bone_index then self.parent_bone_index = value
62
+ else raise KeyError, "no writable field: #{key}"
63
+ end
64
+ end
65
+ end
66
+ end
67
+
68
+ module Raylib
69
+ class BoundingBox
70
+ def [](key)
71
+ case key
72
+ when :min_ptr then min_ptr
73
+ when :max_ptr then max_ptr
74
+ else raise KeyError, "no such field: #{key}"
75
+ end
76
+ end
77
+
78
+ def []=(key, value)
79
+ raise KeyError, "no writable field: #{key}"
80
+ end
81
+ end
82
+ end
83
+
84
+ module Raylib
85
+ class Camera
86
+ def [](key)
87
+ case key
88
+ when :position_ptr then position_ptr
89
+ when :target_ptr then target_ptr
90
+ when :up_ptr then up_ptr
91
+ when :fovy then fovy
92
+ when :projection then projection
93
+ else raise KeyError, "no such field: #{key}"
94
+ end
95
+ end
96
+
97
+ def []=(key, value)
98
+ case key
99
+ when :fovy then self.fovy = value
100
+ when :projection then self.projection = value
101
+ else raise KeyError, "no writable field: #{key}"
102
+ end
103
+ end
104
+ end
105
+ end
106
+
107
+ module Raylib
108
+ class Camera2D
109
+ def [](key)
110
+ case key
111
+ when :offset_ptr then offset_ptr
112
+ when :target_ptr then target_ptr
113
+ when :rotation then rotation
114
+ when :zoom then zoom
115
+ else raise KeyError, "no such field: #{key}"
116
+ end
117
+ end
118
+
119
+ def []=(key, value)
120
+ case key
121
+ when :rotation then self.rotation = value
122
+ when :zoom then self.zoom = value
123
+ else raise KeyError, "no writable field: #{key}"
124
+ end
125
+ end
126
+ end
127
+ end
128
+
129
+ module Raylib
130
+ class Color
131
+ def [](key)
132
+ case key
133
+ when :r then r
134
+ when :g then g
135
+ when :b then b
136
+ when :a then a
137
+ else raise KeyError, "no such field: #{key}"
138
+ end
139
+ end
140
+
141
+ def []=(key, value)
142
+ case key
143
+ when :r then self.r = value
144
+ when :g then self.g = value
145
+ when :b then self.b = value
146
+ when :a then self.a = value
147
+ else raise KeyError, "no writable field: #{key}"
148
+ end
149
+ end
150
+ end
151
+ end
152
+
153
+ module Raylib
154
+ class FilePathList
155
+ def [](key)
156
+ case key
157
+ when :count then count
158
+ else raise KeyError, "no such field: #{key}"
159
+ end
160
+ end
161
+
162
+ def []=(key, value)
163
+ case key
164
+ when :count then self.count = value
165
+ else raise KeyError, "no writable field: #{key}"
166
+ end
167
+ end
168
+ end
169
+ end
170
+
171
+ module Raylib
172
+ class Font
173
+ def [](key)
174
+ case key
175
+ when :baseSize then baseSize
176
+ when :glyphCount then glyphCount
177
+ when :glyphPadding then glyphPadding
178
+ when :texture_ptr then texture_ptr
179
+ else raise KeyError, "no such field: #{key}"
180
+ end
181
+ end
182
+
183
+ def []=(key, value)
184
+ case key
185
+ when :baseSize then self.baseSize = value
186
+ when :glyphCount then self.glyphCount = value
187
+ when :glyphPadding then self.glyphPadding = value
188
+ else raise KeyError, "no writable field: #{key}"
189
+ end
190
+ end
191
+ end
192
+ end
193
+
194
+ module Raylib
195
+ class GlyphInfo
196
+ def [](key)
197
+ case key
198
+ when :value then value
199
+ when :offsetX then offsetX
200
+ when :offsetY then offsetY
201
+ when :advanceX then advanceX
202
+ else raise KeyError, "no such field: #{key}"
203
+ end
204
+ end
205
+
206
+ def []=(key, value)
207
+ case key
208
+ when :value then self.value = value
209
+ when :offsetX then self.offsetX = value
210
+ when :offsetY then self.offsetY = value
211
+ when :advanceX then self.advanceX = value
212
+ else raise KeyError, "no writable field: #{key}"
213
+ end
214
+ end
215
+ end
216
+ end
217
+
218
+ module Raylib
219
+ class Image
220
+ def [](key)
221
+ case key
222
+ when :width then width
223
+ when :height then height
224
+ when :mipmaps then mipmaps
225
+ when :format then format
226
+ else raise KeyError, "no such field: #{key}"
227
+ end
228
+ end
229
+
230
+ def []=(key, value)
231
+ case key
232
+ when :width then self.width = value
233
+ when :height then self.height = value
234
+ when :mipmaps then self.mipmaps = value
235
+ when :format then self.format = value
236
+ else raise KeyError, "no writable field: #{key}"
237
+ end
238
+ end
239
+ end
240
+ end
241
+
242
+ module Raylib
243
+ class Matrix
244
+ def [](key)
245
+ case key
246
+ when :m0 then m0
247
+ when :m4 then m4
248
+ when :m8 then m8
249
+ when :m12 then m12
250
+ when :m1 then m1
251
+ when :m5 then m5
252
+ when :m9 then m9
253
+ when :m13 then m13
254
+ when :m2 then m2
255
+ when :m6 then m6
256
+ when :m10 then m10
257
+ when :m14 then m14
258
+ when :m3 then m3
259
+ when :m7 then m7
260
+ when :m11 then m11
261
+ when :m15 then m15
262
+ else raise KeyError, "no such field: #{key}"
263
+ end
264
+ end
265
+
266
+ def []=(key, value)
267
+ case key
268
+ when :m0 then self.m0 = value
269
+ when :m4 then self.m4 = value
270
+ when :m8 then self.m8 = value
271
+ when :m12 then self.m12 = value
272
+ when :m1 then self.m1 = value
273
+ when :m5 then self.m5 = value
274
+ when :m9 then self.m9 = value
275
+ when :m13 then self.m13 = value
276
+ when :m2 then self.m2 = value
277
+ when :m6 then self.m6 = value
278
+ when :m10 then self.m10 = value
279
+ when :m14 then self.m14 = value
280
+ when :m3 then self.m3 = value
281
+ when :m7 then self.m7 = value
282
+ when :m11 then self.m11 = value
283
+ when :m15 then self.m15 = value
284
+ else raise KeyError, "no writable field: #{key}"
285
+ end
286
+ end
287
+ end
288
+ end
289
+
290
+ module Raylib
291
+ class Mesh
292
+ def [](key)
293
+ case key
294
+ when :vertexCount then vertexCount
295
+ when :triangleCount then triangleCount
296
+ else raise KeyError, "no such field: #{key}"
297
+ end
298
+ end
299
+
300
+ def []=(key, value)
301
+ case key
302
+ when :vertexCount then self.vertexCount = value
303
+ when :triangleCount then self.triangleCount = value
304
+ else raise KeyError, "no writable field: #{key}"
305
+ end
306
+ end
307
+ end
308
+ end
309
+
310
+ module Raylib
311
+ class Model
312
+ def [](key)
313
+ case key
314
+ when :meshCount then meshCount
315
+ when :materialCount then materialCount
316
+ when :boneCount then boneCount
317
+ else raise KeyError, "no such field: #{key}"
318
+ end
319
+ end
320
+
321
+ def []=(key, value)
322
+ case key
323
+ when :meshCount then self.meshCount = value
324
+ when :materialCount then self.materialCount = value
325
+ when :boneCount then self.boneCount = value
326
+ else raise KeyError, "no writable field: #{key}"
327
+ end
328
+ end
329
+ end
330
+ end
331
+
332
+ module Raylib
333
+ class ModelAnimation
334
+ def [](key)
335
+ case key
336
+ when :keyframeCount then keyframeCount
337
+ when :boneCount then boneCount
338
+ else raise KeyError, "no such field: #{key}"
339
+ end
340
+ end
341
+
342
+ def []=(key, value)
343
+ case key
344
+ when :keyframeCount then self.keyframeCount = value
345
+ when :boneCount then self.boneCount = value
346
+ else raise KeyError, "no writable field: #{key}"
347
+ end
348
+ end
349
+ end
350
+ end
351
+
352
+ module Raylib
353
+ class NPatchInfo
354
+ def [](key)
355
+ case key
356
+ when :left then left
357
+ when :top then top
358
+ when :right then right
359
+ when :bottom then bottom
360
+ when :layout then layout
361
+ else raise KeyError, "no such field: #{key}"
362
+ end
363
+ end
364
+
365
+ def []=(key, value)
366
+ case key
367
+ when :left then self.left = value
368
+ when :top then self.top = value
369
+ when :right then self.right = value
370
+ when :bottom then self.bottom = value
371
+ when :layout then self.layout = value
372
+ else raise KeyError, "no writable field: #{key}"
373
+ end
374
+ end
375
+ end
376
+ end
377
+
378
+ module Raylib
379
+ class RayCollision
380
+ def [](key)
381
+ case key
382
+ when :hit then hit
383
+ when :distance then distance
384
+ else raise KeyError, "no such field: #{key}"
385
+ end
386
+ end
387
+
388
+ def []=(key, value)
389
+ case key
390
+ when :hit then self.hit = value
391
+ when :distance then self.distance = value
392
+ else raise KeyError, "no writable field: #{key}"
393
+ end
394
+ end
395
+ end
396
+ end
397
+
398
+ module Raylib
399
+ class Rectangle
400
+ def [](key)
401
+ case key
402
+ when :x then x
403
+ when :y then y
404
+ when :width then width
405
+ when :height then height
406
+ else raise KeyError, "no such field: #{key}"
407
+ end
408
+ end
409
+
410
+ def []=(key, value)
411
+ case key
412
+ when :x then self.x = value
413
+ when :y then self.y = value
414
+ when :width then self.width = value
415
+ when :height then self.height = value
416
+ else raise KeyError, "no writable field: #{key}"
417
+ end
418
+ end
419
+ end
420
+ end
421
+
422
+ module Raylib
423
+ class RenderTexture
424
+ def [](key)
425
+ case key
426
+ when :texture_ptr then texture_ptr
427
+ when :depth_ptr then depth_ptr
428
+ else raise KeyError, "no such field: #{key}"
429
+ end
430
+ end
431
+
432
+ def []=(key, value)
433
+ raise KeyError, "no writable field: #{key}"
434
+ end
435
+ end
436
+ end
437
+
438
+ module Raylib
439
+ class Shader
440
+ def [](key)
441
+ case key
442
+ when :id then id
443
+ else raise KeyError, "no such field: #{key}"
444
+ end
445
+ end
446
+
447
+ def []=(key, value)
448
+ case key
449
+ when :id then self.id = value
450
+ else raise KeyError, "no writable field: #{key}"
451
+ end
452
+ end
453
+ end
454
+ end
455
+
456
+ module Raylib
457
+ class Texture2D
458
+ def [](key)
459
+ case key
460
+ when :id then id
461
+ when :width then width
462
+ when :height then height
463
+ when :mipmaps then mipmaps
464
+ when :format then format
465
+ else raise KeyError, "no such field: #{key}"
466
+ end
467
+ end
468
+
469
+ def []=(key, value)
470
+ case key
471
+ when :id then self.id = value
472
+ when :width then self.width = value
473
+ when :height then self.height = value
474
+ when :mipmaps then self.mipmaps = value
475
+ when :format then self.format = value
476
+ else raise KeyError, "no writable field: #{key}"
477
+ end
478
+ end
479
+ end
480
+ end
481
+
482
+ module Raylib
483
+ class Transform
484
+ def [](key)
485
+ case key
486
+ when :t_ptr then t_ptr
487
+ when :r_ptr then r_ptr
488
+ when :s_ptr then s_ptr
489
+ else raise KeyError, "no such field: #{key}"
490
+ end
491
+ end
492
+
493
+ def []=(key, value)
494
+ raise KeyError, "no writable field: #{key}"
495
+ end
496
+ end
497
+ end
498
+
499
+ module Raylib
500
+ class Vector2
501
+ def [](key)
502
+ case key
503
+ when :x then x
504
+ when :y then y
505
+ else raise KeyError, "no such field: #{key}"
506
+ end
507
+ end
508
+
509
+ def []=(key, value)
510
+ case key
511
+ when :x then self.x = value
512
+ when :y then self.y = value
513
+ else raise KeyError, "no writable field: #{key}"
514
+ end
515
+ end
516
+ end
517
+ end
518
+
519
+ module Raylib
520
+ class Vector3
521
+ def [](key)
522
+ case key
523
+ when :x then x
524
+ when :y then y
525
+ when :z then z
526
+ else raise KeyError, "no such field: #{key}"
527
+ end
528
+ end
529
+
530
+ def []=(key, value)
531
+ case key
532
+ when :x then self.x = value
533
+ when :y then self.y = value
534
+ when :z then self.z = value
535
+ else raise KeyError, "no writable field: #{key}"
536
+ end
537
+ end
538
+ end
539
+ end
540
+
541
+ module Raylib
542
+ class Vector4
543
+ def [](key)
544
+ case key
545
+ when :x then x
546
+ when :y then y
547
+ when :z then z
548
+ when :w then w
549
+ else raise KeyError, "no such field: #{key}"
550
+ end
551
+ end
552
+
553
+ def []=(key, value)
554
+ case key
555
+ when :x then self.x = value
556
+ when :y then self.y = value
557
+ when :z then self.z = value
558
+ when :w then self.w = value
559
+ else raise KeyError, "no writable field: #{key}"
560
+ end
561
+ end
562
+ end
563
+ end
564
+
565
+ module Raylib
566
+ class VrDeviceInfo
567
+ def [](key)
568
+ case key
569
+ when :hResolution then hResolution
570
+ when :vResolution then vResolution
571
+ when :hScreenSize then hScreenSize
572
+ when :vScreenSize then vScreenSize
573
+ when :eyeToScreenDistance then eyeToScreenDistance
574
+ when :lensSeparationDistance then lensSeparationDistance
575
+ when :interpupillaryDistance then interpupillaryDistance
576
+ else raise KeyError, "no such field: #{key}"
577
+ end
578
+ end
579
+
580
+ def []=(key, value)
581
+ case key
582
+ when :hResolution then self.hResolution = value
583
+ when :vResolution then self.vResolution = value
584
+ when :hScreenSize then self.hScreenSize = value
585
+ when :vScreenSize then self.vScreenSize = value
586
+ when :eyeToScreenDistance then self.eyeToScreenDistance = value
587
+ when :lensSeparationDistance then self.lensSeparationDistance = value
588
+ when :interpupillaryDistance then self.interpupillaryDistance = value
589
+ else raise KeyError, "no writable field: #{key}"
590
+ end
591
+ end
592
+ end
593
+ end