Ver a proveniência

Update parser (#2375)

* Add variable len args support

* Api Regen for 4.1dev
pull/2376/head
Ethan Conneely há 2 anos
committed by GitHub
ascendente
cometimento
43dbe67431
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados ID da chave GPG: 4AEE18F83AFDEB23
5 ficheiros alterados com 1664 adições e 486 eliminações
  1. +444
    -29
      parser/raylib_api.json
  2. +392
    -19
      parser/raylib_api.lua
  3. +722
    -419
      parser/raylib_api.txt
  4. +100
    -19
      parser/raylib_api.xml
  5. +6
    -0
      parser/raylib_parser.c

+ 444
- 29
parser/raylib_api.json Ver ficheiro

@ -2349,9 +2349,14 @@
"description": "Blend textures subtracting colors (alternative)"
},
{
"name": "BLEND_CUSTOM",
"name": "BLEND_ALPHA_PREMUL",
"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 rlSetBlendMode())"
}
]
},
@ -2485,6 +2490,320 @@
]
}
],
"defines": [
{
"name": "RAYLIB_H",
"type": "GUARD",
"value": "",
"description": ""
},
{
"name": "RAYLIB_VERSION",
"type": "STRING",
"value": "4.1-dev",
"description": ""
},
{
"name": "RLAPI",
"type": "UNKNOWN",
"value": "__declspec(dllexport)",
"description": "We are building the library as a Win32 shared library (.dll)"
},
{
"name": "PI",
"type": "FLOAT",
"value": 3.14159265358979323846,
"description": ""
},
{
"name": "DEG2RAD",
"type": "UNKNOWN",
"value": "(PI/180.0f)",
"description": ""
},
{
"name": "RAD2DEG",
"type": "UNKNOWN",
"value": "(180.0f/PI)",
"description": ""
},
{
"name": "RL_MALLOC(sz)",
"type": "MACRO",
"value": "malloc(sz)",
"description": ""
},
{
"name": "RL_CALLOC(n,sz)",
"type": "MACRO",
"value": "calloc(n,sz)",
"description": ""
},
{
"name": "RL_REALLOC(ptr,sz)",
"type": "MACRO",
"value": "realloc(ptr,sz)",
"description": ""
},
{
"name": "RL_FREE(ptr)",
"type": "MACRO",
"value": "free(ptr)",
"description": ""
},
{
"name": "CLITERAL(type)",
"type": "MACRO",
"value": "type",
"description": ""
},
{
"name": "RL_COLOR_TYPE",
"type": "GUARD",
"value": "",
"description": ""
},
{
"name": "RL_RECTANGLE_TYPE",
"type": "GUARD",
"value": "",
"description": ""
},
{
"name": "RL_VECTOR2_TYPE",
"type": "GUARD",
"value": "",
"description": ""
},
{
"name": "RL_VECTOR3_TYPE",
"type": "GUARD",
"value": "",
"description": ""
},
{
"name": "RL_VECTOR4_TYPE",
"type": "GUARD",
"value": "",
"description": ""
},
{
"name": "RL_QUATERNION_TYPE",
"type": "GUARD",
"value": "",
"description": ""
},
{
"name": "RL_MATRIX_TYPE",
"type": "GUARD",
"value": "",
"description": ""
},
{
"name": "LIGHTGRAY",
"type": "COLOR",
"value": "CLITERAL(Color){ 200, 200, 200, 255 }",
"description": "Light Gray"
},
{
"name": "GRAY",
"type": "COLOR",
"value": "CLITERAL(Color){ 130, 130, 130, 255 }",
"description": "Gray"
},
{
"name": "DARKGRAY",
"type": "COLOR",
"value": "CLITERAL(Color){ 80, 80, 80, 255 }",
"description": "Dark Gray"
},
{
"name": "YELLOW",
"type": "COLOR",
"value": "CLITERAL(Color){ 253, 249, 0, 255 }",
"description": "Yellow"
},
{
"name": "GOLD",
"type": "COLOR",
"value": "CLITERAL(Color){ 255, 203, 0, 255 }",
"description": "Gold"
},
{
"name": "ORANGE",
"type": "COLOR",
"value": "CLITERAL(Color){ 255, 161, 0, 255 }",
"description": "Orange"
},
{
"name": "PINK",
"type": "COLOR",
"value": "CLITERAL(Color){ 255, 109, 194, 255 }",
"description": "Pink"
},
{
"name": "RED",
"type": "COLOR",
"value": "CLITERAL(Color){ 230, 41, 55, 255 }",
"description": "Red"
},
{
"name": "MAROON",
"type": "COLOR",
"value": "CLITERAL(Color){ 190, 33, 55, 255 }",
"description": "Maroon"
},
{
"name": "GREEN",
"type": "COLOR",
"value": "CLITERAL(Color){ 0, 228, 48, 255 }",
"description": "Green"
},
{
"name": "LIME",
"type": "COLOR",
"value": "CLITERAL(Color){ 0, 158, 47, 255 }",
"description": "Lime"
},
{
"name": "DARKGREEN",
"type": "COLOR",
"value": "CLITERAL(Color){ 0, 117, 44, 255 }",
"description": "Dark Green"
},
{
"name": "SKYBLUE",
"type": "COLOR",
"value": "CLITERAL(Color){ 102, 191, 255, 255 }",
"description": "Sky Blue"
},
{
"name": "BLUE",
"type": "COLOR",
"value": "CLITERAL(Color){ 0, 121, 241, 255 }",
"description": "Blue"
},
{
"name": "DARKBLUE",
"type": "COLOR",
"value": "CLITERAL(Color){ 0, 82, 172, 255 }",
"description": "Dark Blue"
},
{
"name": "PURPLE",
"type": "COLOR",
"value": "CLITERAL(Color){ 200, 122, 255, 255 }",
"description": "Purple"
},
{
"name": "VIOLET",
"type": "COLOR",
"value": "CLITERAL(Color){ 135, 60, 190, 255 }",
"description": "Violet"
},
{
"name": "DARKPURPLE",
"type": "COLOR",
"value": "CLITERAL(Color){ 112, 31, 126, 255 }",
"description": "Dark Purple"
},
{
"name": "BEIGE",
"type": "COLOR",
"value": "CLITERAL(Color){ 211, 176, 131, 255 }",
"description": "Beige"
},
{
"name": "BROWN",
"type": "COLOR",
"value": "CLITERAL(Color){ 127, 106, 79, 255 }",
"description": "Brown"
},
{
"name": "DARKBROWN",
"type": "COLOR",
"value": "CLITERAL(Color){ 76, 63, 47, 255 }",
"description": "Dark Brown"
},
{
"name": "WHITE",
"type": "COLOR",
"value": "CLITERAL(Color){ 255, 255, 255, 255 }",
"description": "White"
},
{
"name": "BLACK",
"type": "COLOR",
"value": "CLITERAL(Color){ 0, 0, 0, 255 }",
"description": "Black"
},
{
"name": "BLANK",
"type": "COLOR",
"value": "CLITERAL(Color){ 0, 0, 0, 0 }",
"description": "Blank (Transparent)"
},
{
"name": "MAGENTA",
"type": "COLOR",
"value": "CLITERAL(Color){ 255, 0, 255, 255 }",
"description": "Magenta"
},
{
"name": "RAYWHITE",
"type": "COLOR",
"value": "CLITERAL(Color){ 245, 245, 245, 255 }",
"description": "My own White (raylib logo)"
},
{
"name": "RL_BOOL_TYPE",
"type": "GUARD",
"value": "",
"description": ""
},
{
"name": "MOUSE_LEFT_BUTTON",
"type": "UNKNOWN",
"value": "MOUSE_BUTTON_LEFT",
"description": ""
},
{
"name": "MOUSE_RIGHT_BUTTON",
"type": "UNKNOWN",
"value": "MOUSE_BUTTON_RIGHT",
"description": ""
},
{
"name": "MOUSE_MIDDLE_BUTTON",
"type": "UNKNOWN",
"value": "MOUSE_BUTTON_MIDDLE",
"description": ""
},
{
"name": "MATERIAL_MAP_DIFFUSE",
"type": "UNKNOWN",
"value": "MATERIAL_MAP_ALBEDO",
"description": ""
},
{
"name": "MATERIAL_MAP_SPECULAR",
"type": "UNKNOWN",
"value": "MATERIAL_MAP_METALNESS",
"description": ""
},
{
"name": "SHADER_LOC_MAP_DIFFUSE",
"type": "UNKNOWN",
"value": "SHADER_LOC_MAP_ALBEDO",
"description": ""
},
{
"name": "SHADER_LOC_MAP_SPECULAR",
"type": "UNKNOWN",
"value": "SHADER_LOC_MAP_METALNESS",
"description": ""
}
],
"functions": [
{
"name": "InitWindow",
@ -3400,8 +3719,8 @@
"name": "text"
},
{
"type": "",
"name": ""
"type": "...",
"name": "args"
}
]
},
@ -3627,6 +3946,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')",
@ -3687,6 +4017,11 @@
"description": "Get current working directory (uses static string)",
"returnType": "const char *"
},
{
"name": "GetApplicationDirectory",
"description": "Get the directory if the running application (uses static string)",
"returnType": "const char *"
},
{
"name": "GetDirectoryFiles",
"description": "Get filenames in a directory path (memory should be freed)",
@ -3756,7 +4091,7 @@
"returnType": "unsigned char *",
"params": [
{
"type": "unsigned char *",
"type": "const unsigned char *",
"name": "data"
},
{
@ -3775,7 +4110,7 @@
"returnType": "unsigned char *",
"params": [
{
"type": "unsigned char *",
"type": "const unsigned char *",
"name": "compData"
},
{
@ -3813,7 +4148,7 @@
"returnType": "unsigned char *",
"params": [
{
"type": "unsigned char *",
"type": "const unsigned char *",
"name": "data"
},
{
@ -7508,6 +7843,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",
@ -7664,7 +8034,7 @@
"returnType": "char *",
"params": [
{
"type": "int *",
"type": "const int *",
"name": "codepoints"
},
{
@ -7724,8 +8094,8 @@
"name": "text"
},
{
"type": "",
"name": ""
"type": "...",
"name": "args"
}
]
},
@ -8717,7 +9087,7 @@
"name": "index"
},
{
"type": "void *",
"type": "const void *",
"name": "data"
},
{
@ -8774,7 +9144,7 @@
"name": "material"
},
{
"type": "Matrix *",
"type": "const Matrix *",
"name": "transforms"
},
{
@ -9160,7 +9530,7 @@
"returnType": "void",
"params": [
{
"type": "ModelAnimation*",
"type": "ModelAnimation *",
"name": "animations"
},
{
@ -9615,25 +9985,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"
}
]
},
@ -9667,9 +10029,32 @@
}
]
},
{
"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": [
{
@ -9710,7 +10095,7 @@
"name": "fileType"
},
{
"type": "unsigned char *",
"type": "const unsigned char *",
"name": "data"
},
{
@ -9841,6 +10226,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)",
@ -10008,6 +10408,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",

+ 392
- 19
parser/raylib_api.lua Ver ficheiro

@ -2349,9 +2349,14 @@ return {
description = "Blend textures subtracting colors (alternative)"
},
{
name = "BLEND_CUSTOM",
name = "BLEND_ALPHA_PREMUL",
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 rlSetBlendMode())"
}
}
},
@ -2485,6 +2490,320 @@ return {
}
}
},
defines = {
{
name = "RAYLIB_H",
type = "GUARD",
value = "",
description = ""
},
{
name = "RAYLIB_VERSION",
type = "STRING",
value = "4.1-dev",
description = ""
},
{
name = "RLAPI",
type = "UNKNOWN",
value = "__declspec(dllexport)",
description = "We are building the library as a Win32 shared library (.dll)"
},
{
name = "PI",
type = "FLOAT",
value = 3.14159265358979323846,
description = ""
},
{
name = "DEG2RAD",
type = "UNKNOWN",
value = "(PI/180.0f)",
description = ""
},
{
name = "RAD2DEG",
type = "UNKNOWN",
value = "(180.0f/PI)",
description = ""
},
{
name = "RL_MALLOC(sz)",
type = "MACRO",
value = "malloc(sz)",
description = ""
},
{
name = "RL_CALLOC(n,sz)",
type = "MACRO",
value = "calloc(n,sz)",
description = ""
},
{
name = "RL_REALLOC(ptr,sz)",
type = "MACRO",
value = "realloc(ptr,sz)",
description = ""
},
{
name = "RL_FREE(ptr)",
type = "MACRO",
value = "free(ptr)",
description = ""
},
{
name = "CLITERAL(type)",
type = "MACRO",
value = "type",
description = ""
},
{
name = "RL_COLOR_TYPE",
type = "GUARD",
value = "",
description = ""
},
{
name = "RL_RECTANGLE_TYPE",
type = "GUARD",
value = "",
description = ""
},
{
name = "RL_VECTOR2_TYPE",
type = "GUARD",
value = "",
description = ""
},
{
name = "RL_VECTOR3_TYPE",
type = "GUARD",
value = "",
description = ""
},
{
name = "RL_VECTOR4_TYPE",
type = "GUARD",
value = "",
description = ""
},
{
name = "RL_QUATERNION_TYPE",
type = "GUARD",
value = "",
description = ""
},
{
name = "RL_MATRIX_TYPE",
type = "GUARD",
value = "",
description = ""
},
{
name = "LIGHTGRAY",
type = "COLOR",
value = "CLITERAL(Color){ 200, 200, 200, 255 }",
description = "Light Gray"
},
{
name = "GRAY",
type = "COLOR",
value = "CLITERAL(Color){ 130, 130, 130, 255 }",
description = "Gray"
},
{
name = "DARKGRAY",
type = "COLOR",
value = "CLITERAL(Color){ 80, 80, 80, 255 }",
description = "Dark Gray"
},
{
name = "YELLOW",
type = "COLOR",
value = "CLITERAL(Color){ 253, 249, 0, 255 }",
description = "Yellow"
},
{
name = "GOLD",
type = "COLOR",
value = "CLITERAL(Color){ 255, 203, 0, 255 }",
description = "Gold"
},
{
name = "ORANGE",
type = "COLOR",
value = "CLITERAL(Color){ 255, 161, 0, 255 }",
description = "Orange"
},
{
name = "PINK",
type = "COLOR",
value = "CLITERAL(Color){ 255, 109, 194, 255 }",
description = "Pink"
},
{
name = "RED",
type = "COLOR",
value = "CLITERAL(Color){ 230, 41, 55, 255 }",
description = "Red"
},
{
name = "MAROON",
type = "COLOR",
value = "CLITERAL(Color){ 190, 33, 55, 255 }",
description = "Maroon"
},
{
name = "GREEN",
type = "COLOR",
value = "CLITERAL(Color){ 0, 228, 48, 255 }",
description = "Green"
},
{
name = "LIME",
type = "COLOR",
value = "CLITERAL(Color){ 0, 158, 47, 255 }",
description = "Lime"
},
{
name = "DARKGREEN",
type = "COLOR",
value = "CLITERAL(Color){ 0, 117, 44, 255 }",
description = "Dark Green"
},
{
name = "SKYBLUE",
type = "COLOR",
value = "CLITERAL(Color){ 102, 191, 255, 255 }",
description = "Sky Blue"
},
{
name = "BLUE",
type = "COLOR",
value = "CLITERAL(Color){ 0, 121, 241, 255 }",
description = "Blue"
},
{
name = "DARKBLUE",
type = "COLOR",
value = "CLITERAL(Color){ 0, 82, 172, 255 }",
description = "Dark Blue"
},
{
name = "PURPLE",
type = "COLOR",
value = "CLITERAL(Color){ 200, 122, 255, 255 }",
description = "Purple"
},
{
name = "VIOLET",
type = "COLOR",
value = "CLITERAL(Color){ 135, 60, 190, 255 }",
description = "Violet"
},
{
name = "DARKPURPLE",
type = "COLOR",
value = "CLITERAL(Color){ 112, 31, 126, 255 }",
description = "Dark Purple"
},
{
name = "BEIGE",
type = "COLOR",
value = "CLITERAL(Color){ 211, 176, 131, 255 }",
description = "Beige"
},
{
name = "BROWN",
type = "COLOR",
value = "CLITERAL(Color){ 127, 106, 79, 255 }",
description = "Brown"
},
{
name = "DARKBROWN",
type = "COLOR",
value = "CLITERAL(Color){ 76, 63, 47, 255 }",
description = "Dark Brown"
},
{
name = "WHITE",
type = "COLOR",
value = "CLITERAL(Color){ 255, 255, 255, 255 }",
description = "White"
},
{
name = "BLACK",
type = "COLOR",
value = "CLITERAL(Color){ 0, 0, 0, 255 }",
description = "Black"
},
{
name = "BLANK",
type = "COLOR",
value = "CLITERAL(Color){ 0, 0, 0, 0 }",
description = "Blank (Transparent)"
},
{
name = "MAGENTA",
type = "COLOR",
value = "CLITERAL(Color){ 255, 0, 255, 255 }",
description = "Magenta"
},
{
name = "RAYWHITE",
type = "COLOR",
value = "CLITERAL(Color){ 245, 245, 245, 255 }",
description = "My own White (raylib logo)"
},
{
name = "RL_BOOL_TYPE",
type = "GUARD",
value = "",
description = ""
},
{
name = "MOUSE_LEFT_BUTTON",
type = "UNKNOWN",
value = "MOUSE_BUTTON_LEFT",
description = ""
},
{
name = "MOUSE_RIGHT_BUTTON",
type = "UNKNOWN",
value = "MOUSE_BUTTON_RIGHT",
description = ""
},
{
name = "MOUSE_MIDDLE_BUTTON",
type = "UNKNOWN",
value = "MOUSE_BUTTON_MIDDLE",
description = ""
},
{
name = "MATERIAL_MAP_DIFFUSE",
type = "UNKNOWN",
value = "MATERIAL_MAP_ALBEDO",
description = ""
},
{
name = "MATERIAL_MAP_SPECULAR",
type = "UNKNOWN",
value = "MATERIAL_MAP_METALNESS",
description = ""
},
{
name = "SHADER_LOC_MAP_DIFFUSE",
type = "UNKNOWN",
value = "SHADER_LOC_MAP_ALBEDO",
description = ""
},
{
name = "SHADER_LOC_MAP_SPECULAR",
type = "UNKNOWN",
value = "SHADER_LOC_MAP_METALNESS",
description = ""
}
},
functions = {
{
name = "InitWindow",
@ -3147,7 +3466,7 @@ return {
params = {
{type = "int", name = "logLevel"},
{type = "const char *", name = "text"},
{type = "", name = ""}
{type = "...", name = "args"}
}
},
{
@ -3300,6 +3619,14 @@ return {
{type = "const char *", name = "ext"}
}
},
{
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')",
@ -3345,6 +3672,11 @@ return {
description = "Get current working directory (uses static string)",
returnType = "const char *"
},
{
name = "GetApplicationDirectory",
description = "Get the directory if the running application (uses static string)",
returnType = "const char *"
},
{
name = "GetDirectoryFiles",
description = "Get filenames in a directory path (memory should be freed)",
@ -3398,7 +3730,7 @@ return {
description = "Compress data (DEFLATE algorithm)",
returnType = "unsigned char *",
params = {
{type = "unsigned char *", name = "data"},
{type = "const unsigned char *", name = "data"},
{type = "int", name = "dataLength"},
{type = "int *", name = "compDataLength"}
}
@ -3408,7 +3740,7 @@ return {
description = "Decompress data (DEFLATE algorithm)",
returnType = "unsigned char *",
params = {
{type = "unsigned char *", name = "compData"},
{type = "const unsigned char *", name = "compData"},
{type = "int", name = "compDataLength"},
{type = "int *", name = "dataLength"}
}
@ -3428,7 +3760,7 @@ return {
description = "Decode Base64 string data",
returnType = "unsigned char *",
params = {
{type = "unsigned char *", name = "data"},
{type = "const unsigned char *", name = "data"},
{type = "int *", name = "outputLength"}
}
},
@ -5417,6 +5749,20 @@ return {
{type = "Color", name = "tint"}
}
},
{
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",
@ -5512,7 +5858,7 @@ return {
description = "Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)",
returnType = "char *",
params = {
{type = "int *", name = "codepoints"},
{type = "const int *", name = "codepoints"},
{type = "int", name = "length"}
}
},
@ -5548,7 +5894,7 @@ return {
returnType = "const char *",
params = {
{type = "const char *", name = "text"},
{type = "", name = ""}
{type = "...", name = "args"}
}
},
{
@ -6043,7 +6389,7 @@ return {
params = {
{type = "Mesh", name = "mesh"},
{type = "int", name = "index"},
{type = "void *", name = "data"},
{type = "const void *", name = "data"},
{type = "int", name = "dataSize"},
{type = "int", name = "offset"}
}
@ -6073,7 +6419,7 @@ return {
params = {
{type = "Mesh", name = "mesh"},
{type = "Material", name = "material"},
{type = "Matrix *", name = "transforms"},
{type = "const Matrix *", name = "transforms"},
{type = "int", name = "instances"}
}
},
@ -6294,7 +6640,7 @@ return {
description = "Unload animation array data",
returnType = "void",
params = {
{type = "ModelAnimation*", name = "animations"},
{type = "ModelAnimation *", name = "animations"},
{type = "unsigned int", name = "count"}
}
},
@ -6576,14 +6922,12 @@ return {
}
},
{
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 = "int", name = "channels"}
{type = "Sound", name = "sound"},
{type = "float", name = "pan"}
}
},
{
@ -6604,9 +6948,20 @@ return {
{type = "int", name = "finalSample"}
}
},
{
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 = {
{type = "Wave", name = "wave"}
@ -6634,7 +6989,7 @@ return {
returnType = "Music",
params = {
{type = "const char *", name = "fileType"},
{type = "unsigned char *", name = "data"},
{type = "const unsigned char *", name = "data"},
{type = "int", name = "dataSize"}
}
},
@ -6721,6 +7076,15 @@ return {
{type = "float", name = "pitch"}
}
},
{
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)",
@ -6831,6 +7195,15 @@ return {
{type = "float", name = "pitch"}
}
},
{
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",

+ 722
- 419
parser/raylib_api.txt
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


+ 100
- 19
parser/raylib_api.xml Ver ficheiro

@ -504,13 +504,14 @@
<Value name="FONT_BITMAP" integer="1" desc="Bitmap font generation, no anti-aliasing" />
<Value name="FONT_SDF" integer="2" desc="SDF font generation, requires external shader" />
</Enum>
<Enum name="BlendMode" valueCount="6" desc="Color blending modes (pre-defined)">
<Enum name="BlendMode" valueCount="7" desc="Color blending modes (pre-defined)">
<Value name="BLEND_ALPHA" integer="0" desc="Blend textures considering alpha (default)" />
<Value name="BLEND_ADDITIVE" integer="1" desc="Blend textures adding colors" />
<Value name="BLEND_MULTIPLIED" integer="2" desc="Blend textures multiplying colors" />
<Value name="BLEND_ADD_COLORS" integer="3" desc="Blend textures adding colors (alternative)" />
<Value name="BLEND_SUBTRACT_COLORS" integer="4" desc="Blend textures subtracting colors (alternative)" />
<Value name="BLEND_CUSTOM" integer="5" desc="Belnd textures using custom src/dst factors (use rlSetBlendMode())" />
<Value name="BLEND_ALPHA_PREMUL" integer="5" desc="Blend premultiplied textures considering alpha" />
<Value name="BLEND_CUSTOM" integer="6" desc="Blend textures using custom src/dst factors (use rlSetBlendMode())" />
</Enum>
<Enum name="Gesture" valueCount="11" desc="Gesture">
<Value name="GESTURE_NONE" integer="0" desc="No gesture" />
@ -542,7 +543,61 @@
<Value name="NPATCH_THREE_PATCH_HORIZONTAL" integer="2" desc="Npatch layout: 3x1 tiles" />
</Enum>
</Enums>
<Functions count="491">
<Defines count="52">
<Define name="RAYLIB_H" type="GUARD" value="" desc="" />
<Define name="RAYLIB_VERSION" type="STRING" value=""4.1-dev"" desc="" />
<Define name="RLAPI" type="UNKNOWN" value="__declspec(dllexport)" desc="// We are building the library as a Win32 shared library (.dll)" />
<Define name="PI" type="FLOAT" value="3.14159265358979323846" desc="" />
<Define name="DEG2RAD" type="UNKNOWN" value="(PI/180.0f)" desc="" />
<Define name="RAD2DEG" type="UNKNOWN" value="(180.0f/PI)" desc="" />
<Define name="RL_MALLOC(sz)" type="MACRO" value="malloc(sz)" desc="" />
<Define name="RL_CALLOC(n,sz)" type="MACRO" value="calloc(n,sz)" desc="" />
<Define name="RL_REALLOC(ptr,sz)" type="MACRO" value="realloc(ptr,sz)" desc="" />
<Define name="RL_FREE(ptr)" type="MACRO" value="free(ptr)" desc="" />
<Define name="CLITERAL(type)" type="MACRO" value="type" desc="" />
<Define name="RL_COLOR_TYPE" type="GUARD" value="" desc="" />
<Define name="RL_RECTANGLE_TYPE" type="GUARD" value="" desc="" />
<Define name="RL_VECTOR2_TYPE" type="GUARD" value="" desc="" />
<Define name="RL_VECTOR3_TYPE" type="GUARD" value="" desc="" />
<Define name="RL_VECTOR4_TYPE" type="GUARD" value="" desc="" />
<Define name="RL_QUATERNION_TYPE" type="GUARD" value="" desc="" />
<Define name="RL_MATRIX_TYPE" type="GUARD" value="" desc="" />
<Define name="LIGHTGRAY" type="COLOR" value="CLITERAL(Color){ 200, 200, 200, 255 }" desc="// Light Gray" />
<Define name="GRAY" type="COLOR" value="CLITERAL(Color){ 130, 130, 130, 255 }" desc="// Gray" />
<Define name="DARKGRAY" type="COLOR" value="CLITERAL(Color){ 80, 80, 80, 255 }" desc="// Dark Gray" />
<Define name="YELLOW" type="COLOR" value="CLITERAL(Color){ 253, 249, 0, 255 }" desc="// Yellow" />
<Define name="GOLD" type="COLOR" value="CLITERAL(Color){ 255, 203, 0, 255 }" desc="// Gold" />
<Define name="ORANGE" type="COLOR" value="CLITERAL(Color){ 255, 161, 0, 255 }" desc="// Orange" />
<Define name="PINK" type="COLOR" value="CLITERAL(Color){ 255, 109, 194, 255 }" desc="// Pink" />
<Define name="RED" type="COLOR" value="CLITERAL(Color){ 230, 41, 55, 255 }" desc="// Red" />
<Define name="MAROON" type="COLOR" value="CLITERAL(Color){ 190, 33, 55, 255 }" desc="// Maroon" />
<Define name="GREEN" type="COLOR" value="CLITERAL(Color){ 0, 228, 48, 255 }" desc="// Green" />
<Define name="LIME" type="COLOR" value="CLITERAL(Color){ 0, 158, 47, 255 }" desc="// Lime" />
<Define name="DARKGREEN" type="COLOR" value="CLITERAL(Color){ 0, 117, 44, 255 }" desc="// Dark Green" />
<Define name="SKYBLUE" type="COLOR" value="CLITERAL(Color){ 102, 191, 255, 255 }" desc="// Sky Blue" />
<Define name="BLUE" type="COLOR" value="CLITERAL(Color){ 0, 121, 241, 255 }" desc="// Blue" />
<Define name="DARKBLUE" type="COLOR" value="CLITERAL(Color){ 0, 82, 172, 255 }" desc="// Dark Blue" />
<Define name="PURPLE" type="COLOR" value="CLITERAL(Color){ 200, 122, 255, 255 }" desc="// Purple" />
<Define name="VIOLET" type="COLOR" value="CLITERAL(Color){ 135, 60, 190, 255 }" desc="// Violet" />
<Define name="DARKPURPLE" type="COLOR" value="CLITERAL(Color){ 112, 31, 126, 255 }" desc="// Dark Purple" />
<Define name="BEIGE" type="COLOR" value="CLITERAL(Color){ 211, 176, 131, 255 }" desc="// Beige" />
<Define name="BROWN" type="COLOR" value="CLITERAL(Color){ 127, 106, 79, 255 }" desc="// Brown" />
<Define name="DARKBROWN" type="COLOR" value="CLITERAL(Color){ 76, 63, 47, 255 }" desc="// Dark Brown" />
<Define name="WHITE" type="COLOR" value="CLITERAL(Color){ 255, 255, 255, 255 }" desc="// White" />
<Define name="BLACK" type="COLOR" value="CLITERAL(Color){ 0, 0, 0, 255 }" desc="// Black" />
<Define name="BLANK" type="COLOR" value="CLITERAL(Color){ 0, 0, 0, 0 }" desc="// Blank (Transparent)" />
<Define name="MAGENTA" type="COLOR" value="CLITERAL(Color){ 255, 0, 255, 255 }" desc="// Magenta" />
<Define name="RAYWHITE" type="COLOR" value="CLITERAL(Color){ 245, 245, 245, 255 }" desc="// My own White (raylib logo)" />
<Define name="RL_BOOL_TYPE" type="GUARD" value="" desc="" />
<Define name="MOUSE_LEFT_BUTTON" type="UNKNOWN" value="MOUSE_BUTTON_LEFT" desc="" />
<Define name="MOUSE_RIGHT_BUTTON" type="UNKNOWN" value="MOUSE_BUTTON_RIGHT" desc="" />
<Define name="MOUSE_MIDDLE_BUTTON" type="UNKNOWN" value="MOUSE_BUTTON_MIDDLE" desc="" />
<Define name="MATERIAL_MAP_DIFFUSE" type="UNKNOWN" value="MATERIAL_MAP_ALBEDO" desc="" />
<Define name="MATERIAL_MAP_SPECULAR" type="UNKNOWN" value="MATERIAL_MAP_METALNESS" desc="" />
<Define name="SHADER_LOC_MAP_DIFFUSE" type="UNKNOWN" value="SHADER_LOC_MAP_ALBEDO" desc="" />
<Define name="SHADER_LOC_MAP_SPECULAR" type="UNKNOWN" value="SHADER_LOC_MAP_METALNESS" desc="" />
</Defines>
<Functions count="497">
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
@ -816,7 +871,7 @@
<Function name="TraceLog" retType="void" paramCount="3" desc="Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)">
<Param type="int" name="logLevel" desc="" />
<Param type="const char *" name="text" desc="" />
<Param type="" name="" desc="" />
<Param type="..." name="args" desc="" />
</Function>
<Function name="SetTraceLogLevel" retType="void" paramCount="1" desc="Set the current threshold (minimum) log level">
<Param type="int" name="logLevel" desc="" />
@ -878,6 +933,9 @@
<Param type="const char *" name="fileName" desc="" />
<Param type="const char *" name="ext" desc="" />
</Function>
<Function name="GetFileLength" retType="int" paramCount="1" desc="Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)">
<Param type="const char *" name="fileName" desc="" />
</Function>
<Function name="GetFileExtension" retType="const char *" paramCount="1" desc="Get pointer to extension for a filename string (includes dot: '.png')">
<Param type="const char *" name="fileName" desc="" />
</Function>
@ -895,6 +953,8 @@
</Function>
<Function name="GetWorkingDirectory" retType="const char *" paramCount="0" desc="Get current working directory (uses static string)">
</Function>
<Function name="GetApplicationDirectory" retType="const char *" paramCount="0" desc="Get the directory if the running application (uses static string)">
</Function>
<Function name="GetDirectoryFiles" retType="char **" paramCount="2" desc="Get filenames in a directory path (memory should be freed)">
<Param type="const char *" name="dirPath" desc="" />
<Param type="int *" name="count" desc="" />
@ -915,12 +975,12 @@
<Param type="const char *" name="fileName" desc="" />
</Function>
<Function name="CompressData" retType="unsigned char *" paramCount="3" desc="Compress data (DEFLATE algorithm)">
<Param type="unsigned char *" name="data" desc="" />
<Param type="const unsigned char *" name="data" desc="" />
<Param type="int" name="dataLength" desc="" />
<Param type="int *" name="compDataLength" desc="" />
</Function>
<Function name="DecompressData" retType="unsigned char *" paramCount="3" desc="Decompress data (DEFLATE algorithm)">
<Param type="unsigned char *" name="compData" desc="" />
<Param type="const unsigned char *" name="compData" desc="" />
<Param type="int" name="compDataLength" desc="" />
<Param type="int *" name="dataLength" desc="" />
</Function>
@ -930,7 +990,7 @@
<Param type="int *" name="outputLength" desc="" />
</Function>
<Function name="DecodeDataBase64" retType="unsigned char *" paramCount="2" desc="Decode Base64 string data">
<Param type="unsigned char *" name="data" desc="" />
<Param type="const unsigned char *" name="data" desc="" />
<Param type="int *" name="outputLength" desc="" />
</Function>
<Function name="SaveStorageValue" retType="bool" paramCount="2" desc="Save integer value to storage file (to defined position), returns true on success">
@ -1916,6 +1976,15 @@
<Param type="float" name="fontSize" desc="" />
<Param type="Color" name="tint" desc="" />
</Function>
<Function name="DrawTextCodepoints" retType="void" paramCount="7" desc="Draw multiple character (codepoint)">
<Param type="Font" name="font" desc="" />
<Param type="const int *" name="codepoints" desc="" />
<Param type="int" name="count" desc="" />
<Param type="Vector2" name="position" desc="" />
<Param type="float" name="fontSize" desc="" />
<Param type="float" name="spacing" desc="" />
<Param type="Color" name="tint" desc="" />
</Function>
<Function name="MeasureText" retType="int" paramCount="2" desc="Measure string width for default font">
<Param type="const char *" name="text" desc="" />
<Param type="int" name="fontSize" desc="" />
@ -1957,7 +2026,7 @@
<Param type="int *" name="byteSize" desc="" />
</Function>
<Function name="TextCodepointsToUTF8" retType="char *" paramCount="2" desc="Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)">
<Param type="int *" name="codepoints" desc="" />
<Param type="const int *" name="codepoints" desc="" />
<Param type="int" name="length" desc="" />
</Function>
<Function name="TextCopy" retType="int" paramCount="2" desc="Copy one string to another, returns bytes copied">
@ -1973,7 +2042,7 @@
</Function>
<Function name="TextFormat" retType="const char *" paramCount="2" desc="Text formatting with variables (sprintf() style)">
<Param type="const char *" name="text" desc="" />
<Param type="" name="" desc="" />
<Param type="..." name="args" desc="" />
</Function>
<Function name="TextSubtext" retType="const char *" paramCount="3" desc="Get a piece of a text string">
<Param type="const char *" name="text" desc="" />
@ -2233,7 +2302,7 @@
<Function name="UpdateMeshBuffer" retType="void" paramCount="5" desc="Update mesh vertex data in GPU for a specific buffer index">
<Param type="Mesh" name="mesh" desc="" />
<Param type="int" name="index" desc="" />
<Param type="void *" name="data" desc="" />
<Param type="const void *" name="data" desc="" />
<Param type="int" name="dataSize" desc="" />
<Param type="int" name="offset" desc="" />
</Function>
@ -2248,7 +2317,7 @@
<Function name="DrawMeshInstanced" retType="void" paramCount="4" desc="Draw multiple mesh instances with material and different transforms">
<Param type="Mesh" name="mesh" desc="" />
<Param type="Material" name="material" desc="" />
<Param type="Matrix *" name="transforms" desc="" />
<Param type="const Matrix *" name="transforms" desc="" />
<Param type="int" name="instances" desc="" />
</Function>
<Function name="ExportMesh" retType="bool" paramCount="2" desc="Export mesh data to file, returns true on success">
@ -2351,7 +2420,7 @@
<Param type="ModelAnimation" name="anim" desc="" />
</Function>
<Function name="UnloadModelAnimations" retType="void" paramCount="2" desc="Unload animation array data">
<Param type="ModelAnimation*" name="animations" desc="" />
<Param type="ModelAnimation *" name="animations" desc="" />
<Param type="unsigned int" name="count" desc="" />
</Function>
<Function name="IsModelAnimationValid" retType="bool" paramCount="2" desc="Check model animation skeleton match">
@ -2476,11 +2545,9 @@
<Param type="Sound" name="sound" desc="" />
<Param type="float" name="pitch" desc="" />
</Function>
<Function name="WaveFormat" retType="void" paramCount="4" desc="Convert wave data to desired format">
<Param type="Wave *" name="wave" desc="" />
<Param type="int" name="sampleRate" desc="" />
<Param type="int" name="sampleSize" desc="" />
<Param type="int" name="channels" desc="" />
<Function name="SetSoundPan" retType="void" paramCount="2" desc="Set pan for a sound (0.5 is center)">
<Param type="Sound" name="sound" desc="" />
<Param type="float" name="pan" desc="" />
</Function>
<Function name="WaveCopy" retType="Wave" paramCount="1" desc="Copy a wave to a new wave">
<Param type="Wave" name="wave" desc="" />
@ -2490,7 +2557,13 @@
<Param type="int" name="initSample" desc="" />
<Param type="int" name="finalSample" desc="" />
</Function>
<Function name="LoadWaveSamples" retType="float *" paramCount="1" desc="Load samples data from wave as a floats array">
<Function name="WaveFormat" retType="void" paramCount="4" desc="Convert wave data to desired format">
<Param type="Wave *" name="wave" desc="" />
<Param type="int" name="sampleRate" desc="" />
<Param type="int" name="sampleSize" desc="" />
<Param type="int" name="channels" desc="" />
</Function>
<Function name="LoadWaveSamples" retType="float *" paramCount="1" desc="Load samples data from wave as a 32bit float data array">
<Param type="Wave" name="wave" desc="" />
</Function>
<Function name="UnloadWaveSamples" retType="void" paramCount="1" desc="Unload samples data loaded with LoadWaveSamples()">
@ -2501,7 +2574,7 @@
</Function>
<Function name="LoadMusicStreamFromMemory" retType="Music" paramCount="3" desc="Load music stream from data">
<Param type="const char *" name="fileType" desc="" />
<Param type="unsigned char *" name="data" desc="" />
<Param type="const unsigned char *" name="data" desc="" />
<Param type="int" name="dataSize" desc="" />
</Function>
<Function name="UnloadMusicStream" retType="void" paramCount="1" desc="Unload music stream">
@ -2537,6 +2610,10 @@
<Param type="Music" name="music" desc="" />
<Param type="float" name="pitch" desc="" />
</Function>
<Function name="SetMusicPan" retType="void" paramCount="2" desc="Set pan for a music (0.5 is center)">
<Param type="Music" name="music" desc="" />
<Param type="float" name="pan" desc="" />
</Function>
<Function name="GetMusicTimeLength" retType="float" paramCount="1" desc="Get music time length (in seconds)">
<Param type="Music" name="music" desc="" />
</Function>
@ -2582,6 +2659,10 @@
<Param type="AudioStream" name="stream" desc="" />
<Param type="float" name="pitch" desc="" />
</Function>
<Function name="SetAudioStreamPan" retType="void" paramCount="2" desc="Set pan for audio stream (0.5 is centered)">
<Param type="AudioStream" name="stream" desc="" />
<Param type="float" name="pan" desc="" />
</Function>
<Function name="SetAudioStreamBufferSizeDefault" retType="void" paramCount="1" desc="Default size for new audio streams">
<Param type="int" name="size" desc="" />
</Function>

+ 6
- 0
parser/raylib_parser.c Ver ficheiro

@ -820,6 +820,12 @@ static void GetDataTypeAndName(const char *typeName, int typeNameLen, char *type
MemoryCopy(name, typeName + k + 1, typeNameLen - k - 1);
break;
}
else if (typeName[k] == '.' && typeNameLen == 3) // Handle varargs ...);
{
MemoryCopy(type, "...", 3);
MemoryCopy(name, "args", 4);
break;
}
}
}

Carregando…
Cancelar
Guardar