raylib 5.0.0.4__cp311-cp311-manylinux2014_x86_64.whl → 5.5.0.0.dev2__cp311-cp311-manylinux2014_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
raylib/raygui.h.modified CHANGED
@@ -1,6 +1,6 @@
1
1
  /*******************************************************************************************
2
2
  *
3
- * raygui v4.0 - A simple and easy-to-use immediate-mode gui library
3
+ * raygui v4.5-dev - A simple and easy-to-use immediate-mode gui library
4
4
  *
5
5
  * DESCRIPTION:
6
6
  * raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also
@@ -26,7 +26,7 @@
26
26
  * NOTES:
27
27
  * - WARNING: GuiLoadStyle() and GuiLoadStyle{Custom}() functions, allocate memory for
28
28
  * font atlas recs and glyphs, freeing that memory is (usually) up to the user,
29
- * no unload function is explicitly provided... but note that GuiLoadStyleDefaulf() unloads
29
+ * no unload function is explicitly provided... but note that GuiLoadStyleDefault() unloads
30
30
  * by default any previously loaded font (texture, recs, glyphs).
31
31
  * - Global UI alpha (guiAlpha) is applied inside GuiDrawRectangle() and GuiDrawText() functions
32
32
  *
@@ -136,11 +136,29 @@
136
136
  *
137
137
  * #define RAYGUI_DEBUG_RECS_BOUNDS
138
138
  * Draw control bounds rectangles for debug
139
- *
139
+ *
140
140
  * #define RAYGUI_DEBUG_TEXT_BOUNDS
141
141
  * Draw text bounds rectangles for debug
142
142
  *
143
143
  * VERSIONS HISTORY:
144
+ * 4.5-dev (Sep-2024) Current dev version...
145
+ * ADDED: guiControlExclusiveMode and guiControlExclusiveRec for exclusive modes
146
+ * ADDED: GuiValueBoxFloat()
147
+ * ADDED: GuiDropdonwBox() properties: DROPDOWN_ARROW_HIDDEN, DROPDOWN_ROLL_UP
148
+ * ADDED: GuiListView() property: LIST_ITEMS_BORDER_WIDTH
149
+ * ADDED: Multiple new icons
150
+ * REVIEWED: GuiTabBar(), close tab with mouse middle button
151
+ * REVIEWED: GuiScrollPanel(), scroll speed proportional to content
152
+ * REVIEWED: GuiDropdownBox(), support roll up and hidden arrow
153
+ * REVIEWED: GuiTextBox(), cursor position initialization
154
+ * REVIEWED: GuiSliderPro(), control value change check
155
+ * REVIEWED: GuiGrid(), simplified implementation
156
+ * REVIEWED: GuiIconText(), increase buffer size and reviewed padding
157
+ * REVIEWED: GuiDrawText(), improved wrap mode drawing
158
+ * REVIEWED: GuiScrollBar(), minor tweaks
159
+ * REVIEWED: Functions descriptions, removed wrong return value reference
160
+ * REDESIGNED: GuiColorPanel(), improved HSV <-> RGBA convertion
161
+ *
144
162
  * 4.0 (12-Sep-2023) ADDED: GuiToggleSlider()
145
163
  * ADDED: GuiColorPickerHSV() and GuiColorPanelHSV()
146
164
  * ADDED: Multiple new icons, mostly compiler related
@@ -246,7 +264,7 @@
246
264
  * 0.8 (27-Aug-2015) Initial release. Implemented by Kevin Gato, Daniel Nicolás and Ramon Santamaria.
247
265
  *
248
266
  * DEPENDENCIES:
249
- * raylib 4.6-dev Inputs reading (keyboard/mouse), shapes drawing, font loading and text drawing
267
+ * raylib 5.0 - Inputs reading (keyboard/mouse), shapes drawing, font loading and text drawing
250
268
  *
251
269
  * STANDALONE MODE:
252
270
  * By default raygui depends on raylib mostly for the inputs and the drawing functionality but that dependency can be disabled
@@ -291,7 +309,7 @@
291
309
  *
292
310
  * LICENSE: zlib/libpng
293
311
  *
294
- * Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
312
+ * Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
295
313
  *
296
314
  * This software is provided "as-is", without any express or implied warranty. In no event
297
315
  * will the authors be held liable for any damages arising from the use of this software.
@@ -431,11 +449,11 @@ typedef enum {
431
449
  TEXT_ALIGNMENT_VERTICAL, // Text vertical alignment inside text bounds (after border and padding)
432
450
  TEXT_WRAP_MODE // Text wrap-mode inside text bounds
433
451
  //TEXT_DECORATION // Text decoration: 0-None, 1-Underline, 2-Line-through, 3-Overline
434
- //TEXT_DECORATION_THICK // Text decoration line thikness
452
+ //TEXT_DECORATION_THICK // Text decoration line thickness
435
453
  } GuiDefaultProperty;
436
454
  // Other possible text properties:
437
455
  // TEXT_WEIGHT // Normal, Italic, Bold -> Requires specific font change
438
- // TEXT_INDENT // Text indentation -> Now using TEXT_PADDING...
456
+ // TEXT_INDENT // Text indentation -> Now using TEXT_PADDING...
439
457
  // Label
440
458
  //typedef enum { } GuiLabelProperty;
441
459
  // Button/Spinner
@@ -474,7 +492,9 @@ typedef enum {
474
492
  // DropdownBox
475
493
  typedef enum {
476
494
  ARROW_PADDING = 16, // DropdownBox arrow separation from border and items
477
- DROPDOWN_ITEMS_SPACING // DropdownBox items separation
495
+ DROPDOWN_ITEMS_SPACING, // DropdownBox items separation
496
+ DROPDOWN_ARROW_HIDDEN, // DropdownBox arrow hidden
497
+ DROPDOWN_ROLL_UP // DropdownBox roll up flag (default rolls down)
478
498
  } GuiDropdownBoxProperty;
479
499
  // TextBox/TextBoxMulti/ValueBox/Spinner
480
500
  typedef enum {
@@ -491,6 +511,7 @@ typedef enum {
491
511
  LIST_ITEMS_SPACING, // ListView items separation
492
512
  SCROLLBAR_WIDTH, // ListView scrollbar size (usually width)
493
513
  SCROLLBAR_SIDE, // ListView scrollbar side (0-SCROLLBAR_LEFT_SIDE, 1-SCROLLBAR_RIGHT_SIDE)
514
+ LIST_ITEMS_BORDER_WIDTH // ListView items border width
494
515
  } GuiListViewProperty;
495
516
  // ColorPicker
496
517
  typedef enum {
@@ -545,26 +566,27 @@ typedef enum {
545
566
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active); // Tab Bar control, returns TAB to be closed or -1
546
567
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll, Rectangle *view); // Scroll Panel control
547
568
  // Basic controls set
548
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabel(Rectangle bounds, const char *text); // Label control, shows text
569
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabel(Rectangle bounds, const char *text); // Label control
549
570
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiButton(Rectangle bounds, const char *text); // Button control, returns true when clicked
550
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabelButton(Rectangle bounds, const char *text); // Label button control, show true when clicked
551
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggle(Rectangle bounds, const char *text, bool *active); // Toggle Button control, returns true when active
552
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleGroup(Rectangle bounds, const char *text, int *active); // Toggle Group control, returns active toggle index
553
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleSlider(Rectangle bounds, const char *text, int *active); // Toggle Slider control, returns true when clicked
571
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabelButton(Rectangle bounds, const char *text); // Label button control, returns true when clicked
572
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggle(Rectangle bounds, const char *text, bool *active); // Toggle Button control
573
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleGroup(Rectangle bounds, const char *text, int *active); // Toggle Group control
574
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleSlider(Rectangle bounds, const char *text, int *active); // Toggle Slider control
554
575
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiCheckBox(Rectangle bounds, const char *text, bool *checked); // Check Box control, returns true when active
555
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiComboBox(Rectangle bounds, const char *text, int *active); // Combo Box control, returns selected item index
556
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control, returns selected item
557
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control, returns selected value
576
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiComboBox(Rectangle bounds, const char *text, int *active); // Combo Box control
577
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control
578
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control
558
579
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Value Box control, updates input text with numbers
580
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiValueBoxFloat(Rectangle bounds, const char *text, char *textValue, float *value, bool editMode); // Value box control for float values
559
581
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control, updates input text
560
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider control, returns selected value
561
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider Bar control, returns selected value
562
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Progress Bar control, shows current progress value
582
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider control
583
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider Bar control
584
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Progress Bar control
563
585
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiStatusBar(Rectangle bounds, const char *text); // Status Bar control, shows info text
564
586
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDummyRec(Rectangle bounds, const char *text); // Dummy control for placeholders
565
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell); // Grid control, returns mouse cell position
587
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell); // Grid control
566
588
  // Advance controls set
567
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *active); // List View control, returns selected list item index
589
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *active); // List View control
568
590
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollIndex, int *active, int *focus); // List View with extended parameters
569
591
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons); // Message Box control, displays a message
570
592
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, bool *secretViewActive); // Text Input Box control, ask for text, supports secret
@@ -573,7 +595,7 @@ typedef enum {
573
595
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha); // Color Bar Alpha control
574
596
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorBarHue(Rectangle bounds, const char *text, float *value); // Color Bar Hue control
575
597
  /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Picker control that avoids conversion to RGB on each call (multiple color controls)
576
- /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that returns HSV color value, used by GuiColorPickerHSV()
598
+ /* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV()
577
599
  //----------------------------------------------------------------------------------------------------------
578
600
  //----------------------------------------------------------------------------------
579
601
  // Icons enumeration
@@ -799,15 +821,15 @@ typedef enum {
799
821
  ICON_FOLDER = 217,
800
822
  ICON_FILE = 218,
801
823
  ICON_SAND_TIMER = 219,
802
- ICON_220 = 220,
803
- ICON_221 = 221,
804
- ICON_222 = 222,
805
- ICON_223 = 223,
806
- ICON_224 = 224,
807
- ICON_225 = 225,
808
- ICON_226 = 226,
809
- ICON_227 = 227,
810
- ICON_228 = 228,
824
+ ICON_WARNING = 220,
825
+ ICON_HELP_BOX = 221,
826
+ ICON_INFO_BOX = 222,
827
+ ICON_PRIORITY = 223,
828
+ ICON_LAYERS_ISO = 224,
829
+ ICON_LAYERS2 = 225,
830
+ ICON_MLAYERS = 226,
831
+ ICON_MAPS = 227,
832
+ ICON_HOT = 228,
811
833
  ICON_229 = 229,
812
834
  ICON_230 = 230,
813
835
  ICON_231 = 231,
raylib/raylib.h.modified CHANGED
@@ -1,6 +1,6 @@
1
1
  /**********************************************************************************************
2
2
  *
3
- * raylib v5.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
3
+ * raylib v5.5-dev - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
4
4
  *
5
5
  * FEATURES:
6
6
  * - NO external dependencies, all required libraries included with raylib
@@ -57,7 +57,7 @@
57
57
  * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
58
58
  * BSD-like license that allows static linking with closed source software:
59
59
  *
60
- * Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
60
+ * Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
61
61
  *
62
62
  * This software is provided "as-is", without any express or implied warranty. In no event
63
63
  * will the authors be held liable for any damages arising from the use of this software.
@@ -75,8 +75,9 @@
75
75
  * 3. This notice may not be removed or altered from any source distribution.
76
76
  *
77
77
  **********************************************************************************************/
