summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2023-08-12 18:45:59 +0200
committerRay <[email protected]>2023-08-12 18:45:59 +0200
commitd873d0f173a2e12dce039132fe91fcd70923d98e (patch)
tree004f719c8d88809f10999dfd87da9adb162bff0a /src
parent9161c55d5970f4e7a7fe2a21606f92cfcecf2cd3 (diff)
downloadraylib-d873d0f173a2e12dce039132fe91fcd70923d98e.tar.gz
raylib-d873d0f173a2e12dce039132fe91fcd70923d98e.zip
ISSUE: `DrawLineCatmullRom()`, needs review
Diffstat (limited to 'src')
-rw-r--r--src/rshapes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rshapes.c b/src/rshapes.c
index 655f683d..98552f26 100644
--- a/src/rshapes.c
+++ b/src/rshapes.c
@@ -429,8 +429,6 @@ void DrawLineCatmullRom(Vector2 *points, int pointCount, float thick, Color colo
float t = 0.0f;
Vector2 p1 = points[i], p2 = points[i + 1], p3 = points[i + 2], p4 = points[i + 3];
- currentPoint = points[i];
-
if (i > 0)
{
vertices[0].x = currentPoint.x + dy*size;
@@ -439,7 +437,9 @@ void DrawLineCatmullRom(Vector2 *points, int pointCount, float thick, Color colo
vertices[1].y = currentPoint.y + dx*size;
}
- for (int i = 0; i <= SPLINE_LINE_DIVISIONS; i++)
+ // TODO: Something is wrong with this implementation,
+ // it should use 'j' instead of 'i' but it does not work...
+ for (int i = 1; i <= SPLINE_LINE_DIVISIONS; i++)
{
t = ((float)i)/((float)SPLINE_LINE_DIVISIONS);