From 296e3af470b5afbc8e3eb30c925166d761974769 Mon Sep 17 00:00:00 2001 From: jestarray <34615798+jestarray@users.noreply.github.com> Date: Sat, 31 May 2025 14:11:00 -0700 Subject: [PATCH 1/2] add const qualifier to ImageDrawTriangleFan and ImageDrawTriangleStrip arguments --- projects/Notepad++/raylib_npp_parser/raylib_to_parse.h | 4 ++-- src/raylib.h | 4 ++-- src/rtextures.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h b/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h index 89cce66f9..27e9b79a2 100644 --- a/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +++ b/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h @@ -440,8 +440,8 @@ RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color c RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image RLAPI void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image -RLAPI void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center) -RLAPI void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image +RLAPI void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center) +RLAPI void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination) RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination) diff --git a/src/raylib.h b/src/raylib.h index 3601faa25..71d346ea7 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1408,8 +1408,8 @@ RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color c RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image RLAPI void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image -RLAPI void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center) -RLAPI void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image +RLAPI void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center) +RLAPI void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination) RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination) diff --git a/src/rtextures.c b/src/rtextures.c index 7a404a6de..7a5a5e57e 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -3891,7 +3891,7 @@ void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Colo } // Draw a triangle fan defined by points within an image (first vertex is the center) -void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color color) +void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color) { if (pointCount >= 3) { @@ -3903,7 +3903,7 @@ void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color col } // Draw a triangle strip defined by points within an image -void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color) +void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color) { if (pointCount >= 3) { From 58a6846c8f1c11b2e7007109a8455604453c9b61 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 31 May 2025 21:26:50 +0000 Subject: [PATCH 2/2] Update raylib_api.* by CI --- parser/output/raylib_api.json | 4 ++-- parser/output/raylib_api.lua | 4 ++-- parser/output/raylib_api.txt | 4 ++-- parser/output/raylib_api.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/parser/output/raylib_api.json b/parser/output/raylib_api.json index efbac71b0..e796478e4 100644 --- a/parser/output/raylib_api.json +++ b/parser/output/raylib_api.json @@ -8302,7 +8302,7 @@ "name": "dst" }, { - "type": "Vector2 *", + "type": "const Vector2 *", "name": "points" }, { @@ -8325,7 +8325,7 @@ "name": "dst" }, { - "type": "Vector2 *", + "type": "const Vector2 *", "name": "points" }, { diff --git a/parser/output/raylib_api.lua b/parser/output/raylib_api.lua index 08615aa22..a2897a226 100644 --- a/parser/output/raylib_api.lua +++ b/parser/output/raylib_api.lua @@ -6141,7 +6141,7 @@ return { returnType = "void", params = { {type = "Image *", name = "dst"}, - {type = "Vector2 *", name = "points"}, + {type = "const Vector2 *", name = "points"}, {type = "int", name = "pointCount"}, {type = "Color", name = "color"} } @@ -6152,7 +6152,7 @@ return { returnType = "void", params = { {type = "Image *", name = "dst"}, - {type = "Vector2 *", name = "points"}, + {type = "const Vector2 *", name = "points"}, {type = "int", name = "pointCount"}, {type = "Color", name = "color"} } diff --git a/parser/output/raylib_api.txt b/parser/output/raylib_api.txt index 2f44d94cc..4de3e267a 100644 --- a/parser/output/raylib_api.txt +++ b/parser/output/raylib_api.txt @@ -3185,7 +3185,7 @@ Function 352: ImageDrawTriangleFan() (4 input parameters) Return type: void Description: Draw a triangle fan defined by points within an image (first vertex is the center) Param[1]: dst (type: Image *) - Param[2]: points (type: Vector2 *) + Param[2]: points (type: const Vector2 *) Param[3]: pointCount (type: int) Param[4]: color (type: Color) Function 353: ImageDrawTriangleStrip() (4 input parameters) @@ -3193,7 +3193,7 @@ Function 353: ImageDrawTriangleStrip() (4 input parameters) Return type: void Description: Draw a triangle strip defined by points within an image Param[1]: dst (type: Image *) - Param[2]: points (type: Vector2 *) + Param[2]: points (type: const Vector2 *) Param[3]: pointCount (type: int) Param[4]: color (type: Color) Function 354: ImageDraw() (5 input parameters) diff --git a/parser/output/raylib_api.xml b/parser/output/raylib_api.xml index 52f7f5b1d..e79e55f4f 100644 --- a/parser/output/raylib_api.xml +++ b/parser/output/raylib_api.xml @@ -2090,13 +2090,13 @@ - + - +