78
- // Function specifiers in case library is build/used as a shared library (Windows)
78
+ // Function specifiers in case library is build/used as a shared library
79
79
  // NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
80
+ // NOTE: visibility("default") attribute makes symbols "visible" when compiled with -fvisibility=hidden
80
81
  //----------------------------------------------------------------------------------
81
82
  // Some basic Defines
82
83
  //----------------------------------------------------------------------------------
@@ -224,8 +225,10 @@ typedef struct Mesh {
224
225
  // Animation vertex data
225
226
  float *animVertices; // Animated vertex positions (after bones transformations)
226
227
  float *animNormals; // Animated normals (after bones transformations)
227
- unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)
228
- float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning)
228
+ unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)
229
+ float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)
230
+ Matrix *boneMatrices; // Bones animated transformation matrices
231
+ int boneCount; // Number of bones
229
232
  // OpenGL identifiers
230
233
  unsigned int vaoId; // OpenGL Vertex Array Object id
231
234
  unsigned int *vboId; // OpenGL Vertex Buffer Objects id (default vertex data)
@@ -282,7 +285,7 @@ typedef struct ModelAnimation {
282
285
  // Ray, ray for raycasting
283
286
  typedef struct Ray {
284
287
  Vector3 position; // Ray position (origin)
285
- Vector3 direction; // Ray direction
288
+ Vector3 direction; // Ray direction (normalized)
286
289
  } Ray;
287
290
  // RayCollision, ray hit information
288
291
  typedef struct RayCollision {
@@ -335,7 +338,6 @@ typedef struct VrDeviceInfo {
335
338
  int vResolution; // Vertical resolution in pixels
336
339
  float hScreenSize; // Horizontal size in meters
337
340
  float vScreenSize; // Vertical size in meters
338
- float vScreenCenter; // Screen center in meters
339
341
  float eyeToScreenDistance; // Distance between eye and display in meters
340
342
  float lensSeparationDistance; // Lens separation distance in meters
341
343
  float interpupillaryDistance; // IPD (distance between pupils) in meters
@@ -522,7 +524,7 @@ typedef enum {
522
524
  KEY_KP_EQUAL = 336, // Key: Keypad =
523
525
  // Android key buttons
524
526
  KEY_BACK = 4, // Key: Android back button
525
- KEY_MENU = 82, // Key: Android menu button
527
+ KEY_MENU = 5, // Key: Android menu button
526
528
  KEY_VOLUME_UP = 24, // Key: Android volume up button
527
529
  KEY_VOLUME_DOWN = 25 // Key: Android volume down button
528
530
  } KeyboardKey;
@@ -559,12 +561,12 @@ typedef enum {
559
561
  GAMEPAD_BUTTON_LEFT_FACE_DOWN, // Gamepad left DPAD down button
560
562
  GAMEPAD_BUTTON_LEFT_FACE_LEFT, // Gamepad left DPAD left button
561
563
  GAMEPAD_BUTTON_RIGHT_FACE_UP, // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
562
- GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Square, Xbox: X)
564
+ GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Circle, Xbox: B)
563
565
  GAMEPAD_BUTTON_RIGHT_FACE_DOWN, // Gamepad right button down (i.e. PS3: Cross, Xbox: A)
564
- GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Circle, Xbox: B)
566
+ GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Square, Xbox: X)
565
567
  GAMEPAD_BUTTON_LEFT_TRIGGER_1, // Gamepad top/back trigger left (first), it could be a trailing button
