~evantj/hare-raylib

8a4c7453faef50a46edd3cb0c840b488ec1698c4 — Autumn! 9 months ago 3ea8b9d
Add raylib.ha as dependency in Makefile

Signed-off-by: Autumn! <autumnull@posteo.net>
4 files changed, 1199 insertions(+), 565 deletions(-)

M Makefile
M README.md
R api.json => raylib.json
M raylib/raylib.ha
M Makefile => Makefile +5 -5
@@ 12,16 12,16 @@ raylib/raylib.ha: raylib.json hare-raylib.py
raylib/raymath.ha: raymath.json hare-raylib.py
	./hare-raylib.py raymath.json > raylib/raymath.ha

raylib.json:
raylib.json: $(RAYLIB_HEADER)
	raylib_parser -i $(RAYLIB_HEADER) -f JSON -o raylib.json
raymath.json:
raymath.json: $(RAYMATH_HEADER)
	raylib_parser -d RMAPI -i $(RAYMATH_HEADER) -f JSON -o raymath.json

demo:
demo: raylib/raylib.ha
	hare build $(LIBS) cmd/demo
heightmap:
heightmap: raylib/raylib.ha
	hare build $(LIBS) cmd/heightmap
run:
run: raylib/raylib.ha
	hare run $(LIBS) cmd/demo
clean:
	rm -f raylib/raylib.ha raylib.json raylib/raymath.ha raymath.json demo heightmap

M README.md => README.md +1 -1
@@ 8,7 8,7 @@ build demo: `make demo`
build heightmap example: `make heightmap`

generate raylib.ha: `make`  
note: if you want to generate api.json yourself, you need a copy of [raylib\_parser](https://github.com/raysan5/raylib/tree/master/parser)
note: if you want to generate raylib.json yourself, you need a copy of [raylib\_parser](https://github.com/raysan5/raylib/tree/master/parser)

# demo
![demo](screenshots/20220723_21h44m55s_grim.png)

R api.json => raylib.json +889 -425
@@ 7,9 7,33 @@
      "description": ""
    },
    {
      "name": "RAYLIB_VERSION_MAJOR",
      "type": "INT",
      "value": 4,
      "description": ""
    },
    {
      "name": "RAYLIB_VERSION_MINOR",
      "type": "INT",
      "value": 5,
      "description": ""
    },
    {
      "name": "RAYLIB_VERSION_PATCH",
      "type": "INT",
      "value": 0,
      "description": ""
    },
    {
      "name": "RAYLIB_VERSION",
      "type": "STRING",
      "value": "4.0",
      "value": "4.5",
      "description": ""
    },
    {
      "name": "__declspec(x)",
      "type": "MACRO",
      "value": "__attribute__((x))",
      "description": ""
    },
    {


@@ 379,7 403,7 @@
    },
    {
      "name": "Matrix",
      "description": "Matrix, 4x4 components, column major, OpenGL style, right handed",
      "description": "Matrix, 4x4 components, column major, OpenGL style, right-handed",
      "fields": [
        {
          "type": "float",


@@ 723,7 747,7 @@
        {
          "type": "float",
          "name": "fovy",
          "description": "Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic"
          "description": "Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic"
        },
        {
          "type": "int",


@@ 785,7 809,7 @@
        {
          "type": "float *",
          "name": "texcoords2",
          "description": "Vertex second texture coordinates (useful for lightmaps) (shader-location = 5)"
          "description": "Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)"
        },
        {
          "type": "float *",


@@ 899,7 923,7 @@
    },
    {
      "name": "Transform",
      "description": "Transform, vectex transformation data",
      "description": "Transform, vertex transformation data",
      "fields": [
        {
          "type": "Vector3",


@@ 1039,12 1063,12 @@
        {
          "type": "float",
          "name": "distance",
          "description": "Distance to nearest hit"
          "description": "Distance to the nearest hit"
        },
        {
          "type": "Vector3",
          "name": "point",
          "description": "Point of nearest hit"
          "description": "Point of the nearest hit"
        },
        {
          "type": "Vector3",


@@ 1110,6 1134,11 @@
          "description": "Pointer to internal data used by the audio system"
        },
        {
          "type": "rAudioProcessor *",
          "name": "processor",
          "description": "Pointer to internal data processor, useful for audio effects"
        },
        {
          "type": "unsigned int",
          "name": "sampleRate",
          "description": "Frequency (samples per second)"


@@ 1274,6 1303,27 @@
          "description": "VR distortion scale in"
        }
      ]
    },
    {
      "name": "FilePathList",
      "description": "File path list",
      "fields": [
        {
          "type": "unsigned int",
          "name": "capacity",
          "description": "Filepaths max entries"
        },
        {
          "type": "unsigned int",
          "name": "count",
          "description": "Filepaths entries count"
        },
        {
          "type": "char **",
          "name": "paths",
          "description": "Filepaths entries"
        }
      ]
    }
  ],
  "aliases": [


@@ 1369,6 1419,11 @@
          "description": "Set to support HighDPI"
        },
        {
          "name": "FLAG_WINDOW_MOUSE_PASSTHROUGH",
          "value": 16384,
          "description": "Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED"
        },
        {
          "name": "FLAG_MSAA_4X_HINT",
          "value": 32,
          "description": "Set to try enabling MSAA 4X"


@@ 2014,7 2069,7 @@
        {
          "name": "MOUSE_BUTTON_FORWARD",
          "value": 5,
          "description": "Mouse button fordward (advanced mouse device)"
          "description": "Mouse button forward (advanced mouse device)"
        },
        {
          "name": "MOUSE_BUTTON_BACK",


@@ 2075,7 2130,7 @@
        {
          "name": "MOUSE_CURSOR_RESIZE_ALL",
          "value": 9,
          "description": "The omni-directional resize/move cursor shape"
          "description": "The omnidirectional resize/move cursor shape"
        },
        {
          "name": "MOUSE_CURSOR_NOT_ALLOWED",


@@ 2608,7 2663,7 @@
        {
          "name": "TEXTURE_FILTER_POINT",
          "value": 0,
          "description": "No filter, just pixel aproximation"
          "description": "No filter, just pixel approximation"
        },
        {
          "name": "TEXTURE_FILTER_BILINEAR",


@@ 2680,7 2735,7 @@
        {
          "name": "CUBEMAP_LAYOUT_LINE_HORIZONTAL",
          "value": 2,
          "description": "Layout is defined by an horizontal line with faces"
          "description": "Layout is defined by a horizontal line with faces"
        },
        {
          "name": "CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR",


@@ 2695,7 2750,7 @@
        {
          "name": "CUBEMAP_LAYOUT_PANORAMA",
          "value": 5,
          "description": "Layout is defined by a panorama image (equirectangular map)"
          "description": "Layout is defined by a panorama image (equirrectangular map)"
        }
      ]
    },


@@ 2750,9 2805,19 @@
          "description": "Blend textures subtracting colors (alternative)"
        },
        {
          "name": "BLEND_CUSTOM",
          "name": "BLEND_ALPHA_PREMULTIPLY",
          "value": 5,
          "description": "Belnd textures using custom src/dst factors (use rlSetBlendMode())"
          "description": "Blend premultiplied textures considering alpha"
        },
        {
          "name": "BLEND_CUSTOM",
          "value": 6,
          "description": "Blend textures using custom src/dst factors (use rlSetBlendFactors())"
        },
        {
          "name": "BLEND_CUSTOM_SEPARATE",
          "value": 7,
          "description": "Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())"
        }
      ]
    },


@@ 2965,6 3030,21 @@
          "name": "text"
        }
      ]
    },
    {
      "name": "AudioCallback",
      "description": "",
      "returnType": "void",
      "params": [
        {
          "type": "void *",
          "name": "bufferData"
        },
        {
          "type": "unsigned int",
          "name": "frames"
        }
      ]
    }
  ],
  "functions": [


@@ 3045,7 3125,7 @@
    },
    {
      "name": "SetWindowState",
      "description": "Set window configuration state using flags",
      "description": "Set window configuration state using flags (only PLATFORM_DESKTOP)",
      "returnType": "void",
      "params": [
        {


@@ 3087,7 3167,7 @@
    },
    {
      "name": "SetWindowIcon",
      "description": "Set icon for window (only PLATFORM_DESKTOP)",
      "description": "Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)",
      "returnType": "void",
      "params": [
        {


@@ 3097,6 3177,21 @@
      ]
    },
    {
      "name": "SetWindowIcons",
      "description": "Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)",
      "returnType": "void",
      "params": [
        {
          "type": "Image *",
          "name": "images"
        },
        {
          "type": "int",
          "name": "count"
        }
      ]
    },
    {
      "name": "SetWindowTitle",
      "description": "Set title for window (only PLATFORM_DESKTOP)",
      "returnType": "void",


@@ 3164,6 3259,17 @@
      ]
    },
    {
      "name": "SetWindowOpacity",
      "description": "Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)",
      "returnType": "void",
      "params": [
        {
          "type": "float",
          "name": "opacity"
        }
      ]
    },
    {
      "name": "GetWindowHandle",
      "description": "Get native window handle",
      "returnType": "void *"


@@ 3179,6 3285,16 @@
      "returnType": "int"
    },
    {
      "name": "GetRenderWidth",
      "description": "Get current render width (it considers HiDPI)",
      "returnType": "int"
    },
    {
      "name": "GetRenderHeight",
      "description": "Get current render height (it considers HiDPI)",
      "returnType": "int"
    },
    {
      "name": "GetMonitorCount",
      "description": "Get number of connected monitors",
      "returnType": "int"


@@ 3201,7 3317,7 @@
    },
    {
      "name": "GetMonitorWidth",
      "description": "Get specified monitor width (max available by monitor)",
      "description": "Get specified monitor width (current video mode used by monitor)",
      "returnType": "int",
      "params": [
        {


@@ 3212,7 3328,7 @@
    },
    {
      "name": "GetMonitorHeight",
      "description": "Get specified monitor height (max available by monitor)",
      "description": "Get specified monitor height (current video mode used by monitor)",
      "returnType": "int",
      "params": [
        {


@@ 3292,6 3408,16 @@
      "returnType": "const char *"
    },
    {
      "name": "EnableEventWaiting",
      "description": "Enable waiting for events on EndDrawing(), no automatic event polling",
      "returnType": "void"
    },
    {
      "name": "DisableEventWaiting",
      "description": "Disable waiting for events on EndDrawing(), automatic events polling",
      "returnType": "void"
    },
    {
      "name": "SwapScreenBuffer",
      "description": "Swap back buffer with front buffer (screen drawing)",
      "returnType": "void"


@@ 3303,12 3429,12 @@
    },
    {
      "name": "WaitTime",
      "description": "Wait for some milliseconds (halt program execution)",
      "description": "Wait for some time (halt program execution)",
      "returnType": "void",
      "params": [
        {
          "type": "float",
          "name": "ms"
          "type": "double",
          "name": "seconds"
        }
      ]
    },


@@ 3540,6 3666,17 @@
      ]
    },
    {
      "name": "IsShaderReady",
      "description": "Check if a shader is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "Shader",
          "name": "shader"
        }
      ]
    },
    {
      "name": "GetShaderLocation",
      "description": "Get shader uniform location",
      "returnType": "int",


@@ 3721,6 3858,21 @@
      ]
    },
    {
      "name": "GetScreenToWorld2D",
      "description": "Get the world space position for a 2d camera screen space position",
      "returnType": "Vector2",
      "params": [
        {
          "type": "Vector2",
          "name": "position"
        },
        {
          "type": "Camera2D",
          "name": "camera"
        }
      ]
    },
    {
      "name": "GetWorldToScreenEx",
      "description": "Get size position for a 3d world space position",
      "returnType": "Vector2",


@@ 3759,21 3911,6 @@
      ]
    },
    {
      "name": "GetScreenToWorld2D",
      "description": "Get the world space position for a 2d camera screen space position",
      "returnType": "Vector2",
      "params": [
        {
          "type": "Vector2",
          "name": "position"
        },
        {
          "type": "Camera2D",
          "name": "camera"
        }
      ]
    },
    {
      "name": "SetTargetFPS",
      "description": "Set target FPS (maximum)",
      "returnType": "void",


@@ 3883,7 4020,7 @@
      "returnType": "void *",
      "params": [
        {
          "type": "int",
          "type": "unsigned int",
          "name": "size"
        }
      ]


@@ 3898,7 4035,7 @@
          "name": "ptr"
        },
        {
          "type": "int",
          "type": "unsigned int",
          "name": "size"
        }
      ]


