Parser improvements (#2461)
* Fix parser function description detection Some functions in easings.h are defined on a single line and include a division which was mistaken for the start of the description. * Fix parser detection of macros including spaces * Add support for self-referencing structs to parser * Fix parser code style * Fix parser handling of multiple fields on one line * Increase parser MAX_STRUCT_FIELDS For internal rlglData State struct (internal structs are still not supported but this makes it less wrong). * Add description helper to parser * Regenerate parser output * Add cakkbacks to parser * Regenerate parser output * Refactor funcLines to be an array of line numbers It used to be an array of pointers into the text buffer but was changed to be an array of pointers to the lines. Now it is an array of line numbers like the others. * Fix code style * Move array size from name to type * Regenerate parser output
This commit is contained in:
parent
8cb03ef524
commit
df6caea25d
5 changed files with 737 additions and 242 deletions
|
@ -471,7 +471,7 @@ return {
|
|||
{
|
||||
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 *",
|
||||
|
@ -577,8 +577,8 @@ return {
|
|||
description = "Material maps array (MAX_MATERIAL_MAPS)"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "params[4]",
|
||||
type = "float[4]",
|
||||
name = "params",
|
||||
description = "Material generic parameters (if required)"
|
||||
}
|
||||
}
|
||||
|
@ -609,8 +609,8 @@ return {
|
|||
description = "Bone, skeletal animation bone",
|
||||
fields = {
|
||||
{
|
||||
type = "char",
|
||||
name = "name[32]",
|
||||
type = "char[32]",
|
||||
name = "name",
|
||||
description = "Bone name"
|
||||
},
|
||||
{
|
||||
|
@ -909,13 +909,13 @@ return {
|
|||
description = "IPD (distance between pupils) in meters"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "lensDistortionValues[4]",
|
||||
type = "float[4]",
|
||||
name = "lensDistortionValues",
|
||||
description = "Lens distortion constant parameters"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "chromaAbCorrection[4]",
|
||||
type = "float[4]",
|
||||
name = "chromaAbCorrection",
|
||||
description = "Chromatic aberration correction parameters"
|
||||
}
|
||||
}
|
||||
|
@ -925,43 +925,43 @@ return {
|
|||
description = "VrStereoConfig, VR stereo rendering configuration for simulator",
|
||||
fields = {
|
||||
{
|
||||
type = "Matrix",
|
||||
name = "projection[2]",
|
||||
type = "Matrix[2]",
|
||||
name = "projection",
|
||||
description = "VR projection matrices (per eye)"
|
||||
},
|
||||
{
|
||||
type = "Matrix",
|
||||
name = "viewOffset[2]",
|
||||
type = "Matrix[2]",
|
||||
name = "viewOffset",
|
||||
description = "VR view offset matrices (per eye)"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "leftLensCenter[2]",
|
||||
type = "float[2]",
|
||||
name = "leftLensCenter",
|
||||
description = "VR left lens center"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "rightLensCenter[2]",
|
||||
type = "float[2]",
|
||||
name = "rightLensCenter",
|
||||
description = "VR right lens center"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "leftScreenCenter[2]",
|
||||
type = "float[2]",
|
||||
name = "leftScreenCenter",
|
||||
description = "VR left screen center"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "rightScreenCenter[2]",
|
||||
type = "float[2]",
|
||||
name = "rightScreenCenter",
|
||||
description = "VR right screen center"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "scale[2]",
|
||||
type = "float[2]",
|
||||
name = "scale",
|
||||
description = "VR distortion scale"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "scaleIn[2]",
|
||||
type = "float[2]",
|
||||
name = "scaleIn",
|
||||
description = "VR distortion scale in"
|
||||
}
|
||||
}
|
||||
|
@ -3771,7 +3771,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "GetDirectoryFiles",
|
||||
description = "Get filenames in a directory path (memory should be freed)",
|
||||
description = "Get filenames in a directory path (memory must be freed)",
|
||||
returnType = "char **",
|
||||
params = {
|
||||
{type = "const char *", name = "dirPath"},
|
||||
|
@ -3798,7 +3798,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "GetDroppedFiles",
|
||||
description = "Get dropped files names (memory should be freed)",
|
||||
description = "Get dropped files names (memory must be freed)",
|
||||
returnType = "char **",
|
||||
params = {
|
||||
{type = "int *", name = "count"}
|
||||
|
@ -3819,7 +3819,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "CompressData",
|
||||
description = "Compress data (DEFLATE algorithm)",
|
||||
description = "Compress data (DEFLATE algorithm), memory must be MemFree()",
|
||||
returnType = "unsigned char *",
|
||||
params = {
|
||||
{type = "const unsigned char *", name = "data"},
|
||||
|
@ -3829,7 +3829,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "DecompressData",
|
||||
description = "Decompress data (DEFLATE algorithm)",
|
||||
description = "Decompress data (DEFLATE algorithm), memory must be MemFree()",
|
||||
returnType = "unsigned char *",
|
||||
params = {
|
||||
{type = "const unsigned char *", name = "compData"},
|
||||
|
@ -3839,7 +3839,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "EncodeDataBase64",
|
||||
description = "Encode data to Base64 string",
|
||||
description = "Encode data to Base64 string, memory must be MemFree()",
|
||||
returnType = "char *",
|
||||
params = {
|
||||
{type = "const unsigned char *", name = "data"},
|
||||
|
@ -3849,7 +3849,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "DecodeDataBase64",
|
||||
description = "Decode Base64 string data",
|
||||
description = "Decode Base64 string data, memory must be MemFree()",
|
||||
returnType = "unsigned char *",
|
||||
params = {
|
||||
{type = "const unsigned char *", name = "data"},
|
||||
|
@ -7322,5 +7322,62 @@ return {
|
|||
{type = "AudioCallback", name = "processor"}
|
||||
}
|
||||
}
|
||||
},
|
||||
callbacks = {
|
||||
{
|
||||
name = "TraceLogCallback",
|
||||
description = "Logging: Redirect trace log messages",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "logLevel"},
|
||||
{type = "const char *", name = "text"},
|
||||
{type = "va_list", name = "args"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "LoadFileDataCallback",
|
||||
description = "FileIO: Load binary data",
|
||||
returnType = "unsigned char *",
|
||||
params = {
|
||||
{type = "const char *", name = "fileName"},
|
||||
{type = "unsigned int *", name = "bytesRead"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "SaveFileDataCallback",
|
||||
description = "FileIO: Save binary data",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "const char *", name = "fileName"},
|
||||
{type = "void *", name = "data"},
|
||||
{type = "unsigned int", name = "bytesToWrite"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "LoadFileTextCallback",
|
||||
description = "FileIO: Load text data",
|
||||
returnType = "char *",
|
||||
params = {
|
||||
{type = "const char *", name = "fileName"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "SaveFileTextCallback",
|
||||
description = "FileIO: Save text data",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "const char *", name = "fileName"},
|
||||
{type = "char *", name = "text"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "AudioCallback",
|
||||
description = "",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "void *", name = "bufferData"},
|
||||
{type = "unsigned int", name = "frames"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue