63 lines
803 B
C++
63 lines
803 B
C++
#ifndef DNA_H
|
|
#define DNA_H
|
|
|
|
#include <cinttypes>
|
|
#include <array>
|
|
|
|
#include <raylib.h>
|
|
|
|
#define MAX_DEPTH 8
|
|
|
|
struct uint128
|
|
{
|
|
uint32_t a;
|
|
uint32_t b;
|
|
uint32_t c;
|
|
uint32_t d;
|
|
};
|
|
|
|
struct Moon
|
|
{
|
|
float x;
|
|
float y;
|
|
float size;
|
|
};
|
|
|
|
struct Branch
|
|
{
|
|
uint8_t colorR;
|
|
uint8_t colorG;
|
|
uint8_t colorB;
|
|
int8_t colorR_change;
|
|
int8_t colorG_change;
|
|
int8_t colorB_change;
|
|
uint8_t color_var;
|
|
|
|
uint8_t size;
|
|
uint8_t size_parent;
|
|
uint8_t size_level;
|
|
uint8_t size_change;
|
|
uint8_t size_var;
|
|
|
|
uint8_t length;
|
|
uint8_t length_var;
|
|
|
|
uint8_t branch_count;
|
|
uint8_t branch_angle_var;
|
|
};
|
|
|
|
struct Dna
|
|
{
|
|
Moon moon;
|
|
int colorSet;
|
|
int time;
|
|
uint128 mountenSeed;
|
|
uint128 starSeed;
|
|
uint128 branchSeed;
|
|
Branch branches[MAX_DEPTH];
|
|
};
|
|
|
|
void newDna(Dna &dna);
|
|
|
|
#endif /* DNA_H */
|