@@ 3915,6 4052,17 @@
      ]
    },
    {
      "name": "OpenURL",
      "description": "Open URL with default system browser (if available)",
      "returnType": "void",
      "params": [
        {
          "type": "const char *",
          "name": "url"
        }
      ]
    },
    {
      "name": "SetTraceLogCallback",
      "description": "Set custom trace log",
      "returnType": "void",


@@ 4015,6 4163,25 @@
      ]
    },
    {
      "name": "ExportDataAsCode",
      "description": "Export data to code (.h), returns true on success",
      "returnType": "bool",
      "params": [
        {
          "type": "const unsigned char *",
          "name": "data"
        },
        {
          "type": "unsigned int",
          "name": "size"
        },
        {
          "type": "const char *",
          "name": "fileName"
        }
      ]
    },
    {
      "name": "LoadFileText",
      "description": "Load text data from file (read), returns a '\\0' terminated string",
      "returnType": "char *",


@@ 4089,6 4256,17 @@
      ]
    },
    {
      "name": "GetFileLength",
      "description": "Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)",
      "returnType": "int",
      "params": [
        {
          "type": "const char *",
          "name": "fileName"
        }
      ]
    },
    {
      "name": "GetFileExtension",
      "description": "Get pointer to extension for a filename string (includes dot: '.png')",
      "returnType": "const char *",


@@ 4149,33 4327,70 @@
      "returnType": "const char *"
    },
    {
      "name": "GetDirectoryFiles",
      "description": "Get filenames in a directory path (memory should be freed)",
      "returnType": "char **",
      "name": "GetApplicationDirectory",
      "description": "Get the directory if the running application (uses static string)",
      "returnType": "const char *"
    },
    {
      "name": "ChangeDirectory",
      "description": "Change working directory, return true on success",
      "returnType": "bool",
      "params": [
        {
          "type": "const char *",
          "name": "dirPath"
        },
          "name": "dir"
        }
      ]
    },
    {
      "name": "IsPathFile",
      "description": "Check if a given path is a file or a directory",
      "returnType": "bool",
      "params": [
        {
          "type": "int *",
          "name": "count"
          "type": "const char *",
          "name": "path"
        }
      ]
    },
    {
      "name": "ClearDirectoryFiles",
      "description": "Clear directory files paths buffers (free memory)",
      "returnType": "void"
      "name": "LoadDirectoryFiles",
      "description": "Load directory filepaths",
      "returnType": "FilePathList",
      "params": [
        {
          "type": "const char *",
          "name": "dirPath"
        }
      ]
    },
    {
      "name": "ChangeDirectory",
      "description": "Change working directory, return true on success",
      "returnType": "bool",
      "name": "LoadDirectoryFilesEx",
      "description": "Load directory filepaths with extension filtering and recursive directory scan",
      "returnType": "FilePathList",
      "params": [
        {
          "type": "const char *",
          "name": "dir"
          "name": "basePath"
        },
        {
          "type": "const char *",
          "name": "filter"
        },
        {
          "type": "bool",
          "name": "scanSubdirs"
        }
      ]
    },
    {
      "name": "UnloadDirectoryFiles",
      "description": "Unload filepaths",
      "returnType": "void",
      "params": [
        {
          "type": "FilePathList",
          "name": "files"
        }
      ]
    },


@@ 4185,22 4400,22 @@
      "returnType": "bool"
    },
    {
      "name": "GetDroppedFiles",
      "description": "Get dropped files names (memory should be freed)",
      "returnType": "char **",
      "name": "LoadDroppedFiles",
      "description": "Load dropped filepaths",
      "returnType": "FilePathList"
    },
    {
      "name": "UnloadDroppedFiles",
      "description": "Unload dropped filepaths",
      "returnType": "void",
      "params": [
        {
          "type": "int *",
          "name": "count"
          "type": "FilePathList",
          "name": "files"
        }
      ]
    },
    {
      "name": "ClearDroppedFiles",
      "description": "Clear dropped files paths buffer (free memory)",
      "returnType": "void"
    },
    {
      "name": "GetFileModTime",
      "description": "Get file modification time (last write time)",
      "returnType": "long",


@@ 4213,45 4428,45 @@
    },
    {
      "name": "CompressData",
      "description": "Compress data (DEFLATE algorithm)",
      "description": "Compress data (DEFLATE algorithm), memory must be MemFree()",
      "returnType": "unsigned char *",
      "params": [
        {
          "type": "unsigned char *",
          "type": "const unsigned char *",
          "name": "data"
        },
        {
          "type": "int",
          "name": "dataLength"
          "name": "dataSize"
        },
        {
          "type": "int *",
          "name": "compDataLength"
          "name": "compDataSize"
        }
      ]
    },
    {
      "name": "DecompressData",
      "description": "Decompress data (DEFLATE algorithm)",
      "description": "Decompress data (DEFLATE algorithm), memory must be MemFree()",
      "returnType": "unsigned char *",
      "params": [
        {
          "type": "unsigned char *",
          "type": "const unsigned char *",
          "name": "compData"
        },
        {
          "type": "int",
          "name": "compDataLength"
          "name": "compDataSize"
        },
        {
          "type": "int *",
          "name": "dataLength"
          "name": "dataSize"
        }
      ]
    },
    {
      "name": "EncodeDataBase64",
      "description": "Encode data to Base64 string",
      "description": "Encode data to Base64 string, memory must be MemFree()",
      "returnType": "char *",
      "params": [
        {


@@ 4260,63 4475,26 @@
        },
        {
          "type": "int",
          "name": "dataLength"
          "name": "dataSize"
        },
        {
          "type": "int *",
          "name": "outputLength"
          "name": "outputSize"
        }
      ]
    },
    {
      "name": "DecodeDataBase64",
      "description": "Decode Base64 string data",
      "description": "Decode Base64 string data, memory must be MemFree()",
      "returnType": "unsigned char *",
      "params": [
        {
          "type": "unsigned char *",
          "type": "const unsigned char *",
          "name": "data"
        },
        {
          "type": "int *",
          "name": "outputLength"
        }
      ]
    },
    {
      "name": "SaveStorageValue",
      "description": "Save integer value to storage file (to defined position), returns true on success",
      "returnType": "bool",
      "params": [
        {
          "type": "unsigned int",
          "name": "position"
        },
        {
          "type": "int",
          "name": "value"
        }
      ]
    },
    {
      "name": "LoadStorageValue",
      "description": "Load integer value from storage file (from defined position)",
      "returnType": "int",
      "params": [
        {
          "type": "unsigned int",
          "name": "position"
        }
      ]
    },
    {
      "name": "OpenURL",
      "description": "Open URL with default system browser (if available)",
      "returnType": "void",
      "params": [
        {
          "type": "const char *",
          "name": "url"
          "name": "outputSize"
        }
      ]
    },


