Skip to content

Commit

Permalink
[SHAPES] Make functions that draw point arrays take them as const (#4051
Browse files Browse the repository at this point in the history
)

* Update raylib_api.* by CI

* make functions that take a pointer to an array take them as const pointers

* Update raylib_api.* by CI

* fix comment alignment.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
JeffM2501 and github-actions[bot] committed Jun 11, 2024
1 parent 0fc4b61 commit 2609211
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 61 deletions.
20 changes: 10 additions & 10 deletions parser/output/raylib_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -5345,7 +5345,7 @@
"returnType": "void",
"params": [
{
"type": "Vector2 *",
"type": "const Vector2 *",
"name": "points"
},
{
Expand Down Expand Up @@ -6022,7 +6022,7 @@
"returnType": "void",
"params": [
{
"type": "Vector2 *",
"type": "const Vector2 *",
"name": "points"
},
{
Expand All @@ -6041,7 +6041,7 @@
"returnType": "void",
"params": [
{
"type": "Vector2 *",
"type": "const Vector2 *",
"name": "points"
},
{
Expand Down Expand Up @@ -6145,7 +6145,7 @@
"returnType": "void",
"params": [
{
"type": "Vector2 *",
"type": "const Vector2 *",
"name": "points"
},
{
Expand All @@ -6168,7 +6168,7 @@
"returnType": "void",
"params": [
{
"type": "Vector2 *",
"type": "const Vector2 *",
"name": "points"
},
{
Expand All @@ -6191,7 +6191,7 @@
"returnType": "void",
"params": [
{
"type": "Vector2 *",
"type": "const Vector2 *",
"name": "points"
},
{
Expand All @@ -6214,7 +6214,7 @@
"returnType": "void",
"params": [
{
"type": "Vector2 *",
"type": "const Vector2 *",
"name": "points"
},
{
Expand All @@ -6237,7 +6237,7 @@
"returnType": "void",
"params": [
{
"type": "Vector2 *",
"type": "const Vector2 *",
"name": "points"
},
{
Expand Down Expand Up @@ -6644,7 +6644,7 @@
"name": "point"
},
{
"type": "Vector2 *",
"type": "const Vector2 *",
"name": "points"
},
{
Expand Down Expand Up @@ -9613,7 +9613,7 @@
"returnType": "void",
"params": [
{
"type": "Vector3 *",
"type": "const Vector3 *",
"name": "points"
},
{
Expand Down
20 changes: 10 additions & 10 deletions parser/output/raylib_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4636,7 +4636,7 @@ return {
description = "Draw lines sequence (using gl lines)",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "Color", name = "color"}
}
Expand Down Expand Up @@ -4947,7 +4947,7 @@ return {
description = "Draw a triangle fan defined by points (first vertex is the center)",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "Color", name = "color"}
}
Expand All @@ -4957,7 +4957,7 @@ return {
description = "Draw a triangle strip defined by points",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "Color", name = "color"}
}
Expand Down Expand Up @@ -5004,7 +5004,7 @@ return {
description = "Draw spline: Linear, minimum 2 points",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
Expand All @@ -5015,7 +5015,7 @@ return {
description = "Draw spline: B-Spline, minimum 4 points",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
Expand All @@ -5026,7 +5026,7 @@ return {
description = "Draw spline: Catmull-Rom, minimum 4 points",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
Expand All @@ -5037,7 +5037,7 @@ return {
description = "Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
Expand All @@ -5048,7 +5048,7 @@ return {
description = "Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
Expand Down Expand Up @@ -5239,7 +5239,7 @@ return {
returnType = "bool",
params = {
{type = "Vector2", name = "point"},
{type = "Vector2 *", name = "points"},
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"}
}
},
Expand Down Expand Up @@ -6855,7 +6855,7 @@ return {
description = "Draw a triangle strip defined by points",
returnType = "void",
params = {
{type = "Vector3 *", name = "points"},
{type = "const Vector3 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "Color", name = "color"}
}
Expand Down
20 changes: 10 additions & 10 deletions parser/output/raylib_api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,7 @@ Function 212: DrawLineStrip() (3 input parameters)
Name: DrawLineStrip
Return type: void
Description: Draw lines sequence (using gl lines)
Param[1]: points (type: Vector2 *)
Param[1]: points (type: const Vector2 *)
Param[2]: pointCount (type: int)
Param[3]: color (type: Color)
Function 213: DrawLineBezier() (4 input parameters)
Expand Down Expand Up @@ -2360,14 +2360,14 @@ Function 239: DrawTriangleFan() (3 input parameters)
Name: DrawTriangleFan
Return type: void
Description: Draw a triangle fan defined by points (first vertex is the center)
Param[1]: points (type: Vector2 *)
Param[1]: points (type: const Vector2 *)
Param[2]: pointCount (type: int)
Param[3]: color (type: Color)
Function 240: DrawTriangleStrip() (3 input parameters)
Name: DrawTriangleStrip
Return type: void
Description: Draw a triangle strip defined by points
Param[1]: points (type: Vector2 *)
Param[1]: points (type: const Vector2 *)
Param[2]: pointCount (type: int)
Param[3]: color (type: Color)
Function 241: DrawPoly() (5 input parameters)
Expand Down Expand Up @@ -2402,39 +2402,39 @@ Function 244: DrawSplineLinear() (4 input parameters)
Name: DrawSplineLinear
Return type: void
Description: Draw spline: Linear, minimum 2 points
Param[1]: points (type: Vector2 *)
Param[1]: points (type: const Vector2 *)
Param[2]: pointCount (type: int)
Param[3]: thick (type: float)
Param[4]: color (type: Color)
Function 245: DrawSplineBasis() (4 input parameters)
Name: DrawSplineBasis
Return type: void
Description: Draw spline: B-Spline, minimum 4 points
Param[1]: points (type: Vector2 *)
Param[1]: points (type: const Vector2 *)
Param[2]: pointCount (type: int)
Param[3]: thick (type: float)
Param[4]: color (type: Color)
Function 246: DrawSplineCatmullRom() (4 input parameters)
Name: DrawSplineCatmullRom
Return type: void
Description: Draw spline: Catmull-Rom, minimum 4 points
Param[1]: points (type: Vector2 *)
Param[1]: points (type: const Vector2 *)
Param[2]: pointCount (type: int)
Param[3]: thick (type: float)
Param[4]: color (type: Color)
Function 247: DrawSplineBezierQuadratic() (4 input parameters)
Name: DrawSplineBezierQuadratic
Return type: void
Description: Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
Param[1]: points (type: Vector2 *)
Param[1]: points (type: const Vector2 *)
Param[2]: pointCount (type: int)
Param[3]: thick (type: float)
Param[4]: color (type: Color)
Function 248: DrawSplineBezierCubic() (4 input parameters)
Name: DrawSplineBezierCubic
Return type: void
Description: Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
Param[1]: points (type: Vector2 *)
Param[1]: points (type: const Vector2 *)
Param[2]: pointCount (type: int)
Param[3]: thick (type: float)
Param[4]: color (type: Color)
Expand Down Expand Up @@ -2574,7 +2574,7 @@ Function 265: CheckCollisionPointPoly() (3 input parameters)
Return type: bool
Description: Check if point is within a polygon described by array of vertices
Param[1]: point (type: Vector2)
Param[2]: points (type: Vector2 *)
Param[2]: points (type: const Vector2 *)
Param[3]: pointCount (type: int)
Function 266: CheckCollisionLines() (5 input parameters)
Name: CheckCollisionLines
Expand Down Expand Up @@ -3695,7 +3695,7 @@ Function 432: DrawTriangleStrip3D() (3 input parameters)
Name: DrawTriangleStrip3D
Return type: void
Description: Draw a triangle strip defined by points
Param[1]: points (type: Vector3 *)
Param[1]: points (type: const Vector3 *)
Param[2]: pointCount (type: int)
Param[3]: color (type: Color)
Function 433: DrawCube() (5 input parameters)
Expand Down
20 changes: 10 additions & 10 deletions parser/output/raylib_api.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawLineStrip" retType="void" paramCount="3" desc="Draw lines sequence (using gl lines)">
<Param type="Vector2 *" name="points" desc="" />
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
Expand Down Expand Up @@ -1493,12 +1493,12 @@
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangleFan" retType="void" paramCount="3" desc="Draw a triangle fan defined by points (first vertex is the center)">
<Param type="Vector2 *" name="points" desc="" />
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangleStrip" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
<Param type="Vector2 *" name="points" desc="" />
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
Expand All @@ -1525,31 +1525,31 @@
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawSplineLinear" retType="void" paramCount="4" desc="Draw spline: Linear, minimum 2 points">
<Param type="Vector2 *" name="points" desc="" />
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="float" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawSplineBasis" retType="void" paramCount="4" desc="Draw spline: B-Spline, minimum 4 points">
<Param type="Vector2 *" name="points" desc="" />
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="float" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawSplineCatmullRom" retType="void" paramCount="4" desc="Draw spline: Catmull-Rom, minimum 4 points">
<Param type="Vector2 *" name="points" desc="" />
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="float" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawSplineBezierQuadratic" retType="void" paramCount="4" desc="Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]">
<Param type="Vector2 *" name="points" desc="" />
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="float" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawSplineBezierCubic" retType="void" paramCount="4" desc="Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]">
<Param type="Vector2 *" name="points" desc="" />
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="float" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
Expand Down Expand Up @@ -1655,7 +1655,7 @@
</Function>
<Function name="CheckCollisionPointPoly" retType="bool" paramCount="3" desc="Check if point is within a polygon described by array of vertices">
<Param type="Vector2" name="point" desc="" />
<Param type="Vector2 *" name="points" desc="" />
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
</Function>
<Function name="CheckCollisionLines" retType="bool" paramCount="5" desc="Check the collision between two lines defined by two points each, returns collision point by reference">
Expand Down Expand Up @@ -2440,7 +2440,7 @@
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangleStrip3D" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
<Param type="Vector3 *" name="points" desc="" />
<Param type="const Vector3 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
Expand Down
Loading

0 comments on commit 2609211

Please sign in to comment.