summaryrefslogtreecommitdiff
path: root/raylib.c3
blob: 2631daa311e5fba08336ad5a266a7ca3f8eb54dd (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
module raylib;

// adapted from https://github.com/GiorgosAthanasopoulos/raylib-c3

struct Matrix {
    float m0, m4, m8, m12;
    float m1, m5, m9, m13;
    float m2, m6, m10, m14;
    float m3, m7, m11, m15;
}

struct Rectangle {
    float x, y, width, height;
}

struct Image {
    void *data;
    int width, height, mipmaps, format;
}

struct Texture {
    uint id;
    int width, height, mipmaps, format;
}
struct RenderTexture {
    uint id;
    Texture texture;
    Texture depth;
}

struct NPatchInfo {
    Rectangle source;
    int left, top, right, bottom, layout;
}

struct GlyphInfo {
    int value, offsetX, offsetY, advanceX;
    Image image;
}

struct Font {
    int baseSize, glyphCount, glyphPadding;
    Texture2D texture;
    Rectangle *recs;
    GlyphInfo *glyphs;
}

struct Camera3D {
    Vector3 pos;
    float fovy;
    int projection;
}
struct Camera2D {
    Vector2 offset, target;
    float rotation, zoom;
}

struct Mesh {
    int vertexCount, triangleCount;
    float *vertices, texcoords, texcoords2, normals, tangents, animVertices, animNormals, boneWeights;
    char *colors, boneIds;
    ushort *indices;
    uint vaoId;
    uint *vboId;
}

struct Shader {
    uint id;
    int *locs;
}

struct MaterialMap {
    Texture2D texture;
    Color color;
    float value;
}
struct Material {
    Shader shader;
    MaterialMap *maps;
    float [4]params;
}

struct Transform {
    Vector3 translation, scale;
    Quaternion rotation;
}

struct BoneInfo {
    char [32]name;
    int parent;
}

struct Model {
    Matrix transform;
    int meshCount, materialCount, boneCount;
    Mesh *meshes;
    Material *materials;
    int *meshMaterial;
    BoneInfo *bones;
    Transform *bindPose;
}
struct ModelAnimation {
    int boneCount, frameCount;
    BoneInfo *bones;
    Transform **framePoses;
    char [32]name;
}

struct Ray {
    Vector3 position, direction;
}
struct RayCollision {
    bool hit;
    float distance;
    Vector3 point, normal;
} 
struct BoundingBox {
    Vector3 min, max;
}

struct Wave {
    uint frameCount, sampleRate, sampleSize, channels;
    void *data;
}
struct AudioBuffer {
    // ma_data_converter converter;

    AudioCallback callback;        
    AudioProcessor *processor;     

    float volume;             
    float pitch;               
    float pan;                  

    bool playing;                
    bool paused;                  
    bool looping;                  
    int usage;                      

    bool [2]isSubBufferProcessed;
    uint sizeInFrames;   
    uint frameCursorPos;  
    uint framesProcessed;  

    char *data;            

    AudioBuffer *next;
    AudioBuffer *prev;
}
struct AudioProcessor {
    AudioCallback process;
    AudioProcessor *next;
    AudioProcessor *prev;
}
struct AudioStream {
    AudioBuffer *buffer;
    AudioProcessor *processor;
    uint sampleRate, sampleSize, channels;
}
struct Sound {
    AudioStream sound;
    uint frameCount;
}
struct Music {
    AudioStream stream;
    uint frameCount;
    bool looping;
    int ctxType;
    void *ctxData;
}

struct VrDeviceInfo {
    int hResolution, vResolution;
    float hScreenSize, vScreenSize, eyeToScreenDistance, lensSeparationDistance, interpupillaryDistance;
    float [4]lensDistortionValues, chromaAbCorrection;
}
struct VrStereoConfig {
    Matrix [2]projection, viewOffset;
    float [2]leftLensCenter, rightLensCenter, leftScreenCenter, rightScreenCenter, scale, scaleIn;
}

struct FilePathList {
    uint capacity;
    uint count;
    char **paths;
}

struct AutomationEvent {
    uint frame, type;
    int [4]params;
}
struct AutomationEventList {
    uint capacity;
    uint count;
    AutomationEvent *events;
}

constdef ConfigFlags : int {
    FLAG_VSYNC_HINT         = 0x00000040,      
    FLAG_FULLSCREEN_MODE    = 0x00000002,
    FLAG_WINDOW_RESIZABLE   = 0x00000004,
    FLAG_WINDOW_UNDECORATED = 0x00000008, 
    FLAG_WINDOW_HIDDEN      = 0x00000080,  
    FLAG_WINDOW_MINIMIZED   = 0x00000200,   
    FLAG_WINDOW_MAXIMIZED   = 0x00000400,   
    FLAG_WINDOW_UNFOCUSED   = 0x00000800, 
    FLAG_WINDOW_TOPMOST     = 0x00001000,  
    FLAG_WINDOW_ALWAYS_RUN  = 0x00000100,   
    FLAG_WINDOW_TRANSPARENT = 0x00000010,   
    FLAG_WINDOW_HIGHDPI     = 0x00002000,   
    FLAG_WINDOW_MOUSE_PASSTHROUGH = 0x00004000,
    FLAG_BORDERLESS_WINDOWED_MODE = 0x00008000, 
    FLAG_MSAA_4X_HINT       = 0x00000020,  
    FLAG_INTERLACED_HINT    = 0x00010000    
}

constdef TraceLogLevel : int {
    LOG_ALL = 0,
    LOG_TRACE = 1,
    LOG_DEBUG = 2,
    LOG_INFO = 3,
    LOG_WARNING = 4,
    LOG_ERROR = 5,
    LOG_FATAL = 6,
    LOG_NONE = 7,
}

constdef KeyboardKey : int {
    KEY_NULL            = 0,        
    KEY_APOSTROPHE      = 39,      
    KEY_COMMA           = 44,     
    KEY_MINUS           = 45,    
    KEY_PERIOD          = 46,   
    KEY_SLASH           = 47,  
    KEY_ZERO            = 48, 
    KEY_ONE             = 49,
    KEY_TWO             = 50,
    KEY_THREE           = 51,
    KEY_FOUR            = 52,
    KEY_FIVE            = 53,
    KEY_SIX             = 54,
    KEY_SEVEN           = 55,
    KEY_EIGHT           = 56,
    KEY_NINE            = 57,
    KEY_SEMICOLON       = 59,
    KEY_EQUAL           = 61,
    KEY_A               = 65,
    KEY_B               = 66,
    KEY_C               = 67,       
    KEY_D               = 68,      
    KEY_E               = 69,     
    KEY_F               = 70,    
    KEY_G               = 71,   
    KEY_H               = 72,  
    KEY_I               = 73, 
    KEY_J               = 74,
    KEY_K               = 75,       
    KEY_L               = 76,      
    KEY_M               = 77,     
    KEY_N               = 78,    
    KEY_O               = 79,   
    KEY_P               = 80,  
    KEY_Q               = 81, 
    KEY_R               = 82,
    KEY_S               = 83,       
    KEY_T               = 84,      
    KEY_U               = 85,     
    KEY_V               = 86,    
    KEY_W               = 87,   
    KEY_X               = 88,  
    KEY_Y               = 89, 
    KEY_Z               = 90,
    KEY_LEFT_BRACKET    = 91,       
    KEY_BACKSLASH       = 92,      
    KEY_RIGHT_BRACKET   = 93,     
    KEY_GRAVE           = 96,    
    KEY_SPACE           = 32,       
    KEY_ESCAPE          = 256,     
    KEY_ENTER           = 257,    
    KEY_TAB             = 258,   
    KEY_BACKSPACE       = 259,  
    KEY_INSERT          = 260, 
    KEY_DELETE          = 261,      
    KEY_RIGHT           = 262,     
    KEY_LEFT            = 263,    
    KEY_DOWN            = 264,   
    KEY_UP              = 265,  
    KEY_PAGE_UP         = 266, 
    KEY_PAGE_DOWN       = 267,
    KEY_HOME            = 268,      
    KEY_END             = 269,     
    KEY_CAPS_LOCK       = 280,    
    KEY_SCROLL_LOCK     = 281,   
    KEY_NUM_LOCK        = 282,
    KEY_PRINT_SCREEN    = 283,  
    KEY_PAUSE           = 284, 
    KEY_F1              = 290,
    KEY_F2              = 291,      
    KEY_F3              = 292,     
    KEY_F4              = 293,    
    KEY_F5              = 294,   
    KEY_F6              = 295,  
    KEY_F7              = 296, 
    KEY_F8              = 297,
    KEY_F9              = 298,
    KEY_F10             = 299,      
    KEY_F11             = 300,     
    KEY_F12             = 301,    
    KEY_LEFT_SHIFT      = 340,   
    KEY_LEFT_CONTROL    = 341,  
    KEY_LEFT_ALT        = 342, 
    KEY_LEFT_SUPER      = 343,
    KEY_RIGHT_SHIFT     = 344,      
    KEY_RIGHT_CONTROL   = 345,     
    KEY_RIGHT_ALT       = 346,    
    KEY_RIGHT_SUPER     = 347,   
    KEY_KB_MENU         = 348,  
    KEY_KP_0            = 320,      
    KEY_KP_1            = 321,     
    KEY_KP_2            = 322,    
    KEY_KP_3            = 323,   
    KEY_KP_4            = 324,  
    KEY_KP_5            = 325,  
    KEY_KP_6            = 326, 
    KEY_KP_7            = 327,    
    KEY_KP_8            = 328,     
    KEY_KP_9            = 329,      
    KEY_KP_DECIMAL      = 330, 
    KEY_KP_DIVIDE       = 331,  
    KEY_KP_MULTIPLY     = 332,   
    KEY_KP_SUBTRACT     = 333,    
    KEY_KP_ADD          = 334,     
    KEY_KP_ENTER        = 335,      
    KEY_KP_EQUAL        = 336, 
    KEY_BACK            = 4,   
    KEY_MENU            = 5,  
    KEY_VOLUME_UP       = 24,
    KEY_VOLUME_DOWN     = 25
}

constdef MouseButton : int {
    MOUSE_BUTTON_LEFT = 0,
    MOUSE_BUTTON_RIGHT = 1,
    MOUSE_BUTTON_MIDDLE = 2,
    MOUSE_BUTTON_SIDE    = 3,     
    MOUSE_BUTTON_EXTRA   = 4,     
    MOUSE_BUTTON_FORWARD = 5,       
    MOUSE_BUTTON_BACK    = 6,
}
constdef MouseCursor : int {
    MOUSE_CURSOR_DEFAULT       = 0,     
    MOUSE_CURSOR_ARROW         = 1,    
    MOUSE_CURSOR_IBEAM         = 2,     
    MOUSE_CURSOR_CROSSHAIR     = 3,   
    MOUSE_CURSOR_POINTING_HAND = 4,    
    MOUSE_CURSOR_RESIZE_EW     = 5,     
    MOUSE_CURSOR_RESIZE_NS     = 6,  
    MOUSE_CURSOR_RESIZE_NWSE   = 7,   
    MOUSE_CURSOR_RESIZE_NESW   = 8,    
    MOUSE_CURSOR_RESIZE_ALL    = 9,     
    MOUSE_CURSOR_NOT_ALLOWED   = 10
}

constdef GamepadButton : int {
    GAMEPAD_BUTTON_UNKNOWN = 0,         
    GAMEPAD_BUTTON_LEFT_FACE_UP = 1,        
    GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2,     
    GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3,   
    GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4,      
    GAMEPAD_BUTTON_RIGHT_FACE_UP = 5,       
    GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6,    
    GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7,     
    GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8,     
    GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9,     
    GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10,    
    GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11,  
    GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12, 
    GAMEPAD_BUTTON_MIDDLE_LEFT = 13, 
    GAMEPAD_BUTTON_MIDDLE = 14,
    GAMEPAD_BUTTON_MIDDLE_RIGHT = 15,        
    GAMEPAD_BUTTON_LEFT_THUMB = 16,         
    GAMEPAD_BUTTON_RIGHT_THUMB = 17,
}
constdef GamepadAxis : int {
    GAMEPAD_AXIS_LEFT_X        = 0,     
    GAMEPAD_AXIS_LEFT_Y        = 1,   
    GAMEPAD_AXIS_RIGHT_X       = 2,    
    GAMEPAD_AXIS_RIGHT_Y       = 3,     
    GAMEPAD_AXIS_LEFT_TRIGGER  = 4,     
    GAMEPAD_AXIS_RIGHT_TRIGGER = 5
}

constdef MaterialMapIndex : int {
    MATERIAL_MAP_ALBEDO = 0,        
    MATERIAL_MAP_METALNESS = 1, 
    MATERIAL_MAP_NORMAL = 2, 
    MATERIAL_MAP_ROUGHNESS = 3,   
    MATERIAL_MAP_OCCLUSION = 4,    
    MATERIAL_MAP_EMISSION = 5,      
    MATERIAL_MAP_HEIGHT = 6,         
    MATERIAL_MAP_CUBEMAP = 7,         
    MATERIAL_MAP_IRRADIANCE = 8,       
    MATERIAL_MAP_PREFILTER = 9,         
    MATERIAL_MAP_BRDF = 10,
}

constdef ShaderLocationIndex : int {
    SHADER_LOC_VERTEX_POSITION = 0, 
    SHADER_LOC_VERTEX_TEXCOORD01 = 1,  
    SHADER_LOC_VERTEX_TEXCOORD02 = 2, 
    SHADER_LOC_VERTEX_NORMAL = 3,    
    SHADER_LOC_VERTEX_TANGENT = 4,      
    SHADER_LOC_VERTEX_COLOR = 5,       
    SHADER_LOC_MATRIX_MVP = 6,        
    SHADER_LOC_MATRIX_VIEW = 7,      
    SHADER_LOC_MATRIX_PROJECTION = 8,   
    SHADER_LOC_MATRIX_MODEL = 9,       
    SHADER_LOC_MATRIX_NORMAL = 10,     
    SHADER_LOC_VECTOR_VIEW = 11,
    SHADER_LOC_COLOR_DIFFUSE = 12,       
    SHADER_LOC_COLOR_SPECULAR = 13,     
    SHADER_LOC_COLOR_AMBIENT = 14,     
    SHADER_LOC_MAP_ALBEDO = 15,       
    SHADER_LOC_MAP_METALNESS = 16,   
    SHADER_LOC_MAP_NORMAL = 17,     
    SHADER_LOC_MAP_ROUGHNESS = 18, 
    SHADER_LOC_MAP_OCCLUSION = 19,       
    SHADER_LOC_MAP_EMISSION = 20,       
    SHADER_LOC_MAP_HEIGHT = 21,        
    SHADER_LOC_MAP_CUBEMAP = 22,      
    SHADER_LOC_MAP_IRRADIANCE = 23,  
    SHADER_LOC_MAP_PREFILTER = 24,  
    SHADER_LOC_MAP_BRDF = 25,
}
constdef ShaderUniformDataType : int {
    SHADER_UNIFORM_FLOAT = 0,       
    SHADER_UNIFORM_VEC2 = 1,            
    SHADER_UNIFORM_VEC3 = 2,           
    SHADER_UNIFORM_VEC4 = 3,          
    SHADER_UNIFORM_INT = 4,          
    SHADER_UNIFORM_IVEC2 = 5,       
    SHADER_UNIFORM_IVEC3 = 6,      
    SHADER_UNIFORM_IVEC4 = 7,     
    SHADER_UNIFORM_SAMPLER2D = 8,
}
constdef ShaderAttributeDataType : int {
    SHADER_ATTRIB_FLOAT = 0,
    SHADER_ATTRIB_VEC2 = 1,             
    SHADER_ATTRIB_VEC3 = 2,             
    SHADER_ATTRIB_VEC4 = 3,
}

constdef PixelFormat : int {
    PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,
    PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2,  
    PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3,     
    PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4,    
    PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, 
    PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6,      
    PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7,     
    PIXELFORMAT_UNCOMPRESSED_R32 = 8,         
    PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9,     
    PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, 
    PIXELFORMAT_UNCOMPRESSED_R16 = 11,         
    PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12,
    PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13, 
    PIXELFORMAT_COMPRESSED_DXT1_RGB = 14,        
    PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15,  
    PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16,   
    PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17,    
    PIXELFORMAT_COMPRESSED_ETC1_RGB = 18,      
    PIXELFORMAT_COMPRESSED_ETC2_RGB = 19,       
    PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20,   
    PIXELFORMAT_COMPRESSED_PVRT_RGB = 21,      
    PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22,      
    PIXELFORMAT_COMPRESSED_ASTC_4X4_RGBA = 23,   
    PIXELFORMAT_COMPRESSED_ASTC_8X8_RGBA = 24, 
}

constdef TextureFilter : int {
    TEXTURE_FILTER_POINT = 0,               
    TEXTURE_FILTER_BILINEAR = 1,               
    TEXTURE_FILTER_TRILINEAR = 2,             
    TEXTURE_FILTER_ANISOTROPIC_4X = 3,       
    TEXTURE_FILTER_ANISOTROPIC_8X = 4,      
    TEXTURE_FILTER_ANISOTROPIC_16X = 5, 
}
constdef TextureWrap : int {
    TEXTURE_WRAP_REPEAT = 0,                
    TEXTURE_WRAP_CLAMP = 1,                     
    TEXTURE_WRAP_MIRROR_REPEAT = 2,             
    TEXTURE_WRAP_MIRROR_CLAMP = 3,
}

constdef CubemapLayout : int {
    CUBEMAP_LAYOUT_AUTO_DETECT = 0,         
    CUBEMAP_LAYOUT_LINE_VERTICAL = 1,         
    CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2,        
    CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3,     
    CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4,
    CUBEMAP_LAYOUT_PANORAMA = 5,
}

constdef FontType : int {
    FONT_DEFAULT = 0,             
    FONT_BITMAP = 1,               
    FONT_SDF = 2,                   
} 

constdef BlendMode : int {
    BLEND_ALPHA = 0,              
    BLEND_ADDITIVE = 1,            
    BLEND_MULTIPLIED = 2,           
    BLEND_ADD_COLORS = 3,            
    BLEND_SUBTRACT_COLORS = 4,        
    BLEND_ALPHA_PREMULTIPLY = 5,       
    BLEND_CUSTOM = 6,                   
    BLEND_CUSTOM_SEPARATE = 7,
}

constdef Gesture : int {
    GESTURE_NONE        = 0,        
    GESTURE_TAP         = 1,       
    GESTURE_DOUBLETAP   = 2,      
    GESTURE_HOLD        = 4,     
    GESTURE_DRAG        = 8,    
    GESTURE_SWIPE_RIGHT = 16,  
    GESTURE_SWIPE_LEFT  = 32,       
    GESTURE_SWIPE_UP    = 64,      
    GESTURE_SWIPE_DOWN  = 128,    
    GESTURE_PINCH_IN    = 256,   
    GESTURE_PINCH_OUT   = 512
}

constdef CameraMode : int {
    CAMERA_CUSTOM = 0,              
    CAMERA_FREE = 1,                  
    CAMERA_ORBITAL = 2,                
    CAMERA_FIRST_PERSON = 3,            
    CAMERA_THIRD_PERSON = 4,  
}
constdef CameraProjection : int {
    CAMERA_PERSPECTIVE = 0,         
    CAMERA_ORTHOGRAPHIC = 1,
}

constdef NPathLayout: int {
    NPATCH_NINE_PATCH = 0,        
    NPATCH_THREE_PATCH_VERTICAL = 1,
    NPATCH_THREE_PATCH_HORIZONTAL = 2,
}

alias Vector2 = float[<2>];
alias Vector3 = float[<3>];
alias Vector4 = float[<4>];
alias Quaternion = Vector4;

alias Color = char[<4>];

alias Texture2D = Texture;
alias TextureCubemap = Texture;
alias RenderTexture2D = RenderTexture;

alias Camera = Camera3D;

alias TraceLogCallback = fn void(int logLevel, char *text, ...);
alias LoadFileDataCallback = fn char*(char *filename, int *dataSize);
alias SaveFileDataCallback = fn bool(char *filename, void *data, int dataSize);
alias LoadFileTextCallback = fn char*(char *fileName);            
alias SaveFileTextCallback = fn bool(char *filename, char *text);

alias AudioCallback = fn void(void *bufferData, uint frames);

const int RAYLIB_VERSION_PATCH = 0;
const int RAYLIB_VERSION_MAJOR = 5;
const int RAYLIB_VERSION_MINOR = 5;
const char *RAYLIB_VERSION = "5.5-dev";
const DEG2RAD = PI/180.0f;
const float PI = 3.14159265358979323846f;
const float RAD2DEG = 180.0f/PI;
const Color LIGHTRAY = {200, 200, 200, 255};
const Color GRAY = {130, 130, 130, 255};
const Color DARKGRAY= {80, 80, 80, 255};
const Color YELLOW = {253, 249, 0, 255};
const Color GOLD = {255, 203, 0, 255};
const Color ORANGE = {255, 161, 0, 255};
const Color PINK = {255, 109, 194, 255};
const Color RED = {230, 41, 55, 255};
const Color MAROON = {190, 33, 55, 255};
const Color GREEN = {0, 228, 48, 255};
const Color LIME = {0, 158, 47, 255};
const Color DARKGREEN = {0, 117, 44, 255};
const Color SKYBLUE = {102, 191, 255, 255};
const Color BLUE = {0, 121, 241, 255};
const Color DARKBLUE = {0, 82, 172, 255};
const Color PURPLE = {200, 122, 255, 255};
const Color VIOLET = {135, 60, 190, 255};
const Color DARKPURPLE = {112, 31, 126, 255};
const Color BEIGE = {211, 176, 131, 255};
const Color BROWN = {127, 106, 79, 255};
const Color DARKBROWN = {76, 63, 47, 255};
const Color WHITE = {255, 255, 255, 255};
const Color BLACK = {0, 0, 0, 255};
const Color BLANK = {0, 0, 0, 0};
const Color MAGENTA = {255, 0, 255, 255};
const Color RAYWHITE = {245, 245, 245, 255};

const MouseButton MOUSE_LEFT_BUTTON = MOUSE_BUTTON_LEFT;
const MouseButton MOUSE_RIGHT_BUTTON = MOUSE_BUTTON_RIGHT;
const MouseButton MOUSE_MIDDLE_BUTTON = MOUSE_BUTTON_MIDDLE;

const MaterialMapIndex MATERIAL_MAP_DIFFUSE = MATERIAL_MAP_ALBEDO;
const MaterialMapIndex MATERIAL_MAP_SPECULAR = MATERIAL_MAP_METALNESS;

const ShaderLocationIndex SHADER_LOC_MAP_DIFFUSE = SHADER_LOC_MAP_ALBEDO;
const ShaderLocationIndex SHADER_LOC_MAP_SPECULAR = SHADER_LOC_MAP_METALNESS;

extern fn void init_window(int width, int height, char *title) @cname("InitWindow");
extern fn void close_window() @cname("CloseWindow");
extern fn bool window_should_close() @cname("WindowShouldClose");
extern fn bool is_window_ready() @cname("IsWindowReady");
extern fn bool is_window_fullscreen() @cname("IsWindowFulLscreen");
extern fn bool is_window_hidden() @cname("IsWindowHidden");
extern fn bool is_window_minimized() @cname("IsWindowMinimized");
extern fn bool is_window_maximized() @cname("IsWindowMaximized");
extern fn bool is_window_focused() @cname("IsWindowFocused");
extern fn bool is_window_resized() @cname("IsWindowResized");
extern fn bool is_window_state(uint flags) @cname("IsWindowState");
extern fn void set_window_state(uint flags) @cname("SetWindowState");
extern fn void clear_window_state(uint flags) @cname("ClearWindowState");
extern fn void toggle_fullscreen() @cname("ToggleFullscreen");           
extern fn void toggle_borderless_windowed() @cname("ToggleBorderlessWindowed");  
extern fn void maximize_window() @cname("MaximizeWindow");           
extern fn void minimize_window() @cname("MinimizeWindow");          
extern fn void restore_window() @cname("RestoreWindow");          
extern fn void set_window_icon(Image image) @cname("SetWindowIcon");                            
extern fn void set_window_icons(Image *images, int count) @cname("SetWindowIcons");             
extern fn void set_window_title(char *title) @cname("SetWindowTitle");                   
extern fn void set_window_position(int x, int y) @cname("SetWindowPosition");                    
extern fn void set_window_monitor(int monitor) @cname("SetWindowMonitor");                     
extern fn void set_window_min_size(int width, int height) @cname("SetWindowMinSize");          
extern fn void set_window_max_size(int width, int height) @cname("SetWindowMaxSize");         
extern fn void set_window_size(int width, int height) @cname("SetWindowSize");
extern fn void set_window_opacity(float opacity) @cname("SetWindowOpacity");                       
extern fn void set_window_focused() @cname("SetWindowFocused");                                
extern fn void *get_window_handle() @cname("GetWindowHandle");                               
extern fn int get_screen_width() @cname("GetScreenWidth");                                 
extern fn int get_screen_height() @cname("GetScreenHeight");                               
extern fn int get_render_width() @cname("GetRenderWidth");                               
extern fn int get_render_height() @cname("GetRenderHeight");                             
extern fn int get_monitor_count() @cname("GetMonitorCount");                            
extern fn int get_current_monitor() @cname("GetCurrentMonitor");                         
extern fn Vector2 get_monitor_position(int monitor) @cname("GetMonitorPosition");            
extern fn int get_monitor_width(int monitor) @cname("GetMonitorWidth");                  
extern fn int get_monitor_height(int monitor) @cname("GetMonitorHeight");                
extern fn int get_monitor_physical_width(int monitor) @cname("GetMonitorPhysicalWidth");        
extern fn int get_monitor_physical_height(int monitor) @cname("GetMonitorPhysicalHeight"); 
extern fn int get_monitor_refresh_rate(int monitor) @cname("GetMonitorRefreshRate");                     
extern fn Vector2 get_window_position() @cname("GetWindowPosition");                           
extern fn Vector2 get_window_scale_dpi() @cname("GetWindowScaleDPI");                          
extern fn char *get_monitor_name(int monitor) @cname("GetMonitorName");                 
extern fn void set_clipboard_text(char *text) @cname("SetClipboardText");                
extern fn char *get_clipboard_text() @cname("GetClipboardText");                    
extern fn void enable_event_waiting() @cname("EnableEventWaiting");                        
extern fn void disable_event_waiting() @cname("DisableEventWaiting");

extern fn void show_cursor() @cname("ShowCursor");                                      
extern fn void hide_cursor() @cname("HideCursor");                                     
extern fn bool is_cursor_hidden() @cname("IsCursorHidden");                                
extern fn void enable_cursor() @cname("EnableCursor");                                 
extern fn void disable_cursor() @cname("DisableCursor");                               
extern fn bool is_cursor_on_screen() @cname("IsCursorOnSreen");

extern fn void clear_background(Color color) @cname("ClearBackground");                          
extern fn void begin_drawing() @cname("BeginDrawing");                                   
extern fn void end_drawing() @cname("EndDrawing");                                    
extern fn void begin_mode_2d(Camera2D camera) @cname("BeginMode2D");                       
extern fn void end_mode_2d() @cname("EndMode2D");                                   
extern fn void begin_mode_3d(Camera3D camera) @cname("BeginMode3D");                     
extern fn void end_mode_3d() @cname("EndMode3D");                                 
extern fn void begin_texture_mode(RenderTexture2D target) @cname("BeginTextureMode");       
extern fn void end_texture_mode() @cname("EndTextureMode");                          
extern fn void begin_shader_mode(Shader shader) @cname("BeginShaderMode");               
extern fn void end_shader_mode() @cname("EndShaderMode");                         
extern fn void begin_blend_mode(int mode) @cname("BeginBlendMode");                   
extern fn void end_blend_mode() @cname("EndBlendMode");                        
extern fn void begin_scissor_mode(int x, int y, int width, int height) @cname("BeginScissorMode");
extern fn void end_scissor_mode() @cname("EndScissorMode");                                  
extern fn void begin_vr_stereo_mode(VrStereoConfig config) @cname("BeginVrStereoMode");           
extern fn void end_vr_stereo_mode() @cname("EndVrStereoMode");   

extern fn VrStereoConfig load_vr_stereo_config(VrDeviceInfo device) @cname("LoadVrStereoConfig");   
extern fn void unload_vr_stereo_config(VrStereoConfig config) @cname("UnloadVrStereoConfig");         


extern fn Shader load_shader(char *vsFileName, char *fsFileName) @cname("LoadShader");
extern fn Shader load_shader_from_meomry(char *vsCode, char *fsCode) @cname("LoadShaderFromMemory");
extern fn bool is_shader_ready(Shader shader) @cname("IsShaderReady");
extern fn int get_shader_location(Shader shader,char *uniformName) @cname("GetShaderLocation");      
extern fn int get_shader_location_attrib(Shader shader, char *attribName) @cname("GetShaderLocationAttrib");
extern fn void set_shader_value(Shader shader, int locIndex, void *value, int uniformType) @cname("SetShaderValue");               
extern fn void set_shader_value_v(Shader shader, int locIndex, void *value, int uniformType, int count) @cname("SetShaderValueV");  
extern fn void set_shader_value_matrix(Shader shader, int locIndex, Matrix mat) @cname("SetShaderValueMatrix");
extern fn void set_shader_value_texture(Shader shader, int locIndex, Texture2D texture) @cname("SetShaderValueTexture");
extern fn void unload_shader(Shader shader) @cname("UnloadShader");

extern fn Ray get_mouse_ray(Vector2 mousePosition, Camera camera) @cname("GetMouseRay");      
extern fn Matrix get_camera_matrix(Camera camera) @cname("GetCameraMatrix");
extern fn Matrix get_camera_matrix_2d(Camera2D camera) @cname("GetCameraMatrix2D");
extern fn Vector2 get_world_to_screen(Vector3 position, Camera camera) @cname("GetWorldToScreen");
extern fn Vector2 get_screen_to_world_2d(Vector2 position, Camera2D camera) @cname("GetScreenToWorld2D"); 
extern fn Vector2 get_world_to_screen_ex(Vector3 position, Camera camera, int width, int height) @cname("GetWorldToScreenEx"); 
extern fn Vector2 get_world_to_screen_2d(Vector2 position, Camera2D camera) @cname("GetWorldToScreen2D");

extern fn void set_target_fps(int fps) @cname("SetTargetFPS");                                
extern fn float get_frame_time() @cname("GetFrameTime");                                 
extern fn double get_time() @cname("GetTime");
extern fn int get_fps() @cname("GetFPS");

extern fn void swap_screen_buffer() @cname("SwapScreenBuffer");                              
extern fn void poll_input_events() @cname("PollInputEvents");                                
extern fn void wait_time(double seconds) @cname("WaitTime");                              

extern fn void set_random_seed(uint seed) @cname("SetRandomSeed");                     
extern fn int get_random_value(int min, int max) @cname("GetRandomValue");                  
extern fn int *load_random_sequence(uint count, int min, int max) @cname("LoadRandomSequence");
extern fn void unload_random_sequence(int *sequence) @cname("UnloadRandomSequence");

extern fn void take_screenshot(char *fileName) @cname("TakeScreenshot");                
extern fn void set_config_flags(uint flags) @cname("SetConfigFlags");                   
extern fn void open_url(char *url) @cname("OpenURL");                              

extern fn void trace_log(int logLevel, char *text, ...) @cname("TraceLog");         
extern fn void set_trace_log_level(int logLevel) @cname("SetTraceLogLevel");               
extern fn void *mem_alloc(uint size) @cname("MemAlloc");                          
extern fn void *mem_realloc(void *ptr, uint size) @cname("MemRealloc");            
extern fn void mem_free(void *ptr) @cname("MemFree");                          

extern fn void set_trace_log_callback(TraceLogCallback callback) @cname("SetTraceLogCallback"); 
extern fn void set_load_file_data_callback(LoadFileDataCallback callback) @cname("SetLoadFileDataCallback"); 
extern fn void set_save_file_data_callback(SaveFileDataCallback callback) @cname("SetSaveFileDataCallback");
extern fn void set_load_file_text_callback(LoadFileTextCallback callback) @cname("SetLoadFileTextCallback");
extern fn void set_save_file_text_callback(SaveFileTextCallback callback) @cname("SetSaveFileTextCallback");

extern fn char *load_file_data(char *fileName, int *dataSize) @cname("LoadFileData");
extern fn void unload_file_data(char *data) @cname("UnloadFileData");                   
extern fn bool save_file_data(char *fileName, void *data, int dataSize) @cname("SaveFileData");
extern fn bool export_data_as_code(char *data, int dataSize, char *fileName) @cname("ExportDataAsCode"); 
extern fn char *load_file_text(char *fileName) @cname("LoadFileText");                 
extern fn void unload_file_text(char *text) @cname("UnloadFileText");                     
extern fn bool save_file_text(char *fileName, char *text) @cname("SaveFileText");        

extern fn bool file_exists(char *fileName) @cname("FileExists");
extern fn bool directory_exists(char *dirPath) @cname("DirectoryExists");
extern fn bool is_file_extension(char *fileName, char *ext) @cname("IsFileExtension");
extern fn int get_file_length(char *fileName) @cname("GetFileLength");
extern fn char *get_file_extension(char *fileName) @cname("GetFileExtension");       
extern fn char *get_file_name(char *filePath) @cname("GetFileName");           
extern fn char *get_filename_without_ext(char *filePath) @cname("GetFilenameWithoutExt");
extern fn char *get_directory_path(char *filePath) @cname("GetDirectoryPath");
extern fn char *get_prev_directory_path(char *dirPath) @cname("GetPrevDirectoryPath");  
extern fn char *get_working_directory() @cname("GetWorkingDirectory");                 
extern fn char *get_application_directory() @cname("GetApplicationDirectory");            
extern fn bool change_directory(char *dir) @cname("ChangeDirectory");               
extern fn bool is_path_file(char *path) @cname("IsPathFile");
extern fn FilePathList load_directory_files(char *dirPath) @cname("LoadDirectoryFiles");
extern fn FilePathList load_directory_files_ex(char *basePath, char *filter, bool scanSubdirs) @cname("LoadDirectoryFilesEx");
extern fn void unload_directory_files(FilePathList files) @cname("UnloadDirectoryFiles");          
extern fn bool is_file_dropped() @cname("IsFileDropped");                              
extern fn FilePathList load_dropped_files() @cname("LoadDroppedFiles");                  
extern fn void unload_dropped_files(FilePathList files) @cname("UnloadDroppedFiles");         
extern fn long get_file_mod_time(char *fileName) @cname("GetFileModTime");          

extern fn char *compress_data(char *data, int dataSize, int *compDataSize) @cname("CompressData");        
extern fn char *decompress_data(char *compData, int compDataSize, int *dataSize) @cname("DecompressData"); 
extern fn char *encode_database_64(char *data, int dataSize, int *outputSize) @cname("EncodeDatabase64");    
extern fn char *decode_database_64(char *data, int *outputSize) @cname("DecodeDatabase64");                 

extern fn AutomationEventList load_automation_event_list(char *fileName) @cname("LoadAutomationEventList");             
extern fn void unload_automation_event_list(AutomationEventList *list) @cname("UnloadAutomationEventList");                      
extern fn bool export_automation_event_list(AutomationEventList list, char *fileName) @cname("ExportAutomationEventList");  
extern fn void set_automation_event_list(AutomationEventList *list) @cname("SetAutomationEventList");                           
extern fn void set_automation_event_base_frame(int frame) @cname("SetAutomationEventBaseFrame");                                   
extern fn void start_automation_event_recording() @cname("StartAutomationEventRecording");                                       
extern fn void stop_automation_event_recording() @cname("StopAutomationEventRecording");                                         
extern fn void play_automation_event(AutomationEvent event) @cname("PlayAutomationEvent");                                  

extern fn bool is_key_pressed(int key) @cname("IsKeyPressed");                      
extern fn bool is_key_pressed_repeat(int key) @cname("IsKeyPressedRepeat");                 
extern fn bool is_key_down(int key) @cname("IsKeyDown");                           
extern fn bool is_key_released(int key) @cname("IsKeyReleased");                        
extern fn bool is_key_up(int key) @cname("IsKeyUp");                               
extern fn int get_key_pressed() @cname("GetKeyPressed");                              
extern fn int get_char_pressed() @cname("GetCharPressed");                              
extern fn void set_exit_key(int key) @cname("SetExitKey");                               

extern fn bool is_gamepad_available(int gamepad) @cname("IsGamepadAvailable");               
extern fn char *get_gamepad_name(int gamepad) @cname("GetGamepadName");             
extern fn bool is_gamepad_button_pressed(int gamepad, int button) @cname("IsGamepadButtonPressed");   
extern fn bool is_gamepad_button_down(int gamepad, int button) @cname("IsGamepadButtonDown");      
extern fn bool is_gamepad_button_released(int gamepad, int button) @cname("IsGamepadButtonReleased");  
extern fn bool is_gamepad_button_up(int gamepad, int button) @cname("IsGamepadButtonUp");        
extern fn int get_gamepad_button_pressed() @cname("GetGamepadButtonPressed");                    
extern fn int get_gamepad_axis_count(int gamepad) @cname("GetGamepadAxisCount");                   
extern fn float get_gamepad_axis_movement(int gamepad, int axis) @cname("GetGamepadAxisMovement");    
extern fn int set_gamepad_mappings(char *mappings) @cname("SetGamepadMappings");           

extern fn bool is_mouse_button_pressed(int button) @cname("IsMouseButtonPressed");                  
extern fn bool is_mouse_button_down(int button) @cname("IsMouseButtonDown");                    
extern fn bool is_mouse_button_released(int button) @cname("IsMouseButtonReleased");               
extern fn bool is_mouse_button_up(int button) @cname("IsMouseButtonUp");                    
extern fn int get_mouse_x() @cname("GetMouseX");                                
extern fn int get_mouse_y() @cname("GetMouseY");                               
extern fn Vector2 get_mouse_position() @cname("GetMousePosition");                   
extern fn Vector2 get_mouse_delta() @cname("GetMouseDelta");                     
extern fn void set_mouse_position(int x, int y) @cname("SetMousePosition");                    
extern fn void set_mouse_offset(int offsetX, int offsetY) @cname("SetMouseOffset");         
extern fn void set_mouse_scale(float scaleX, float scaleY) @cname("SetMouseScale");       
extern fn float get_mouse_wheel_move() @cname("GetMouseWheelMove");                       
extern fn Vector2 get_mouse_wheel_move_v() @cname("GetMouseWheelMoveV");                   
extern fn void set_mouse_cursor(int cursor) @cname("SetMouseCursor");                   

extern fn int get_touch_x() @cname("GetTouchX");                                
extern fn int get_touch_y() @cname("GetTouchY");                                 
extern fn Vector2 get_touch_position(int index) @cname("GetTouchPosition");                  
extern fn int get_touch_point_id(int index) @cname("GetTouchPointId");                        
extern fn int get_touch_point_count() @cname("GetTouchPointCount");                           

extern fn void set_gestures_enabled(uint flags) @cname("SetGesturesEnabled");  
extern fn bool is_gesture_detected(uint gesture) @cname("IsGestureDetected"); 
extern fn int get_gesture_detected() @cname("GetGestureDetected");
extern fn float get_gesture_hold_duration() @cname("GetGestureHoldDuration");           
extern fn Vector2 get_gesture_drag_vector() @cname("GetGestureDragVector");            
extern fn float get_gesture_drag_angle() @cname("GetGestureDragAngle");                
extern fn Vector2 get_gesture_pinch_vector() @cname("GetGesturePinchVector");             
extern fn float get_gesture_pinch_angle() @cname("GetGesturePinchAngle");                 

extern fn void update_camera(Camera *camera, int mode) @cname("UpdateCamera");      
extern fn void update_camera_pro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom) @cname("UpdateCameraPro"); 