@@ 4620,11 4798,16 @@
    },
    {
      "name": "GetMouseWheelMove",
      "description": "Get mouse wheel movement Y",
      "description": "Get mouse wheel movement for X or Y, whichever is larger",
      "returnType": "float"
    },
    {
      "name": "SetMouseCursor",
      "name": "GetMouseWheelMoveV",
      "description": "Get mouse wheel movement for both X and Y",
      "returnType": "Vector2"
    },
    {
      "name": "SetMouseCursor",
      "description": "Set mouse cursor",
      "returnType": "void",
      "params": [


@@ 4724,12 4907,12 @@
      "returnType": "float"
    },
    {
      "name": "SetCameraMode",
      "description": "Set camera mode (multiple camera modes available)",
      "name": "UpdateCamera",
      "description": "Update camera position for selected mode",
      "returnType": "void",
      "params": [
        {
          "type": "Camera",
          "type": "Camera *",
          "name": "camera"
        },
        {


@@ 4739,77 4922,25 @@
      ]
    },
    {
      "name": "UpdateCamera",
      "description": "Update camera position for selected mode",
      "name": "UpdateCameraPro",
      "description": "Update camera movement/rotation",
      "returnType": "void",
      "params": [
        {
          "type": "Camera *",
          "name": "camera"
        }
      ]
    },
    {
      "name": "SetCameraPanControl",
      "description": "Set camera pan key to combine with mouse movement (free camera)",
      "returnType": "void",
      "params": [
        {
          "type": "int",
          "name": "keyPan"
        }
      ]
    },
    {
      "name": "SetCameraAltControl",
      "description": "Set camera alt key to combine with mouse movement (free camera)",
      "returnType": "void",
      "params": [
        {
          "type": "int",
          "name": "keyAlt"
        }
      ]
    },
    {
      "name": "SetCameraSmoothZoomControl",
      "description": "Set camera smooth zoom key to combine with mouse (free camera)",
      "returnType": "void",
      "params": [
        {
          "type": "int",
          "name": "keySmoothZoom"
        }
      ]
    },
    {
      "name": "SetCameraMoveControls",
      "description": "Set camera move controls (1st person and 3rd person cameras)",
      "returnType": "void",
      "params": [
        {
          "type": "int",
          "name": "keyFront"
        },
        {
          "type": "int",
          "name": "keyBack"
        },
        {
          "type": "int",
          "name": "keyRight"
        },
        {
          "type": "int",
          "name": "keyLeft"
          "type": "Vector3",
          "name": "movement"
        },
        {
          "type": "int",
          "name": "keyUp"
          "type": "Vector3",
          "name": "rotation"
        },
        {
          "type": "int",
          "name": "keyDown"
          "type": "float",
          "name": "zoom"
        }
      ]
    },


@@ 5862,6 5993,25 @@
      ]
    },
    {
      "name": "CheckCollisionPointPoly",
      "description": "Check if point is within a polygon described by array of vertices",
      "returnType": "bool",
      "params": [
        {
          "type": "Vector2",
          "name": "point"
        },
        {
          "type": "Vector2 *",
          "name": "points"
        },
        {
          "type": "int",
          "name": "pointCount"
        }
      ]
    },
    {
      "name": "CheckCollisionLines",
      "description": "Check the collision between two lines defined by two points each, returns collision point by reference",
      "returnType": "bool",


@@ 6015,6 6165,17 @@
      "returnType": "Image"
    },
    {
      "name": "IsImageReady",
      "description": "Check if an image is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "Image",
          "name": "image"
        }
      ]
    },
    {
      "name": "UnloadImage",
      "description": "Unload image from CPU memory (RAM)",
      "returnType": "void",


@@ 6198,6 6359,33 @@
      ]
    },
    {
      "name": "GenImagePerlinNoise",
      "description": "Generate image: perlin noise",
      "returnType": "Image",
      "params": [
        {
          "type": "int",
          "name": "width"
        },
        {
          "type": "int",
          "name": "height"
        },
        {
          "type": "int",
          "name": "offsetX"
        },
        {
          "type": "int",
          "name": "offsetY"
        },
        {
          "type": "float",
          "name": "scale"
        }
      ]
    },
    {
      "name": "GenImageCellular",
      "description": "Generate image: cellular algorithm, bigger tileSize means bigger cells",
      "returnType": "Image",


@@ 6217,6 6405,25 @@
      ]
    },
    {
      "name": "GenImageText",
      "description": "Generate image: grayscale image from text data",
      "returnType": "Image",
      "params": [
        {
          "type": "int",
          "name": "width"
        },
        {
          "type": "int",
          "name": "height"
        },
        {
          "type": "const char *",
          "name": "text"
        }
      ]
    },
    {
      "name": "ImageCopy",
      "description": "Create an image duplicate (useful for transformations)",
      "returnType": "Image",


@@ 6394,6 6601,21 @@
      ]
    },
    {
      "name": "ImageBlurGaussian",
      "description": "Apply Gaussian blur using a box blur approximation",
      "returnType": "void",
      "params": [
        {
          "type": "Image *",
          "name": "image"
        },
        {
          "type": "int",
          "name": "blurSize"
        }
      ]
    },
    {
      "name": "ImageResize",
      "description": "Resize image (Bicubic scaling algorithm)",
      "returnType": "void",


@@ 6829,7 7051,7 @@
    },
    {
      "name": "ImageDrawCircle",
      "description": "Draw circle within an image",
      "description": "Draw a filled circle within an image",
      "returnType": "void",
      "params": [
        {


@@ 6856,7 7078,57 @@
    },
    {
      "name": "ImageDrawCircleV",
      "description": "Draw circle within an image (Vector version)",
      "description": "Draw a filled circle within an image (Vector version)",
      "returnType": "void",
      "params": [
        {
          "type": "Image *",
          "name": "dst"
        },
        {
          "type": "Vector2",
          "name": "center"
        },
        {
          "type": "int",
          "name": "radius"
        },
        {
          "type": "Color",
          "name": "color"
        }
      ]
    },
    {
      "name": "ImageDrawCircleLines",
      "description": "Draw circle outline within an image",
      "returnType": "void",
      "params": [
        {
          "type": "Image *",
          "name": "dst"
        },
        {
          "type": "int",
          "name": "centerX"
        },
        {
          "type": "int",
          "name": "centerY"
        },
        {
          "type": "int",
          "name": "radius"
        },
        {
          "type": "Color",
          "name": "color"
        }
      ]
    },
    {
      "name": "ImageDrawCircleLinesV",
      "description": "Draw circle outline within an image (Vector version)",
      "returnType": "void",
      "params": [
        {


@@ 7119,6 7391,17 @@
      ]
    },
    {
      "name": "IsTextureReady",
      "description": "Check if a texture is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "Texture2D",
          "name": "texture"
        }
      ]
    },
    {
      "name": "UnloadTexture",
      "description": "Unload texture from GPU memory (VRAM)",
      "returnType": "void",


@@ 7130,6 7413,17 @@
      ]
    },
    {
      "name": "IsRenderTextureReady",
      "description": "Check if a render texture is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "RenderTexture2D",
          "name": "target"
        }
      ]
    },
    {
      "name": "UnloadRenderTexture",
      "description": "Unload render texture from GPU memory (VRAM)",
      "returnType": "void",


@@ 7308,68 7602,6 @@
      ]
    },
    {
      "name": "DrawTextureQuad",
      "description": "Draw texture quad with tiling and offset parameters",
      "returnType": "void",
      "params": [
        {
          "type": "Texture2D",
          "name": "texture"
        },
        {
          "type": "Vector2",
          "name": "tiling"
        },
        {
          "type": "Vector2",
          "name": "offset"
        },
        {
          "type": "Rectangle",
          "name": "quad"
        },
        {
          "type": "Color",
          "name": "tint"
        }
      ]
    },
    {
      "name": "DrawTextureTiled",
      "description": "Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.",
      "returnType": "void",
      "params": [
        {
          "type": "Texture2D",
          "name": "texture"
        },
        {
          "type": "Rectangle",
          "name": "source"
        },
        {
          "type": "Rectangle",
          "name": "dest"
        },
        {
          "type": "Vector2",
          "name": "origin"
        },
        {
          "type": "float",
          "name": "rotation"
        },
        {
          "type": "float",
          "name": "scale"
        },
        {
          "type": "Color",
          "name": "tint"
        }
      ]
    },
    {
      "name": "DrawTexturePro",
      "description": "Draw a part of a texture defined by a rectangle with 'pro' parameters",
      "returnType": "void",


@@ 7432,37 7664,6 @@
      ]
    },
    {
      "name": "DrawTexturePoly",
      "description": "Draw a textured polygon",
      "returnType": "void",
      "params": [
        {
          "type": "Texture2D",
          "name": "texture"
        },
        {
          "type": "Vector2",
          "name": "center"
        },
        {
          "type": "Vector2 *",
          "name": "points"
        },
        {
          "type": "Vector2 *",
          "name": "texcoords"
        },
        {
          "type": "int",
          "name": "pointCount"
        },
        {
          "type": "Color",
          "name": "tint"
        }
      ]
    },
    {
      "name": "Fade",
      "description": "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
      "returnType": "Color",


@@ 7541,6 7742,51 @@
      ]
    },
    {
      "name": "ColorTint",
      "description": "Get color multiplied with another color",
      "returnType": "Color",
      "params": [
        {
          "type": "Color",
          "name": "color"
        },
        {
          "type": "Color",
          "name": "tint"
        }
      ]
    },
    {
      "name": "ColorBrightness",
      "description": "Get color with brightness correction, brightness factor goes from -1.0f to 1.0f",
      "returnType": "Color",
      "params": [
        {
          "type": "Color",
          "name": "color"
        },
        {
          "type": "float",
          "name": "factor"
        }
      ]
    },
    {
      "name": "ColorContrast",
      "description": "Get color with contrast correction, contrast values between -1.0f and 1.0f",
      "returnType": "Color",
      "params": [
        {
          "type": "Color",
          "name": "color"
        },
        {
          "type": "float",
          "name": "contrast"
        }
      ]
    },
    {
      "name": "ColorAlpha",
      "description": "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
      "returnType": "Color",


@@ 7656,7 7902,7 @@
    },
    {
      "name": "LoadFontEx",
      "description": "Load font from file with extended parameters",
      "description": "Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set",
      "returnType": "Font",
      "params": [
        {


@@ 7728,6 7974,17 @@
      ]
    },
    {
      "name": "IsFontReady",
      "description": "Check if a font is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "Font",
          "name": "font"
        }
      ]
    },
    {
      "name": "LoadFontData",
      "description": "Load font data for further use",
      "returnType": "GlyphInfo *",


@@ 7806,7 8063,7 @@
    },
    {
      "name": "UnloadFont",
      "description": "Unload Font from GPU memory (VRAM)",
      "description": "Unload font from GPU memory (VRAM)",
      "returnType": "void",
      "params": [
        {


@@ 7816,6 8073,21 @@
      ]
    },
    {
      "name": "ExportFontAsCode",
      "description": "Export font as code file, returns true on success",
      "returnType": "bool",
      "params": [
        {
          "type": "Font",
          "name": "font"
        },
        {
          "type": "const char *",
          "name": "fileName"
        }
      ]
    },
    {
      "name": "DrawFPS",
      "description": "Draw current FPS",
      "returnType": "void",


@@ 7955,6 8227,41 @@
      ]
    },
    {
      "name": "DrawTextCodepoints",
      "description": "Draw multiple character (codepoint)",
      "returnType": "void",
      "params": [
        {
          "type": "Font",
          "name": "font"
        },
        {
          "type": "const int *",
          "name": "codepoints"
        },
        {
          "type": "int",
          "name": "count"
        },
        {
          "type": "Vector2",
          "name": "position"
        },
        {
          "type": "float",
          "name": "fontSize"
        },
        {
          "type": "float",
          "name": "spacing"
        },
        {
          "type": "Color",
          "name": "tint"
        }
      ]
    },
    {
      "name": "MeasureText",
      "description": "Measure string width for default font",
      "returnType": "int",


@@ 8038,6 8345,32 @@
      ]
    },
    {
      "name": "LoadUTF8",
      "description": "Load UTF-8 text encoded from codepoints array",
      "returnType": "char *",
      "params": [
        {
          "type": "const int *",
          "name": "codepoints"
        },
        {
          "type": "int",
          "name": "length"
        }
      ]
    },
    {
      "name": "UnloadUTF8",
      "description": "Unload UTF-8 text encoded from codepoints array",
      "returnType": "void",
      "params": [
        {
          "type": "char *",
          "name": "text"
        }
      ]
    },
    {
      "name": "LoadCodepoints",
      "description": "Load all codepoints from a UTF-8 text string, codepoints count returned by parameter",
      "returnType": "int *",


@@ 8085,37 8418,52 @@
        },
        {
          "type": "int *",
          "name": "bytesProcessed"
          "name": "codepointSize"
        }
      ]
    },
    {
      "name": "CodepointToUTF8",
      "description": "Encode one codepoint into UTF-8 byte array (array length returned as parameter)",
      "returnType": "const char *",
      "name": "GetCodepointNext",
      "description": "Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure",
      "returnType": "int",
      "params": [
        {
          "type": "int",
          "name": "codepoint"
          "type": "const char *",
          "name": "text"
        },
        {
          "type": "int *",
          "name": "byteSize"
          "name": "codepointSize"
        }
      ]
    },
    {
      "name": "TextCodepointsToUTF8",
      "description": "Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)",
      "returnType": "char *",
      "name": "GetCodepointPrevious",
      "description": "Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure",
      "returnType": "int",
      "params": [
        {
          "type": "int *",
          "name": "codepoints"
          "type": "const char *",
          "name": "text"
        },
        {
          "type": "int *",
          "name": "codepointSize"
        }
      ]
    },
    {
      "name": "CodepointToUTF8",
      "description": "Encode one codepoint into UTF-8 byte array (array length returned as parameter)",
      "returnType": "const char *",
      "params": [
        {
          "type": "int",
          "name": "length"
          "name": "codepoint"
        },
        {
          "type": "int *",
          "name": "utf8Size"
        }
      ]
    },


@@ 8544,72 8892,6 @@
      ]
    },
    {
      "name": "DrawCubeTexture",
      "description": "Draw cube textured",
      "returnType": "void",
      "params": [
        {
          "type": "Texture2D",
          "name": "texture"
        },
        {
          "type": "Vector3",
          "name": "position"
        },
        {
          "type": "float",
          "name": "width"
        },
        {
          "type": "float",
          "name": "height"
        },
        {
          "type": "float",
          "name": "length"
        },
        {
          "type": "Color",
          "name": "color"
        }
      ]
    },
    {
      "name": "DrawCubeTextureRec",
      "description": "Draw cube with a region of a texture",
      "returnType": "void",
      "params": [
        {
          "type": "Texture2D",
          "name": "texture"
        },
        {
          "type": "Rectangle",
          "name": "source"
        },
        {
          "type": "Vector3",
          "name": "position"
        },
        {
          "type": "float",
          "name": "width"
        },
        {
          "type": "float",
          "name": "height"
        },
        {
          "type": "float",
          "name": "length"
        },
        {
          "type": "Color",
          "name": "color"
        }
      ]
    },
    {
      "name": "DrawSphere",
      "description": "Draw sphere",
      "returnType": "void",


@@ 8807,6 9089,68 @@
      ]
    },
    {
      "name": "DrawCapsule",
      "description": "Draw a capsule with the center of its sphere caps at startPos and endPos",
      "returnType": "void",
      "params": [
        {
          "type": "Vector3",
          "name": "startPos"
        },
        {
          "type": "Vector3",
          "name": "endPos"
        },
        {
          "type": "float",
          "name": "radius"
        },
        {
          "type": "int",
          "name": "slices"
        },
        {
          "type": "int",
          "name": "rings"
        },
        {
          "type": "Color",
          "name": "color"
        }
      ]
    },
    {
      "name": "DrawCapsuleWires",
      "description": "Draw capsule wireframe with the center of its sphere caps at startPos and endPos",
      "returnType": "void",
      "params": [
        {
          "type": "Vector3",
          "name": "startPos"
        },
        {
          "type": "Vector3",
          "name": "endPos"
        },
        {
          "type": "float",
          "name": "radius"
        },
        {
          "type": "int",
          "name": "slices"
        },
        {
          "type": "int",
          "name": "rings"
        },
        {
          "type": "Color",
          "name": "color"
        }
      ]
    },
    {
      "name": "DrawPlane",
      "description": "Draw a plane XZ",
      "returnType": "void",


@@ 8878,9 9222,9 @@
      ]
    },
    {
      "name": "UnloadModel",
      "description": "Unload model (including meshes) from memory (RAM and/or VRAM)",
      "returnType": "void",
      "name": "IsModelReady",
      "description": "Check if a model is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "Model",


@@ 8889,8 9233,8 @@
      ]
    },
    {
      "name": "UnloadModelKeepMeshes",
      "description": "Unload model (but not meshes) from memory (RAM and/or VRAM)",
      "name": "UnloadModel",
      "description": "Unload model (including meshes) from memory (RAM and/or VRAM)",
      "returnType": "void",
      "params": [
        {


@@ 9163,7 9507,7 @@
          "name": "index"
        },
        {
          "type": "void *",
          "type": "const void *",
          "name": "data"
        },
        {


@@ 9220,7 9564,7 @@
          "name": "material"
        },
        {
          "type": "Matrix *",
          "type": "const Matrix *",
          "name": "transforms"
        },
        {


@@ 9267,17 9611,6 @@
      ]
    },
    {
      "name": "GenMeshBinormals",
      "description": "Compute mesh binormals",
      "returnType": "void",
      "params": [
        {
          "type": "Mesh *",
          "name": "mesh"
        }
      ]
    },
    {
      "name": "GenMeshPoly",
      "description": "Generate polygonal mesh",
      "returnType": "Mesh",


@@ 9507,6 9840,17 @@
      "returnType": "Material"
    },
    {
      "name": "IsMaterialReady",
      "description": "Check if a material is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "Material",
          "name": "material"
        }
      ]
    },
    {
      "name": "UnloadMaterial",
      "description": "Unload material from GPU memory (VRAM)",
      "returnType": "void",


@@ 9606,7 9950,7 @@
      "returnType": "void",
      "params": [
        {
          "type": "ModelAnimation*",
          "type": "ModelAnimation *",
          "name": "animations"
        },
        {


@@ 9722,21 10066,6 @@
      ]
    },
    {
      "name": "GetRayCollisionModel",
      "description": "Get collision info between ray and model",
      "returnType": "RayCollision",
      "params": [
        {
          "type": "Ray",
          "name": "ray"
        },
        {
          "type": "Model",
          "name": "model"
        }
      ]
    },
    {
      "name": "GetRayCollisionMesh",
      "description": "Get collision info between ray and mesh",
      "returnType": "RayCollision",


@@ 9862,6 10191,17 @@
      ]
    },
    {
      "name": "IsWaveReady",
      "description": "Checks if wave data is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "Wave",
          "name": "wave"
        }
      ]
    },
    {
      "name": "LoadSound",
      "description": "Load sound from file",
      "returnType": "Sound",


@@ 9884,6 10224,17 @@
      ]
    },
    {
      "name": "IsSoundReady",
      "description": "Checks if a sound is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "Sound",
          "name": "sound"
        }
      ]
    },
    {
      "name": "UpdateSound",
      "description": "Update sound buffer with new data",
      "returnType": "void",


@@ 9999,27 10350,6 @@
      ]
    },
    {
      "name": "PlaySoundMulti",
      "description": "Play a sound (using multichannel buffer pool)",
      "returnType": "void",
      "params": [
        {
          "type": "Sound",
          "name": "sound"
        }
      ]
    },
    {
      "name": "StopSoundMulti",
      "description": "Stop any sound playing (using multichannel buffer pool)",
      "returnType": "void"
    },
    {
      "name": "GetSoundsPlaying",
      "description": "Get number of sounds playing in the multichannel",
      "returnType": "int"
    },
    {
      "name": "IsSoundPlaying",
      "description": "Check if a sound is currently playing",
      "returnType": "bool",


@@ 10061,25 10391,17 @@
      ]
    },
    {
      "name": "WaveFormat",
      "description": "Convert wave data to desired format",
      "name": "SetSoundPan",
      "description": "Set pan for a sound (0.5 is center)",
      "returnType": "void",
      "params": [
        {
          "type": "Wave *",
          "name": "wave"
        },
        {
          "type": "int",
          "name": "sampleRate"
        },
        {
          "type": "int",
          "name": "sampleSize"
          "type": "Sound",
          "name": "sound"
        },
        {
          "type": "int",
          "name": "channels"
          "type": "float",
          "name": "pan"
        }
      ]
    },


@@ 10114,8 10436,31 @@
      ]
    },
    {
      "name": "WaveFormat",
      "description": "Convert wave data to desired format",
      "returnType": "void",
      "params": [
        {
          "type": "Wave *",
          "name": "wave"
        },
        {
          "type": "int",
          "name": "sampleRate"
        },
        {
          "type": "int",
          "name": "sampleSize"
        },
        {
          "type": "int",
          "name": "channels"
        }
      ]
    },
    {
      "name": "LoadWaveSamples",
      "description": "Load samples data from wave as a floats array",
      "description": "Load samples data from wave as a 32bit float data array",
      "returnType": "float *",
      "params": [
        {


@@ 10156,7 10501,7 @@
          "name": "fileType"
        },
        {
          "type": "unsigned char *",
          "type": "const unsigned char *",
          "name": "data"
        },
        {


@@ 10166,6 10511,17 @@
      ]
    },
    {
      "name": "IsMusicReady",
      "description": "Checks if a music stream is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "Music",
          "name": "music"
        }
      ]
    },
    {
      "name": "UnloadMusicStream",
      "description": "Unload music stream",
      "returnType": "void",


@@ 10288,6 10644,21 @@
      ]
    },
    {
      "name": "SetMusicPan",
      "description": "Set pan for a music (0.5 is center)",
      "returnType": "void",
      "params": [
        {
          "type": "Music",
          "name": "music"
        },
        {
          "type": "float",
          "name": "pan"
        }
      ]
    },
    {
      "name": "GetMusicTimeLength",
      "description": "Get music time length (in seconds)",
      "returnType": "float",


@@ 10329,6 10700,17 @@
      ]
    },
    {
      "name": "IsAudioStreamReady",
      "description": "Checks if an audio stream is ready",
      "returnType": "bool",
      "params": [
        {
          "type": "AudioStream",
          "name": "stream"
        }
      ]
    },
    {
      "name": "UnloadAudioStream",
      "description": "Unload audio stream and free memory",
      "returnType": "void",


@@ 10455,6 10837,21 @@
      ]
    },
    {
      "name": "SetAudioStreamPan",
      "description": "Set pan for audio stream (0.5 is centered)",
      "returnType": "void",
      "params": [
        {
          "type": "AudioStream",
          "name": "stream"
        },
        {
          "type": "float",
          "name": "pan"
        }
      ]
    },
    {
      "name": "SetAudioStreamBufferSizeDefault",
      "description": "Default size for new audio streams",
      "returnType": "void",


@@ 10464,6 10861,73 @@
          "name": "size"
        }
      ]
    },
    {
      "name": "SetAudioStreamCallback",
      "description": "Audio thread callback to request new data",
      "returnType": "void",
      "params": [
        {
          "type": "AudioStream",
          "name": "stream"
        },
        {
          "type": "AudioCallback",
          "name": "callback"
        }
      ]
    },
    {
      "name": "AttachAudioStreamProcessor",
      "description": "Attach audio stream processor to stream",
      "returnType": "void",
      "params": [
        {
          "type": "AudioStream",
          "name": "stream"
        },
        {
          "type": "AudioCallback",
          "name": "processor"
        }
      ]
    },
    {
      "name": "DetachAudioStreamProcessor",
      "description": "Detach audio stream processor from stream",
      "returnType": "void",
      "params": [
        {
          "type": "AudioStream",
          "name": "stream"
        },
        {
          "type": "AudioCallback",
          "name": "processor"
        }
      ]
    },
    {
      "name": "AttachAudioMixedProcessor",
      "description": "Attach audio stream processor to the entire audio pipeline",
      "returnType": "void",
      "params": [
        {
          "type": "AudioCallback",
          "name": "processor"
        }
      ]
    },
    {
      "name": "DetachAudioMixedProcessor",
      "description": "Detach audio stream processor from the entire audio pipeline",
      "returnType": "void",
      "params": [
        {
          "type": "AudioCallback",
          "name": "processor"
        }
      ]
    }
  ]
}

M raylib/raylib.ha => raylib/raylib.ha +304 -134
@@ 8,7 8,7 @@ export type rAudioProcessor = void;
export type rAudioBuffer = void;


export def RAYLIB_VERSION: str = "4.0";
export def RAYLIB_VERSION: str = "4.5";

export def PI: f64 = 3.141592653589793;



@@ 124,7 124,7 @@ export type Vector4 = struct {
	w: f32,
};

