From eb7d8d97100ec5273b93b7aeacd75f0f9e5bd018 Mon Sep 17 00:00:00 2001 From: David Buzatto Date: Sat, 29 Nov 2025 22:21:46 -0300 Subject: [PATCH] stack cleanup --- examples/shapes/shapes_penrose_tile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/shapes/shapes_penrose_tile.c b/examples/shapes/shapes_penrose_tile.c index 8883f0eb5..a44c94924 100644 --- a/examples/shapes/shapes_penrose_tile.c +++ b/examples/shapes/shapes_penrose_tile.c @@ -22,7 +22,7 @@ #include "raylib.h" #define STR_MAX_SIZE 10000 -#define TURTLE_STACK_MAX_SIZE 2500 +#define TURTLE_STACK_MAX_SIZE 50 typedef struct TurtleState { Vector2 origin; @@ -149,6 +149,9 @@ void DrawPenroseLSystem(PenroseLSystem *ls) repeats = (int) step - 48; } } + + turtleTop = -1; + } void BuildProductionStep(PenroseLSystem *ls) @@ -187,7 +190,6 @@ void BuildProductionStep(PenroseLSystem *ls) void BuildPenroseLSystem(PenroseLSystem *ls, float drawLength, int generations) { *ls = CreatePenroseLSystem(drawLength); - turtleTop = -1; for (int i = 0; i < generations; i++) { BuildProductionStep(ls);