566
568
  GAMEPAD_BUTTON_LEFT_TRIGGER_2, // Gamepad top/back trigger left (second), it could be a trailing button
567
- GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (one), it could be a trailing button
569
+ GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (first), it could be a trailing button
568
570
  GAMEPAD_BUTTON_RIGHT_TRIGGER_2, // Gamepad top/back trigger right (second), it could be a trailing button
569
571
  GAMEPAD_BUTTON_MIDDLE_LEFT, // Gamepad center buttons, left one (i.e. PS3: Select)
570
572
  GAMEPAD_BUTTON_MIDDLE, // Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
@@ -622,7 +624,10 @@ typedef enum {
622
624
  SHADER_LOC_MAP_CUBEMAP, // Shader location: samplerCube texture: cubemap
623
625
  SHADER_LOC_MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance
624
626
  SHADER_LOC_MAP_PREFILTER, // Shader location: samplerCube texture: prefilter
625
- SHADER_LOC_MAP_BRDF // Shader location: sampler2d texture: brdf
627
+ SHADER_LOC_MAP_BRDF, // Shader location: sampler2d texture: brdf
628
+ SHADER_LOC_VERTEX_BONEIDS, // Shader location: vertex attribute: boneIds
629
+ SHADER_LOC_VERTEX_BONEWEIGHTS, // Shader location: vertex attribute: boneWeights
630
+ SHADER_LOC_BONE_MATRICES // Shader location: array of matrices uniform: boneMatrices
626
631
  } ShaderLocationIndex;
627
632
  // Shader uniform data type
628
633
  typedef enum {
@@ -732,11 +737,11 @@ typedef enum {
732
737
  } Gesture;
733
738
  // Camera system modes
734
739
  typedef enum {
735
- CAMERA_CUSTOM = 0, // Custom camera
736
- CAMERA_FREE, // Free camera
737
- CAMERA_ORBITAL, // Orbital camera
738
- CAMERA_FIRST_PERSON, // First person camera
739
- CAMERA_THIRD_PERSON // Third person camera
740
+ CAMERA_CUSTOM = 0, // Camera custom, controlled by user (UpdateCamera() does nothing)
741
+ CAMERA_FREE, // Camera free mode
742
+ CAMERA_ORBITAL, // Camera orbital, around target, zoom supported
743
+ CAMERA_FIRST_PERSON, // Camera first person
744
+ CAMERA_THIRD_PERSON // Camera third person
740
745
  } CameraMode;
741
746
  // Camera projection
742
747
  typedef enum {
@@ -750,7 +755,7 @@ typedef enum {
750
755
  NPATCH_THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
751
756
  } NPatchLayout;
752
757
  // Callbacks to hook some internal functions
753
- // WARNING: These callbacks are intended for advance users
758
+ // WARNING: These callbacks are intended for advanced users
754
759
  typedef void (*TraceLogCallback)(int logLevel, const char *text, void * args); // Logging: Redirect trace log messages
755
760
  typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data
756
761
  typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data
@@ -777,8 +782,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
777
782
  bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
778
783
  void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
779
784
  void ClearWindowState(unsigned int flags); // Clear window configuration state flags
780
- void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
781
- void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
785
+ void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)
786
+ void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)
782
787
  void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
783
788
  void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
784
789
  void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
@@ -853,20 +858,21 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
853
858
  void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d)
854
859
  void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
855
860
  // Screen-space-related functions
856
- Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Get a ray trace from mouse position
857
- Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
858
- Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
861
+ Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse)
862
+ Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport
859
863
  Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position
860
- Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
861
864
  Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
862
865
  Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
866
+ Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
867
+ Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
868
+ Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
863
869
  // Timing-related functions
864
870
  void SetTargetFPS(int fps); // Set target FPS (maximum)
865
871
  float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
866
872
  double GetTime(void); // Get elapsed time in seconds since InitWindow()
867
873
  int GetFPS(void); // Get current FPS
868
874
  // Custom frame control functions
869
- // NOTE: Those functions are intended for advance users that want full control over the frame processing
875
+ // NOTE: Those functions are intended for advanced users that want full control over the frame processing
870
876
  // By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
871
877
  // To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
872
878
  void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
@@ -889,7 +895,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
889
895
  void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
890
896
  void MemFree(void *ptr); // Internal memory free
891
897
  // Set custom callbacks
892
- // WARNING: Callbacks setup is intended for advance users
898
+ // WARNING: Callbacks setup is intended for advanced users
893
899
  void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
894
900
  void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader
895
901
  void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver
@@ -916,10 +922,12 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
916
922
  const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
917
923
  const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
918
924
  const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
925
+ int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success
919
926
  bool ChangeDirectory(const char *dir); // Change working directory, return true on success
920
927
  bool IsPathFile(const char *path); // Check if a given path is a file or a directory
928
+ bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS
921
929
  FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths
922
- FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan
930
+ FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
923
931
  void UnloadDirectoryFiles(FilePathList files); // Unload filepaths
924
932
  bool IsFileDropped(void); // Check if a file has been dropped into window
925
933
  FilePathList LoadDroppedFiles(void); // Load dropped filepaths
@@ -932,7 +940,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
932
940
  unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
933
941
  // Automation events functionality
934
942
  AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
935
- void UnloadAutomationEventList(AutomationEventList *list); // Unload automation events list from file
943
+ void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file
936
944
  bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
937
945
  void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
938
946
  void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
@@ -962,6 +970,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
962
970
  int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad
963
971
  float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis
964
972
  int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
973
+ void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor); // Set gamepad vibration for both motors
965
974
  // Input-related functions: mouse
966
975
  bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
967
976
  bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed
@@ -1006,18 +1015,20 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1006
1015
  // NOTE: It can be useful when using basic shapes and one single font,
