X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcreature%2FMemory.hpp;h=192d03aab091574b30199dce1c70407ca3b585ef;hb=HEAD;hp=3bc39082b0741017ecae5bebcb69fd8776867eb8;hpb=392826deaf802ac0960ed3924a3f98b9d18d381b;p=blobs.git diff --git a/src/creature/Memory.hpp b/src/creature/Memory.hpp index 3bc3908..192d03a 100644 --- a/src/creature/Memory.hpp +++ b/src/creature/Memory.hpp @@ -19,8 +19,7 @@ class Memory { public: struct Location { world::Planet *planet; - int surface; - glm::ivec2 coords; + glm::dvec3 position; }; public: @@ -28,10 +27,18 @@ public: ~Memory(); public: - void Tick(double dt); - + /// remove all memories void Erase(); + /// try to remember where stuff was + /// when true, pos contains an approximation of the + /// location of the best fitting resource + bool RememberLocation(const Composition &, glm::dvec3 &pos) const noexcept; + + void TrackCollision(Creature &); + + void Tick(double dt); + private: /// track time spent on a tile void TrackStay(const Location &, double t); @@ -47,6 +54,11 @@ private: double time_spent; }; std::map known_types; + struct Profile { + double annoyance = 0.0; + double familiarity = 0.0; + }; + std::map known_creatures; };