mirror of
https://github.com/raysan5/raylib.git
synced 2026-09-14 01:50:50 +00:00
[rlparser] Fix type aliases (typedefs): added support to type pointers (#6126)
Fix issue #6122
This commit is contained in:
@@ -1411,8 +1411,8 @@
|
||||
"description": "Camera type fallback, defaults to Camera3D"
|
||||
},
|
||||
{
|
||||
"type": "Transform",
|
||||
"name": "*ModelAnimPose",
|
||||
"type": "Transform *",
|
||||
"name": "ModelAnimPose",
|
||||
"description": "Anim pose, an array of Transform[]"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -1411,8 +1411,8 @@ return {
|
||||
description = "Camera type fallback, defaults to Camera3D"
|
||||
},
|
||||
{
|
||||
type = "Transform",
|
||||
name = "*ModelAnimPose",
|
||||
type = "Transform *",
|
||||
name = "ModelAnimPose",
|
||||
description = "Anim pose, an array of Transform[]"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -887,8 +887,8 @@
|
||||
(name "Camera")
|
||||
(description "Camera type fallback, defaults to Camera3D"))
|
||||
|
||||
((type "Transform")
|
||||
(name "*ModelAnimPose")
|
||||
((type "Transform *")
|
||||
(name "ModelAnimPose")
|
||||
(description "Anim pose, an array of Transform[]")))
|
||||
|
||||
(enums
|
||||
|
||||
@@ -579,9 +579,9 @@ Alias 005: Camera
|
||||
Type: Camera3D
|
||||
Name: Camera
|
||||
Description: Camera type fallback, defaults to Camera3D
|
||||
Alias 006: *ModelAnimPose
|
||||
Type: Transform
|
||||
Name: *ModelAnimPose
|
||||
Alias 006: ModelAnimPose
|
||||
Type: Transform *
|
||||
Name: ModelAnimPose
|
||||
Description: Anim pose, an array of Transform[]
|
||||
|
||||
Enums found: 21
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
<Alias type="TextureCubemap" name="Texture" desc="TextureCubemap, same as Texture" />
|
||||
<Alias type="RenderTexture2D" name="RenderTexture" desc="RenderTexture2D, same as RenderTexture" />
|
||||
<Alias type="Camera" name="Camera3D" desc="Camera type fallback, defaults to Camera3D" />
|
||||
<Alias type="*ModelAnimPose" name="Transform" desc="Anim pose, an array of Transform[]" />
|
||||
<Alias type="ModelAnimPose" name="Transform *" desc="Anim pose, an array of Transform[]" />
|
||||
</Aliases>
|
||||
<Enums count="21">
|
||||
<Enum name="ConfigFlags" valueCount="16" desc="System/Window config flags">
|
||||
|
||||
@@ -774,14 +774,21 @@ int main(int argc, char *argv[])
|
||||
// Skip "typedef "
|
||||
int c = 8;
|
||||
|
||||
// Type
|
||||
// Type word part
|
||||
int typeStart = c;
|
||||
while(linePtr[c] != ' ') c++;
|
||||
int typeLen = c - typeStart;
|
||||
MemoryCopy(aliases[i].type, &linePtr[typeStart], typeLen);
|
||||
|
||||
|
||||
// Skip space
|
||||
c++;
|
||||
c++;
|
||||
|
||||
// Maybe type pointer part
|
||||
if (linePtr[c] == '*') {
|
||||
while(linePtr[c] == '*') c++;
|
||||
typeLen = c - typeStart;
|
||||
}
|
||||
|
||||
MemoryCopy(aliases[i].type, &linePtr[typeStart], typeLen);
|
||||
|
||||
// Name
|
||||
int nameStart = c;
|
||||
|
||||
Reference in New Issue
Block a user