1007
1016
  // defining a font char white rectangle would allow drawing everything in a single draw call
1008
1017
  void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
1018
+ Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing
1019
+ Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing
1009
1020
  // Basic shapes drawing functions
1010
- void DrawPixel(int posX, int posY, Color color); // Draw a pixel
1011
- void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version)
1021
+ void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care]
1022
+ void DrawPixelV(Vector2 position, Color color); // Draw a pixel using geometry (Vector version) [Can be slow, use with care]
1012
1023
  void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
1013
1024
  void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
1014
1025
  void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
1015
- void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
1026
+ void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
1016
1027
  void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
1017
1028
  void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
1018
1029
  void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
1019
1030
  void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
1020
- void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
1031
+ void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer); // Draw a gradient-filled circle
1021
1032
  void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
1022
1033
  void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
1023
1034
  void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
@@ -1029,26 +1040,27 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1029
1040
  void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
1030
1041
  void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
1031
1042
  void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
1032
- void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle
1033
- void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle
1034
- void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
1043
+ void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
1044
+ void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
1045
+ void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color topRight, Color bottomRight); // Draw a gradient-filled rectangle with custom vertex colors
1035
1046
  void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
1036
1047
  void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
1037
1048
  void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
1038
- void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
1049
+ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
1050
+ void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
1039
1051
  void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
1040
1052
  void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
1041
- void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
1042
- void DrawTriangleStrip(Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1053
+ void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
1054
+ void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1043
1055
  void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
1044
1056
  void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
1045
1057
  void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
1046
1058
  // Splines drawing functions
1047
- void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
1048
- void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
1049
- void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
1050
- void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
1051
- void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
1059
+ void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
1060
+ void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
1061
+ void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
1062
+ void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
1063
+ void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
1052
1064
  void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
1053
1065
  void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
1054
1066
  void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
@@ -1067,9 +1079,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1067
1079
  bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
1068
1080
  bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
1069
1081
  bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
1070
- bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
1082
+ bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
1071
1083
  bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
1072
1084
  bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
1085
+ bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2]
1073
1086
  Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
1074
1087
  //------------------------------------------------------------------------------------
1075
1088
  // Texture Loading and Drawing Functions (Module: textures)
@@ -1078,8 +1091,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1078
1091
  // NOTE: These functions do not require GPU access
1079
1092
  Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
1080
1093
  Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
1081
- Image LoadImageSvg(const char *fileNameOrString, int width, int height); // Load image from SVG file data or string with specified size
1082
1094
  Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
1095
+ Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int *frames); // Load image sequence from memory buffer
1083
1096
  Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
1084
1097
  Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
1085
1098
  Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
@@ -1101,6 +1114,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1101
1114
  // Image manipulation functions
1102
1115
  Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
1103
1116
  Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
1117
+ Image ImageFromChannel(Image image, int selectedChannel); // Create an image from a selected channel of another image (GRAYSCALE)
1104
1118
  Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
1105
1119
  Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
1106
1120
  void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
@@ -1111,6 +1125,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1111
1125
  void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
1112
1126
  void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
1113
1127
  void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
1128
+ void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image
1114
1129
  void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
1115
1130
  void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
1116
1131
  void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
@@ -1140,6 +1155,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1140
1155
  void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version)
1141
1156
  void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
1142
1157
  void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
1158
+ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness within an image
1143
1159
  void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
1144
1160
  void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
1145
1161
  void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
@@ -1148,6 +1164,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1148
1164
  void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
1149
1165
  void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
1150
1166
  void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
1167
+ void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image
1168
+ void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image
1169
+ void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image
1170
+ void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center)
1171
+ void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image
1151
1172
  void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
1152
1173
  void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
1153
1174
  void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
@@ -1175,8 +1196,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1175
1196
  void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
1176
1197
  void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
1177
1198
  // Color/pixel related functions
1199
+ bool ColorIsEqual(Color col1, Color col2); // Check if two colors are equal
1178
1200
  Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
1179
- int ColorToInt(Color color); // Get hexadecimal value for a Color
1201
+ int ColorToInt(Color color); // Get hexadecimal value for a Color (0xRRGGBBAA)
1180
1202
  Vector4 ColorNormalize(Color color); // Get Color normalized as float [0..1]