// Matrix, 4x4 components, column major, OpenGL style, right handed
// Matrix, 4x4 components, column major, OpenGL style, right-handed
export type Matrix = struct {
	// Matrix first row (4 components)
	m0: f32,


@@ 276,7 276,7 @@ export type Camera3D = struct {
	target: Vector3,
	// Camera up vector (rotation over its axis)
	up: Vector3,
	// Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
	// Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
	fovy: f32,
	// Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
	projection: int,


@@ 304,7 304,7 @@ export type Mesh = struct {
	vertices: *[*]f32,
	// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
	texcoords: *[*]f32,
	// Vertex second texture coordinates (useful for lightmaps) (shader-location = 5)
	// Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)
	texcoords2: *[*]f32,
	// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
	normals: *[*]f32,


@@ 356,7 356,7 @@ export type Material = struct {
	params: [4]f32,
};

// Transform, vectex transformation data
// Transform, vertex transformation data
export type Transform = struct {
	// Translation
	translation: Vector3,


@@ 420,9 420,9 @@ export type Ray = struct {
export type RayCollision = struct {
	// Did the ray hit something?
	hit: bool,
	// Distance to nearest hit
	// Distance to the nearest hit
	distance: f32,
	// Point of nearest hit
	// Point of the nearest hit
	point: Vector3,
	// Surface normal of hit
	normal: Vector3,


@@ 454,6 454,8 @@ export type Wave = struct {
export type AudioStream = struct {
	// Pointer to internal data used by the audio system
	buffer: *[*]rAudioBuffer,
	// Pointer to internal data processor, useful for audio effects
	processor: *[*]rAudioProcessor,
	// Frequency (samples per second)
	sampleRate: uint,
	// Bit depth (bits per sample): 8, 16, 32 (24 not supported)


@@ 528,6 530,16 @@ export type VrStereoConfig = struct {
	scaleIn: [2]f32,
};

// File path list
export type FilePathList = struct {
	// Filepaths max entries
	capacity: uint,
	// Filepaths entries count
	count: uint,
	// Filepaths entries
	paths: *[*]*[*]c::schar,
};

// Quaternion, 4 components (Vector4 alias)
export type Quaternion = Vector4;



@@ 569,6 581,8 @@ export type ConfigFlags = enum {
	FLAG_WINDOW_TRANSPARENT = 16,
	// Set to support HighDPI
	FLAG_WINDOW_HIGHDPI = 8192,
	// Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
	FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384,
	// Set to try enabling MSAA 4X
	FLAG_MSAA_4X_HINT = 32,
	// Set to try enabling interlaced video format (for V3D)


@@ 831,7 845,7 @@ export type MouseButton = enum {
	MOUSE_BUTTON_SIDE = 3,
	// Mouse button extra (advanced mouse device)
	MOUSE_BUTTON_EXTRA = 4,
	// Mouse button fordward (advanced mouse device)
	// Mouse button forward (advanced mouse device)
	MOUSE_BUTTON_FORWARD = 5,
	// Mouse button back (advanced mouse device)
	MOUSE_BUTTON_BACK = 6,


@@ 857,7 871,7 @@ export type MouseCursor = enum {
	MOUSE_CURSOR_RESIZE_NWSE = 7,
	// The top-right to bottom-left diagonal resize/move arrow shape
	MOUSE_CURSOR_RESIZE_NESW = 8,
	// The omni-directional resize/move cursor shape
	// The omnidirectional resize/move cursor shape
	MOUSE_CURSOR_RESIZE_ALL = 9,
	// The operation-not-allowed shape
	MOUSE_CURSOR_NOT_ALLOWED = 10,


@@ 1083,7 1097,7 @@ export type PixelFormat = enum {

// Texture parameters: filter mode
export type TextureFilter = enum {
	// No filter, just pixel aproximation
	// No filter, just pixel approximation
	TEXTURE_FILTER_POINT = 0,
	// Linear filtering
	TEXTURE_FILTER_BILINEAR = 1,


@@ 1115,13 1129,13 @@ export type CubemapLayout = enum {
	CUBEMAP_LAYOUT_AUTO_DETECT = 0,
	// Layout is defined by a vertical line with faces
	CUBEMAP_LAYOUT_LINE_VERTICAL = 1,
	// Layout is defined by an horizontal line with faces
	// Layout is defined by a horizontal line with faces
	CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2,
	// Layout is defined by a 3x4 cross with cubemap faces
	CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3,
	// Layout is defined by a 4x3 cross with cubemap faces
	CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4,
	// Layout is defined by a panorama image (equirectangular map)
	// Layout is defined by a panorama image (equirrectangular map)
	CUBEMAP_LAYOUT_PANORAMA = 5,
};



@@ 1147,8 1161,12 @@ export type BlendMode = enum {
	BLEND_ADD_COLORS = 3,
	// Blend textures subtracting colors (alternative)
	BLEND_SUBTRACT_COLORS = 4,
	// Belnd textures using custom src/dst factors (use rlSetBlendMode())
	BLEND_CUSTOM = 5,
	// Blend premultiplied textures considering alpha
	BLEND_ALPHA_PREMULTIPLY = 5,
	// Blend textures using custom src/dst factors (use rlSetBlendFactors())
	BLEND_CUSTOM = 6,
	// Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())
	BLEND_CUSTOM_SEPARATE = 7,
};

// Gesture


@@ 1224,6 1242,8 @@ export type LoadFileTextCallback = *fn(fileName: const *c::schar) *c::schar;
// FileIO: Save text data
export type SaveFileTextCallback = *fn(fileName: const *c::schar, text: *c::schar) bool;

export type AudioCallback = *fn(bufferData: *void, frames: uint) void;

@symbol("InitWindow") fn _InitWindow(width: int, height: int, title: const *c::schar) void;

// Initialize window and OpenGL context


@@ 1263,7 1283,7 @@ export @symbol("IsWindowResized") fn IsWindowResized() bool;
// Check if one specific window flag is enabled
export @symbol("IsWindowState") fn IsWindowState(flag: uint) bool;

// Set window configuration state using flags
// Set window configuration state using flags (only PLATFORM_DESKTOP)
export @symbol("SetWindowState") fn SetWindowState(flags: uint) void;

// Clear window configuration state flags


@@ 1281,9 1301,12 @@ export @symbol("MinimizeWindow") fn MinimizeWindow() void;
// Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
export @symbol("RestoreWindow") fn RestoreWindow() void;

// Set icon for window (only PLATFORM_DESKTOP)
// Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
export @symbol("SetWindowIcon") fn SetWindowIcon(image: Image) void;

// Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
export @symbol("SetWindowIcons") fn SetWindowIcons(images: *Image, count: int) void;

@symbol("SetWindowTitle") fn _SetWindowTitle(title: const *c::schar) void;

// Set title for window (only PLATFORM_DESKTOP)


@@ 1305,6 1328,9 @@ export @symbol("SetWindowMinSize") fn SetWindowMinSize(width: int, height: int) 
// Set window dimensions
export @symbol("SetWindowSize") fn SetWindowSize(width: int, height: int) void;

// Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
export @symbol("SetWindowOpacity") fn SetWindowOpacity(opacity: f32) void;

// Get native window handle
export @symbol("GetWindowHandle") fn GetWindowHandle() *void;



@@ 1314,6 1340,12 @@ export @symbol("GetScreenWidth") fn GetScreenWidth() int;
// Get current screen height
export @symbol("GetScreenHeight") fn GetScreenHeight() int;

// Get current render width (it considers HiDPI)
export @symbol("GetRenderWidth") fn GetRenderWidth() int;

// Get current render height (it considers HiDPI)
export @symbol("GetRenderHeight") fn GetRenderHeight() int;

// Get number of connected monitors
export @symbol("GetMonitorCount") fn GetMonitorCount() int;



@@ 1323,10 1355,10 @@ export @symbol("GetCurrentMonitor") fn GetCurrentMonitor() int;
// Get specified monitor position
export @symbol("GetMonitorPosition") fn GetMonitorPosition(monitor: int) Vector2;

// Get specified monitor width (max available by monitor)
// Get specified monitor width (current video mode used by monitor)
export @symbol("GetMonitorWidth") fn GetMonitorWidth(monitor: int) int;

// Get specified monitor height (max available by monitor)
// Get specified monitor height (current video mode used by monitor)
export @symbol("GetMonitorHeight") fn GetMonitorHeight(monitor: int) int;

// Get specified monitor physical width in millimetres


@@ 1367,14 1399,20 @@ export fn GetClipboardText() const str = {
	return c::tostr(_GetClipboardText())!;
};

// Enable waiting for events on EndDrawing(), no automatic event polling
export @symbol("EnableEventWaiting") fn EnableEventWaiting() void;

// Disable waiting for events on EndDrawing(), automatic events polling
export @symbol("DisableEventWaiting") fn DisableEventWaiting() void;

// Swap back buffer with front buffer (screen drawing)
export @symbol("SwapScreenBuffer") fn SwapScreenBuffer() void;

// Register all input events
export @symbol("PollInputEvents") fn PollInputEvents() void;

// Wait for some milliseconds (halt program execution)
export @symbol("WaitTime") fn WaitTime(ms: f32) void;
// Wait for some time (halt program execution)
export @symbol("WaitTime") fn WaitTime(seconds: f64) void;

// Shows cursor
export @symbol("ShowCursor") fn ShowCursor() void;


@@ 1473,6 1511,9 @@ export fn LoadShaderFromMemory(vsCode: const str, fsCode: const str) Shader = {
	return _LoadShaderFromMemory(vsCode_cstring, fsCode_cstring);
};

// Check if a shader is ready
export @symbol("IsShaderReady") fn IsShaderReady(shader: Shader) bool;

@symbol("GetShaderLocation") fn _GetShaderLocation(shader: Shader, uniformName: const *c::schar) int;

// Get shader uniform location


@@ 1518,15 1559,15 @@ export @symbol("GetCameraMatrix2D") fn GetCameraMatrix2D(camera: Camera2D) Matri
// Get the screen space position for a 3d world space position
export @symbol("GetWorldToScreen") fn GetWorldToScreen(position: Vector3, camera: Camera) Vector2;

// Get the world space position for a 2d camera screen space position
export @symbol("GetScreenToWorld2D") fn GetScreenToWorld2D(position: Vector2, camera: Camera2D) Vector2;

// Get size position for a 3d world space position
export @symbol("GetWorldToScreenEx") fn GetWorldToScreenEx(position: Vector3, camera: Camera, width: int, height: int) Vector2;

// Get the screen space position for a 2d camera world space position
export @symbol("GetWorldToScreen2D") fn GetWorldToScreen2D(position: Vector2, camera: Camera2D) Vector2;

// Get the world space position for a 2d camera screen space position
export @symbol("GetScreenToWorld2D") fn GetScreenToWorld2D(position: Vector2, camera: Camera2D) Vector2;

// Set target FPS (maximum)
export @symbol("SetTargetFPS") fn SetTargetFPS(fps: int) void;



@@ 1564,14 1605,23 @@ export @symbol("TraceLog") fn TraceLog(logLevel: int, text: const *c::schar, ...
export @symbol("SetTraceLogLevel") fn SetTraceLogLevel(logLevel: int) void;

// Internal memory allocator
export @symbol("MemAlloc") fn MemAlloc(_size: int) *void;
export @symbol("MemAlloc") fn MemAlloc(_size: uint) *void;

// Internal memory reallocator
export @symbol("MemRealloc") fn MemRealloc(ptr: *void, _size: int) *void;
export @symbol("MemRealloc") fn MemRealloc(ptr: *void, _size: uint) *void;

// Internal memory free
export @symbol("MemFree") fn MemFree(ptr: *void) void;

@symbol("OpenURL") fn _OpenURL(url: const *c::schar) void;

// Open URL with default system browser (if available)
export fn OpenURL(url: const str) void = {
	let url_cstring: *c::char = c::fromstr(url);
	defer free(url_cstring);
	return _OpenURL(url_cstring);
};

// Set custom trace log
export @symbol("SetTraceLogCallback") fn SetTraceLogCallback(callback: TraceLogCallback) void;



@@ 1608,6 1658,15 @@ export fn SaveFileData(fileName: const str, data: *void, bytesToWrite: uint) boo
	return _SaveFileData(fileName_cstring, data, bytesToWrite);
};

@symbol("ExportDataAsCode") fn _ExportDataAsCode(data: const *c::uchar, _size: uint, fileName: const *c::schar) bool;

// Export data to code (.h), returns true on success
export fn ExportDataAsCode(data: const *c::uchar, _size: uint, fileName: const str) bool = {
	let fileName_cstring: *c::char = c::fromstr(fileName);
	defer free(fileName_cstring);
	return _ExportDataAsCode(data, _size, fileName_cstring);
};

@symbol("LoadFileText") fn _LoadFileText(fileName: const *c::schar) *c::schar;

// Load text data from file (read), returns a '\0' terminated string


@@ 1666,6 1725,15 @@ export fn IsFileExtension(fileName: const str, ext: const str) bool = {
	return _IsFileExtension(fileName_cstring, ext_cstring);
};

@symbol("GetFileLength") fn _GetFileLength(fileName: const *c::schar) int;

// Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
export fn GetFileLength(fileName: const str) int = {
	let fileName_cstring: *c::char = c::fromstr(fileName);
	defer free(fileName_cstring);
	return _GetFileLength(fileName_cstring);
};

@symbol("GetFileExtension") fn _GetFileExtension(fileName: const *c::schar) const *c::schar;

// Get pointer to extension for a filename string (includes dot: '.png')


@@ 1718,18 1786,13 @@ export fn GetWorkingDirectory() const str = {
	return c::tostr(_GetWorkingDirectory())!;
};

@symbol("GetDirectoryFiles") fn _GetDirectoryFiles(dirPath: const *c::schar, count: *int) **c::schar;
@symbol("GetApplicationDirectory") fn _GetApplicationDirectory() const *c::schar;

// Get filenames in a directory path (memory should be freed)
export fn GetDirectoryFiles(dirPath: const str, count: *int) **c::schar = {
	let dirPath_cstring: *c::char = c::fromstr(dirPath);
	defer free(dirPath_cstring);
	return _GetDirectoryFiles(dirPath_cstring, count);
// Get the directory if the running application (uses static string)
export fn GetApplicationDirectory() const str = {
	return c::tostr(_GetApplicationDirectory())!;
};

// Clear directory files paths buffers (free memory)
export @symbol("ClearDirectoryFiles") fn ClearDirectoryFiles() void;

@symbol("ChangeDirectory") fn _ChangeDirectory(dir: const *c::schar) bool;

// Change working directory, return true on success


@@ 1739,14 1802,46 @@ export fn ChangeDirectory(dir: const str) bool = {
	return _ChangeDirectory(dir_cstring);
};

@symbol("IsPathFile") fn _IsPathFile(path: const *c::schar) bool;

// Check if a given path is a file or a directory
export fn IsPathFile(path: const str) bool = {
	let path_cstring: *c::char = c::fromstr(path);
	defer free(path_cstring);
	return _IsPathFile(path_cstring);
};

@symbol("LoadDirectoryFiles") fn _LoadDirectoryFiles(dirPath: const *c::schar) FilePathList;

// Load directory filepaths
export fn LoadDirectoryFiles(dirPath: const str) FilePathList = {
	let dirPath_cstring: *c::char = c::fromstr(dirPath);
	defer free(dirPath_cstring);
	return _LoadDirectoryFiles(dirPath_cstring);
};

@symbol("LoadDirectoryFilesEx") fn _LoadDirectoryFilesEx(basePath: const *c::schar, filter: const *c::schar, scanSubdirs: bool) FilePathList;

// Load directory filepaths with extension filtering and recursive directory scan
export fn LoadDirectoryFilesEx(basePath: const str, filter: const str, scanSubdirs: bool) FilePathList = {
	let basePath_cstring: *c::char = c::fromstr(basePath);
	defer free(basePath_cstring);
	let filter_cstring: *c::char = c::fromstr(filter);
	defer free(filter_cstring);
	return _LoadDirectoryFilesEx(basePath_cstring, filter_cstring, scanSubdirs);
};

// Unload filepaths
export @symbol("UnloadDirectoryFiles") fn UnloadDirectoryFiles(files: FilePathList) void;

// Check if a file has been dropped into window
export @symbol("IsFileDropped") fn IsFileDropped() bool;

// Get dropped files names (memory should be freed)
export @symbol("GetDroppedFiles") fn GetDroppedFiles(count: *int) **c::schar;
// Load dropped filepaths
export @symbol("LoadDroppedFiles") fn LoadDroppedFiles() FilePathList;

// Clear dropped files paths buffer (free memory)
export @symbol("ClearDroppedFiles") fn ClearDroppedFiles() void;
// Unload dropped filepaths
export @symbol("UnloadDroppedFiles") fn UnloadDroppedFiles(files: FilePathList) void;

@symbol("GetFileModTime") fn _GetFileModTime(fileName: const *c::schar) c::long;



@@ 1757,36 1852,21 @@ export fn GetFileModTime(fileName: const str) c::long = {
	return _GetFileModTime(fileName_cstring);
};

// Compress data (DEFLATE algorithm)
export @symbol("CompressData") fn CompressData(data: *c::uchar, dataLength: int, compDataLength: *int) *c::uchar;
// Compress data (DEFLATE algorithm), memory must be MemFree()
export @symbol("CompressData") fn CompressData(data: const *c::uchar, dataSize: int, compDataSize: *int) *c::uchar;

// Decompress data (DEFLATE algorithm)
export @symbol("DecompressData") fn DecompressData(compData: *c::uchar, compDataLength: int, dataLength: *int) *c::uchar;
// Decompress data (DEFLATE algorithm), memory must be MemFree()
export @symbol("DecompressData") fn DecompressData(compData: const *c::uchar, compDataSize: int, dataSize: *int) *c::uchar;

@symbol("EncodeDataBase64") fn _EncodeDataBase64(data: const *c::uchar, dataLength: int, outputLength: *int) *c::schar;
@symbol("EncodeDataBase64") fn _EncodeDataBase64(data: const *c::uchar, dataSize: int, outputSize: *int) *c::schar;

// Encode data to Base64 string
export fn EncodeDataBase64(data: const *c::uchar, dataLength: int, outputLength: *int) str = {
	return c::tostr(_EncodeDataBase64(data, dataLength, outputLength))!;
// Encode data to Base64 string, memory must be MemFree()
export fn EncodeDataBase64(data: const *c::uchar, dataSize: int, outputSize: *int) str = {
	return c::tostr(_EncodeDataBase64(data, dataSize, outputSize))!;
};

// Decode Base64 string data
export @symbol("DecodeDataBase64") fn DecodeDataBase64(data: *c::uchar, outputLength: *int) *c::uchar;

// Save integer value to storage file (to defined position), returns true on success
export @symbol("SaveStorageValue") fn SaveStorageValue(position: uint, value: int) bool;

// Load integer value from storage file (from defined position)
export @symbol("LoadStorageValue") fn LoadStorageValue(position: uint) int;

@symbol("OpenURL") fn _OpenURL(url: const *c::schar) void;

// Open URL with default system browser (if available)
export fn OpenURL(url: const str) void = {
	let url_cstring: *c::char = c::fromstr(url);
	defer free(url_cstring);
	return _OpenURL(url_cstring);
};
// Decode Base64 string data, memory must be MemFree()
export @symbol("DecodeDataBase64") fn DecodeDataBase64(data: const *c::uchar, outputSize: *int) *c::uchar;

// Check if a key has been pressed once
export @symbol("IsKeyPressed") fn IsKeyPressed(key: int) bool;


@@ 1882,9 1962,12 @@ export @symbol("SetMouseOffset") fn SetMouseOffset(offsetX: int, offsetY: int) v
// Set mouse scaling
export @symbol("SetMouseScale") fn SetMouseScale(scaleX: f32, scaleY: f32) void;

// Get mouse wheel movement Y
// Get mouse wheel movement for X or Y, whichever is larger
export @symbol("GetMouseWheelMove") fn GetMouseWheelMove() f32;

// Get mouse wheel movement for both X and Y
export @symbol("GetMouseWheelMoveV") fn GetMouseWheelMoveV() Vector2;

// Set mouse cursor
export @symbol("SetMouseCursor") fn SetMouseCursor(cursor: int) void;



@@ 1927,23 2010,11 @@ export @symbol("GetGesturePinchVector") fn GetGesturePinchVector() Vector2;
// Get gesture pinch angle
export @symbol("GetGesturePinchAngle") fn GetGesturePinchAngle() f32;

// Set camera mode (multiple camera modes available)
export @symbol("SetCameraMode") fn SetCameraMode(camera: Camera, mode: int) void;

// Update camera position for selected mode
export @symbol("UpdateCamera") fn UpdateCamera(camera: *Camera) void;

// Set camera pan key to combine with mouse movement (free camera)
export @symbol("SetCameraPanControl") fn SetCameraPanControl(keyPan: int) void;

// Set camera alt key to combine with mouse movement (free camera)
export @symbol("SetCameraAltControl") fn SetCameraAltControl(keyAlt: int) void;
export @symbol("UpdateCamera") fn UpdateCamera(camera: *Camera, mode: int) void;

// Set camera smooth zoom key to combine with mouse (free camera)
export @symbol("SetCameraSmoothZoomControl") fn SetCameraSmoothZoomControl(keySmoothZoom: int) void;

// Set camera move controls (1st person and 3rd person cameras)
export @symbol("SetCameraMoveControls") fn SetCameraMoveControls(keyFront: int, keyBack: int, keyRight: int, keyLeft: int, keyUp: int, keyDown: int) void;
// Update camera movement/rotation
export @symbol("UpdateCameraPro") fn UpdateCameraPro(camera: *Camera, movement: Vector3, rotation: Vector3, zoom: f32) void;

// Set texture and rectangle to be used on shapes drawing
export @symbol("SetShapesTexture") fn SetShapesTexture(texture: Texture2D, source: Rectangle) void;


@@ 2077,6 2148,9 @@ export @symbol("CheckCollisionPointCircle") fn CheckCollisionPointCircle(point: 
// Check if point is inside a triangle
export @symbol("CheckCollisionPointTriangle") fn CheckCollisionPointTriangle(point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) bool;

// Check if point is within a polygon described by array of vertices
export @symbol("CheckCollisionPointPoly") fn CheckCollisionPointPoly(point: Vector2, points: *Vector2, pointCount: int) bool;

// Check the collision between two lines defined by two points each, returns collision point by reference
export @symbol("CheckCollisionLines") fn CheckCollisionLines(startPos1: Vector2, endPos1: Vector2, startPos2: Vector2, endPos2: Vector2, collisionPoint: *Vector2) bool;



@@ 2128,6 2202,9 @@ export @symbol("LoadImageFromTexture") fn LoadImageFromTexture(texture: Texture2
// Load image from screen buffer and (screenshot)
export @symbol("LoadImageFromScreen") fn LoadImageFromScreen() Image;

// Check if an image is ready
export @symbol("IsImageReady") fn IsImageReady(image: Image) bool;

// Unload image from CPU memory (RAM)
export @symbol("UnloadImage") fn UnloadImage(image: Image) void;



@@ 2167,9 2244,21 @@ export @symbol("GenImageChecked") fn GenImageChecked(width: int, height: int, ch
// Generate image: white noise
export @symbol("GenImageWhiteNoise") fn GenImageWhiteNoise(width: int, height: int, factor: f32) Image;

// Generate image: perlin noise
export @symbol("GenImagePerlinNoise") fn GenImagePerlinNoise(width: int, height: int, offsetX: int, offsetY: int, scale: f32) Image;

// Generate image: cellular algorithm, bigger tileSize means bigger cells
export @symbol("GenImageCellular") fn GenImageCellular(width: int, height: int, tileSize: int) Image;

@symbol("GenImageText") fn _GenImageText(width: int, height: int, text: const *c::schar) Image;

// Generate image: grayscale image from text data
export fn GenImageText(width: int, height: int, text: const str) Image = {
	let text_cstring: *c::char = c::fromstr(text);
	defer free(text_cstring);
	return _GenImageText(width, height, text_cstring);
};

// Create an image duplicate (useful for transformations)
export @symbol("ImageCopy") fn ImageCopy(image: Image) Image;



@@ 2215,6 2304,9 @@ export @symbol("ImageAlphaMask") fn ImageAlphaMask(image: *Image, alphaMask: Ima
// Premultiply alpha channel
export @symbol("ImageAlphaPremultiply") fn ImageAlphaPremultiply(image: *Image) void;

// Apply Gaussian blur using a box blur approximation
export @symbol("ImageBlurGaussian") fn ImageBlurGaussian(image: *Image, blurSize: int) void;

// Resize image (Bicubic scaling algorithm)
export @symbol("ImageResize") fn ImageResize(image: *Image, newWidth: int, newHeight: int) void;



@@ 2293,12 2385,18 @@ export @symbol("ImageDrawLine") fn ImageDrawLine(dst: *Image, startPosX: int, st
// Draw line within an image (Vector version)
export @symbol("ImageDrawLineV") fn ImageDrawLineV(dst: *Image, start: Vector2, end: Vector2, color: Color) void;

// Draw circle within an image
// Draw a filled circle within an image
export @symbol("ImageDrawCircle") fn ImageDrawCircle(dst: *Image, centerX: int, centerY: int, radius: int, color: Color) void;

// Draw circle within an image (Vector version)
// Draw a filled circle within an image (Vector version)
export @symbol("ImageDrawCircleV") fn ImageDrawCircleV(dst: *Image, center: Vector2, radius: int, color: Color) void;

// Draw circle outline within an image
export @symbol("ImageDrawCircleLines") fn ImageDrawCircleLines(dst: *Image, centerX: int, centerY: int, radius: int, color: Color) void;

// Draw circle outline within an image (Vector version)
export @symbol("ImageDrawCircleLinesV") fn ImageDrawCircleLinesV(dst: *Image, center: Vector2, radius: int, color: Color) void;

// Draw rectangle within an image
export @symbol("ImageDrawRectangle") fn ImageDrawRectangle(dst: *Image, posX: int, posY: int, width: int, height: int, color: Color) void;



@@ 2350,9 2448,15 @@ export @symbol("LoadTextureCubemap") fn LoadTextureCubemap(image: Image, layout:
// Load texture for rendering (framebuffer)
export @symbol("LoadRenderTexture") fn LoadRenderTexture(width: int, height: int) RenderTexture2D;

// Check if a texture is ready
export @symbol("IsTextureReady") fn IsTextureReady(texture: Texture2D) bool;

// Unload texture from GPU memory (VRAM)
export @symbol("UnloadTexture") fn UnloadTexture(texture: Texture2D) void;

// Check if a render texture is ready
export @symbol("IsRenderTextureReady") fn IsRenderTextureReady(target: RenderTexture2D) bool;

// Unload render texture from GPU memory (VRAM)
export @symbol("UnloadRenderTexture") fn UnloadRenderTexture(target: RenderTexture2D) void;



@@ 2383,21 2487,12 @@ export @symbol("DrawTextureEx") fn DrawTextureEx(texture: Texture2D, position: V
// Draw a part of a texture defined by a rectangle
export @symbol("DrawTextureRec") fn DrawTextureRec(texture: Texture2D, source: Rectangle, position: Vector2, tint: Color) void;

// Draw texture quad with tiling and offset parameters
export @symbol("DrawTextureQuad") fn DrawTextureQuad(texture: Texture2D, tiling: Vector2, _offset: Vector2, quad: Rectangle, tint: Color) void;

// Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
export @symbol("DrawTextureTiled") fn DrawTextureTiled(texture: Texture2D, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: f32, scale: f32, tint: Color) void;

// Draw a part of a texture defined by a rectangle with 'pro' parameters
export @symbol("DrawTexturePro") fn DrawTexturePro(texture: Texture2D, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: f32, tint: Color) void;

// Draws a texture (or part of it) that stretches or shrinks nicely
export @symbol("DrawTextureNPatch") fn DrawTextureNPatch(texture: Texture2D, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: f32, tint: Color) void;

// Draw a textured polygon
export @symbol("DrawTexturePoly") fn DrawTexturePoly(texture: Texture2D, center: Vector2, points: *Vector2, texcoords: *Vector2, pointCount: int, tint: Color) void;

// Get color with alpha applied, alpha goes from 0.0f to 1.0f
export @symbol("Fade") fn Fade(color: Color, alpha: f32) Color;



@@ 2416,6 2511,15 @@ export @symbol("ColorToHSV") fn ColorToHSV(color: Color) Vector3;
// Get a Color from HSV values, hue [0..360], saturation/value [0..1]
export @symbol("ColorFromHSV") fn ColorFromHSV(hue: f32, saturation: f32, value: f32) Color;

// Get color multiplied with another color
export @symbol("ColorTint") fn ColorTint(color: Color, tint: Color) Color;

// Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
export @symbol("ColorBrightness") fn ColorBrightness(color: Color, factor: f32) Color;

// Get color with contrast correction, contrast values between -1.0f and 1.0f
export @symbol("ColorContrast") fn ColorContrast(color: Color, contrast: f32) Color;

// Get color with alpha applied, alpha goes from 0.0f to 1.0f
export @symbol("ColorAlpha") fn ColorAlpha(color: Color, alpha: f32) Color;



@@ 2448,7 2552,7 @@ export fn LoadFont(fileName: const str) Font = {

@symbol("LoadFontEx") fn _LoadFontEx(fileName: const *c::schar, fontSize: int, fontChars: *int, glyphCount: int) Font;

// Load font from file with extended parameters
// Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
export fn LoadFontEx(fileName: const str, fontSize: int, fontChars: *int, glyphCount: int) Font = {
	let fileName_cstring: *c::char = c::fromstr(fileName);
	defer free(fileName_cstring);


@@ 2467,6 2571,9 @@ export fn LoadFontFromMemory(fileType: const str, fileData: const *c::uchar, dat
	return _LoadFontFromMemory(fileType_cstring, fileData, dataSize, fontSize, fontChars, glyphCount);
};

// Check if a font is ready
export @symbol("IsFontReady") fn IsFontReady(font: Font) bool;

// Load font data for further use
export @symbol("LoadFontData") fn LoadFontData(fileData: const *c::uchar, dataSize: int, fontSize: int, fontChars: *int, glyphCount: int, _type: int) *GlyphInfo;



@@ 2476,9 2583,18 @@ export @symbol("GenImageFontAtlas") fn GenImageFontAtlas(chars: const *GlyphInfo
// Unload font chars info data (RAM)
export @symbol("UnloadFontData") fn UnloadFontData(chars: *GlyphInfo, glyphCount: int) void;

// Unload Font from GPU memory (VRAM)
// Unload font from GPU memory (VRAM)
export @symbol("UnloadFont") fn UnloadFont(font: Font) void;

@symbol("ExportFontAsCode") fn _ExportFontAsCode(font: Font, fileName: const *c::schar) bool;

// Export font as code file, returns true on success
export fn ExportFontAsCode(font: Font, fileName: const str) bool = {
	let fileName_cstring: *c::char = c::fromstr(fileName);
	defer free(fileName_cstring);
	return _ExportFontAsCode(font, fileName_cstring);
};

// Draw current FPS
export @symbol("DrawFPS") fn DrawFPS(posX: int, posY: int) void;



@@ 2512,6 2628,9 @@ export fn DrawTextPro(font: Font, text: const str, position: Vector2, origin: Ve
// Draw one character (codepoint)
export @symbol("DrawTextCodepoint") fn DrawTextCodepoint(font: Font, codepoint: int, position: Vector2, fontSize: f32, tint: Color) void;

// Draw multiple character (codepoint)
export @symbol("DrawTextCodepoints") fn DrawTextCodepoints(font: Font, codepoints: const *int, count: int, position: Vector2, fontSize: f32, spacing: f32, tint: Color) void;

@symbol("MeasureText") fn _MeasureText(text: const *c::schar, fontSize: int) int;

// Measure string width for default font


@@ 2539,6 2658,22 @@ export @symbol("GetGlyphInfo") fn GetGlyphInfo(font: Font, codepoint: int) Glyph
// Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
export @symbol("GetGlyphAtlasRec") fn GetGlyphAtlasRec(font: Font, codepoint: int) Rectangle;

@symbol("LoadUTF8") fn _LoadUTF8(codepoints: const *int, length: int) *c::schar;

// Load UTF-8 text encoded from codepoints array
export fn LoadUTF8(codepoints: const *int, length: int) str = {
	return c::tostr(_LoadUTF8(codepoints, length))!;
};

@symbol("UnloadUTF8") fn _UnloadUTF8(text: *c::schar) void;

// Unload UTF-8 text encoded from codepoints array
export fn UnloadUTF8(text: str) void = {
	let text_cstring: *c::char = c::fromstr(text);
	defer free(text_cstring);
	return _UnloadUTF8(text_cstring);
};

@symbol("LoadCodepoints") fn _LoadCodepoints(text: const *c::schar, count: *int) *int;

// Load all codepoints from a UTF-8 text string, codepoints count returned by parameter


@@ 2560,27 2695,38 @@ export fn GetCodepointCount(text: const str) int = {
	return _GetCodepointCount(text_cstring);
};

@symbol("GetCodepoint") fn _GetCodepoint(text: const *c::schar, bytesProcessed: *int) int;
@symbol("GetCodepoint") fn _GetCodepoint(text: const *c::schar, codepointSize: *int) int;

// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
export fn GetCodepoint(text: const str, bytesProcessed: *int) int = {
export fn GetCodepoint(text: const str, codepointSize: *int) int = {
	let text_cstring: *c::char = c::fromstr(text);
	defer free(text_cstring);
	return _GetCodepoint(text_cstring, bytesProcessed);
	return _GetCodepoint(text_cstring, codepointSize);
};

@symbol("CodepointToUTF8") fn _CodepointToUTF8(codepoint: int, byteSize: *int) const *c::schar;
@symbol("GetCodepointNext") fn _GetCodepointNext(text: const *c::schar, codepointSize: *int) int;

// Encode one codepoint into UTF-8 byte array (array length returned as parameter)
export fn CodepointToUTF8(codepoint: int, byteSize: *int) const str = {
	return c::tostr(_CodepointToUTF8(codepoint, byteSize))!;
// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
export fn GetCodepointNext(text: const str, codepointSize: *int) int = {
	let text_cstring: *c::char = c::fromstr(text);
	defer free(text_cstring);
	return _GetCodepointNext(text_cstring, codepointSize);
};

@symbol("TextCodepointsToUTF8") fn _TextCodepointsToUTF8(codepoints: *int, length: int) *c::schar;
@symbol("GetCodepointPrevious") fn _GetCodepointPrevious(text: const *c::schar, codepointSize: *int) int;

// Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)
export fn TextCodepointsToUTF8(codepoints: *int, length: int) str = {
	return c::tostr(_TextCodepointsToUTF8(codepoints, length))!;
// Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
export fn GetCodepointPrevious(text: const str, codepointSize: *int) int = {
	let text_cstring: *c::char = c::fromstr(text);
	defer free(text_cstring);
	return _GetCodepointPrevious(text_cstring, codepointSize);
};

@symbol("CodepointToUTF8") fn _CodepointToUTF8(codepoint: int, utf8Size: *int) const *c::schar;

// Encode one codepoint into UTF-8 byte array (array length returned as parameter)
export fn CodepointToUTF8(codepoint: int, utf8Size: *int) const str = {
	return c::tostr(_CodepointToUTF8(codepoint, utf8Size))!;
};

@symbol("TextCopy") fn _TextCopy(dst: *c::schar, src: const *c::schar) int;


@@ 2753,12 2899,6 @@ export @symbol("DrawCubeWires") fn DrawCubeWires(position: Vector3, width: f32, 
// Draw cube wires (Vector version)
export @symbol("DrawCubeWiresV") fn DrawCubeWiresV(position: Vector3, _size: Vector3, color: Color) void;

// Draw cube textured
export @symbol("DrawCubeTexture") fn DrawCubeTexture(texture: Texture2D, position: Vector3, width: f32, height: f32, length: f32, color: Color) void;

// Draw cube with a region of a texture
export @symbol("DrawCubeTextureRec") fn DrawCubeTextureRec(texture: Texture2D, source: Rectangle, position: Vector3, width: f32, height: f32, length: f32, color: Color) void;

// Draw sphere
export @symbol("DrawSphere") fn DrawSphere(centerPos: Vector3, radius: f32, color: Color) void;



@@ 2780,6 2920,12 @@ export @symbol("DrawCylinderWires") fn DrawCylinderWires(position: Vector3, radi
// Draw a cylinder wires with base at startPos and top at endPos
export @symbol("DrawCylinderWiresEx") fn DrawCylinderWiresEx(startPos: Vector3, endPos: Vector3, startRadius: f32, endRadius: f32, sides: int, color: Color) void;

// Draw a capsule with the center of its sphere caps at startPos and endPos
export @symbol("DrawCapsule") fn DrawCapsule(startPos: Vector3, endPos: Vector3, radius: f32, slices: int, rings: int, color: Color) void;

// Draw capsule wireframe with the center of its sphere caps at startPos and endPos
export @symbol("DrawCapsuleWires") fn DrawCapsuleWires(startPos: Vector3, endPos: Vector3, radius: f32, slices: int, rings: int, color: Color) void;

// Draw a plane XZ
export @symbol("DrawPlane") fn DrawPlane(centerPos: Vector3, _size: Vector2, color: Color) void;



@@ 2801,12 2947,12 @@ export fn LoadModel(fileName: const str) Model = {
// Load model from generated mesh (default material)
export @symbol("LoadModelFromMesh") fn LoadModelFromMesh(mesh: Mesh) Model;

// Check if a model is ready
export @symbol("IsModelReady") fn IsModelReady(model: Model) bool;

// Unload model (including meshes) from memory (RAM and/or VRAM)
export @symbol("UnloadModel") fn UnloadModel(model: Model) void;

// Unload model (but not meshes) from memory (RAM and/or VRAM)
export @symbol("UnloadModelKeepMeshes") fn UnloadModelKeepMeshes(model: Model) void;

// Compute model bounding box limits (considers all meshes)
export @symbol("GetModelBoundingBox") fn GetModelBoundingBox(model: Model) BoundingBox;



@@ 2838,7 2984,7 @@ export @symbol("DrawBillboardPro") fn DrawBillboardPro(camera: Camera, texture: 
export @symbol("UploadMesh") fn UploadMesh(mesh: *Mesh, dynamic: bool) void;

// Update mesh vertex data in GPU for a specific buffer index
export @symbol("UpdateMeshBuffer") fn UpdateMeshBuffer(mesh: Mesh, index: int, data: *void, dataSize: int, _offset: int) void;
export @symbol("UpdateMeshBuffer") fn UpdateMeshBuffer(mesh: Mesh, index: int, data: const *void, dataSize: int, _offset: int) void;

// Unload mesh data from CPU and GPU
export @symbol("UnloadMesh") fn UnloadMesh(mesh: Mesh) void;


@@ 2847,7 2993,7 @@ export @symbol("UnloadMesh") fn UnloadMesh(mesh: Mesh) void;
export @symbol("DrawMesh") fn DrawMesh(mesh: Mesh, material: Material, transform: Matrix) void;

// Draw multiple mesh instances with material and different transforms
export @symbol("DrawMeshInstanced") fn DrawMeshInstanced(mesh: Mesh, material: Material, transforms: *Matrix, instances: int) void;
export @symbol("DrawMeshInstanced") fn DrawMeshInstanced(mesh: Mesh, material: Material, transforms: const *Matrix, instances: int) void;

@symbol("ExportMesh") fn _ExportMesh(mesh: Mesh, fileName: const *c::schar) bool;



@@ 2864,9 3010,6 @@ export @symbol("GetMeshBoundingBox") fn GetMeshBoundingBox(mesh: Mesh) BoundingB
// Compute mesh tangents
export @symbol("GenMeshTangents") fn GenMeshTangents(mesh: *Mesh) void;

// Compute mesh binormals
export @symbol("GenMeshBinormals") fn GenMeshBinormals(mesh: *Mesh) void;

// Generate polygonal mesh
export @symbol("GenMeshPoly") fn GenMeshPoly(sides: int, radius: f32) Mesh;



@@ 2912,6 3055,9 @@ export fn LoadMaterials(fileName: const str, materialCount: *int) *Material = {
// Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
export @symbol("LoadMaterialDefault") fn LoadMaterialDefault() Material;

// Check if a material is ready
export @symbol("IsMaterialReady") fn IsMaterialReady(material: Material) bool;

// Unload material from GPU memory (VRAM)
export @symbol("UnloadMaterial") fn UnloadMaterial(material: Material) void;



@@ 2957,9 3103,6 @@ export @symbol("GetRayCollisionSphere") fn GetRayCollisionSphere(ray: Ray, cente
// Get collision info between ray and box
export @symbol("GetRayCollisionBox") fn GetRayCollisionBox(ray: Ray, box: BoundingBox) RayCollision;

// Get collision info between ray and model
export @symbol("GetRayCollisionModel") fn GetRayCollisionModel(ray: Ray, model: Model) RayCollision;

// Get collision info between ray and mesh
export @symbol("GetRayCollisionMesh") fn GetRayCollisionMesh(ray: Ray, mesh: Mesh, transform: Matrix) RayCollision;



@@ 2999,6 3142,9 @@ export fn LoadWaveFromMemory(fileType: const str, fileData: const *c::uchar, dat
	return _LoadWaveFromMemory(fileType_cstring, fileData, dataSize);
};

// Checks if wave data is ready
export @symbol("IsWaveReady") fn IsWaveReady(wave: Wave) bool;

@symbol("LoadSound") fn _LoadSound(fileName: const *c::schar) Sound;

// Load sound from file


@@ 3011,6 3157,9 @@ export fn LoadSound(fileName: const str) Sound = {
// Load sound from wave data
export @symbol("LoadSoundFromWave") fn LoadSoundFromWave(wave: Wave) Sound;

// Checks if a sound is ready
export @symbol("IsSoundReady") fn IsSoundReady(sound: Sound) bool;

// Update sound buffer with new data
export @symbol("UpdateSound") fn UpdateSound(sound: Sound, data: const *void, sampleCount: int) void;



@@ 3050,15 3199,6 @@ export @symbol("PauseSound") fn PauseSound(sound: Sound) void;
// Resume a paused sound
export @symbol("ResumeSound") fn ResumeSound(sound: Sound) void;

// Play a sound (using multichannel buffer pool)
export @symbol("PlaySoundMulti") fn PlaySoundMulti(sound: Sound) void;

// Stop any sound playing (using multichannel buffer pool)
export @symbol("StopSoundMulti") fn StopSoundMulti() void;

// Get number of sounds playing in the multichannel
export @symbol("GetSoundsPlaying") fn GetSoundsPlaying() int;

// Check if a sound is currently playing
export @symbol("IsSoundPlaying") fn IsSoundPlaying(sound: Sound) bool;



@@ 3068,8 3208,8 @@ export @symbol("SetSoundVolume") fn SetSoundVolume(sound: Sound, volume: f32) vo
// Set pitch for a sound (1.0 is base level)
export @symbol("SetSoundPitch") fn SetSoundPitch(sound: Sound, pitch: f32) void;

// Convert wave data to desired format
export @symbol("WaveFormat") fn WaveFormat(wave: *Wave, sampleRate: int, sampleSize: int, channels: int) void;
// Set pan for a sound (0.5 is center)
export @symbol("SetSoundPan") fn SetSoundPan(sound: Sound, pan: f32) void;

// Copy a wave to a new wave
export @symbol("WaveCopy") fn WaveCopy(wave: Wave) Wave;


@@ 3077,7 3217,10 @@ export @symbol("WaveCopy") fn WaveCopy(wave: Wave) Wave;
// Crop a wave to defined samples range
export @symbol("WaveCrop") fn WaveCrop(wave: *Wave, initSample: int, finalSample: int) void;

// Load samples data from wave as a floats array
// Convert wave data to desired format
export @symbol("WaveFormat") fn WaveFormat(wave: *Wave, sampleRate: int, sampleSize: int, channels: int) void;

// Load samples data from wave as a 32bit float data array
export @symbol("LoadWaveSamples") fn LoadWaveSamples(wave: Wave) *f32;

// Unload samples data loaded with LoadWaveSamples()


@@ 3092,15 3235,18 @@ export fn LoadMusicStream(fileName: const str) Music = {
	return _LoadMusicStream(fileName_cstring);
};

@symbol("LoadMusicStreamFromMemory") fn _LoadMusicStreamFromMemory(fileType: const *c::schar, data: *c::uchar, dataSize: int) Music;
@symbol("LoadMusicStreamFromMemory") fn _LoadMusicStreamFromMemory(fileType: const *c::schar, data: const *c::uchar, dataSize: int) Music;

// Load music stream from data
export fn LoadMusicStreamFromMemory(fileType: const str, data: *c::uchar, dataSize: int) Music = {
export fn LoadMusicStreamFromMemory(fileType: const str, data: const *c::uchar, dataSize: int) Music = {
	let fileType_cstring: *c::char = c::fromstr(fileType);
	defer free(fileType_cstring);
	return _LoadMusicStreamFromMemory(fileType_cstring, data, dataSize);
};

// Checks if a music stream is ready
export @symbol("IsMusicReady") fn IsMusicReady(music: Music) bool;

// Unload music stream
export @symbol("UnloadMusicStream") fn UnloadMusicStream(music: Music) void;



@@ 3131,6 3277,9 @@ export @symbol("SetMusicVolume") fn SetMusicVolume(music: Music, volume: f32) vo
// Set pitch for a music (1.0 is base level)
export @symbol("SetMusicPitch") fn SetMusicPitch(music: Music, pitch: f32) void;

// Set pan for a music (0.5 is center)
export @symbol("SetMusicPan") fn SetMusicPan(music: Music, pan: f32) void;

// Get music time length (in seconds)
export @symbol("GetMusicTimeLength") fn GetMusicTimeLength(music: Music) f32;



@@ 3140,6 3289,9 @@ export @symbol("GetMusicTimePlayed") fn GetMusicTimePlayed(music: Music) f32;
// Load audio stream (to stream raw audio pcm data)
export @symbol("LoadAudioStream") fn LoadAudioStream(sampleRate: uint, sampleSize: uint, channels: uint) AudioStream;

// Checks if an audio stream is ready
export @symbol("IsAudioStreamReady") fn IsAudioStreamReady(stream: AudioStream) bool;

// Unload audio stream and free memory
export @symbol("UnloadAudioStream") fn UnloadAudioStream(stream: AudioStream) void;



@@ 3170,6 3322,24 @@ export @symbol("SetAudioStreamVolume") fn SetAudioStreamVolume(stream: AudioStre
// Set pitch for audio stream (1.0 is base level)
export @symbol("SetAudioStreamPitch") fn SetAudioStreamPitch(stream: AudioStream, pitch: f32) void;

// Set pan for audio stream (0.5 is centered)
export @symbol("SetAudioStreamPan") fn SetAudioStreamPan(stream: AudioStream, pan: f32) void;

// Default size for new audio streams
export @symbol("SetAudioStreamBufferSizeDefault") fn SetAudioStreamBufferSizeDefault(_size: int) void;

// Audio thread callback to request new data
export @symbol("SetAudioStreamCallback") fn SetAudioStreamCallback(stream: AudioStream, callback: AudioCallback) void;

// Attach audio stream processor to stream
export @symbol("AttachAudioStreamProcessor") fn AttachAudioStreamProcessor(stream: AudioStream, processor: AudioCallback) void;

// Detach audio stream processor from stream
export @symbol("DetachAudioStreamProcessor") fn DetachAudioStreamProcessor(stream: AudioStream, processor: AudioCallback) void;

// Attach audio stream processor to the entire audio pipeline
export @symbol("AttachAudioMixedProcessor") fn AttachAudioMixedProcessor(processor: AudioCallback) void;

// Detach audio stream processor from the entire audio pipeline
export @symbol("DetachAudioMixedProcessor") fn DetachAudioMixedProcessor(processor: AudioCallback) void;