X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcreature%2FGenome.hpp;h=b14efc1a756396dd405906786eaffe7f1bc96fea;hb=2ab70a92ae39cebc6166ef15545ebcbd31a31c38;hp=882a8a28f3b9c5e6acf1671c4a6883c944c9339c;hpb=838022c799cecd0e93826565e537a0667bded024;p=blobs.git diff --git a/src/creature/Genome.hpp b/src/creature/Genome.hpp index 882a8a2..b14efc1 100644 --- a/src/creature/Genome.hpp +++ b/src/creature/Genome.hpp @@ -3,6 +3,7 @@ #include "../math/Distribution.hpp" #include "../math/GaloisLFSR.hpp" +#include "../math/glm.hpp" #include @@ -22,6 +23,7 @@ struct Genome { T age; T mass; T fertility; + T highlight; }; template struct Properties { @@ -57,6 +59,10 @@ struct Genome { }; std::vector composition; + math::Distribution base_hue; + math::Distribution base_saturation; + math::Distribution base_lightness; + void Configure(Creature &) const; static PropertySet Instantiate( @@ -66,7 +72,8 @@ struct Genome { return { p.age.FakeNormal(rand.SNorm()), p.mass.FakeNormal(rand.SNorm()), - p.fertility.FakeNormal(rand.SNorm()) + p.fertility.FakeNormal(rand.SNorm()), + glm::clamp(p.highlight.FakeNormal(rand.SNorm()), 0.0, 1.0) }; }