extern fn void set_shapes_texture(Texture2D texture, Rectangle source) @cname("SetShapesTexture");       

extern fn void draw_pixel(int posX, int posY, Color color) @cname("DrawPixel");                                           
extern fn void draw_pixel_v(Vector2 position, Color color) @cname("DrawPixelV");                                             
extern fn void draw_line(int startPosX, int startPosY, int endPosX, int endPosY, Color color) @cname("DrawLine");          
extern fn void draw_line_v(Vector2 startPos, Vector2 endPos, Color color) @cname("DrawLineV");                                
extern fn void draw_line_ex(Vector2 startPos, Vector2 endPos, float thick, Color color) @cname("DrawLineEx");                   
extern fn void draw_line_strip(Vector2 *points, int pointCount, Color color) @cname("DrawLineStrip");                               
extern fn void draw_line_bezier(Vector2 startPos, Vector2 endPos, float thick, Color color) @cname("DrawLineBezier");                 
extern fn void draw_circle(int centerX, int centerY, float radius, Color color) @cname("DrawCircle");                             
extern fn void draw_circle_sector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) @cname("DrawCircleSector");      
extern fn void draw_circle_sector_lines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) @cname("DrawCircleSectorLines");
extern fn void draw_circle_gradient(int centerX, int centerY, float radius, Color color1, Color color2) @cname("DrawCircleGradient");       
extern fn void draw_circle_v(Vector2 center, float radius, Color color) @cname("DrawCircleV");                                 
extern fn void draw_circle_lines(int centerX, int centerY, float radius, Color color) @cname("DrawCircleLines");                    
extern fn void draw_circle_lines_v(Vector2 center, float radius, Color color) @cname("DrawCirclesLinesV");                              
extern fn void draw_ellipse(int centerX, int centerY, float radiusH, float radiusV, Color color) @cname("DrawEllipse");          
extern fn void draw_ellipse_lines(int centerX, int centerY, float radiusH, float radiusV, Color color) @cname("DrawEllipseLines");      
extern fn void draw_ring(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color) @cname("DrawRing"); 
extern fn void draw_ring_lines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color) @cname("DrawRingLines");    
extern fn void draw_rectangle(int posX, int posY, int width, int height, Color color) @cname("DrawRectangle");                     
extern fn void draw_rectangle_v(Vector2 position, Vector2 size, Color color) @cname("DrawRectangleV");                               
extern fn void draw_rectangle_rec(Rectangle rec, Color color) @cname("DrawRectangleRec");                                               
extern fn void draw_rectangle_pro(Rectangle rec, Vector2 origin, float rotation, Color color) @cname("DrawRectanglePro");                
extern fn void draw_rectangle_gradient_v(int posX, int posY, int width, int height, Color color1, Color color2) @cname("DrawRectangleGradientV");
extern fn void draw_rectangle_gradient_h(int posX, int posY, int width, int height, Color color1, Color color2) @cname("DrawRectangleGradientH");
extern fn void draw_rectangle_gradient_ex(Rectangle rec, Color col1, Color col2, Color col3, Color col4) @cname("DrawRectangleGradientEx");    
extern fn void draw_rectangle_lines(int posX, int posY, int width, int height, Color color) @cname("DrawRectangleLines");                 
extern fn void draw_rectangle_lines_ex(Rectangle rec, float lineThick, Color color) @cname("DrawRectangleLinesEx");                           
extern fn void draw_rectangle_rounded(Rectangle rec, float roundness, int segments, Color color) @cname("DrawRectangleRounded");              
extern fn void draw_rectangle_rounded_lines(Rectangle rec, float roundness, int segments, float lineThick, Color color) @cname("DrawRectangleRoundedLines"); 
extern fn void draw_triangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color) @cname("DrawTriangle");                           
extern fn void draw_triangle_lines(Vector2 v1, Vector2 v2, Vector2 v3, Color color) @cname("DrawTriangleLines");                       
extern fn void draw_triangle_fan(Vector2 *points, int pointCount, Color color) @cname("DrawTriangleFan");                             
extern fn void draw_triangle_strip(Vector2 *points, int pointCount, Color color) @cname("DrawTriangleStrip");                            
extern fn void draw_poly(Vector2 center, int sides, float radius, float rotation, Color color) @cname("DrawPoly");              
extern fn void draw_poly_lines(Vector2 center, int sides, float radius, float rotation, Color color) @cname("DrawPolyLines");          
extern fn void draw_poly_lines_ex(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color) @cname("DrawPolyLinesEx"); 