1181
1203
  Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
1182
1204
  Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
@@ -1186,6 +1208,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1186
1208
  Color ColorContrast(Color color, float contrast); // Get color with contrast correction, contrast values between -1.0f and 1.0f
1187
1209
  Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
1188
1210
  Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
1211
+ Color ColorLerp(Color color1, Color color2, float factor); // Get color lerp interpolation between two colors, factor [0.0f..1.0f]
1189
1212
  Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
1190
1213
  Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
1191
1214
  void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
@@ -1196,7 +1219,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1196
1219
  // Font loading/unloading functions
1197
1220
  Font GetFontDefault(void); // Get the default Font
1198
1221
  Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
1199
- Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set
1222
+ Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
1200
1223
  Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
1201
1224
  Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
1202
1225
  bool IsFontReady(Font font); // Check if a font is ready
@@ -1236,7 +1259,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1236
1259
  unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
1237
1260
  const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style)
1238
1261
  const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
1239
- char *TextReplace(char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
1262
+ char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
1240
1263
  char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!)
1241
1264
  const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter
1242
1265
  const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
@@ -1245,7 +1268,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1245
1268
  const char *TextToUpper(const char *text); // Get upper case version of provided string
1246
1269
  const char *TextToLower(const char *text); // Get lower case version of provided string
1247
1270
  const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
1271
+ const char *TextToSnake(const char *text); // Get Snake case notation version of provided string
1272
+ const char *TextToCamel(const char *text); // Get Camel case notation version of provided string
1248
1273
  int TextToInteger(const char *text); // Get integer value from text (negative values not supported)
1274
+ float TextToFloat(const char *text); // Get float value from text (negative values not supported)
1249
1275
  //------------------------------------------------------------------------------------
1250
1276
  // Basic 3d Shapes Drawing Functions (Module: models)
1251
1277
  //------------------------------------------------------------------------------------
@@ -1254,7 +1280,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1254
1280
  void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
1255
1281
  void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
1256
1282
  void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
1257
- void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1283
+ void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1258
1284
  void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
1259
1285
  void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
1260
1286
  void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
@@ -1285,8 +1311,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1285
1311
  void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
1286
1312
  void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
1287
1313
  void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
1314
+ void DrawModelPoints(Model model, Vector3 position, float scale, Color tint); // Draw a model as points
1315
+ void DrawModelPointsEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model as points with extended parameters
1288
1316
  void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
1289
- void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture
1317
+ void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture
1290
1318
  void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
1291
1319
  void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
1292
1320
  // Mesh management functions
@@ -1295,9 +1323,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1295
1323
  void UnloadMesh(Mesh mesh); // Unload mesh data from CPU and GPU
1296
1324
  void DrawMesh(Mesh mesh, Material material, Matrix transform); // Draw a 3d mesh with material and transform
1297
1325
  void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, int instances); // Draw multiple mesh instances with material and different transforms
1298
- bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
1299
1326
  BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
1300
1327
  void GenMeshTangents(Mesh *mesh); // Compute mesh tangents
1328
+ bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
1329
+ bool ExportMeshAsCode(Mesh mesh, const char *fileName); // Export mesh as code file (.h) defining multiple arrays of vertex attributes
1301
1330
  // Mesh generation functions
1302
1331
  Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
1303
1332
  Mesh GenMeshPlane(float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions)
@@ -1323,6 +1352,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
1323
1352
  void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
1324
1353
  void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
1325
1354
  bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
1355
+ void UpdateModelAnimationBoneMatrices(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)
1326
1356
  // Collision detection functions
1327
1357
  bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
1328
1358
  bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes
@@ -1366,7 +1396,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
1366
1396
  void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
1367
1397
  void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center)
1368
1398
  Wave WaveCopy(Wave wave); // Copy a wave to a new wave
1369
- void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range
1399
+ void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range
1370
1400
  void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
1371
1401
  float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array
1372
1402
  void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()
@@ -1403,7 +1433,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
1403
1433
  void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
1404
1434
  void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
1405
1435
  void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
1406
- void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as <float>s
1436
+ void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as 'float'
1407
1437
  void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
1408
- void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s
1438
+ void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'
1409
1439
  void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline