added value and description for defines in parser
This commit is contained in:
parent
1d7ff04923
commit
5097077597
|
|
@ -2485,214 +2485,318 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"defs": [
|
||||
"defines": [
|
||||
{
|
||||
"name": "RAYLIB_H",
|
||||
"type": "GUARD"
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RAYLIB_VERSION",
|
||||
"type": "STRING"
|
||||
"type": "STRING",
|
||||
"value": "4.1-dev",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RLAPI",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "__declspec(dllexport)",
|
||||
"description": "We are building the library as a Win32 shared library (.dll)"
|
||||
},
|
||||
{
|
||||
"name": "PI",
|
||||
"type": "FLOAT"
|
||||
"type": "FLOAT",
|
||||
"value": 3.14159265358979323846,
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "DEG2RAD",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "(PI/180.0f)",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RAD2DEG",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "(180.0f/PI)",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_MALLOC(sz)",
|
||||
"type": "MACRO"
|
||||
"type": "MACRO",
|
||||
"value": "malloc(sz)",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_CALLOC(n,sz)",
|
||||
"type": "MACRO"
|
||||
"type": "MACRO",
|
||||
"value": "calloc(n,sz)",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_REALLOC(ptr,sz)",
|
||||
"type": "MACRO"
|
||||
"type": "MACRO",
|
||||
"value": "realloc(ptr,sz)",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_FREE(ptr)",
|
||||
"type": "MACRO"
|
||||
"type": "MACRO",
|
||||
"value": "free(ptr)",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "CLITERAL(type)",
|
||||
"type": "MACRO"
|
||||
"type": "MACRO",
|
||||
"value": "type",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_COLOR_TYPE",
|
||||
"type": "GUARD"
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_RECTANGLE_TYPE",
|
||||
"type": "GUARD"
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_VECTOR2_TYPE",
|
||||
"type": "GUARD"
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_VECTOR3_TYPE",
|
||||
"type": "GUARD"
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_VECTOR4_TYPE",
|
||||
"type": "GUARD"
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_QUATERNION_TYPE",
|
||||
"type": "GUARD"
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_MATRIX_TYPE",
|
||||
"type": "GUARD"
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "LIGHTGRAY",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 200, 200, 200, 255 }",
|
||||
"description": "Light Gray"
|
||||
},
|
||||
{
|
||||
"name": "GRAY",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 130, 130, 130, 255 }",
|
||||
"description": "Gray"
|
||||
},
|
||||
{
|
||||
"name": "DARKGRAY",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 80, 80, 80, 255 }",
|
||||
"description": "Dark Gray"
|
||||
},
|
||||
{
|
||||
"name": "YELLOW",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 253, 249, 0, 255 }",
|
||||
"description": "Yellow"
|
||||
},
|
||||
{
|
||||
"name": "GOLD",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 255, 203, 0, 255 }",
|
||||
"description": "Gold"
|
||||
},
|
||||
{
|
||||
"name": "ORANGE",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 255, 161, 0, 255 }",
|
||||
"description": "Orange"
|
||||
},
|
||||
{
|
||||
"name": "PINK",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 255, 109, 194, 255 }",
|
||||
"description": "Pink"
|
||||
},
|
||||
{
|
||||
"name": "RED",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 230, 41, 55, 255 }",
|
||||
"description": "Red"
|
||||
},
|
||||
{
|
||||
"name": "MAROON",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 190, 33, 55, 255 }",
|
||||
"description": "Maroon"
|
||||
},
|
||||
{
|
||||
"name": "GREEN",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 0, 228, 48, 255 }",
|
||||
"description": "Green"
|
||||
},
|
||||
{
|
||||
"name": "LIME",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 0, 158, 47, 255 }",
|
||||
"description": "Lime"
|
||||
},
|
||||
{
|
||||
"name": "DARKGREEN",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 0, 117, 44, 255 }",
|
||||
"description": "Dark Green"
|
||||
},
|
||||
{
|
||||
"name": "SKYBLUE",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 102, 191, 255, 255 }",
|
||||
"description": "Sky Blue"
|
||||
},
|
||||
{
|
||||
"name": "BLUE",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 0, 121, 241, 255 }",
|
||||
"description": "Blue"
|
||||
},
|
||||
{
|
||||
"name": "DARKBLUE",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 0, 82, 172, 255 }",
|
||||
"description": "Dark Blue"
|
||||
},
|
||||
{
|
||||
"name": "PURPLE",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 200, 122, 255, 255 }",
|
||||
"description": "Purple"
|
||||
},
|
||||
{
|
||||
"name": "VIOLET",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 135, 60, 190, 255 }",
|
||||
"description": "Violet"
|
||||
},
|
||||
{
|
||||
"name": "DARKPURPLE",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 112, 31, 126, 255 }",
|
||||
"description": "Dark Purple"
|
||||
},
|
||||
{
|
||||
"name": "BEIGE",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 211, 176, 131, 255 }",
|
||||
"description": "Beige"
|
||||
},
|
||||
{
|
||||
"name": "BROWN",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 127, 106, 79, 255 }",
|
||||
"description": "Brown"
|
||||
},
|
||||
{
|
||||
"name": "DARKBROWN",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 76, 63, 47, 255 }",
|
||||
"description": "Dark Brown"
|
||||
},
|
||||
{
|
||||
"name": "WHITE",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 255, 255, 255, 255 }",
|
||||
"description": "White"
|
||||
},
|
||||
{
|
||||
"name": "BLACK",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 0, 0, 0, 255 }",
|
||||
"description": "Black"
|
||||
},
|
||||
{
|
||||
"name": "BLANK",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 0, 0, 0, 0 }",
|
||||
"description": "Blank (Transparent)"
|
||||
},
|
||||
{
|
||||
"name": "MAGENTA",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 255, 0, 255, 255 }",
|
||||
"description": "Magenta"
|
||||
},
|
||||
{
|
||||
"name": "RAYWHITE",
|
||||
"type": "COLOR"
|
||||
"type": "COLOR",
|
||||
"value": "CLITERAL(Color){ 245, 245, 245, 255 }",
|
||||
"description": "My own White (raylib logo)"
|
||||
},
|
||||
{
|
||||
"name": "RL_BOOL_TYPE",
|
||||
"type": "GUARD"
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "MOUSE_LEFT_BUTTON",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "MOUSE_BUTTON_LEFT",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "MOUSE_RIGHT_BUTTON",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "MOUSE_BUTTON_RIGHT",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "MOUSE_MIDDLE_BUTTON",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "MOUSE_BUTTON_MIDDLE",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "MATERIAL_MAP_DIFFUSE",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "MATERIAL_MAP_ALBEDO",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "MATERIAL_MAP_SPECULAR",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "MATERIAL_MAP_METALNESS",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "SHADER_LOC_MAP_DIFFUSE",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "SHADER_LOC_MAP_ALBEDO",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "SHADER_LOC_MAP_SPECULAR",
|
||||
"type": "UNKNOWN"
|
||||
"type": "UNKNOWN",
|
||||
"value": "SHADER_LOC_MAP_METALNESS",
|
||||
"description": ""
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
|
|
|
|||
|
|
@ -2485,214 +2485,318 @@ return {
|
|||
}
|
||||
}
|
||||
},
|
||||
defs = {
|
||||
defines = {
|
||||
{
|
||||
name = "RAYLIB_H",
|
||||
type = "GUARD"
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RAYLIB_VERSION",
|
||||
type = "STRING"
|
||||
type = "STRING",
|
||||
value = "4.1-dev",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RLAPI",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "__declspec(dllexport)",
|
||||
description = "We are building the library as a Win32 shared library (.dll)"
|
||||
},
|
||||
{
|
||||
name = "PI",
|
||||
type = "FLOAT"
|
||||
type = "FLOAT",
|
||||
value = 3.14159265358979323846,
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "DEG2RAD",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "(PI/180.0f)",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RAD2DEG",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "(180.0f/PI)",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_MALLOC(sz)",
|
||||
type = "MACRO"
|
||||
type = "MACRO",
|
||||
value = "malloc(sz)",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_CALLOC(n,sz)",
|
||||
type = "MACRO"
|
||||
type = "MACRO",
|
||||
value = "calloc(n,sz)",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_REALLOC(ptr,sz)",
|
||||
type = "MACRO"
|
||||
type = "MACRO",
|
||||
value = "realloc(ptr,sz)",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_FREE(ptr)",
|
||||
type = "MACRO"
|
||||
type = "MACRO",
|
||||
value = "free(ptr)",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "CLITERAL(type)",
|
||||
type = "MACRO"
|
||||
type = "MACRO",
|
||||
value = "type",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_COLOR_TYPE",
|
||||
type = "GUARD"
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_RECTANGLE_TYPE",
|
||||
type = "GUARD"
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_VECTOR2_TYPE",
|
||||
type = "GUARD"
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_VECTOR3_TYPE",
|
||||
type = "GUARD"
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_VECTOR4_TYPE",
|
||||
type = "GUARD"
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_QUATERNION_TYPE",
|
||||
type = "GUARD"
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_MATRIX_TYPE",
|
||||
type = "GUARD"
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "LIGHTGRAY",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 200, 200, 200, 255 }",
|
||||
description = "Light Gray"
|
||||
},
|
||||
{
|
||||
name = "GRAY",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 130, 130, 130, 255 }",
|
||||
description = "Gray"
|
||||
},
|
||||
{
|
||||
name = "DARKGRAY",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 80, 80, 80, 255 }",
|
||||
description = "Dark Gray"
|
||||
},
|
||||
{
|
||||
name = "YELLOW",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 253, 249, 0, 255 }",
|
||||
description = "Yellow"
|
||||
},
|
||||
{
|
||||
name = "GOLD",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 255, 203, 0, 255 }",
|
||||
description = "Gold"
|
||||
},
|
||||
{
|
||||
name = "ORANGE",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 255, 161, 0, 255 }",
|
||||
description = "Orange"
|
||||
},
|
||||
{
|
||||
name = "PINK",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 255, 109, 194, 255 }",
|
||||
description = "Pink"
|
||||
},
|
||||
{
|
||||
name = "RED",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 230, 41, 55, 255 }",
|
||||
description = "Red"
|
||||
},
|
||||
{
|
||||
name = "MAROON",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 190, 33, 55, 255 }",
|
||||
description = "Maroon"
|
||||
},
|
||||
{
|
||||
name = "GREEN",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 0, 228, 48, 255 }",
|
||||
description = "Green"
|
||||
},
|
||||
{
|
||||
name = "LIME",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 0, 158, 47, 255 }",
|
||||
description = "Lime"
|
||||
},
|
||||
{
|
||||
name = "DARKGREEN",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 0, 117, 44, 255 }",
|
||||
description = "Dark Green"
|
||||
},
|
||||
{
|
||||
name = "SKYBLUE",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 102, 191, 255, 255 }",
|
||||
description = "Sky Blue"
|
||||
},
|
||||
{
|
||||
name = "BLUE",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 0, 121, 241, 255 }",
|
||||
description = "Blue"
|
||||
},
|
||||
{
|
||||
name = "DARKBLUE",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 0, 82, 172, 255 }",
|
||||
description = "Dark Blue"
|
||||
},
|
||||
{
|
||||
name = "PURPLE",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 200, 122, 255, 255 }",
|
||||
description = "Purple"
|
||||
},
|
||||
{
|
||||
name = "VIOLET",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 135, 60, 190, 255 }",
|
||||
description = "Violet"
|
||||
},
|
||||
{
|
||||
name = "DARKPURPLE",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 112, 31, 126, 255 }",
|
||||
description = "Dark Purple"
|
||||
},
|
||||
{
|
||||
name = "BEIGE",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 211, 176, 131, 255 }",
|
||||
description = "Beige"
|
||||
},
|
||||
{
|
||||
name = "BROWN",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 127, 106, 79, 255 }",
|
||||
description = "Brown"
|
||||
},
|
||||
{
|
||||
name = "DARKBROWN",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 76, 63, 47, 255 }",
|
||||
description = "Dark Brown"
|
||||
},
|
||||
{
|
||||
name = "WHITE",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 255, 255, 255, 255 }",
|
||||
description = "White"
|
||||
},
|
||||
{
|
||||
name = "BLACK",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 0, 0, 0, 255 }",
|
||||
description = "Black"
|
||||
},
|
||||
{
|
||||
name = "BLANK",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 0, 0, 0, 0 }",
|
||||
description = "Blank (Transparent)"
|
||||
},
|
||||
{
|
||||
name = "MAGENTA",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 255, 0, 255, 255 }",
|
||||
description = "Magenta"
|
||||
},
|
||||
{
|
||||
name = "RAYWHITE",
|
||||
type = "COLOR"
|
||||
type = "COLOR",
|
||||
value = "CLITERAL(Color){ 245, 245, 245, 255 }",
|
||||
description = "My own White (raylib logo)"
|
||||
},
|
||||
{
|
||||
name = "RL_BOOL_TYPE",
|
||||
type = "GUARD"
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "MOUSE_LEFT_BUTTON",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "MOUSE_BUTTON_LEFT",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "MOUSE_RIGHT_BUTTON",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "MOUSE_BUTTON_RIGHT",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "MOUSE_MIDDLE_BUTTON",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "MOUSE_BUTTON_MIDDLE",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "MATERIAL_MAP_DIFFUSE",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "MATERIAL_MAP_ALBEDO",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "MATERIAL_MAP_SPECULAR",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "MATERIAL_MAP_METALNESS",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "SHADER_LOC_MAP_DIFFUSE",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "SHADER_LOC_MAP_ALBEDO",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "SHADER_LOC_MAP_SPECULAR",
|
||||
type = "UNKNOWN"
|
||||
type = "UNKNOWN",
|
||||
value = "SHADER_LOC_MAP_METALNESS",
|
||||
description = ""
|
||||
},
|
||||
},
|
||||
functions = {
|
||||
|
|
|
|||
|
|
@ -3699,156 +3699,260 @@ Defines found: 52
|
|||
Define 001: RAYLIB_H
|
||||
Name: RAYLIB_H
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 002: RAYLIB_VERSION
|
||||
Name: RAYLIB_VERSION
|
||||
Type: STRING
|
||||
Value: "4.1-dev"
|
||||
Description:
|
||||
Define 003: RLAPI
|
||||
Name: RLAPI
|
||||
Type: UNKNOWN
|
||||
Value: __declspec(dllexport)
|
||||
Description: We are building the library as a Win32 shared library (.dll)
|
||||
Define 004: PI
|
||||
Name: PI
|
||||
Type: FLOAT
|
||||
Value: 3.14159265358979323846f
|
||||
Description:
|
||||
Define 005: DEG2RAD
|
||||
Name: DEG2RAD
|
||||
Type: UNKNOWN
|
||||
Value: (PI/180.0f)
|
||||
Description:
|
||||
Define 006: RAD2DEG
|
||||
Name: RAD2DEG
|
||||
Type: UNKNOWN
|
||||
Value: (180.0f/PI)
|
||||
Description:
|
||||
Define 007: RL_MALLOC(sz)
|
||||
Name: RL_MALLOC(sz)
|
||||
Type: MACRO
|
||||
Value: malloc(sz)
|
||||
Description:
|
||||
Define 008: RL_CALLOC(n,sz)
|
||||
Name: RL_CALLOC(n,sz)
|
||||
Type: MACRO
|
||||
Value: calloc(n,sz)
|
||||
Description:
|
||||
Define 009: RL_REALLOC(ptr,sz)
|
||||
Name: RL_REALLOC(ptr,sz)
|
||||
Type: MACRO
|
||||
Value: realloc(ptr,sz)
|
||||
Description:
|
||||
Define 010: RL_FREE(ptr)
|
||||
Name: RL_FREE(ptr)
|
||||
Type: MACRO
|
||||
Value: free(ptr)
|
||||
Description:
|
||||
Define 011: CLITERAL(type)
|
||||
Name: CLITERAL(type)
|
||||
Type: MACRO
|
||||
Value: type
|
||||
Description:
|
||||
Define 012: RL_COLOR_TYPE
|
||||
Name: RL_COLOR_TYPE
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 013: RL_RECTANGLE_TYPE
|
||||
Name: RL_RECTANGLE_TYPE
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 014: RL_VECTOR2_TYPE
|
||||
Name: RL_VECTOR2_TYPE
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 015: RL_VECTOR3_TYPE
|
||||
Name: RL_VECTOR3_TYPE
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 016: RL_VECTOR4_TYPE
|
||||
Name: RL_VECTOR4_TYPE
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 017: RL_QUATERNION_TYPE
|
||||
Name: RL_QUATERNION_TYPE
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 018: RL_MATRIX_TYPE
|
||||
Name: RL_MATRIX_TYPE
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 019: LIGHTGRAY
|
||||
Name: LIGHTGRAY
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 200, 200, 200, 255 }
|
||||
Description: Light Gray
|
||||
Define 020: GRAY
|
||||
Name: GRAY
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 130, 130, 130, 255 }
|
||||
Description: Gray
|
||||
Define 021: DARKGRAY
|
||||
Name: DARKGRAY
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 80, 80, 80, 255 }
|
||||
Description: Dark Gray
|
||||
Define 022: YELLOW
|
||||
Name: YELLOW
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 253, 249, 0, 255 }
|
||||
Description: Yellow
|
||||
Define 023: GOLD
|
||||
Name: GOLD
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 255, 203, 0, 255 }
|
||||
Description: Gold
|
||||
Define 024: ORANGE
|
||||
Name: ORANGE
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 255, 161, 0, 255 }
|
||||
Description: Orange
|
||||
Define 025: PINK
|
||||
Name: PINK
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 255, 109, 194, 255 }
|
||||
Description: Pink
|
||||
Define 026: RED
|
||||
Name: RED
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 230, 41, 55, 255 }
|
||||
Description: Red
|
||||
Define 027: MAROON
|
||||
Name: MAROON
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 190, 33, 55, 255 }
|
||||
Description: Maroon
|
||||
Define 028: GREEN
|
||||
Name: GREEN
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 0, 228, 48, 255 }
|
||||
Description: Green
|
||||
Define 029: LIME
|
||||
Name: LIME
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 0, 158, 47, 255 }
|
||||
Description: Lime
|
||||
Define 030: DARKGREEN
|
||||
Name: DARKGREEN
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 0, 117, 44, 255 }
|
||||
Description: Dark Green
|
||||
Define 031: SKYBLUE
|
||||
Name: SKYBLUE
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 102, 191, 255, 255 }
|
||||
Description: Sky Blue
|
||||
Define 032: BLUE
|
||||
Name: BLUE
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 0, 121, 241, 255 }
|
||||
Description: Blue
|
||||
Define 033: DARKBLUE
|
||||
Name: DARKBLUE
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 0, 82, 172, 255 }
|
||||
Description: Dark Blue
|
||||
Define 034: PURPLE
|
||||
Name: PURPLE
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 200, 122, 255, 255 }
|
||||
Description: Purple
|
||||
Define 035: VIOLET
|
||||
Name: VIOLET
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 135, 60, 190, 255 }
|
||||
Description: Violet
|
||||
Define 036: DARKPURPLE
|
||||
Name: DARKPURPLE
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 112, 31, 126, 255 }
|
||||
Description: Dark Purple
|
||||
Define 037: BEIGE
|
||||
Name: BEIGE
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 211, 176, 131, 255 }
|
||||
Description: Beige
|
||||
Define 038: BROWN
|
||||
Name: BROWN
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 127, 106, 79, 255 }
|
||||
Description: Brown
|
||||
Define 039: DARKBROWN
|
||||
Name: DARKBROWN
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 76, 63, 47, 255 }
|
||||
Description: Dark Brown
|
||||
Define 040: WHITE
|
||||
Name: WHITE
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 255, 255, 255, 255 }
|
||||
Description: White
|
||||
Define 041: BLACK
|
||||
Name: BLACK
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 0, 0, 0, 255 }
|
||||
Description: Black
|
||||
Define 042: BLANK
|
||||
Name: BLANK
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 0, 0, 0, 0 }
|
||||
Description: Blank (Transparent)
|
||||
Define 043: MAGENTA
|
||||
Name: MAGENTA
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 255, 0, 255, 255 }
|
||||
Description: Magenta
|
||||
Define 044: RAYWHITE
|
||||
Name: RAYWHITE
|
||||
Type: COLOR
|
||||
Value: CLITERAL(Color){ 245, 245, 245, 255 }
|
||||
Description: My own White (raylib logo)
|
||||
Define 045: RL_BOOL_TYPE
|
||||
Name: RL_BOOL_TYPE
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 046: MOUSE_LEFT_BUTTON
|
||||
Name: MOUSE_LEFT_BUTTON
|
||||
Type: UNKNOWN
|
||||
Value: MOUSE_BUTTON_LEFT
|
||||
Description:
|
||||
Define 047: MOUSE_RIGHT_BUTTON
|
||||
Name: MOUSE_RIGHT_BUTTON
|
||||
Type: UNKNOWN
|
||||
Value: MOUSE_BUTTON_RIGHT
|
||||
Description:
|
||||
Define 048: MOUSE_MIDDLE_BUTTON
|
||||
Name: MOUSE_MIDDLE_BUTTON
|
||||
Type: UNKNOWN
|
||||
Value: MOUSE_BUTTON_MIDDLE
|
||||
Description:
|
||||
Define 049: MATERIAL_MAP_DIFFUSE
|
||||
Name: MATERIAL_MAP_DIFFUSE
|
||||
Type: UNKNOWN
|
||||
Value: MATERIAL_MAP_ALBEDO
|
||||
Description:
|
||||
Define 050: MATERIAL_MAP_SPECULAR
|
||||
Name: MATERIAL_MAP_SPECULAR
|
||||
Type: UNKNOWN
|
||||
Value: MATERIAL_MAP_METALNESS
|
||||
Description:
|
||||
Define 051: SHADER_LOC_MAP_DIFFUSE
|
||||
Name: SHADER_LOC_MAP_DIFFUSE
|
||||
Type: UNKNOWN
|
||||
Value: SHADER_LOC_MAP_ALBEDO
|
||||
Description:
|
||||
Define 052: SHADER_LOC_MAP_SPECULAR
|
||||
Name: SHADER_LOC_MAP_SPECULAR
|
||||
Type: UNKNOWN
|
||||
Value: SHADER_LOC_MAP_METALNESS
|
||||
Description:
|
||||
|
|
|
|||
|
|
@ -543,58 +543,58 @@
|
|||
</Enum>
|
||||
</Enums>
|
||||
<Defines count="52">
|
||||
<Define name="RAYLIB_H" type="GUARD" />
|
||||
<Define name="RAYLIB_VERSION" type="STRING" />
|
||||
<Define name="RLAPI" type="UNKNOWN" />
|
||||
<Define name="PI" type="FLOAT" />
|
||||
<Define name="DEG2RAD" type="UNKNOWN" />
|
||||
<Define name="RAD2DEG" type="UNKNOWN" />
|
||||
<Define name="RL_MALLOC(sz)" type="MACRO" />
|
||||
<Define name="RL_CALLOC(n,sz)" type="MACRO" />
|
||||
<Define name="RL_REALLOC(ptr,sz)" type="MACRO" />
|
||||
<Define name="RL_FREE(ptr)" type="MACRO" />
|
||||
<Define name="CLITERAL(type)" type="MACRO" />
|
||||
<Define name="RL_COLOR_TYPE" type="GUARD" />
|
||||
<Define name="RL_RECTANGLE_TYPE" type="GUARD" />
|
||||
<Define name="RL_VECTOR2_TYPE" type="GUARD" />
|
||||
<Define name="RL_VECTOR3_TYPE" type="GUARD" />
|
||||
<Define name="RL_VECTOR4_TYPE" type="GUARD" />
|
||||
<Define name="RL_QUATERNION_TYPE" type="GUARD" />
|
||||
<Define name="RL_MATRIX_TYPE" type="GUARD" />
|
||||
<Define name="LIGHTGRAY" type="COLOR" />
|
||||
<Define name="GRAY" type="COLOR" />
|
||||
<Define name="DARKGRAY" type="COLOR" />
|
||||
<Define name="YELLOW" type="COLOR" />
|
||||
<Define name="GOLD" type="COLOR" />
|
||||
<Define name="ORANGE" type="COLOR" />
|
||||
<Define name="PINK" type="COLOR" />
|
||||
<Define name="RED" type="COLOR" />
|
||||
<Define name="MAROON" type="COLOR" />
|
||||
<Define name="GREEN" type="COLOR" />
|
||||
<Define name="LIME" type="COLOR" />
|
||||
<Define name="DARKGREEN" type="COLOR" />
|
||||
<Define name="SKYBLUE" type="COLOR" />
|
||||
<Define name="BLUE" type="COLOR" />
|
||||
<Define name="DARKBLUE" type="COLOR" />
|
||||
<Define name="PURPLE" type="COLOR" />
|
||||
<Define name="VIOLET" type="COLOR" />
|
||||
<Define name="DARKPURPLE" type="COLOR" />
|
||||
<Define name="BEIGE" type="COLOR" />
|
||||
<Define name="BROWN" type="COLOR" />
|
||||
<Define name="DARKBROWN" type="COLOR" />
|
||||
<Define name="WHITE" type="COLOR" />
|
||||
<Define name="BLACK" type="COLOR" />
|
||||
<Define name="BLANK" type="COLOR" />
|
||||
<Define name="MAGENTA" type="COLOR" />
|
||||
<Define name="RAYWHITE" type="COLOR" />
|
||||
<Define name="RL_BOOL_TYPE" type="GUARD" />
|
||||
<Define name="MOUSE_LEFT_BUTTON" type="UNKNOWN" />
|
||||
<Define name="MOUSE_RIGHT_BUTTON" type="UNKNOWN" />
|
||||
<Define name="MOUSE_MIDDLE_BUTTON" type="UNKNOWN" />
|
||||
<Define name="MATERIAL_MAP_DIFFUSE" type="UNKNOWN" />
|
||||
<Define name="MATERIAL_MAP_SPECULAR" type="UNKNOWN" />
|
||||
<Define name="SHADER_LOC_MAP_DIFFUSE" type="UNKNOWN" />
|
||||
<Define name="SHADER_LOC_MAP_SPECULAR" type="UNKNOWN" />
|
||||
<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.14159265358979323846f" 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="491">
|
||||
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
#define MAX_FUNCS_TO_PARSE 512 // Maximum number of functions to parse
|
||||
#define MAX_STRUCTS_TO_PARSE 64 // Maximum number of structures to parse
|
||||
#define MAX_ENUMS_TO_PARSE 64 // Maximum number of enums to parse
|
||||
#define MAX_DEFINES_TO_PARSE 512
|
||||
#define MAX_DEFINES_TO_PARSE 2048 // Maximum number of defines to parse
|
||||
|
||||
#define MAX_LINE_LENGTH 512 // Maximum length of one line (including comments)
|
||||
#define MAX_STRUCT_LINE_LENGTH 2048 // Maximum length of one struct (multiple lines)
|
||||
|
|
@ -111,12 +111,15 @@ typedef struct EnumInfo {
|
|||
char valueDesc[MAX_ENUM_VALUES][128]; // Value description
|
||||
} EnumInfo;
|
||||
|
||||
typedef enum { UNKNOWN, MACRO, GUARD, INT, FLOAT, DOUBLE, CHAR, STRING, COLOR } DefineType;
|
||||
// Type of parsed define
|
||||
typedef enum { UNKNOWN = 0, MACRO, GUARD, INT, FLOAT, DOUBLE, CHAR, STRING, COLOR } DefineType;
|
||||
|
||||
// Define info data
|
||||
typedef struct DefineInfo {
|
||||
char name[64];
|
||||
DefineType type;
|
||||
char name[64]; // Define name
|
||||
DefineType type; // Define type
|
||||
char value[256]; // Define value
|
||||
char desc[128]; // Define description
|
||||
} DefineInfo;
|
||||
|
||||
// Output format for parsed data
|
||||
|
|
@ -128,11 +131,11 @@ typedef enum { DEFAULT = 0, JSON, XML, LUA } OutputFormat;
|
|||
static int funcCount = 0;
|
||||
static int structCount = 0;
|
||||
static int enumCount = 0;
|
||||
static int defCount = 0;
|
||||
static int defineCount = 0;
|
||||
static FunctionInfo *funcs = NULL;
|
||||
static StructInfo *structs = NULL;
|
||||
static EnumInfo *enums = NULL;
|
||||
static DefineInfo *defs = NULL;
|
||||
static DefineInfo *defines = NULL;
|
||||
static char apiDefine[32] = "RLAPI\0";
|
||||
|
||||
// Command line variables
|
||||
|
|
@ -153,10 +156,11 @@ static unsigned int TextLength(const char *text); // Get text length i
|
|||
static bool IsTextEqual(const char *text1, const char *text2, unsigned int count);
|
||||
static void MemoryCopy(void *dest, const void *src, unsigned int count);
|
||||
static char *EscapeBackslashes(char *text); // Replace '\' by "\\" when exporting to JSON and XML
|
||||
static const char *StrDefineType(DefineType type); // Get string of define type
|
||||
|
||||
static void ExportParsedData(const char *fileName, int format); // Export parsed data in desired format
|
||||
|
||||
static const char *StrDefineType(DefineType type); // Get string of define type
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
|
|
@ -184,7 +188,7 @@ int main(int argc, char* argv[])
|
|||
int *enumLines = (int *)malloc(MAX_ENUMS_TO_PARSE*sizeof(int));
|
||||
|
||||
// Defines lines pointers, selected from buffer "lines"
|
||||
int *defLines = (int *)malloc(MAX_DEFINES_TO_PARSE*sizeof(int));
|
||||
int *defineLines = (int *)malloc(MAX_DEFINES_TO_PARSE*sizeof(int));
|
||||
|
||||
// Prepare required lines for parsing
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
|
@ -255,12 +259,12 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
// Keep the line position in the array of lines,
|
||||
// so, we can scan that position and following lines
|
||||
defLines[defCount] = i;
|
||||
defCount++;
|
||||
defineLines[defineCount] = i;
|
||||
defineCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// At this point we have all raylib structs, enums, functions, defs lines data to start parsing
|
||||
// At this point we have all raylib structs, enums, functions, defines lines data to start parsing
|
||||
|
||||
free(buffer); // Unload text buffer
|
||||
|
||||
|
|
@ -437,68 +441,83 @@ int main(int argc, char* argv[])
|
|||
free(enumLines);
|
||||
|
||||
// Define info data
|
||||
defs = (DefineInfo *)calloc(MAX_DEFINES_TO_PARSE, sizeof(DefineInfo));
|
||||
defines = (DefineInfo *)calloc(MAX_DEFINES_TO_PARSE, sizeof(DefineInfo));
|
||||
int defineIndex = 0;
|
||||
|
||||
for (int i = 0; i < defCount; i++)
|
||||
for (int i = 0; i < defineCount; i++)
|
||||
{
|
||||
char *linePtr = lines[defLines[i]];
|
||||
char *linePtr = lines[defineLines[i]];
|
||||
int j = 0;
|
||||
int constNameStart, constNameEnd;
|
||||
|
||||
while (linePtr[j] == ' ' || linePtr[j] == '\t') j++; // Skip spaces and tabs in the begining
|
||||
j += 8; // Skip "#define "
|
||||
while (linePtr[j] == ' ' || linePtr[j] == '\t') j++; // Skip spaces and tabs after "#define "
|
||||
|
||||
constNameStart = j;
|
||||
while (linePtr[j] != ' ' && linePtr[j] != '\t' && linePtr[j] != '\0') j++; // Extract name
|
||||
constNameEnd = j-1;
|
||||
|
||||
// Functional macros
|
||||
if (linePtr[constNameEnd] == ')') {
|
||||
defs[defineIndex].type = MACRO;
|
||||
}
|
||||
|
||||
while (linePtr[j] == ' ' || linePtr[j] == '\t') j++; // Skip spaces and tabs after name
|
||||
|
||||
// Empty
|
||||
if (linePtr[j] == '\0' || linePtr == "/") {
|
||||
defs[defineIndex].type = GUARD;
|
||||
}
|
||||
|
||||
if (linePtr[j] == '"') defs[defineIndex].type = STRING;
|
||||
else if (linePtr[j] == '\'') defs[defineIndex].type = CHAR;
|
||||
else if (IsTextEqual(linePtr+j, "CLITERAL(Color)", 15)) defs[defineIndex].type = COLOR;
|
||||
// Parsing numbers
|
||||
else if (isdigit(linePtr[j])) {
|
||||
bool isFloat = false;
|
||||
while (linePtr[j] != ' ' && linePtr[j] != '\t' && linePtr[j] != '\n' && linePtr[j] != '\r') {
|
||||
j++;
|
||||
if (linePtr[j] == '.') isFloat = true;
|
||||
}
|
||||
if (isFloat) {
|
||||
defs[defineIndex].type = linePtr[j-1] == 'f' ? FLOAT : DOUBLE;
|
||||
} else {
|
||||
defs[defineIndex].type = INT;
|
||||
}
|
||||
}
|
||||
// Extract name
|
||||
int defineNameStart = j;
|
||||
while (linePtr[j] != ' ' && linePtr[j] != '\t' && linePtr[j] != '\0') j++;
|
||||
int defineNameEnd = j-1;
|
||||
|
||||
// Skip duplicates
|
||||
int len = constNameEnd - constNameStart + 1;
|
||||
int nameLen = defineNameEnd - defineNameStart + 1;
|
||||
bool isDuplicate = false;
|
||||
for (int k = 0; k < defineIndex; k++) {
|
||||
if (len == TextLength(defs[k].name) && IsTextEqual(defs[k].name, linePtr + constNameStart, len)) {
|
||||
if (nameLen == TextLength(defines[k].name) && IsTextEqual(defines[k].name, linePtr + defineNameStart, nameLen)) {
|
||||
isDuplicate = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isDuplicate) continue;
|
||||
|
||||
MemoryCopy(defs[defineIndex].name, linePtr + constNameStart, len);
|
||||
MemoryCopy(defines[defineIndex].name, linePtr + defineNameStart, nameLen);
|
||||
|
||||
// Determine type
|
||||
if (linePtr[defineNameEnd] == ')') defines[defineIndex].type = MACRO;
|
||||
|
||||
while (linePtr[j] == ' ' || linePtr[j] == '\t') j++; // Skip spaces and tabs after name
|
||||
|
||||
int defineValueStart = j;
|
||||
if (linePtr[j] == '\0' || linePtr == "/") defines[defineIndex].type = GUARD;
|
||||
if (linePtr[j] == '"') defines[defineIndex].type = STRING;
|
||||
else if (linePtr[j] == '\'') defines[defineIndex].type = CHAR;
|
||||
else if (IsTextEqual(linePtr+j, "CLITERAL(Color)", 15)) defines[defineIndex].type = COLOR;
|
||||
else if (isdigit(linePtr[j])) { // Parsing numbers
|
||||
bool isFloat = false;
|
||||
while (linePtr[j] != ' ' && linePtr[j] != '\t' && linePtr[j] != '\n' && linePtr[j] != '\r') {
|
||||
j++;
|
||||
if (linePtr[j] == '.') isFloat = true;
|
||||
}
|
||||
if (isFloat) {
|
||||
defines[defineIndex].type = linePtr[j-1] == 'f' ? FLOAT : DOUBLE;
|
||||
} else {
|
||||
defines[defineIndex].type = INT;
|
||||
}
|
||||
}
|
||||
|
||||
// Extracting value
|
||||
while (linePtr[j] != '\\' && linePtr[j] != '\0' && !(linePtr[j] == '/' && linePtr[j+1] == '/')) j++;
|
||||
int defineValueEnd = j-1;
|
||||
while (linePtr[defineValueEnd] == ' ' || linePtr[defineValueEnd] == '\t') defineValueEnd--; // Remove trailing spaces and tabs
|
||||
int valueLen = defineValueEnd - defineValueStart + 1;
|
||||
if (valueLen > 255) valueLen = 255;
|
||||
|
||||
if (valueLen > 0) MemoryCopy(defines[defineIndex].value, linePtr + defineValueStart, valueLen);
|
||||
|
||||
// Extracting description
|
||||
if (linePtr[j] == '/') {
|
||||
int commentStart = j;
|
||||
while (linePtr[j] != '\\' && linePtr[j] != '\0') j++;
|
||||
int commentEnd = j-1;
|
||||
int commentLen = commentEnd - commentStart + 1;
|
||||
if (commentLen > 127) commentLen = 127;
|
||||
|
||||
MemoryCopy(defines[defineIndex].desc, linePtr + commentStart, commentLen);
|
||||
}
|
||||
|
||||
defineIndex++;
|
||||
}
|
||||
defCount = defineIndex;
|
||||
free(defLines);
|
||||
defineCount = defineIndex;
|
||||
free(defineLines);
|
||||
|
||||
// Functions info data
|
||||
funcs = (FunctionInfo *)calloc(MAX_FUNCS_TO_PARSE, sizeof(FunctionInfo));
|
||||
|
|
@ -581,7 +600,7 @@ int main(int argc, char* argv[])
|
|||
// structs[] -> We have all the structs decomposed into pieces for further analysis
|
||||
// enums[] -> We have all the enums decomposed into pieces for further analysis
|
||||
// funcs[] -> We have all the functions decomposed into pieces for further analysis
|
||||
// defs[] -> We have all the defines decomposed into pieces for further analysis
|
||||
// defines[] -> We have all the defines decomposed into pieces for further analysis
|
||||
|
||||
// Process input file to output
|
||||
if (outFileName[0] == '\0') MemoryCopy(outFileName, "raylib_api.txt\0", 15);
|
||||
|
|
@ -855,6 +874,7 @@ static char *EscapeBackslashes(char *text)
|
|||
return buffer;
|
||||
}
|
||||
|
||||
// Get string of define type
|
||||
static const char *StrDefineType(DefineType type)
|
||||
{
|
||||
switch (type)
|
||||
|
|
@ -965,12 +985,14 @@ static void ExportParsedData(const char *fileName, int format)
|
|||
if (funcs[i].paramCount == 0) fprintf(outFile, " No input parameters\n");
|
||||
}
|
||||
|
||||
fprintf(outFile, "\nDefines found: %i\n\n", defCount);
|
||||
for (int i = 0; i < defCount; i++)
|
||||
fprintf(outFile, "\nDefines found: %i\n\n", defineCount);
|
||||
for (int i = 0; i < defineCount; i++)
|
||||
{
|
||||
fprintf(outFile, "Define %03i: %s\n", i + 1, defs[i].name);
|
||||
fprintf(outFile, " Name: %s\n", defs[i].name);
|
||||
fprintf(outFile, " Type: %s\n", StrDefineType(defs[i].type));
|
||||
fprintf(outFile, "Define %03i: %s\n", i + 1, defines[i].name);
|
||||
fprintf(outFile, " Name: %s\n", defines[i].name);
|
||||
fprintf(outFile, " Type: %s\n", StrDefineType(defines[i].type));
|
||||
fprintf(outFile, " Value: %s\n", defines[i].value);
|
||||
fprintf(outFile, " Description: %s\n", defines[i].desc + 3);
|
||||
}
|
||||
} break;
|
||||
case LUA:
|
||||
|
|
@ -1027,13 +1049,24 @@ static void ExportParsedData(const char *fileName, int format)
|
|||
}
|
||||
fprintf(outFile, " },\n");
|
||||
|
||||
// Print defs info
|
||||
fprintf(outFile, " defs = {\n");
|
||||
for (int i = 0; i < defCount; i++)
|
||||
// Print defines info
|
||||
fprintf(outFile, " defines = {\n");
|
||||
for (int i = 0; i < defineCount; i++)
|
||||
{
|
||||
fprintf(outFile, " {\n");
|
||||
fprintf(outFile, " name = \"%s\",\n", defs[i].name);
|
||||
fprintf(outFile, " type = \"%s\"\n", StrDefineType(defs[i].type));
|
||||
fprintf(outFile, " name = \"%s\",\n", defines[i].name);
|
||||
fprintf(outFile, " type = \"%s\",\n", StrDefineType(defines[i].type));
|
||||
if (defines[i].type == INT || defines[i].type == DOUBLE || defines[i].type == STRING) {
|
||||
fprintf(outFile, " value = %s,\n", defines[i].value);
|
||||
} else if (defines[i].type == FLOAT) {
|
||||
int n = TextLength(defines[i].value);
|
||||
defines[i].value[n-1] = '\0';
|
||||
fprintf(outFile, " value = %s,\n", defines[i].value);
|
||||
defines[i].value[n-1] = 'f';
|
||||
} else {
|
||||
fprintf(outFile, " value = \"%s\",\n", defines[i].value);
|
||||
}
|
||||
fprintf(outFile, " description = \"%s\"\n", defines[i].desc + 3);
|
||||
fprintf(outFile, " }");
|
||||
|
||||
if (i < funcCount - 1) fprintf(outFile, ",\n");
|
||||
|
|
@ -1124,16 +1157,27 @@ static void ExportParsedData(const char *fileName, int format)
|
|||
}
|
||||
fprintf(outFile, " ],\n");
|
||||
|
||||
// Print defs info
|
||||
fprintf(outFile, " \"defs\": [\n");
|
||||
for (int i = 0; i < defCount; i++)
|
||||
// Print defines info
|
||||
fprintf(outFile, " \"defines\": [\n");
|
||||
for (int i = 0; i < defineCount; i++)
|
||||
{
|
||||
fprintf(outFile, " {\n");
|
||||
fprintf(outFile, " \"name\": \"%s\",\n", defs[i].name);
|
||||
fprintf(outFile, " \"type\": \"%s\"\n", StrDefineType(defs[i].type));
|
||||
fprintf(outFile, " \"name\": \"%s\",\n", defines[i].name);
|
||||
fprintf(outFile, " \"type\": \"%s\",\n", StrDefineType(defines[i].type));
|
||||
if (defines[i].type == INT || defines[i].type == DOUBLE || defines[i].type == STRING) {
|
||||
fprintf(outFile, " \"value\": %s,\n", defines[i].value);
|
||||
} else if (defines[i].type == FLOAT) {
|
||||
int n = TextLength(defines[i].value);
|
||||
defines[i].value[n-1] = '\0';
|
||||
fprintf(outFile, " \"value\": %s,\n", defines[i].value);
|
||||
defines[i].value[n-1] = 'f';
|
||||
} else {
|
||||
fprintf(outFile, " \"value\": \"%s\",\n", defines[i].value);
|
||||
}
|
||||
fprintf(outFile, " \"description\": \"%s\"\n", defines[i].desc + 3);
|
||||
fprintf(outFile, " }");
|
||||
|
||||
if (i < defCount - 1) fprintf(outFile, ",\n");
|
||||
if (i < defineCount - 1) fprintf(outFile, ",\n");
|
||||
else fprintf(outFile, "\n");
|
||||
}
|
||||
fprintf(outFile, " ],\n");
|
||||
|
|
@ -1226,11 +1270,11 @@ static void ExportParsedData(const char *fileName, int format)
|
|||
}
|
||||
fprintf(outFile, " </Enums>\n");
|
||||
|
||||
// Print defs info
|
||||
fprintf(outFile, " <Defines count=\"%i\">\n", defCount);
|
||||
for (int i = 0; i < defCount; i++)
|
||||
// Print defines info
|
||||
fprintf(outFile, " <Defines count=\"%i\">\n", defineCount);
|
||||
for (int i = 0; i < defineCount; i++)
|
||||
{
|
||||
fprintf(outFile, " <Define name=\"%s\" type=\"%s\" />\n", defs[i].name, StrDefineType(defs[i].type));
|
||||
fprintf(outFile, " <Define name=\"%s\" type=\"%s\" value=\"%s\" desc=\"%s\" />\n", defines[i].name, StrDefineType(defines[i].type), defines[i].value, defines[i].desc);
|
||||
}
|
||||
fprintf(outFile, " </Defines>\n");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user