extern fn void draw_spline_linear(Vector2 *points, int pointCount, float thick, Color color) @cname("DrawSplineLinear");              
extern fn void draw_spline_basis(Vector2 *points, int pointCount, float thick, Color color) @cname("DrawSplineBasis");                
extern fn void draw_spline_catmull_rom(Vector2 *points, int pointCount, float thick, Color color) @cname("DrawSplineCatmullRom");           
extern fn void draw_spline_bezier_quadratic(Vector2 *points, int pointCount, float thick, Color color) @cname("DrawSplineBezierQuadratic");       
extern fn void draw_spline_bezier_cubic(Vector2 *points, int pointCount, float thick, Color color) @cname("DrawSplineBezierCubic");            
extern fn void draw_spline_segment_linear(Vector2 p1, Vector2 p2, float thick, Color color) @cname("DrawSplineSegmentLinear");                    
extern fn void draw_spline_segment_basis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color) @cname("DrawSplineSegmentBasis"); 
extern fn void draw_spline_segment_catmull_rom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color) @cname("DrawSplineSegmentCatmullRom"); 
extern fn void draw_spline_segment_bezier_quadratic(Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color) @cname("DrawSplineSegmentBezierQuadratic"); 
extern fn void draw_spline_segment_bezier_cubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color) @cname("DrawSplineSegmentBezierCubic"); 

extern fn Vector2 get_spline_point_linear(Vector2 startPos, Vector2 endPos, float t) @cname("GetSplinePointLinear");                           
extern fn Vector2 get_spline_point_basis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t) @cname("GetSplinePointBasis");             
extern fn Vector2 get_spline_point_catmull_rom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t) @cname("GetSplinePointCatmullRom");       
extern fn Vector2 get_spline_point_bezier_quad(Vector2 p1, Vector2 c2, Vector2 p3, float t) @cname("GetSplinePointBezierQuad");                  
extern fn Vector2 get_spline_point_bezier_cubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t) @cname("GetSplinePointBezierCubic");    

extern fn bool check_collision_recs(Rectangle rec1, Rectangle rec2) @cname("CheckCollisionRecs");                                   
extern fn bool check_collision_circles(Vector2 center1, float radius1, Vector2 center2, float radius2) @cname("CheckCollisionCircles"); 
extern fn bool check_collision_circle_rec(Vector2 center, float radius, Rectangle rec) @cname("CheckCollisionCircleRec");                   
extern fn bool check_collision_point_rec(Vector2 point, Rectangle rec) @cname("CheckCollisionPointRec");                                    
extern fn bool check_collision_point_circle(Vector2 point, Vector2 center, float radius) @cname("CheckCollisionPointCircle");                   
extern fn bool check_collision_point_triangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3) @cname("CheckCollisionPointTriangle");            
extern fn bool check_collision_point_poly(Vector2 point, Vector2 *points, int pointCount) @cname("CheckCollisionPointPoly");                    
extern fn bool check_collision_lines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint) @cname("CheckCollisionLines"); 
extern fn bool check_collision_point_line(Vector2 point, Vector2 p1, Vector2 p2, int threshold) @cname("CheckCollisionPointLine");               
extern fn Rectangle get_collision_rec(Rectangle rec1, Rectangle rec2) @cname("GetCollisionRec");                                         

extern fn Image load_image(char *fileName) @cname("LoadImage");                                                             
extern fn Image load_image_raw(char *fileName, int width, int height, int format, int headerSize) @cname("LoadImageRaw");      
extern fn Image load_image_svg(char *fileNameOrString, int width, int height) @cname("LoadImageSvg");                         
extern fn Image load_image_anim(char *fileName, int *frames) @cname("LoadImageAnim");                                         
extern fn Image load_image_from_memory(char *fileType, char *fileData, int dataSize) @cname("LoadImageFromMemory");      
extern fn Image load_image_from_texture(Texture2D texture) @cname("LoadImageFromTexture");                                                     
extern fn Image load_image_from_screen() @cname("LoadImageFromScreen");                                                                   
extern fn bool is_image_ready(Image image) @cname("IsImageReady");                                                               
extern fn void unload_image(Image image) @cname("UnloadImage");                                                               
extern fn bool export_image(Image image, char *fileName) @cname("ExportImage");                                              
extern fn char *export_image_to_memory(Image image, char *fileType, int *fileSize) @cname("ExportImageToMemory");            
extern fn bool export_image_as_code(Image image, char *fileName) @cname("ExportImageAsCode");                                      

extern fn Image gen_image_color(int width, int height, Color color) @cname("GenImageColor");                                       
extern fn Image gen_image_gradient_linear(int width, int height, int direction, Color start, Color end) @cname("GenImageGradientLinear");    
extern fn Image gen_image_gradient_radial(int width, int height, float density, Color inner, Color outer) @cname("GenImageGradientRadial");   
extern fn Image gen_image_gradient_square(int width, int height, float density, Color inner, Color outer) @cname("GenImageGradientSquare");    
extern fn Image gen_image_checked(int width, int height, int checksX, int checksY, Color col1, Color col2) @cname("GenImageChecked");    
extern fn Image gen_image_white_noise(int width, int height, float factor) @cname("GenImageWhiteNoise");                               
extern fn Image gen_image_perlin_noise(int width, int height, int offsetX, int offsetY, float scale) @cname("GenImagePerlinNoise");    
extern fn Image gen_image_cellular(int width, int height, int tileSize) @cname("GenImageCellular");                                
extern fn Image gen_image_text(int width, int height, char *text) @cname("GenImageText");                                     

