-
Notifications
You must be signed in to change notification settings - Fork 3
/
mod.cy
2483 lines (2363 loc) · 120 KB
/
mod.cy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
use math
-- ./cbindgen.cy -o mod.cy raylib.h -I/opt/homebrew/Cellar/llvm/18.1.8/lib/clang/18/include
var .libUrl = switch os.system:
case 'linux' => 'https://raw.githubusercontent.com/fubark/ray-cyber/master/libraylib.so.5.0.0'
case 'windows' => 'https://raw.githubusercontent.com/fubark/ray-cyber/master/raylib.5.0.0.dll'
case 'macos' => 'https://raw.githubusercontent.com/fubark/ray-cyber/master/libraylib.5.0.0.dylib'
else => throw error.Unsupported
var .libPath = os.cacheUrl(libUrl)
func InitFoo(width int, height int, title *void): pass
func InitWindow(width int, height int, title String):
var cstr = os.cstr(title)
lib.InitWindow(width, height, cstr)
os.free(cstr)
func DrawText(text String, x int, y int, size int, color Color):
var cstr = os.cstr(text)
lib.DrawText(cstr, x, y, size, color)
os.free(cstr)
func MeasureText(text String, size int) int:
var cstr = os.cstr(text)
var res = lib.MeasureText(cstr, size)
os.free(cstr)
return res as int
func LoadTexture(fileName String) Texture2D:
var cstr = os.cstr(fileName)
var res = lib.LoadTexture(cstr)
os.free(cstr)
return res as Texture2D
func Vector2.sub(self, o Vector2) Vector2:
return Vector2{
x = self.x - o.x,
y = self.y - o.y,
}
func Vector2.add(self, o Vector2) Vector2:
return Vector2{
x = self.x + o.x,
y = self.y + o.y,
}
func Vector2.scale(self, scale float) Vector2:
return Vector2{
x = self.x * scale,
y = self.y * scale,
}
func Vector2.normalize(self) Vector2:
var res = Vector2{x=0, y=0}
var len = self.len()
if len > 0.0:
var ilen = 1.0/len
res.x = self.x*ilen
res.y = self.y*ilen
return res
func Vector2.len(self) float:
return math.sqrt(self.x*self.x + self.y*self.y)
-- CBINDGEN MARKER
-- Code below is generated by cbindgen.cy
-- typedef __gnuc_va_list
-- typedef va_list
type Vector2_S:
x float
y float
type Vector2 -> Vector2_S
type Vector3_S:
x float
y float
z float
type Vector3 -> Vector3_S
type Vector4_S:
x float
y float
z float
w float
type Vector4 -> Vector4_S
type Quaternion -> Vector4
type Matrix_S:
m0 float
m4 float
m8 float
m12 float
m1 float
m5 float
m9 float
m13 float
m2 float
m6 float
m10 float
m14 float
m3 float
m7 float
m11 float
m15 float
type Matrix -> Matrix_S
type Color_S:
r int
g int
b int
a int
type Color -> Color_S
type Rectangle_S:
x float
y float
width float
height float
type Rectangle -> Rectangle_S
type Image_S:
data *void -- void *
width int
height int
mipmaps int
format int
type Image -> Image_S
type Texture_S:
id int
width int
height int
mipmaps int
format int
type Texture -> Texture_S
type Texture2D -> Texture
type TextureCubemap -> Texture
type RenderTexture_S:
id int
texture Texture
depth Texture
type RenderTexture -> RenderTexture_S
type RenderTexture2D -> RenderTexture
type NPatchInfo_S:
source Rectangle
left int
top int
right int
bottom int
layout int
type NPatchInfo -> NPatchInfo_S
type GlyphInfo_S:
value int
offsetX int
offsetY int
advanceX int
image Image
type GlyphInfo -> GlyphInfo_S
type Font_S:
baseSize int
glyphCount int
glyphPadding int
texture Texture2D
recs *void -- Rectangle *
glyphs *void -- GlyphInfo *
type Font -> Font_S
type Camera3D_S:
position Vector3
target Vector3
up Vector3
fovy float
projection int
type Camera3D -> Camera3D_S
type Camera -> Camera3D
type Camera2D_S:
offset Vector2
target Vector2
rotation float
zoom float
type Camera2D -> Camera2D_S
type Mesh_S:
vertexCount int
triangleCount int
vertices *void -- float *
texcoords *void -- float *
texcoords2 *void -- float *
normals *void -- float *
tangents *void -- float *
colors *void -- unsigned char *
indices *void -- unsigned short *
animVertices *void -- float *
animNormals *void -- float *
boneIds *void -- unsigned char *
boneWeights *void -- float *
vaoId int
vboId *void -- unsigned int *
type Mesh -> Mesh_S
type Shader_S:
id int
locs *void -- int *
type Shader -> Shader_S
type MaterialMap_S:
texture Texture2D
color Color
value float
type MaterialMap -> MaterialMap_S
type Material_S:
shader Shader
maps *void -- MaterialMap *
params List[dyn] -- float[4]
type Material -> Material_S
type Transform_S:
translation Vector3
rotation Quaternion
scale Vector3
type Transform -> Transform_S
type BoneInfo_S:
name List[dyn] -- char[32]
parent int
type BoneInfo -> BoneInfo_S
type Model_S:
transform Matrix
meshCount int
materialCount int
meshes *void -- Mesh *
materials *void -- Material *
meshMaterial *void -- int *
boneCount int
bones *void -- BoneInfo *
bindPose *void -- Transform *
type Model -> Model_S
type ModelAnimation_S:
boneCount int
frameCount int
bones *void -- BoneInfo *
framePoses *void -- Transform **
name List[dyn] -- char[32]
type ModelAnimation -> ModelAnimation_S
type Ray_S:
position Vector3
direction Vector3
type Ray -> Ray_S
type RayCollision_S:
hit bool
distance float
point Vector3
normal Vector3
type RayCollision -> RayCollision_S
type BoundingBox_S:
min Vector3
max Vector3
type BoundingBox -> BoundingBox_S
type Wave_S:
frameCount int
sampleRate int
sampleSize int
channels int
data *void -- void *
type Wave -> Wave_S
type rAudioBuffer_S #int64_t
type rAudioBuffer -> rAudioBuffer_S
type rAudioProcessor_S #int64_t
type rAudioProcessor -> rAudioProcessor_S
type AudioStream_S:
buffer *void -- rAudioBuffer *
processor *void -- rAudioProcessor *
sampleRate int
sampleSize int
channels int
type AudioStream -> AudioStream_S
type Sound_S:
stream AudioStream
frameCount int
type Sound -> Sound_S
type Music_S:
stream AudioStream
frameCount int
looping bool
ctxType int
ctxData *void -- void *
type Music -> Music_S
type VrDeviceInfo_S:
hResolution int
vResolution int
hScreenSize float
vScreenSize float
vScreenCenter float
eyeToScreenDistance float
lensSeparationDistance float
interpupillaryDistance float
lensDistortionValues List[dyn] -- float[4]
chromaAbCorrection List[dyn] -- float[4]
type VrDeviceInfo -> VrDeviceInfo_S
type VrStereoConfig_S:
projection List[dyn] -- Matrix[2]
viewOffset List[dyn] -- Matrix[2]
leftLensCenter List[dyn] -- float[2]
rightLensCenter List[dyn] -- float[2]
leftScreenCenter List[dyn] -- float[2]
rightScreenCenter List[dyn] -- float[2]
scale List[dyn] -- float[2]
scaleIn List[dyn] -- float[2]
type VrStereoConfig -> VrStereoConfig_S
type FilePathList_S:
capacity int
count int
paths *void -- char **
type FilePathList -> FilePathList_S
type AutomationEvent_S:
frame int
type int
params List[dyn] -- int[4]
type AutomationEvent -> AutomationEvent_S
type AutomationEventList_S:
capacity int
count int
events *void -- AutomationEvent *
type AutomationEventList -> AutomationEventList_S
type ConfigFlags -> int
var .FLAG_VSYNC_HINT int = 64
var .FLAG_FULLSCREEN_MODE int = 2
var .FLAG_WINDOW_RESIZABLE int = 4
var .FLAG_WINDOW_UNDECORATED int = 8
var .FLAG_WINDOW_HIDDEN int = 128
var .FLAG_WINDOW_MINIMIZED int = 512
var .FLAG_WINDOW_MAXIMIZED int = 1024
var .FLAG_WINDOW_UNFOCUSED int = 2048
var .FLAG_WINDOW_TOPMOST int = 4096
var .FLAG_WINDOW_ALWAYS_RUN int = 256
var .FLAG_WINDOW_TRANSPARENT int = 16
var .FLAG_WINDOW_HIGHDPI int = 8192
var .FLAG_WINDOW_MOUSE_PASSTHROUGH int = 16384
var .FLAG_BORDERLESS_WINDOWED_MODE int = 32768
var .FLAG_MSAA_4X_HINT int = 32
var .FLAG_INTERLACED_HINT int = 65536
type TraceLogLevel -> int
var .LOG_ALL int = 0
var .LOG_TRACE int = 1
var .LOG_DEBUG int = 2
var .LOG_INFO int = 3
var .LOG_WARNING int = 4
var .LOG_ERROR int = 5
var .LOG_FATAL int = 6
var .LOG_NONE int = 7
type KeyboardKey -> int
var .KEY_NULL int = 0
var .KEY_APOSTROPHE int = 39
var .KEY_COMMA int = 44
var .KEY_MINUS int = 45
var .KEY_PERIOD int = 46
var .KEY_SLASH int = 47
var .KEY_ZERO int = 48
var .KEY_ONE int = 49
var .KEY_TWO int = 50
var .KEY_THREE int = 51
var .KEY_FOUR int = 52
var .KEY_FIVE int = 53
var .KEY_SIX int = 54
var .KEY_SEVEN int = 55
var .KEY_EIGHT int = 56
var .KEY_NINE int = 57
var .KEY_SEMICOLON int = 59
var .KEY_EQUAL int = 61
var .KEY_A int = 65
var .KEY_B int = 66
var .KEY_C int = 67
var .KEY_D int = 68
var .KEY_E int = 69
var .KEY_F int = 70
var .KEY_G int = 71
var .KEY_H int = 72
var .KEY_I int = 73
var .KEY_J int = 74
var .KEY_K int = 75
var .KEY_L int = 76
var .KEY_M int = 77
var .KEY_N int = 78
var .KEY_O int = 79
var .KEY_P int = 80
var .KEY_Q int = 81
var .KEY_R int = 82
var .KEY_S int = 83
var .KEY_T int = 84
var .KEY_U int = 85
var .KEY_V int = 86
var .KEY_W int = 87
var .KEY_X int = 88
var .KEY_Y int = 89
var .KEY_Z int = 90
var .KEY_LEFT_BRACKET int = 91
var .KEY_BACKSLASH int = 92
var .KEY_RIGHT_BRACKET int = 93
var .KEY_GRAVE int = 96
var .KEY_SPACE int = 32
var .KEY_ESCAPE int = 256
var .KEY_ENTER int = 257
var .KEY_TAB int = 258
var .KEY_BACKSPACE int = 259
var .KEY_INSERT int = 260
var .KEY_DELETE int = 261
var .KEY_RIGHT int = 262
var .KEY_LEFT int = 263
var .KEY_DOWN int = 264
var .KEY_UP int = 265
var .KEY_PAGE_UP int = 266
var .KEY_PAGE_DOWN int = 267
var .KEY_HOME int = 268
var .KEY_END int = 269
var .KEY_CAPS_LOCK int = 280
var .KEY_SCROLL_LOCK int = 281
var .KEY_NUM_LOCK int = 282
var .KEY_PRINT_SCREEN int = 283
var .KEY_PAUSE int = 284
var .KEY_F1 int = 290
var .KEY_F2 int = 291
var .KEY_F3 int = 292
var .KEY_F4 int = 293
var .KEY_F5 int = 294
var .KEY_F6 int = 295
var .KEY_F7 int = 296
var .KEY_F8 int = 297
var .KEY_F9 int = 298
var .KEY_F10 int = 299
var .KEY_F11 int = 300
var .KEY_F12 int = 301
var .KEY_LEFT_SHIFT int = 340
var .KEY_LEFT_CONTROL int = 341
var .KEY_LEFT_ALT int = 342
var .KEY_LEFT_SUPER int = 343
var .KEY_RIGHT_SHIFT int = 344
var .KEY_RIGHT_CONTROL int = 345
var .KEY_RIGHT_ALT int = 346
var .KEY_RIGHT_SUPER int = 347
var .KEY_KB_MENU int = 348
var .KEY_KP_0 int = 320
var .KEY_KP_1 int = 321
var .KEY_KP_2 int = 322
var .KEY_KP_3 int = 323
var .KEY_KP_4 int = 324
var .KEY_KP_5 int = 325
var .KEY_KP_6 int = 326
var .KEY_KP_7 int = 327
var .KEY_KP_8 int = 328
var .KEY_KP_9 int = 329
var .KEY_KP_DECIMAL int = 330
var .KEY_KP_DIVIDE int = 331
var .KEY_KP_MULTIPLY int = 332
var .KEY_KP_SUBTRACT int = 333
var .KEY_KP_ADD int = 334
var .KEY_KP_ENTER int = 335
var .KEY_KP_EQUAL int = 336
var .KEY_BACK int = 4
var .KEY_MENU int = 82
var .KEY_VOLUME_UP int = 24
var .KEY_VOLUME_DOWN int = 25
type MouseButton -> int
var .MOUSE_BUTTON_LEFT int = 0
var .MOUSE_BUTTON_RIGHT int = 1
var .MOUSE_BUTTON_MIDDLE int = 2
var .MOUSE_BUTTON_SIDE int = 3
var .MOUSE_BUTTON_EXTRA int = 4
var .MOUSE_BUTTON_FORWARD int = 5
var .MOUSE_BUTTON_BACK int = 6
type MouseCursor -> int
var .MOUSE_CURSOR_DEFAULT int = 0
var .MOUSE_CURSOR_ARROW int = 1
var .MOUSE_CURSOR_IBEAM int = 2
var .MOUSE_CURSOR_CROSSHAIR int = 3
var .MOUSE_CURSOR_POINTING_HAND int = 4
var .MOUSE_CURSOR_RESIZE_EW int = 5
var .MOUSE_CURSOR_RESIZE_NS int = 6
var .MOUSE_CURSOR_RESIZE_NWSE int = 7
var .MOUSE_CURSOR_RESIZE_NESW int = 8
var .MOUSE_CURSOR_RESIZE_ALL int = 9
var .MOUSE_CURSOR_NOT_ALLOWED int = 10
type GamepadButton -> int
var .GAMEPAD_BUTTON_UNKNOWN int = 0
var .GAMEPAD_BUTTON_LEFT_FACE_UP int = 1
var .GAMEPAD_BUTTON_LEFT_FACE_RIGHT int = 2
var .GAMEPAD_BUTTON_LEFT_FACE_DOWN int = 3
var .GAMEPAD_BUTTON_LEFT_FACE_LEFT int = 4
var .GAMEPAD_BUTTON_RIGHT_FACE_UP int = 5
var .GAMEPAD_BUTTON_RIGHT_FACE_RIGHT int = 6
var .GAMEPAD_BUTTON_RIGHT_FACE_DOWN int = 7
var .GAMEPAD_BUTTON_RIGHT_FACE_LEFT int = 8
var .GAMEPAD_BUTTON_LEFT_TRIGGER_1 int = 9
var .GAMEPAD_BUTTON_LEFT_TRIGGER_2 int = 10
var .GAMEPAD_BUTTON_RIGHT_TRIGGER_1 int = 11
var .GAMEPAD_BUTTON_RIGHT_TRIGGER_2 int = 12
var .GAMEPAD_BUTTON_MIDDLE_LEFT int = 13
var .GAMEPAD_BUTTON_MIDDLE int = 14
var .GAMEPAD_BUTTON_MIDDLE_RIGHT int = 15
var .GAMEPAD_BUTTON_LEFT_THUMB int = 16
var .GAMEPAD_BUTTON_RIGHT_THUMB int = 17
type GamepadAxis -> int
var .GAMEPAD_AXIS_LEFT_X int = 0
var .GAMEPAD_AXIS_LEFT_Y int = 1
var .GAMEPAD_AXIS_RIGHT_X int = 2
var .GAMEPAD_AXIS_RIGHT_Y int = 3
var .GAMEPAD_AXIS_LEFT_TRIGGER int = 4
var .GAMEPAD_AXIS_RIGHT_TRIGGER int = 5
type MaterialMapIndex -> int
var .MATERIAL_MAP_ALBEDO int = 0
var .MATERIAL_MAP_METALNESS int = 1
var .MATERIAL_MAP_NORMAL int = 2
var .MATERIAL_MAP_ROUGHNESS int = 3
var .MATERIAL_MAP_OCCLUSION int = 4
var .MATERIAL_MAP_EMISSION int = 5
var .MATERIAL_MAP_HEIGHT int = 6
var .MATERIAL_MAP_CUBEMAP int = 7
var .MATERIAL_MAP_IRRADIANCE int = 8
var .MATERIAL_MAP_PREFILTER int = 9
var .MATERIAL_MAP_BRDF int = 10
type ShaderLocationIndex -> int
var .SHADER_LOC_VERTEX_POSITION int = 0
var .SHADER_LOC_VERTEX_TEXCOORD01 int = 1
var .SHADER_LOC_VERTEX_TEXCOORD02 int = 2
var .SHADER_LOC_VERTEX_NORMAL int = 3
var .SHADER_LOC_VERTEX_TANGENT int = 4
var .SHADER_LOC_VERTEX_COLOR int = 5
var .SHADER_LOC_MATRIX_MVP int = 6
var .SHADER_LOC_MATRIX_VIEW int = 7
var .SHADER_LOC_MATRIX_PROJECTION int = 8
var .SHADER_LOC_MATRIX_MODEL int = 9
var .SHADER_LOC_MATRIX_NORMAL int = 10
var .SHADER_LOC_VECTOR_VIEW int = 11
var .SHADER_LOC_COLOR_DIFFUSE int = 12
var .SHADER_LOC_COLOR_SPECULAR int = 13
var .SHADER_LOC_COLOR_AMBIENT int = 14
var .SHADER_LOC_MAP_ALBEDO int = 15
var .SHADER_LOC_MAP_METALNESS int = 16
var .SHADER_LOC_MAP_NORMAL int = 17
var .SHADER_LOC_MAP_ROUGHNESS int = 18
var .SHADER_LOC_MAP_OCCLUSION int = 19
var .SHADER_LOC_MAP_EMISSION int = 20
var .SHADER_LOC_MAP_HEIGHT int = 21
var .SHADER_LOC_MAP_CUBEMAP int = 22
var .SHADER_LOC_MAP_IRRADIANCE int = 23
var .SHADER_LOC_MAP_PREFILTER int = 24
var .SHADER_LOC_MAP_BRDF int = 25
type ShaderUniformDataType -> int
var .SHADER_UNIFORM_FLOAT int = 0
var .SHADER_UNIFORM_VEC2 int = 1
var .SHADER_UNIFORM_VEC3 int = 2
var .SHADER_UNIFORM_VEC4 int = 3
var .SHADER_UNIFORM_INT int = 4
var .SHADER_UNIFORM_IVEC2 int = 5
var .SHADER_UNIFORM_IVEC3 int = 6
var .SHADER_UNIFORM_IVEC4 int = 7
var .SHADER_UNIFORM_SAMPLER2D int = 8
type ShaderAttributeDataType -> int
var .SHADER_ATTRIB_FLOAT int = 0
var .SHADER_ATTRIB_VEC2 int = 1
var .SHADER_ATTRIB_VEC3 int = 2
var .SHADER_ATTRIB_VEC4 int = 3
type PixelFormat -> int
var .PIXELFORMAT_UNCOMPRESSED_GRAYSCALE int = 1
var .PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA int = 2
var .PIXELFORMAT_UNCOMPRESSED_R5G6B5 int = 3
var .PIXELFORMAT_UNCOMPRESSED_R8G8B8 int = 4
var .PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 int = 5
var .PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 int = 6
var .PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 int = 7
var .PIXELFORMAT_UNCOMPRESSED_R32 int = 8
var .PIXELFORMAT_UNCOMPRESSED_R32G32B32 int = 9
var .PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 int = 10
var .PIXELFORMAT_UNCOMPRESSED_R16 int = 11
var .PIXELFORMAT_UNCOMPRESSED_R16G16B16 int = 12
var .PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 int = 13
var .PIXELFORMAT_COMPRESSED_DXT1_RGB int = 14
var .PIXELFORMAT_COMPRESSED_DXT1_RGBA int = 15
var .PIXELFORMAT_COMPRESSED_DXT3_RGBA int = 16
var .PIXELFORMAT_COMPRESSED_DXT5_RGBA int = 17
var .PIXELFORMAT_COMPRESSED_ETC1_RGB int = 18
var .PIXELFORMAT_COMPRESSED_ETC2_RGB int = 19
var .PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA int = 20
var .PIXELFORMAT_COMPRESSED_PVRT_RGB int = 21
var .PIXELFORMAT_COMPRESSED_PVRT_RGBA int = 22
var .PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA int = 23
var .PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA int = 24
type TextureFilter -> int
var .TEXTURE_FILTER_POINT int = 0
var .TEXTURE_FILTER_BILINEAR int = 1
var .TEXTURE_FILTER_TRILINEAR int = 2
var .TEXTURE_FILTER_ANISOTROPIC_4X int = 3
var .TEXTURE_FILTER_ANISOTROPIC_8X int = 4
var .TEXTURE_FILTER_ANISOTROPIC_16X int = 5
type TextureWrap -> int
var .TEXTURE_WRAP_REPEAT int = 0
var .TEXTURE_WRAP_CLAMP int = 1
var .TEXTURE_WRAP_MIRROR_REPEAT int = 2
var .TEXTURE_WRAP_MIRROR_CLAMP int = 3
type CubemapLayout -> int
var .CUBEMAP_LAYOUT_AUTO_DETECT int = 0
var .CUBEMAP_LAYOUT_LINE_VERTICAL int = 1
var .CUBEMAP_LAYOUT_LINE_HORIZONTAL int = 2
var .CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR int = 3
var .CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE int = 4
var .CUBEMAP_LAYOUT_PANORAMA int = 5
type FontType -> int
var .FONT_DEFAULT int = 0
var .FONT_BITMAP int = 1
var .FONT_SDF int = 2
type BlendMode -> int
var .BLEND_ALPHA int = 0
var .BLEND_ADDITIVE int = 1
var .BLEND_MULTIPLIED int = 2
var .BLEND_ADD_COLORS int = 3
var .BLEND_SUBTRACT_COLORS int = 4
var .BLEND_ALPHA_PREMULTIPLY int = 5
var .BLEND_CUSTOM int = 6
var .BLEND_CUSTOM_SEPARATE int = 7
type Gesture -> int
var .GESTURE_NONE int = 0
var .GESTURE_TAP int = 1
var .GESTURE_DOUBLETAP int = 2
var .GESTURE_HOLD int = 4
var .GESTURE_DRAG int = 8
var .GESTURE_SWIPE_RIGHT int = 16
var .GESTURE_SWIPE_LEFT int = 32
var .GESTURE_SWIPE_UP int = 64
var .GESTURE_SWIPE_DOWN int = 128
var .GESTURE_PINCH_IN int = 256
var .GESTURE_PINCH_OUT int = 512
type CameraMode -> int
var .CAMERA_CUSTOM int = 0
var .CAMERA_FREE int = 1
var .CAMERA_ORBITAL int = 2
var .CAMERA_FIRST_PERSON int = 3
var .CAMERA_THIRD_PERSON int = 4
type CameraProjection -> int
var .CAMERA_PERSPECTIVE int = 0
var .CAMERA_ORTHOGRAPHIC int = 1
type NPatchLayout -> int
var .NPATCH_NINE_PATCH int = 0
var .NPATCH_THREE_PATCH_VERTICAL int = 1
var .NPATCH_THREE_PATCH_HORIZONTAL int = 2
type TraceLogCallback -> *void
type LoadFileDataCallback -> *void
type SaveFileDataCallback -> *void
type LoadFileTextCallback -> *void
type SaveFileTextCallback -> *void
--func InitWindow(width int, height int, title *void) void
func CloseWindow() void:
return lib.CloseWindow()
func WindowShouldClose() bool:
return lib.WindowShouldClose()
func IsWindowReady() bool:
return lib.IsWindowReady()
func IsWindowFullscreen() bool:
return lib.IsWindowFullscreen()
func IsWindowHidden() bool:
return lib.IsWindowHidden()
func IsWindowMinimized() bool:
return lib.IsWindowMinimized()
func IsWindowMaximized() bool:
return lib.IsWindowMaximized()
func IsWindowFocused() bool:
return lib.IsWindowFocused()
func IsWindowResized() bool:
return lib.IsWindowResized()
func IsWindowState(flag int) bool:
return lib.IsWindowState(flag)
func SetWindowState(flags int) void:
return lib.SetWindowState(flags)
func ClearWindowState(flags int) void:
return lib.ClearWindowState(flags)
func ToggleFullscreen() void:
return lib.ToggleFullscreen()
func ToggleBorderlessWindowed() void:
return lib.ToggleBorderlessWindowed()
func MaximizeWindow() void:
return lib.MaximizeWindow()
func MinimizeWindow() void:
return lib.MinimizeWindow()
func RestoreWindow() void:
return lib.RestoreWindow()
func SetWindowIcon(image Image) void:
return lib.SetWindowIcon(image)
func SetWindowIcons(images *void, count int) void:
return lib.SetWindowIcons(images, count)
func SetWindowTitle(title *void) void:
return lib.SetWindowTitle(title)
func SetWindowPosition(x int, y int) void:
return lib.SetWindowPosition(x, y)
func SetWindowMonitor(monitor int) void:
return lib.SetWindowMonitor(monitor)
func SetWindowMinSize(width int, height int) void:
return lib.SetWindowMinSize(width, height)
func SetWindowMaxSize(width int, height int) void:
return lib.SetWindowMaxSize(width, height)
func SetWindowSize(width int, height int) void:
return lib.SetWindowSize(width, height)
func SetWindowOpacity(opacity float) void:
return lib.SetWindowOpacity(opacity)
func SetWindowFocused() void:
return lib.SetWindowFocused()
func GetWindowHandle() *void:
return lib.GetWindowHandle()
func GetScreenWidth() int:
return lib.GetScreenWidth()
func GetScreenHeight() int:
return lib.GetScreenHeight()
func GetRenderWidth() int:
return lib.GetRenderWidth()
func GetRenderHeight() int:
return lib.GetRenderHeight()
func GetMonitorCount() int:
return lib.GetMonitorCount()
func GetCurrentMonitor() int:
return lib.GetCurrentMonitor()
func GetMonitorPosition(monitor int) Vector2:
return lib.GetMonitorPosition(monitor)
func GetMonitorWidth(monitor int) int:
return lib.GetMonitorWidth(monitor)
func GetMonitorHeight(monitor int) int:
return lib.GetMonitorHeight(monitor)
func GetMonitorPhysicalWidth(monitor int) int:
return lib.GetMonitorPhysicalWidth(monitor)
func GetMonitorPhysicalHeight(monitor int) int:
return lib.GetMonitorPhysicalHeight(monitor)
func GetMonitorRefreshRate(monitor int) int:
return lib.GetMonitorRefreshRate(monitor)
func GetWindowPosition() Vector2:
return lib.GetWindowPosition()
func GetWindowScaleDPI() Vector2:
return lib.GetWindowScaleDPI()
func GetMonitorName(monitor int) *void:
return lib.GetMonitorName(monitor)
func SetClipboardText(text *void) void:
return lib.SetClipboardText(text)
func GetClipboardText() *void:
return lib.GetClipboardText()
func EnableEventWaiting() void:
return lib.EnableEventWaiting()
func DisableEventWaiting() void:
return lib.DisableEventWaiting()
func ShowCursor() void:
return lib.ShowCursor()
func HideCursor() void:
return lib.HideCursor()
func IsCursorHidden() bool:
return lib.IsCursorHidden()
func EnableCursor() void:
return lib.EnableCursor()
func DisableCursor() void:
return lib.DisableCursor()
func IsCursorOnScreen() bool:
return lib.IsCursorOnScreen()
func ClearBackground(color Color) void:
return lib.ClearBackground(color)
func BeginDrawing() void:
return lib.BeginDrawing()
func EndDrawing() void:
return lib.EndDrawing()
func BeginMode2D(camera Camera2D) void:
return lib.BeginMode2D(camera)
func EndMode2D() void:
return lib.EndMode2D()
func BeginMode3D(camera Camera3D) void:
return lib.BeginMode3D(camera)
func EndMode3D() void:
return lib.EndMode3D()
func BeginTextureMode(target RenderTexture2D) void:
return lib.BeginTextureMode(target)
func EndTextureMode() void:
return lib.EndTextureMode()
func BeginShaderMode(shader Shader) void:
return lib.BeginShaderMode(shader)
func EndShaderMode() void:
return lib.EndShaderMode()
func BeginBlendMode(mode int) void:
return lib.BeginBlendMode(mode)
func EndBlendMode() void:
return lib.EndBlendMode()
func BeginScissorMode(x int, y int, width int, height int) void:
return lib.BeginScissorMode(x, y, width, height)
func EndScissorMode() void:
return lib.EndScissorMode()
func BeginVrStereoMode(config VrStereoConfig) void:
return lib.BeginVrStereoMode(config)
func EndVrStereoMode() void:
return lib.EndVrStereoMode()
func LoadVrStereoConfig(device VrDeviceInfo) VrStereoConfig:
return lib.LoadVrStereoConfig(device)
func UnloadVrStereoConfig(config VrStereoConfig) void:
return lib.UnloadVrStereoConfig(config)
func LoadShader(vsFileName *void, fsFileName *void) Shader:
return lib.LoadShader(vsFileName, fsFileName)
func LoadShaderFromMemory(vsCode *void, fsCode *void) Shader:
return lib.LoadShaderFromMemory(vsCode, fsCode)
func IsShaderReady(shader Shader) bool:
return lib.IsShaderReady(shader)
func GetShaderLocation(shader Shader, uniformName *void) int:
return lib.GetShaderLocation(shader, uniformName)
func GetShaderLocationAttrib(shader Shader, attribName *void) int:
return lib.GetShaderLocationAttrib(shader, attribName)
func SetShaderValue(shader Shader, locIndex int, value *void, uniformType int) void:
return lib.SetShaderValue(shader, locIndex, value, uniformType)
func SetShaderValueV(shader Shader, locIndex int, value *void, uniformType int, count int) void:
return lib.SetShaderValueV(shader, locIndex, value, uniformType, count)
func SetShaderValueMatrix(shader Shader, locIndex int, mat Matrix) void:
return lib.SetShaderValueMatrix(shader, locIndex, mat)
func SetShaderValueTexture(shader Shader, locIndex int, texture Texture2D) void:
return lib.SetShaderValueTexture(shader, locIndex, texture)
func UnloadShader(shader Shader) void:
return lib.UnloadShader(shader)
func GetMouseRay(mousePosition Vector2, camera Camera) Ray:
return lib.GetMouseRay(mousePosition, camera)
func GetCameraMatrix(camera Camera) Matrix:
return lib.GetCameraMatrix(camera)
func GetCameraMatrix2D(camera Camera2D) Matrix:
return lib.GetCameraMatrix2D(camera)
func GetWorldToScreen(position Vector3, camera Camera) Vector2:
return lib.GetWorldToScreen(position, camera)
func GetScreenToWorld2D(position Vector2, camera Camera2D) Vector2:
return lib.GetScreenToWorld2D(position, camera)
func GetWorldToScreenEx(position Vector3, camera Camera, width int, height int) Vector2:
return lib.GetWorldToScreenEx(position, camera, width, height)
func GetWorldToScreen2D(position Vector2, camera Camera2D) Vector2:
return lib.GetWorldToScreen2D(position, camera)
func SetTargetFPS(fps int) void:
return lib.SetTargetFPS(fps)
func GetFrameTime() float:
return lib.GetFrameTime()
func GetTime() float:
return lib.GetTime()
func GetFPS() int:
return lib.GetFPS()
func SwapScreenBuffer() void:
return lib.SwapScreenBuffer()
func PollInputEvents() void:
return lib.PollInputEvents()
func WaitTime(seconds float) void:
return lib.WaitTime(seconds)
func SetRandomSeed(seed int) void:
return lib.SetRandomSeed(seed)
func GetRandomValue(min int, max int) int:
return lib.GetRandomValue(min, max)
func LoadRandomSequence(count int, min int, max int) *void:
return lib.LoadRandomSequence(count, min, max)
func UnloadRandomSequence(sequence *void) void:
return lib.UnloadRandomSequence(sequence)
func TakeScreenshot(fileName *void) void:
return lib.TakeScreenshot(fileName)
func SetConfigFlags(flags int) void:
return lib.SetConfigFlags(flags)
func OpenURL(url *void) void:
return lib.OpenURL(url)
func TraceLog(logLevel int, text *void) void:
return lib.TraceLog(logLevel, text)
func SetTraceLogLevel(logLevel int) void:
return lib.SetTraceLogLevel(logLevel)
func MemAlloc(size int) *void:
return lib.MemAlloc(size)
func MemRealloc(ptr *void, size int) *void:
return lib.MemRealloc(ptr, size)
func MemFree(ptr *void) void:
return lib.MemFree(ptr)
func SetTraceLogCallback(callback *void) void:
return lib.SetTraceLogCallback(callback)
func SetLoadFileDataCallback(callback *void) void:
return lib.SetLoadFileDataCallback(callback)
func SetSaveFileDataCallback(callback *void) void:
return lib.SetSaveFileDataCallback(callback)
func SetLoadFileTextCallback(callback *void) void:
return lib.SetLoadFileTextCallback(callback)
func SetSaveFileTextCallback(callback *void) void:
return lib.SetSaveFileTextCallback(callback)
func LoadFileData(fileName *void, dataSize *void) *void:
return lib.LoadFileData(fileName, dataSize)
func UnloadFileData(data *void) void:
return lib.UnloadFileData(data)
func SaveFileData(fileName *void, data *void, dataSize int) bool:
return lib.SaveFileData(fileName, data, dataSize)
func ExportDataAsCode(data *void, dataSize int, fileName *void) bool:
return lib.ExportDataAsCode(data, dataSize, fileName)
func LoadFileText(fileName *void) *void:
return lib.LoadFileText(fileName)
func UnloadFileText(text *void) void:
return lib.UnloadFileText(text)
func SaveFileText(fileName *void, text *void) bool:
return lib.SaveFileText(fileName, text)
func FileExists(fileName *void) bool:
return lib.FileExists(fileName)
func DirectoryExists(dirPath *void) bool:
return lib.DirectoryExists(dirPath)
func IsFileExtension(fileName *void, ext *void) bool:
return lib.IsFileExtension(fileName, ext)
func GetFileLength(fileName *void) int:
return lib.GetFileLength(fileName)
func GetFileExtension(fileName *void) *void:
return lib.GetFileExtension(fileName)
func GetFileName(filePath *void) *void:
return lib.GetFileName(filePath)
func GetFileNameWithoutExt(filePath *void) *void:
return lib.GetFileNameWithoutExt(filePath)
func GetDirectoryPath(filePath *void) *void:
return lib.GetDirectoryPath(filePath)
func GetPrevDirectoryPath(dirPath *void) *void:
return lib.GetPrevDirectoryPath(dirPath)
func GetWorkingDirectory() *void: