forked from ryupold/raylib.zig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
marshal.h
2519 lines (1681 loc) · 80.5 KB
/
marshal.h
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
//--- CORE ----------------------------------------------------------------------------------------
#define GRAPHICS_API_OPENGL_11
// #define RLGL_IMPLEMENTATION
#include "raylib.h"
#include "rlgl.h"
#include "raymath.h"
// Enable vertex state pointer
void rlEnableStatePointer(int vertexAttribType, void *buffer);
// Disable vertex state pointer
void rlDisableStatePointer(int vertexAttribType);// Initialize window and OpenGL context
void mInitWindow(int width, int height, const char * title);
// Close window and unload OpenGL context
void mCloseWindow(void);
// Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
bool mWindowShouldClose(void);
// Check if window has been initialized successfully
bool mIsWindowReady(void);
// Check if window is currently fullscreen
bool mIsWindowFullscreen(void);
// Check if window is currently hidden (only PLATFORM_DESKTOP)
bool mIsWindowHidden(void);
// Check if window is currently minimized (only PLATFORM_DESKTOP)
bool mIsWindowMinimized(void);
// Check if window is currently maximized (only PLATFORM_DESKTOP)
bool mIsWindowMaximized(void);
// Check if window is currently focused (only PLATFORM_DESKTOP)
bool mIsWindowFocused(void);
// Check if window has been resized last frame
bool mIsWindowResized(void);
// Check if one specific window flag is enabled
bool mIsWindowState(unsigned int flag);
// Set window configuration state using flags (only PLATFORM_DESKTOP)
void mSetWindowState(unsigned int flags);
// Clear window configuration state flags
void mClearWindowState(unsigned int flags);
// Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
void mToggleFullscreen(void);
// Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
void mToggleBorderlessWindowed(void);
// Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
void mMaximizeWindow(void);
// Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
void mMinimizeWindow(void);
// Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
void mRestoreWindow(void);
// Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
void mSetWindowIcon(Image *image);
// Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
void mSetWindowIcons(Image * images, int count);
// Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)
void mSetWindowTitle(const char * title);
// Set window position on screen (only PLATFORM_DESKTOP)
void mSetWindowPosition(int x, int y);
// Set monitor for the current window
void mSetWindowMonitor(int monitor);
// Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
void mSetWindowMinSize(int width, int height);
// Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
void mSetWindowMaxSize(int width, int height);
// Set window dimensions
void mSetWindowSize(int width, int height);
// Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
void mSetWindowOpacity(float opacity);
// Set window focused (only PLATFORM_DESKTOP)
void mSetWindowFocused(void);
// Get current screen width
int mGetScreenWidth(void);
// Get current screen height
int mGetScreenHeight(void);
// Get current render width (it considers HiDPI)
int mGetRenderWidth(void);
// Get current render height (it considers HiDPI)
int mGetRenderHeight(void);
// Get number of connected monitors
int mGetMonitorCount(void);
// Get current connected monitor
int mGetCurrentMonitor(void);
// Get specified monitor position
void mGetMonitorPosition(Vector2 *out, int monitor);
// Get specified monitor width (current video mode used by monitor)
int mGetMonitorWidth(int monitor);
// Get specified monitor height (current video mode used by monitor)
int mGetMonitorHeight(int monitor);
// Get specified monitor physical width in millimetres
int mGetMonitorPhysicalWidth(int monitor);
// Get specified monitor physical height in millimetres
int mGetMonitorPhysicalHeight(int monitor);
// Get specified monitor refresh rate
int mGetMonitorRefreshRate(int monitor);
// Get window position XY on monitor
void mGetWindowPosition(Vector2 *out);
// Get window scale DPI factor
void mGetWindowScaleDPI(Vector2 *out);
// Get the human-readable, UTF-8 encoded name of the specified monitor
const char * mGetMonitorName(int monitor);
// Set clipboard text content
void mSetClipboardText(const char * text);
// Get clipboard text content
const char * mGetClipboardText(void);
// Enable waiting for events on EndDrawing(), no automatic event polling
void mEnableEventWaiting(void);
// Disable waiting for events on EndDrawing(), automatic events polling
void mDisableEventWaiting(void);
// Shows cursor
void mShowCursor(void);
// Hides cursor
void mHideCursor(void);
// Check if cursor is not visible
bool mIsCursorHidden(void);
// Enables cursor (unlock cursor)
void mEnableCursor(void);
// Disables cursor (lock cursor)
void mDisableCursor(void);
// Check if cursor is on the screen
bool mIsCursorOnScreen(void);
// Set background color (framebuffer clear color)
void mClearBackground(Color *color);
// Setup canvas (framebuffer) to start drawing
void mBeginDrawing(void);
// End canvas drawing and swap buffers (double buffering)
void mEndDrawing(void);
// Begin 2D mode with custom camera (2D)
void mBeginMode2D(Camera2D *camera);
// Ends 2D mode with custom camera
void mEndMode2D(void);
// Begin 3D mode with custom camera (3D)
void mBeginMode3D(Camera3D *camera);
// Ends 3D mode and returns to default 2D orthographic mode
void mEndMode3D(void);
// Begin drawing to render texture
void mBeginTextureMode(RenderTexture2D *target);
// Ends drawing to render texture
void mEndTextureMode(void);
// Begin custom shader drawing
void mBeginShaderMode(Shader *shader);
// End custom shader drawing (use default shader)
void mEndShaderMode(void);
// Begin blending mode (alpha, additive, multiplied, subtract, custom)
void mBeginBlendMode(int mode);
// End blending mode (reset to default: alpha blending)
void mEndBlendMode(void);
// Begin scissor mode (define screen area for following drawing)
void mBeginScissorMode(int x, int y, int width, int height);
// End scissor mode
void mEndScissorMode(void);
// Begin stereo rendering (requires VR simulator)
void mBeginVrStereoMode(VrStereoConfig *config);
// End stereo rendering (requires VR simulator)
void mEndVrStereoMode(void);
// Load VR stereo config for VR simulator device parameters
void mLoadVrStereoConfig(VrStereoConfig *out, VrDeviceInfo *device);
// Unload VR stereo config
void mUnloadVrStereoConfig(VrStereoConfig *config);
// Load shader from files and bind default locations
void mLoadShader(Shader *out, const char * vsFileName, const char * fsFileName);
// Load shader from code strings and bind default locations
void mLoadShaderFromMemory(Shader *out, const char * vsCode, const char * fsCode);
// Check if a shader is ready
bool mIsShaderReady(Shader *shader);
// Get shader uniform location
int mGetShaderLocation(Shader *shader, const char * uniformName);
// Get shader attribute location
int mGetShaderLocationAttrib(Shader *shader, const char * attribName);
// Set shader uniform value
void mSetShaderValue(Shader *shader, int locIndex, const void * value, int uniformType);
// Set shader uniform value vector
void mSetShaderValueV(Shader *shader, int locIndex, const void * value, int uniformType, int count);
// Set shader uniform value (matrix 4x4)
void mSetShaderValueMatrix(Shader *shader, int locIndex, Matrix *mat);
// Set shader uniform value for texture (sampler2d)
void mSetShaderValueTexture(Shader *shader, int locIndex, Texture2D *texture);
// Unload shader from GPU memory (VRAM)
void mUnloadShader(Shader *shader);
// Get a ray trace from screen position (i.e mouse)
void mGetScreenToWorldRay(Ray *out, Vector2 *position, Camera3D *camera);
// Get a ray trace from screen position (i.e mouse) in a viewport
void mGetScreenToWorldRayEx(Ray *out, Vector2 *position, Camera3D *camera, float width, float height);
// Get the screen space position for a 3d world space position
void mGetWorldToScreen(Vector2 *out, Vector3 *position, Camera3D *camera);
// Get size position for a 3d world space position
void mGetWorldToScreenEx(Vector2 *out, Vector3 *position, Camera3D *camera, int width, int height);
// Get the screen space position for a 2d camera world space position
void mGetWorldToScreen2D(Vector2 *out, Vector2 *position, Camera2D *camera);
// Get the world space position for a 2d camera screen space position
void mGetScreenToWorld2D(Vector2 *out, Vector2 *position, Camera2D *camera);
// Get camera transform matrix (view matrix)
void mGetCameraMatrix(Matrix *out, Camera3D *camera);
// Get camera 2d transform matrix
void mGetCameraMatrix2D(Matrix *out, Camera2D *camera);
// Set target FPS (maximum)
void mSetTargetFPS(int fps);
// Get time in seconds for last frame drawn (delta time)
float mGetFrameTime(void);
// Get elapsed time in seconds since InitWindow()
double mGetTime(void);
// Get current FPS
int mGetFPS(void);
// Swap back buffer with front buffer (screen drawing)
void mSwapScreenBuffer(void);
// Register all input events
void mPollInputEvents(void);
// Wait for some time (halt program execution)
void mWaitTime(double seconds);
// Set the seed for the random number generator
void mSetRandomSeed(unsigned int seed);
// Get a random value between min and max (both included)
int mGetRandomValue(int min, int max);
// Load random values sequence, no values repeated
int * mLoadRandomSequence(unsigned int count, int min, int max);
// Unload random values sequence
void mUnloadRandomSequence(int * sequence);
// Takes a screenshot of current screen (filename extension defines format)
void mTakeScreenshot(const char * fileName);
// Open URL with default system browser (if available)
void mOpenURL(const char * url);
// Set the current threshold (minimum) log level
void mSetTraceLogLevel(int logLevel);
// Set custom file binary data loader
void mSetLoadFileDataCallback(LoadFileDataCallback callback);
// Set custom file binary data saver
void mSetSaveFileDataCallback(SaveFileDataCallback callback);
// Set custom file text data loader
void mSetLoadFileTextCallback(LoadFileTextCallback callback);
// Set custom file text data saver
void mSetSaveFileTextCallback(SaveFileTextCallback callback);
// Save data to file from byte array (write), returns true on success
bool mSaveFileData(const char * fileName, void * data, int dataSize);
// Export data to code (.h), returns true on success
bool mExportDataAsCode(const unsigned char * data, int dataSize, const char * fileName);
// Load text data from file (read), returns a '\0' terminated string
char * mLoadFileText(const char * fileName);
// Unload file text data allocated by LoadFileText()
void mUnloadFileText(char * text);
// Save text data to file (write), string must be '\0' terminated, returns true on success
bool mSaveFileText(const char * fileName, char * text);
// Check if file exists
bool mFileExists(const char * fileName);
// Check if a directory path exists
bool mDirectoryExists(const char * dirPath);
// Check file extension (including point: .png, .wav)
bool mIsFileExtension(const char * fileName, const char * ext);
// Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
int mGetFileLength(const char * fileName);
// Get pointer to extension for a filename string (includes dot: '.png')
const char * mGetFileExtension(const char * fileName);
// Get pointer to filename for a path string
const char * mGetFileName(const char * filePath);
// Get filename string without extension (uses static string)
const char * mGetFileNameWithoutExt(const char * filePath);
// Get full path for a given fileName with path (uses static string)
const char * mGetDirectoryPath(const char * filePath);
// Get previous directory path for a given path (uses static string)
const char * mGetPrevDirectoryPath(const char * dirPath);
// Get current working directory (uses static string)
const char * mGetWorkingDirectory(void);
// Get the directory of the running application (uses static string)
const char * mGetApplicationDirectory(void);
// Change working directory, return true on success
bool mChangeDirectory(const char * dir);
// Check if a given path is a file or a directory
bool mIsPathFile(const char * path);
// Load directory filepaths
void mLoadDirectoryFiles(FilePathList *out, const char * dirPath);
// Load directory filepaths with extension filtering and recursive directory scan
void mLoadDirectoryFilesEx(FilePathList *out, const char * basePath, const char * filter, bool scanSubdirs);
// Unload filepaths
void mUnloadDirectoryFiles(FilePathList *files);
// Check if a file has been dropped into window
bool mIsFileDropped(void);
// Load dropped filepaths
void mLoadDroppedFiles(FilePathList *out);
// Unload dropped filepaths
void mUnloadDroppedFiles(FilePathList *files);
// Get file modification time (last write time)
long mGetFileModTime(const char * fileName);
// Compress data (DEFLATE algorithm), memory must be MemFree()
unsigned char * mCompressData(const unsigned char * data, int dataSize, int * compDataSize);
// Decompress data (DEFLATE algorithm), memory must be MemFree()
unsigned char * mDecompressData(const unsigned char * compData, int compDataSize, int * dataSize);
// Encode data to Base64 string, memory must be MemFree()
char * mEncodeDataBase64(const unsigned char * data, int dataSize, int * outputSize);
// Decode Base64 string data, memory must be MemFree()
unsigned char * mDecodeDataBase64(const unsigned char * data, int * outputSize);
// Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
void mLoadAutomationEventList(AutomationEventList *out, const char * fileName);
// Unload automation events list from file
void mUnloadAutomationEventList(AutomationEventList *list);
// Export automation events list as text file
bool mExportAutomationEventList(AutomationEventList *list, const char * fileName);
// Set automation event list to record to
void mSetAutomationEventList(AutomationEventList * list);
// Set automation event internal base frame to start recording
void mSetAutomationEventBaseFrame(int frame);
// Start recording automation events (AutomationEventList must be set)
void mStartAutomationEventRecording(void);
// Stop recording automation events
void mStopAutomationEventRecording(void);
// Play a recorded automation event
void mPlayAutomationEvent(AutomationEvent *event);
// Check if a key has been pressed once
bool mIsKeyPressed(int key);
// Check if a key has been pressed again (Only PLATFORM_DESKTOP)
bool mIsKeyPressedRepeat(int key);
// Check if a key is being pressed
bool mIsKeyDown(int key);
// Check if a key has been released once
bool mIsKeyReleased(int key);
// Check if a key is NOT being pressed
bool mIsKeyUp(int key);
// Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
int mGetKeyPressed(void);
// Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
int mGetCharPressed(void);
// Set a custom key to exit program (default is ESC)
void mSetExitKey(int key);
// Check if a gamepad is available
bool mIsGamepadAvailable(int gamepad);
// Get gamepad internal name id
const char * mGetGamepadName(int gamepad);
// Check if a gamepad button has been pressed once
bool mIsGamepadButtonPressed(int gamepad, int button);
// Check if a gamepad button is being pressed
bool mIsGamepadButtonDown(int gamepad, int button);
// Check if a gamepad button has been released once
bool mIsGamepadButtonReleased(int gamepad, int button);
// Check if a gamepad button is NOT being pressed
bool mIsGamepadButtonUp(int gamepad, int button);
// Get gamepad axis count for a gamepad
int mGetGamepadAxisCount(int gamepad);
// Get axis movement value for a gamepad axis
float mGetGamepadAxisMovement(int gamepad, int axis);
// Set internal gamepad mappings (SDL_GameControllerDB)
int mSetGamepadMappings(const char * mappings);
// Set gamepad vibration for both motors
void mSetGamepadVibration(int gamepad, float leftMotor, float rightMotor);
// Check if a mouse button has been pressed once
bool mIsMouseButtonPressed(int button);
// Check if a mouse button is being pressed
bool mIsMouseButtonDown(int button);
// Check if a mouse button has been released once
bool mIsMouseButtonReleased(int button);
// Check if a mouse button is NOT being pressed
bool mIsMouseButtonUp(int button);
// Get mouse position X
int mGetMouseX(void);
// Get mouse position Y
int mGetMouseY(void);
// Get mouse position XY
void mGetMousePosition(Vector2 *out);
// Get mouse delta between frames
void mGetMouseDelta(Vector2 *out);
// Set mouse position XY
void mSetMousePosition(int x, int y);
// Set mouse offset
void mSetMouseOffset(int offsetX, int offsetY);
// Set mouse scaling
void mSetMouseScale(float scaleX, float scaleY);
// Get mouse wheel movement for X or Y, whichever is larger
float mGetMouseWheelMove(void);
// Get mouse wheel movement for both X and Y
void mGetMouseWheelMoveV(Vector2 *out);
// Set mouse cursor
void mSetMouseCursor(int cursor);
// Get touch position X for touch point 0 (relative to screen size)
int mGetTouchX(void);
// Get touch position Y for touch point 0 (relative to screen size)
int mGetTouchY(void);
// Get touch position XY for a touch point index (relative to screen size)
void mGetTouchPosition(Vector2 *out, int index);
// Get touch point identifier for given index
int mGetTouchPointId(int index);
// Get number of touch points
int mGetTouchPointCount(void);
// Enable a set of gestures using flags
void mSetGesturesEnabled(unsigned int flags);
// Check if a gesture have been detected
bool mIsGestureDetected(unsigned int gesture);
// Get latest detected gesture
int mGetGestureDetected(void);
// Get gesture hold time in milliseconds
float mGetGestureHoldDuration(void);
// Get gesture drag vector
void mGetGestureDragVector(Vector2 *out);
// Get gesture drag angle
float mGetGestureDragAngle(void);
// Get gesture pinch delta
void mGetGesturePinchVector(Vector2 *out);
// Get gesture pinch angle
float mGetGesturePinchAngle(void);
// Update camera position for selected mode
void mUpdateCamera(Camera * camera, int mode);
// Update camera movement/rotation
void mUpdateCameraPro(Camera * camera, Vector3 *movement, Vector3 *rotation, float zoom);
// Set texture and rectangle to be used on shapes drawing
void mSetShapesTexture(Texture2D *texture, Rectangle *source);
// Get texture that is used for shapes drawing
void mGetShapesTexture(Texture2D *out);
// Get texture source rectangle that is used for shapes drawing
void mGetShapesTextureRectangle(Rectangle *out);
// Draw a pixel
void mDrawPixel(int posX, int posY, Color *color);
// Draw a pixel (Vector version)
void mDrawPixelV(Vector2 *position, Color *color);
// Draw a line
void mDrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color *color);
// Draw a line (using gl lines)
void mDrawLineV(Vector2 *startPos, Vector2 *endPos, Color *color);
// Draw a line (using triangles/quads)
void mDrawLineEx(Vector2 *startPos, Vector2 *endPos, float thick, Color *color);
// Draw lines sequence (using gl lines)
void mDrawLineStrip(Vector2 * points, int pointCount, Color *color);
// Draw line segment cubic-bezier in-out interpolation
void mDrawLineBezier(Vector2 *startPos, Vector2 *endPos, float thick, Color *color);
// Draw a color-filled circle
void mDrawCircle(int centerX, int centerY, float radius, Color *color);
// Draw a piece of a circle
void mDrawCircleSector(Vector2 *center, float radius, float startAngle, float endAngle, int segments, Color *color);
// Draw circle sector outline
void mDrawCircleSectorLines(Vector2 *center, float radius, float startAngle, float endAngle, int segments, Color *color);
// Draw a gradient-filled circle
void mDrawCircleGradient(int centerX, int centerY, float radius, Color *color1, Color *color2);
// Draw a color-filled circle (Vector version)
void mDrawCircleV(Vector2 *center, float radius, Color *color);
// Draw circle outline
void mDrawCircleLines(int centerX, int centerY, float radius, Color *color);
// Draw circle outline (Vector version)
void mDrawCircleLinesV(Vector2 *center, float radius, Color *color);
// Draw ellipse
void mDrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color *color);
// Draw ellipse outline
void mDrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color *color);
// Draw ring
void mDrawRing(Vector2 *center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color *color);
// Draw ring outline
void mDrawRingLines(Vector2 *center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color *color);
// Draw a color-filled rectangle
void mDrawRectangle(int posX, int posY, int width, int height, Color *color);
// Draw a color-filled rectangle (Vector version)
void mDrawRectangleV(Vector2 *position, Vector2 *size, Color *color);
// Draw a color-filled rectangle
void mDrawRectangleRec(Rectangle *rec, Color *color);
// Draw a color-filled rectangle with pro parameters
void mDrawRectanglePro(Rectangle *rec, Vector2 *origin, float rotation, Color *color);
// Draw a vertical-gradient-filled rectangle
void mDrawRectangleGradientV(int posX, int posY, int width, int height, Color *color1, Color *color2);
// Draw a horizontal-gradient-filled rectangle
void mDrawRectangleGradientH(int posX, int posY, int width, int height, Color *color1, Color *color2);
// Draw a gradient-filled rectangle with custom vertex colors
void mDrawRectangleGradientEx(Rectangle *rec, Color *col1, Color *col2, Color *col3, Color *col4);
// Draw rectangle outline
void mDrawRectangleLines(int posX, int posY, int width, int height, Color *color);
// Draw rectangle outline with extended parameters
void mDrawRectangleLinesEx(Rectangle *rec, float lineThick, Color *color);
// Draw rectangle with rounded edges
void mDrawRectangleRounded(Rectangle *rec, float roundness, int segments, Color *color);
// Draw rectangle with rounded edges outline
void mDrawRectangleRoundedLines(Rectangle *rec, float roundness, int segments, float lineThick, Color *color);
// Draw a color-filled triangle (vertex in counter-clockwise order!)
void mDrawTriangle(Vector2 *v1, Vector2 *v2, Vector2 *v3, Color *color);
// Draw triangle outline (vertex in counter-clockwise order!)
void mDrawTriangleLines(Vector2 *v1, Vector2 *v2, Vector2 *v3, Color *color);
// Draw a triangle fan defined by points (first vertex is the center)
void mDrawTriangleFan(Vector2 * points, int pointCount, Color *color);
// Draw a triangle strip defined by points
void mDrawTriangleStrip(Vector2 * points, int pointCount, Color *color);
// Draw a regular polygon (Vector version)
void mDrawPoly(Vector2 *center, int sides, float radius, float rotation, Color *color);
// Draw a polygon outline of n sides
void mDrawPolyLines(Vector2 *center, int sides, float radius, float rotation, Color *color);
// Draw a polygon outline of n sides with extended parameters
void mDrawPolyLinesEx(Vector2 *center, int sides, float radius, float rotation, float lineThick, Color *color);
// Draw spline: Linear, minimum 2 points
void mDrawSplineLinear(Vector2 * points, int pointCount, float thick, Color *color);
// Draw spline: B-Spline, minimum 4 points
void mDrawSplineBasis(Vector2 * points, int pointCount, float thick, Color *color);
// Draw spline: Catmull-Rom, minimum 4 points
void mDrawSplineCatmullRom(Vector2 * points, int pointCount, float thick, Color *color);
// Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
void mDrawSplineBezierQuadratic(Vector2 * points, int pointCount, float thick, Color *color);
// Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
void mDrawSplineBezierCubic(Vector2 * points, int pointCount, float thick, Color *color);
// Draw spline segment: Linear, 2 points
void mDrawSplineSegmentLinear(Vector2 *p1, Vector2 *p2, float thick, Color *color);
// Draw spline segment: B-Spline, 4 points
void mDrawSplineSegmentBasis(Vector2 *p1, Vector2 *p2, Vector2 *p3, Vector2 *p4, float thick, Color *color);
// Draw spline segment: Catmull-Rom, 4 points
void mDrawSplineSegmentCatmullRom(Vector2 *p1, Vector2 *p2, Vector2 *p3, Vector2 *p4, float thick, Color *color);
// Draw spline segment: Quadratic Bezier, 2 points, 1 control point
void mDrawSplineSegmentBezierQuadratic(Vector2 *p1, Vector2 *c2, Vector2 *p3, float thick, Color *color);
// Draw spline segment: Cubic Bezier, 2 points, 2 control points
void mDrawSplineSegmentBezierCubic(Vector2 *p1, Vector2 *c2, Vector2 *c3, Vector2 *p4, float thick, Color *color);
// Get (evaluate) spline point: Linear
void mGetSplinePointLinear(Vector2 *out, Vector2 *startPos, Vector2 *endPos, float t);
// Get (evaluate) spline point: B-Spline
void mGetSplinePointBasis(Vector2 *out, Vector2 *p1, Vector2 *p2, Vector2 *p3, Vector2 *p4, float t);
// Get (evaluate) spline point: Catmull-Rom
void mGetSplinePointCatmullRom(Vector2 *out, Vector2 *p1, Vector2 *p2, Vector2 *p3, Vector2 *p4, float t);
// Get (evaluate) spline point: Quadratic Bezier
void mGetSplinePointBezierQuad(Vector2 *out, Vector2 *p1, Vector2 *c2, Vector2 *p3, float t);
// Get (evaluate) spline point: Cubic Bezier
void mGetSplinePointBezierCubic(Vector2 *out, Vector2 *p1, Vector2 *c2, Vector2 *c3, Vector2 *p4, float t);
// Check collision between two rectangles
bool mCheckCollisionRecs(Rectangle *rec1, Rectangle *rec2);
// Check collision between two circles
bool mCheckCollisionCircles(Vector2 *center1, float radius1, Vector2 *center2, float radius2);
// Check collision between circle and rectangle
bool mCheckCollisionCircleRec(Vector2 *center, float radius, Rectangle *rec);
// Check if point is inside rectangle
bool mCheckCollisionPointRec(Vector2 *point, Rectangle *rec);
// Check if point is inside circle
bool mCheckCollisionPointCircle(Vector2 *point, Vector2 *center, float radius);
// Check if point is inside a triangle
bool mCheckCollisionPointTriangle(Vector2 *point, Vector2 *p1, Vector2 *p2, Vector2 *p3);
// Check if point is within a polygon described by array of vertices
bool mCheckCollisionPointPoly(Vector2 *point, Vector2 * points, int pointCount);
// Check the collision between two lines defined by two points each, returns collision point by reference
bool mCheckCollisionLines(Vector2 *startPos1, Vector2 *endPos1, Vector2 *startPos2, Vector2 *endPos2, Vector2 * collisionPoint);
// Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
bool mCheckCollisionPointLine(Vector2 *point, Vector2 *p1, Vector2 *p2, int threshold);
// Get collision rectangle for two rectangles collision
void mGetCollisionRec(Rectangle *out, Rectangle *rec1, Rectangle *rec2);
// Load image from file into CPU memory (RAM)
void mLoadImage(Image *out, const char * fileName);
// Load image from RAW file data
void mLoadImageRaw(Image *out, const char * fileName, int width, int height, int format, int headerSize);
// Load image from SVG file data or string with specified size
void mLoadImageSvg(Image *out, const char * fileNameOrString, int width, int height);
// Load image sequence from file (frames appended to image.data)
void mLoadImageAnim(Image *out, const char * fileName, int * frames);
// Load image sequence from memory buffer
void mLoadImageAnimFromMemory(Image *out, const char * fileType, const unsigned char * fileData, int dataSize, int * frames);
// Load image from memory buffer, fileType refers to extension: i.e. '.png'
void mLoadImageFromMemory(Image *out, const char * fileType, const unsigned char * fileData, int dataSize);
// Load image from GPU texture data
void mLoadImageFromTexture(Image *out, Texture2D *texture);
// Load image from screen buffer and (screenshot)
void mLoadImageFromScreen(Image *out);
// Check if an image is ready
bool mIsImageReady(Image *image);
// Unload image from CPU memory (RAM)
void mUnloadImage(Image *image);
// Export image data to file, returns true on success
bool mExportImage(Image *image, const char * fileName);
// Export image to memory buffer
unsigned char * mExportImageToMemory(Image *image, const char * fileType, int * fileSize);
// Export image as code file defining an array of bytes, returns true on success
bool mExportImageAsCode(Image *image, const char * fileName);
// Generate image: plain color
void mGenImageColor(Image *out, int width, int height, Color *color);
// Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
void mGenImageGradientLinear(Image *out, int width, int height, int direction, Color *start, Color *end);
// Generate image: radial gradient
void mGenImageGradientRadial(Image *out, int width, int height, float density, Color *inner, Color *outer);
// Generate image: square gradient
void mGenImageGradientSquare(Image *out, int width, int height, float density, Color *inner, Color *outer);
// Generate image: checked
void mGenImageChecked(Image *out, int width, int height, int checksX, int checksY, Color *col1, Color *col2);
// Generate image: white noise
void mGenImageWhiteNoise(Image *out, int width, int height, float factor);
// Generate image: perlin noise
void mGenImagePerlinNoise(Image *out, int width, int height, int offsetX, int offsetY, float scale);
// Generate image: cellular algorithm, bigger tileSize means bigger cells
void mGenImageCellular(Image *out, int width, int height, int tileSize);
// Generate image: grayscale image from text data
void mGenImageText(Image *out, int width, int height, const char * text);
// Create an image duplicate (useful for transformations)
void mImageCopy(Image *out, Image *image);
// Create an image from another image piece
void mImageFromImage(Image *out, Image *image, Rectangle *rec);
// Create an image from text (default font)
void mImageText(Image *out, const char * text, int fontSize, Color *color);
// Create an image from text (custom sprite font)
void mImageTextEx(Image *out, Font *font, const char * text, float fontSize, float spacing, Color *tint);
// Convert image data to desired format
void mImageFormat(Image * image, int newFormat);
// Convert image to POT (power-of-two)
void mImageToPOT(Image * image, Color *fill);
// Crop an image to a defined rectangle
void mImageCrop(Image * image, Rectangle *crop);
// Crop image depending on alpha value
void mImageAlphaCrop(Image * image, float threshold);
// Clear alpha channel to desired color
void mImageAlphaClear(Image * image, Color *color, float threshold);
// Apply alpha mask to image
void mImageAlphaMask(Image * image, Image *alphaMask);
// Premultiply alpha channel
void mImageAlphaPremultiply(Image * image);
// Apply Gaussian blur using a box blur approximation
void mImageBlurGaussian(Image * image, int blurSize);
// Apply Custom Square image convolution kernel
void mImageKernelConvolution(Image * image, float* kernel, int kernelSize);
// Resize image (Bicubic scaling algorithm)
void mImageResize(Image * image, int newWidth, int newHeight);
// Resize image (Nearest-Neighbor scaling algorithm)
void mImageResizeNN(Image * image, int newWidth, int newHeight);
// Resize canvas and fill with color
void mImageResizeCanvas(Image * image, int newWidth, int newHeight, int offsetX, int offsetY, Color *fill);
// Compute all mipmap levels for a provided image
void mImageMipmaps(Image * image);
// Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
void mImageDither(Image * image, int rBpp, int gBpp, int bBpp, int aBpp);
// Flip image vertically
void mImageFlipVertical(Image * image);
// Flip image horizontally
void mImageFlipHorizontal(Image * image);
// Rotate image by input angle in degrees (-359 to 359)
void mImageRotate(Image * image, int degrees);
// Rotate image clockwise 90deg
void mImageRotateCW(Image * image);
// Rotate image counter-clockwise 90deg
void mImageRotateCCW(Image * image);
// Modify image color: tint
void mImageColorTint(Image * image, Color *color);
// Modify image color: invert
void mImageColorInvert(Image * image);
// Modify image color: grayscale
void mImageColorGrayscale(Image * image);
// Modify image color: contrast (-100 to 100)
void mImageColorContrast(Image * image, float contrast);
// Modify image color: brightness (-255 to 255)
void mImageColorBrightness(Image * image, int brightness);
// Modify image color: replace color
void mImageColorReplace(Image * image, Color *color, Color *replace);
// Load color data from image as a Color array (RGBA - 32bit)
Color * mLoadImageColors(Image *image);
// Load colors palette from image as a Color array (RGBA - 32bit)
Color * mLoadImagePalette(Image *image, int maxPaletteSize, int * colorCount);
// Unload color data loaded with LoadImageColors()
void mUnloadImageColors(Color * colors);
// Unload colors palette loaded with LoadImagePalette()
void mUnloadImagePalette(Color * colors);
// Get image alpha border rectangle
void mGetImageAlphaBorder(Rectangle *out, Image *image, float threshold);
// Get image pixel color at (x, y) position
void mGetImageColor(Color *out, Image *image, int x, int y);
// Clear image background with given color
void mImageClearBackground(Image * dst, Color *color);
// Draw pixel within an image
void mImageDrawPixel(Image * dst, int posX, int posY, Color *color);
// Draw pixel within an image (Vector version)
void mImageDrawPixelV(Image * dst, Vector2 *position, Color *color);
// Draw line within an image
void mImageDrawLine(Image * dst, int startPosX, int startPosY, int endPosX, int endPosY, Color *color);
// Draw line within an image (Vector version)
void mImageDrawLineV(Image * dst, Vector2 *start, Vector2 *end, Color *color);
// Draw a filled circle within an image
void mImageDrawCircle(Image * dst, int centerX, int centerY, int radius, Color *color);
// Draw a filled circle within an image (Vector version)
void mImageDrawCircleV(Image * dst, Vector2 *center, int radius, Color *color);
// Draw circle outline within an image
void mImageDrawCircleLines(Image * dst, int centerX, int centerY, int radius, Color *color);
// Draw circle outline within an image (Vector version)
void mImageDrawCircleLinesV(Image * dst, Vector2 *center, int radius, Color *color);
// Draw rectangle within an image
void mImageDrawRectangle(Image * dst, int posX, int posY, int width, int height, Color *color);
// Draw rectangle within an image (Vector version)
void mImageDrawRectangleV(Image * dst, Vector2 *position, Vector2 *size, Color *color);
// Draw rectangle within an image
void mImageDrawRectangleRec(Image * dst, Rectangle *rec, Color *color);
// Draw rectangle lines within an image
void mImageDrawRectangleLines(Image * dst, Rectangle *rec, int thick, Color *color);
// Draw a source image within a destination image (tint applied to source)
void mImageDraw(Image * dst, Image *src, Rectangle *srcRec, Rectangle *dstRec, Color *tint);
// Draw text (using default font) within an image (destination)
void mImageDrawText(Image * dst, const char * text, int posX, int posY, int fontSize, Color *color);
// Draw text (custom sprite font) within an image (destination)
void mImageDrawTextEx(Image * dst, Font *font, const char * text, Vector2 *position, float fontSize, float spacing, Color *tint);
// Load texture from file into GPU memory (VRAM)
void mLoadTexture(Texture2D *out, const char * fileName);