David Buzatto 2 месяцев назад
Родитель
Сommit
eb7d8d9710
1 измененных файлов: 4 добавлений и 2 удалений
  1. +4
    -2
      examples/shapes/shapes_penrose_tile.c

+ 4
- 2
examples/shapes/shapes_penrose_tile.c Просмотреть файл

@ -22,7 +22,7 @@
#include "raylib.h" #include "raylib.h"
#define STR_MAX_SIZE 10000 #define STR_MAX_SIZE 10000
#define TURTLE_STACK_MAX_SIZE 2500
#define TURTLE_STACK_MAX_SIZE 50
typedef struct TurtleState { typedef struct TurtleState {
Vector2 origin; Vector2 origin;
@ -149,6 +149,9 @@ void DrawPenroseLSystem(PenroseLSystem *ls)
repeats = (int) step - 48; repeats = (int) step - 48;
} }
} }
turtleTop = -1;
} }
void BuildProductionStep(PenroseLSystem *ls) void BuildProductionStep(PenroseLSystem *ls)
@ -187,7 +190,6 @@ void BuildProductionStep(PenroseLSystem *ls)
void BuildPenroseLSystem(PenroseLSystem *ls, float drawLength, int generations) void BuildPenroseLSystem(PenroseLSystem *ls, float drawLength, int generations)
{ {
*ls = CreatePenroseLSystem(drawLength); *ls = CreatePenroseLSystem(drawLength);
turtleTop = -1;
for (int i = 0; i < generations; i++) for (int i = 0; i < generations; i++)
{ {
BuildProductionStep(ls); BuildProductionStep(ls);

Загрузка…
Отмена
Сохранить