extern fn Image image_copy(Image image) @cname("ImageCopy");                                                                      
extern fn Image image_from_image(Image image, Rectangle rec) @cname("ImageFromImage");                                                 
extern fn Image image_text(char *text, int fontSize, Color color) @cname("ImageText");                                    
extern fn Image image_text_ex(Font font, char *text, float fontSize, float spacing, Color tint) @cname("ImageTextEx");      
extern fn void image_format(Image *image, int newFormat) @cname("ImageFormat");                                                 
extern fn void image_to_pot(Image *image, Color fill) @cname("ImageToPot");                                                    
extern fn void image_crop(Image *image, Rectangle crop) @cname("ImageCrop");                                                
extern fn void image_alpha_crop(Image *image, float threshold) @cname("ImageAlphaCrop");                                         
extern fn void image_alpha_clear(Image *image, Color color, float threshold) @cname("ImageAlphaClear");                          
extern fn void image_alpha_mask(Image *image, Image alphaMask) @cname("ImageAlphaMask");                                       
extern fn void image_alpha_premultiply(Image *image) @cname("ImageAlphaPremultiply");                                                
extern fn void image_blur_guassian(Image *image, int blurSize) @cname("ImageBlueGuassian");                                     
extern fn void image_resize(Image *image, int newWidth, int newHeight) @cname("ImageResize");                           
extern fn void image_resize_nn(Image *image, int newWidth,int newHeight) @cname("ImageResizeNN");                         
extern fn void image_resize_canvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill) @cname("ImageResizeCanvas");  
extern fn void image_mipmaps(Image *image) @cname("ImageMipmaps");                                                                   
extern fn void image_dither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp) @cname("ImageDither");                           
extern fn void image_flip_vertical(Image *image) @cname("ImageFlipVertical");                                                            
extern fn void image_flip_horizontal(Image *image) @cname("ImageFlipHorizontal");                                                         
extern fn void image_rotate(Image *image, int degrees) @cname("ImageRotate");                                                   
extern fn void image_rotate_cw(Image *image) @cname("ImageRotateCW");                                                             
extern fn void image_rotate_ccw(Image *image) @cname("ImageRotateCCW");                                                           
extern fn void image_color_tint(Image *image, Color color) @cname("ImageColorTint");                                                    
extern fn void image_color_invert(Image *image) @cname("ImageColorInvert");                                                              
extern fn void image_color_grayscale(Image *image) @cname("ImageColorGrayscale");                                                          
extern fn void image_color_contrast(Image *image, float contrast) @cname("ImageColorContrast");                                          
extern fn void image_color_brightness(Image *image, int brightness) @cname("ImageColorBrightness");                                       
extern fn void image_color_replace(Image *image, Color color, Color replace) @cname("ImageColorReplace");                             
extern fn Color *load_image_colors(Image image) @cname("LoadImageColors");                                                         
extern fn Color *load_image_palette(Image image, int maxPaletteSize, int *colorCount) @cname("LoadImagePalette");                  
extern fn void unload_image_colors(Color *colors) @cname("UnloadImageColors");                                                     
extern fn void unload_image_palette(Color *colors) @cname("UnloadImagePalette");                                                   
extern fn Rectangle get_image_alpha_border(Image image, float threshold) @cname("GetImageAlphaBorder");                             
extern fn Color get_image_color(Image image, int x, int y) @cname("GetImageColor");                                         

extern fn void image_clear_background(Image *dst, Color color) @cname("ImageClearBackground");                                                
extern fn void image_draw_pixel(Image *dst, int posX, int posY, Color color) @cname("ImageDrawPixel");                                 
extern fn void image_draw_pixel_v(Image *dst, Vector2 position, Color color) @cname("ImageDrawPixelV");                                
extern fn void image_draw_line(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color) @cname("ImageDrawLine"); 
extern fn void image_draw_line_v(Image *dst, Vector2 start, Vector2 end, Color color) @cname("ImageDrawLineV");                          
extern fn void image_draw_circle(Image *dst, int centerX, int centerY, int radius, Color color) @cname("ImageDrawCircle");               
extern fn void image_draw_circle_v(Image *dst, Vector2 center, int radius, Color color) @cname("ImageDrawCircleV");                      
extern fn void image_draw_circle_lines(Image *dst, int centerX, int centerY, int radius, Color color) @cname("ImageDrawCircleLines");       
extern fn void image_draw_circle_lines_v(Image *dst, Vector2 center, int radius, Color color) @cname("ImageDrawCircleLinesV");              
extern fn void image_draw_rectangle(Image *dst, int posX, int posY, int width, int height, Color color) @cname("ImageDrawRectangle");   
extern fn void image_draw_rectangle_v(Image *dst, Vector2 position, Vector2 size, Color color) @cname("ImageDrawRectangleV");           
extern fn void image_draw_rectangle_rec(Image *dst, Rectangle rec, Color color) @cname("ImageDrawRectangleRec");                         
extern fn void image_draw_rectangle_lines(Image *dst, Rectangle rec, int thick, Color color) @cname("ImageDrawRectangeLines");           
extern fn void image_draw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint) @cname("ImageDraw");      
extern fn void image_draw_text(Image *dst, char *text, int posX, int posY, int fontSize, Color color) @cname("ImageDrawText");   
extern fn void image_draw_text_ex(Image *dst, Font font, char *text, Vector2 position, float fontSize, float spacing, Color tint) @cname("ImageDrawTextEx"); 

extern fn Texture2D load_texture(char *fileName) @cname("LoadTexture");                                                       
extern fn Texture2D load_texture_from_image(Image image) @cname("LoadTextureFromImage");                                                 
extern fn TextureCubemap load_texture_cubemap(Image image, int layout) @cname("LoadTextureCubemap");                                 
extern fn RenderTexture2D load_render_texture(int width, int height) @cname("LoadRenderTexture");                                  
extern fn bool is_texture_ready(Texture2D texture) @cname("IsTextureReady");                                                   
extern fn void unload_texture(Texture2D texture) @cname("UnloadTexture");                                                   
extern fn bool is_render_texture_ready(RenderTexture2D target) @cname("IsRenderTextureReady");                                      
extern fn void unload_render_texture(RenderTexture2D target) @cname("UploadRenderTexture");                                      
extern fn void update_texture(Texture2D texture, void *pixels) @cname("UpdateTexture");                                  
extern fn void update_texture_rec(Texture2D texture, Rectangle rec, void *pixels) @cname("UpdateTextureRec");              

extern fn void gen_texture_mipmaps(Texture2D *texture) @cname("GenTextureMipmaps");                                                        
extern fn void set_texture_filter(Texture2D texture, int filter) @cname("SetTextureFilter");                                             
extern fn void set_texture_wrap(Texture2D texture, int wrap) @cname("SetTextureWrap");                                                

extern fn void draw_texture(Texture2D texture, int posX, int posY, Color tint) @cname("DrawTexture");                             
extern fn void draw_texture_v(Texture2D texture, Vector2 position, Color tint) @cname("DrawTextureV");                              
extern fn void draw_texture_ex(Texture2D texture, Vector2 position, float rotation, float scale, Color tint) @cname("DrawTextureEx"); 
extern fn void draw_texture_rec(Texture2D texture, Rectangle source, Vector2 position, Color tint) @cname("DrawTextureRec");            
extern fn void draw_texture_pro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint) @cname("DrawTexturePro"); 
extern fn void draw_texture_n_patch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint) @cname("DrawTextureNPatch");

extern fn Color fade(Color color, float alpha) @cname("Fade");                   
extern fn int color_to_int(Color color) @cname("ColorToInt");                             
extern fn Vector4 color_normalize(Color color) @cname("ColorToNormalize");                      
extern fn Color color_from_normalized(Vector4 normalized) @cname("ColorFromNormalized");             
extern fn Vector3 color_to_hsv(Color color) @cname("ColorToHSV");                            
extern fn Color color_from_hsv(float hue, float saturation, float value) @cname("ColorFromHSV");
extern fn Color color_tint(Color color, Color tint) @cname("ColorTint");                     
extern fn Color color_brightness(Color color, float factor) @cname("ColorBrightness");              
extern fn Color color_contrast(Color color, float contrast) @cname("ColorContrast");               
extern fn Color color_alpha(Color color, float alpha) @cname("ColorAlpha");                      
extern fn Color color_alpha_blend(Color dst, Color src, Color tint) @cname("ColorAlphaBlend");          
extern fn Color get_color(uint hexValue) @cname("GetColor");                             
extern fn Color get_pixel_color(void *srcPtr, int format) @cname("GetPixelColor");                      
extern fn void set_pixel_color(void *dstPtr, Color color, int format) @cname("SetPixelColor");           
extern fn int get_pixel_data_size(int width, int height, int format) @cname("GetPixelDataSize");              

extern fn Font get_font_default() @cname("GetFontDefault");                                                         
extern fn Font load_font(char *fileName) @cname("LoadFont");                                                  
extern fn Font load_font_ex(char *fileName, int fontSize, int *codepoints, int codepointCount) @cname("LoadFontEx"); 
extern fn Font load_font_from_image(Image image, Color key, int firstChar) @cname("LoadFontFromImage");                       
extern fn Font load_font_from_memory(char *fileType, char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount) @cname("LoadFontFromMemory"); 
extern fn bool is_font_ready(Font font) @cname("IsFontReady");                                                          
extern fn GlyphInfo *load_font_data(char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type) @cname("LoadFontData"); 
extern fn Image gen_image_from_atlas(GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod) @cname("GenImageFromAtlas"); 
extern fn void unload_font_data(GlyphInfo *glyphs, int glyphCount) @cname("UnloadFontData");                       
extern fn void unload_font(Font font) @cname("UnloadFont");                                                    
extern fn bool export_font_as_code(Font font, char *fileName) @cname("ExportFontAsCode");                               

extern fn void draw_fps(int posX, int posY) @cname("DrawFPS");                                                     
extern fn void draw_text(char *text, int posX, int posY, int fontSize, Color color) @cname("DrawText");       
extern fn void draw_text_ex(Font font, char *text, Vector2 position, float fontSize, float spacing, Color tint) @cname("DrawTextEx"); 
extern fn void draw_text_pro(Font font, char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint) @cname("DrawTextPro"); 
extern fn void draw_text_codepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint) @cname("DrawTextCodepoint"); 
extern fn void draw_text_codepoints(Font font, int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint) @cname("DrawTextCodepoints"); 

extern fn void set_text_line_spacing(int spacing) @cname("SetTextLineSpacing");                                                 
extern fn int measure_text(char *text, int fontSize) @cname("MeasureText");                                      
extern fn Vector2 measure_text_ex(Font font, char *text, float fontSize, float spacing) @cname("MeasureTextEx");   
extern fn int get_glyph_index(Font font, int codepoint) @cname("GetGlyphIndex");                                  
extern fn Rectangle get_glyph_atlas_rec(Font font, int codepoint) @cname("GetGlyphAtlasRec");                        
extern fn GlyphInfo get_glyph_info(Font font, int codepoint) @cname("GetGlyphInfo");                           

extern fn char *load_utf8(int *codepoints, int length) @cname("LoadUTF8");                
extern fn void unload_utf8(char *text) @cname("UnloadUTF8");                               
extern fn int *load_codepoints(char *text, int *count) @cname("LoadCodepoints");              
extern fn void unload_codepoints(int *codepoints) @cname("UnloadCodepoints");                  
extern fn int get_codepoint_count(char *text) @cname("GetCodepointCount");                      
extern fn int get_codepoint(char *text, int *codepointSize) @cname("GetCodepoint");      
extern fn int get_codepoint_next(char *text, int *codepointSize) @cname("GetCodepointNext");       
extern fn int get_codepoint_previous(char *text, int *codepointSize) @cname("GetCodepointPrevious");  
extern fn char *codepoint_to_utf8(int codepoint, int *utf8Size) @cname("CodepointToUTF8");

extern fn int text_copy(char *dst, char *src) @cname("TextCopy");                                             
extern fn bool text_is_equal(char *text1, char *text2) @cname("TextIsEqual");                              
extern fn uint text_length(char *text) @cname("TextLength");                                          
extern fn char *text_format(char *text, ...) @cname("TextFormat");                                     
extern fn char *text_subtext(char *text, int position, int length) @cname("TextSubtext");              
extern fn char *text_replace(char *text, char *replace, char *by) @cname("TextReplace");              
extern fn char *text_insert(char *text, char *insert, int position) @cname("TextInsert");           
extern fn char *text_join(char **textList, int count, char *delimiter) @cname("TextJoin"); 
extern fn char **text_split(char *text, char delimiter, int *count) @cname("TextSplit");         
extern fn void text_append(char *text, char *append, int *position) @cname("TextAppend");              
extern fn int text_find_index(char *text, char *find) @cname("TextFindIndex");                      
extern fn char *text_to_upper(char *text) @cname("TextToUpper");                   
extern fn char *text_to_lower(char *text) @cname("TextToLower");                    
extern fn char *text_to_pascal(char *text) @cname("TextToPascal");                    
extern fn int text_to_integer(char *text) @cname("TextToInteger");                            

extern fn void draw_line_3d(Vector3 startPos, Vector3 endPos, Color color) @cname("DrawLine3D");                                    
extern fn void draw_point_3d(Vector3 position, Color color) @cname("DrawPoint3D");                                                  
extern fn void draw_circle_3d(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color) @cname("DrawCircle3D"); 
extern fn void draw_triangle_3d(Vector3 v1, Vector3 v2, Vector3 v3, Color color) @cname("DrawTriangle3D");                              
extern fn void draw_triangle_strip_3d(Vector3 *points, int pointCount, Color color) @cname("DrawTriangleStrip3D");                           
extern fn void draw_cube(Vector3 position, float width, float height, float length, Color color) @cname("DrawCube");           
extern fn void draw_cube_v(Vector3 position, Vector3 size, Color color) @cname("DrawCubeV");                                    
extern fn void draw_cube_wires(Vector3 position, float width, float height, float length, Color color) @cname("DrawCubeWires");    
extern fn void draw_cube_wires_v(Vector3 position, Vector3 size, Color color) @cname("DrawCubeWiresV");                             
extern fn void draw_sphere(Vector3 centerPos, float radius, Color color) @cname("DrawSphere");                               
extern fn void draw_sphere_ex(Vector3 centerPos, float radius, int rings, int slices, Color color) @cname("DrawSphereEx");     
extern fn void draw_sphere_wires(Vector3 centerPos, float radius, int rings, int slices, Color color) @cname("DrawSphereWires"); 
extern fn void draw_cylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color) @cname("DrawCylinder"); 
extern fn void draw_cylinder_ex(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color) @cname("DrawCylinderEx"); 
extern fn void draw_cylinder_wires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color) @cname("DrawCylinderWires"); 
extern fn void draw_cylinders_wires_ex(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color) @cname("DrawCylinderWiresEx"); 
extern fn void draw_capsule(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color) @cname("DrawCapsule"); 
extern fn void draw_capsule_wires(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color) @cname("DrawCapsuleWires"); 
extern fn void draw_plane(Vector3 centerPos, Vector2 size, Color color) @cname("DrawPlane");                                      
extern fn void draw_ray(Ray ray, Color color) @cname("DrawRay");                                                               
extern fn void draw_grid(int slices, float spacing) @cname("DrawGrid");                                                        

extern fn Model load_model(char *fileName) @cname("LoadModel");                                                
extern fn Model load_model_from_mesh(Mesh mesh) @cname("LoadModelFromMesh");                                            
extern fn bool is_model_ready(Model model) @cname("IsModelReady");                                               
extern fn void unload_model(Model model) @cname("UnloadModel");                                               
extern fn BoundingBox get_model_bounding_box(Model model) @cname("GetModelBoundingBox");                               

extern fn void draw_model(Model model, Vector3 position, float scale, Color tint) @cname("DrawModel");             
extern fn void draw_model_ex(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) @cname("DrawModelEx"); 
extern fn void draw_model_wires(Model model, Vector3 position, float scale, Color tint) @cname("DrawModelWires");         
extern fn void draw_model_wires_ex(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) @cname("DrawModelWiresEx"); 
extern fn void draw_bounding_box(BoundingBox box, Color color) @cname("DrawBoundingBox");                                   
extern fn void draw_billboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint) @cname("DrawBillboard");   
extern fn void draw_billboard_rec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint) @cname("DrawBillboardRec"); 
extern fn void draw_billboard_pro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint) @cname("DrawBillboardRec"); 

extern fn void upload_mesh(Mesh *mesh, bool dynamic) @cname("UploadMesh");                                         
extern fn void update_mesh_buffer(Mesh mesh, int index, void *data, int dataSize, int offset) @cname("UpdateMeshBuffer");
extern fn void unload_mesh(Mesh mesh) @cname("UnloadMesh");                                                      
extern fn void draw_mesh(Mesh mesh, Material material, Matrix transform) @cname("DrawMesh");                  
extern fn void draw_mesh_instanced(Mesh mesh, Material material, Matrix *transforms, int instances) @cname("DrawMeshInstanced"); 
extern fn bool export_mesh(Mesh mesh, char *fileName) @cname("ExportMesh");                                    
extern fn BoundingBox get_mesh_bounding_box(Mesh mesh) @cname("GetMeshBoundingBox");                                    
extern fn void get_mesh_tangents(Mesh *mesh) @cname("GetMeshTangents");                                            

extern fn Mesh gen_mesh_poly(int sides, float radius) @cname("GenMeshPoly");                                         
extern fn Mesh gen_mesh_plane(float width, float length, int resX, int resZ) @cname("GenMeshPlane");                   
extern fn Mesh gen_mesh_cube(float width, float height, float length) @cname("GenMeshCube");                           
extern fn Mesh gen_mesh_sphere(float radius, int rings, int slices) @cname("GenMeshSphere");                              
extern fn Mesh gen_mesh_hemisphere(float radius, int rings, int slices) @cname("GenMeshHemisphere");                        
extern fn Mesh gen_mesh_cylinder(float radius, float height, int slices) @cname("GenMeshCylinder");                      
extern fn Mesh gen_mesh_cone(float radius, float height, int slices) @cname("GenMeshCone");                         
extern fn Mesh gen_mesh_torus(float radius, float size, int radSeg, int sides) @cname("GenMeshTorus");              
extern fn Mesh gen_mesh_knot(float radius, float size, int radSeg, int sides) @cname("GenMeshKnot");              
extern fn Mesh gen_mesh_heightmap(Image heightmap, Vector3 size) @cname("GenMeshHeightmap");
extern fn Mesh gen_mesh_cubicmap(Image cubicmap, Vector3 cubeSize) @cname("GenMeshCubicmap");                       

extern fn Material *load_materials(char *fileName, int *materialCount) @cname("LoadMaterials");                    
extern fn Material load_material_default() @cname("LoadMaterialDefault");                                                
extern fn bool is_material_ready(Material material) @cname("IsMaterialReady");                                            
extern fn void unload_material(Material material) @cname("UnloadMaterial");                                              
extern fn void set_material_texture(Material *material, int mapType, Texture2D texture) @cname("SetMaterialTexture");          
extern fn void set_model_mesh_material(Model *model, int meshId, int materialId) @cname("SetModelMeshMaterial");           

extern fn ModelAnimation *load_model_animations(char *fileName, int *animCount) @cname("LoadModelAnimations");            
extern fn void update_model_animation(Model model, ModelAnimation anim, int frame) @cname("UpdateModelAnimation");            
extern fn void unload_model_animation(ModelAnimation anim) @cname("UnloadModelAnimation");                                     
extern fn void unload_model_animations(ModelAnimation *animations, int animCount) @cname("UnloadModelAnimations");               
extern fn bool is_model_animaton_valid(Model model, ModelAnimation anim) @cname("IsModelAnimationValid");                         

extern fn bool check_collision_spheres(Vector3 center1, float radius1, Vector3 center2, float radius2) @cname("CheckCollisionSpheres");   
extern fn bool check_collision_boxes(BoundingBox box1, BoundingBox box2) @cname("CheckCollisionBoxes");                           
extern fn bool check_collision_box_sphere(BoundingBox box, Vector3 center, float radius) @cname("CheckCollisionBoxSphere");             
extern fn RayCollision get_ray_collision_sphere(Ray ray, Vector3 center, float radius) @cname("GetRayCollisionSphere");                
extern fn RayCollision get_ray_collision_box(Ray ray, BoundingBox box) @cname("GetRayCollisionBox");                                 
extern fn RayCollision get_ray_collision_mesh(Ray ray, Mesh mesh, Matrix transform) @cname("GetRayCollisionMesh");                     
extern fn RayCollision get_ray_collision_triangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3) @cname("GetRayCollisionTriangle");           
extern fn RayCollision get_ray_collision_quad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4) @cname("GetRayCollisionQuad");    

extern fn void init_audio_device() @cname("InitAudioDevice");                                     
extern fn void close_audio_device() @cname("CloseAudioDevice");                                   
extern fn bool is_audio_device_ready() @cname("IsAudioDeviceReady");                                
extern fn void set_master_volume(float volume) @cname("SetMasterVolume");                      
extern fn float get_master_volume() @cname("GetMasterVolume");                                

extern fn Wave load_wave(char *fileName) @cname("LoadWave");                            
extern fn Wave load_wave_from_memory(char *fileType, char *fileData, int dataSize) @cname("LoadWaveFromMemory"); 
extern fn bool is_wave_ready(Wave wave) @cname("IsWaveReady");                           
extern fn Sound load_sound(char *fileName) @cname("LoadSound");                        
extern fn Sound load_sound_from_wave(Wave wave) @cname("LoadSoundFromWave");                      
extern fn Sound load_sound_alias(Sound source) @cname("LoadSoundAlias");                       
extern fn bool is_sound_ready(Sound sound) @cname("IsSoundReady");                            
extern fn void update_sound(Sound sound, void *data, int sampleCount) @cname("UpdateSound"); 
extern fn void unload_wave(Wave wave) @cname("UnloadWave");                           
extern fn void unload_sound(Sound sound) @cname("UnloadSound");                         
extern fn void unload_sound_alias(Sound sound_alias) @cname("UnloadSoundAlias");                     
extern fn bool export_wave(Wave wave, char *fileName) @cname("ExportWave");              
extern fn bool export_wave_as_code(Wave wave, char *fileName) @cname("ExportWaveAsCode");         

extern fn void play_sound(Sound sound) @cname("PlaySound");                         
extern fn void stop_sound(Sound sound) @cname("StopSound");                          
extern fn void pause_sound(Sound sound) @cname("PauseSound");                          
extern fn void resume_sound(Sound sound) @cname("ResumeSound");                          
extern fn bool is_sound_playing(Sound sound) @cname("IsSoundPlaying");                        
extern fn void set_sound_volume(Sound sound, float volume) @cname("SetSoundVolume");           
extern fn void set_sound_pitch(Sound sound, float pitch) @cname("SetSoundPitch");              
extern fn void set_sound_pan(Sound sound, float pan) @cname("SetSoundPan");                   
extern fn Wave wave_copy(Wave wave) @cname("WaveCopy");                                    
extern fn void wave_crop(Wave *wave, int initSample, int finalSample) @cname("WaveCrop");   
extern fn void wave_format(Wave *wave, int sampleRate, int sampleSize, int channels) @cname("WaveFormat"); 
extern fn float *load_wave_samples(Wave wave) @cname("LoadWaveSamples");                             
extern fn void unload_wave_samples(float *samples) @cname("UnloadWaveSamples");                         

extern fn Music load_music_stream(char *fileName) @cname("LoadMusicStream");                    
extern fn Music load_music_stream_from_memory(char *fileType, char *data, int dataSize) @cname("LoadMusicStreamFromMemory"); 
extern fn bool is_music_ready(Music music) @cname("IsMusicReady");                    
extern fn void unload_music_stream(Music music) @cname("UnloadMusicStream");                
extern fn void play_music_stream(Music music) @cname("PlayMusicStream");                   
extern fn bool is_music_stream_playing(Music music) @cname("IsMusicStreamPlaying");               
extern fn void update_music_stream(Music music) @cname("UpdateMusicStream");                   
extern fn void stop_music_stream(Music music) @cname("StopMusicStream");                      
extern fn void pause_music_stream(Music music) @cname("PauseMusicStream");                      
extern fn void resume_music_stream(Music music) @cname("ResumeMusicStream");                      
extern fn void seek_music_stream(Music music, float position) @cname("SeekMusicStream");         
extern fn void set_music_volume(Music music, float volume) @cname("SetMusicVolume");             
extern fn void set_music_pitch(Music music, float pitch) @cname("SetMusicPitch");                
extern fn void set_music_pan(Music music, float pan) @cname("SetMusicPan");                     
extern fn float get_music_time_length(Music music) @cname("GetMusicTimeLength");                         
extern fn float get_music_time_played(Music music) @cname("GetMusicTimePlayed");                          

extern fn AudioStream load_audio_stream(uint sampleRate, uint sampleSize, uint channels) @cname("LoadAudioStream"); 
extern fn bool is_audio_stream_ready(AudioStream stream) @cname("IsAudioStreamReady");                    
extern fn void unload_audio_stream(AudioStream stream) @cname("UnloadAudioStream");                    
extern fn void update_audio_stream(AudioStream stream, void *data, int frameCount) @cname("UpdateAudioStream"); 
extern fn bool is_audio_stream_processed(AudioStream stream) @cname("IsAudioStreamProcessed");                
extern fn void play_audio_stream(AudioStream stream) @cname("PlayAudioStream");                      
extern fn void pause_audio_stream(AudioStream stream) @cname("PauseAudioStream");                    
extern fn void resume_audio_stream(AudioStream stream) @cname("ResumeAudioStream");                  
extern fn bool is_audio_stream_playing(AudioStream stream) @cname("IsAudioStreamPlaying");              
extern fn void stop_audio_stream(AudioStream stream) @cname("StopAudioStream");                  
extern fn void set_audio_stream_volume(AudioStream stream, float volume) @cname("SetAudioStreamVolume");    
extern fn void set_audio_stream_pitch(AudioStream stream, float pitch) @cname("SetAudioStreamPitch");     
extern fn void set_audio_stream_pan(AudioStream stream, float pan) @cname("SetAudioStreamPan");        
extern fn void set_audio_stream_buffer_size_default(int size) @cname("SetAudioStreamBufferSizeDefault");              
extern fn void set_audio_stream_callback(AudioStream stream, AudioCallback callback) @cname("SetAudioStreamCallback"); 

extern fn void attach_audio_stream_processor(AudioStream stream, AudioCallback processor) @cname("AttachAudioStreamProcessor"); 
extern fn void detach_audio_stream_processor(AudioStream stream, AudioCallback processor) @cname("DetachAudioStreamProcessor");

extern fn void attach_audio_mixer_processor(AudioCallback processor) @cname("AttachAudioMixerProcessor"); 
extern fn void detach_audio_mixer_processor(AudioCallback processor) @cname("DetachAudioMixerProcessor");