ScummVM API documentation
person.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /*
23  * This code is based on the CRAB engine
24  *
25  * Copyright (c) Arvind Raja Yadav
26  *
27  * Licensed under MIT
28  *
29  */
30 
31 #ifndef CRAB_PERSON_H
32 #define CRAB_PERSON_H
33 
34 #include "crab/stat/StatTemplate.h"
35 #include "crab/people/opinion.h"
36 #include "crab/people/personbase.h"
37 #include "crab/people/trait.h"
38 
39 namespace Crab {
40 
41 namespace pyrodactyl {
42 namespace people {
43 struct Person {
44  // The id of the object
45  Common::String _id;
46 
47  // Opinion of the person towards the player
48  Opinion _opinion;
49 
50  // The state of the object, defines what behavior it is doing right now
51  PersonState _state;
52 
53  // The stats of the character
55 
56  // Name of object
57  Common::String _name;
58 
59  // Type of object
60  PersonType _type;
61 
62  // Sometimes a person's journal entry isn't the same as their name
63  Common::String _journalName;
64 
65  // If this is true, use the alternate journal name instead
66  bool _altJournalName;
67 
68  // The picture of the object - DISABLED DUE TO LOW BUDGET
69  // ImageKey pic;
70 
71  // The trigger areas the person is in right now
72  Common::Array<int> _trig;
73 
74  // The traits of a person
75  Common::Array<Trait> _trait;
76 
77  Person();
78  void load(rapidxml::xml_node<char> *node, const pyrodactyl::stat::StatTemplates &stem);
79 
80  void reset();
81  void validate();
82 
83  void saveState(rapidxml::xml_document<> &doc, rapidxml::xml_node<char> *root);
84  void loadState(rapidxml::xml_node<char> *node);
85 };
86 
88 } // End of namespace people
89 } // End of namespace pyrodactyl
90 
91 } // End of namespace Crab
92 
93 #endif // CRAB_PERSON_H
Definition: str.h:59
Definition: person.h:43
Definition: opinion.h:53
Definition: StatTemplate.h:42
Definition: moveeffect.h:37