local instructions

This commit is contained in:
vrd
2023-11-02 21:25:56 +02:00
parent 6a71d7e13c
commit bc5e5d1deb
11 changed files with 210 additions and 166 deletions
+10 -10
View File
@@ -5,6 +5,10 @@
#include "person.hpp"
using person_id = U32;
enum: person_id {
Nobody = UINT32_MAX
};
enum RelType : U8
{
None = 0,
@@ -24,16 +28,12 @@ struct Relation
RelType type;
};
enum: person_id {
Nobody = UINT_MAX
};
class Tree
{
public:
Tree() = default;
template <class Str>
explicit Tree(Str&& Name) : treeName(std::forward<Str>(Name)) {}
explicit Tree(Str&& Name) : treeName_(std::forward<Str>(Name)) {}
/* Tree(const Tree&) = default; */
/* Tree& operator= (const Tree& other); */
@@ -96,17 +96,17 @@ private:
void selectLeftSibSpouse(person_id);
void selectRightSib(person_id);
std::string treeName;
std::vector<Person> people; //The data for each member
std::vector<std::vector<Relation>> relations; //The relatives of each member
std::string treeName_;
std::vector<Person> people_; //The data for each member
std::vector<std::vector<Relation>> relations_; //The relatives of each member
person_id focused_ = 0; /* the tree was draw based on this person */
person_id selected_ = 0;
I16 offsetX_ = 0; /* offset of the tree in relation to the screen*/
I16 offsetY_ = 0;
U8 zoom_ = 0;
U8 dist_between_ = 1; /* distance between people */
U8 spouse_dist_ = 0; /* distance between spouses */
U8 dist_between_ = 1; /* distance between people */
U8 spouse_dist_ = 0; /* distance between spouses */
//Search, ect.
};