Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / client / src / client_sheets / player_sheet.h
blobf660980cc1075d3492de96d126eb7c9580891784
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef CL_PLAYER_SHEET_H
21 #define CL_PLAYER_SHEET_H
24 /////////////
25 // INCLUDE //
26 /////////////
27 // Misc
28 #include "nel/misc/types_nl.h"
29 // Application
30 #include "entity_sheet.h"
31 // Game share
32 #include "game_share/people.h"
33 #include "game_share/characteristics.h"
34 #include "game_share/slot_types.h"
35 #include "game_share/skills_build.h"
36 // std
37 #include <vector>
38 #include <string>
41 ///////////
42 // CLASS //
43 ///////////
44 //struct CSkillSummary;
46 namespace NLGEORGES
48 class UFormElm;
49 class UFormLoader;
52 /**
53 * Class to manage the player sheet.
54 * \author Guillaume PUZIN (GUIGUI)
55 * \author Nevrax France
56 * \date 2001
58 class CPlayerSheet : public CEntitySheet
60 public:
61 struct CEquipment
63 std::string Item; // name of the '.item'
64 sint8 Color;
66 /// Build the sheet from an external script.
67 virtual void build(const std::string &key, const NLGEORGES::UFormElm &item);
68 /// Serialize
69 virtual void serial(NLMISC::IStream &f)
71 f.serial(Item, Color);
75 public:
76 std::string SkelFilename;
77 std::string AnimSetBaseName;
78 float Scale;
79 // Lod Character.
80 std::string LodCharacterName;
81 float LodCharacterDistance;
82 // value to scale the "pos" channel of the animation of the player.
83 float CharacterScalePos;
84 // People of the player (FYROS, MATIS, ...)
85 EGSPD::CPeople::TPeople People;
86 // Default player look.
87 std::string DefaultFace;
88 std::string DefaultChest;
89 std::string DefaultLegs;
90 std::string DefaultArms;
91 std::string DefaultHands;
92 std::string DefaultFeet;
93 std::string DefaultHair;
94 // Player Gender.
95 uint8 Gender;
97 // Equipment for player
98 CEquipment Body;
99 CEquipment Legs;
100 CEquipment Arms;
101 CEquipment Hands;
102 CEquipment Feet;
103 CEquipment Head;
104 CEquipment Face;
105 CEquipment ObjectInRightHand;
106 CEquipment ObjectInLeftHand;
107 CEquipment Headdress;
108 CEquipment EarL;
109 CEquipment EarR;
110 CEquipment Neck;
111 CEquipment Shoulders;
112 CEquipment Back;
113 CEquipment WristL;
114 CEquipment WristR;
115 CEquipment FingerL;
116 CEquipment FingerR;
117 CEquipment AnkleL;
118 CEquipment AnkleR;
119 CEquipment Ammo;
121 // caracs
122 uint16 Characteristics[CHARACTERISTICS::NUM_CHARACTERISTICS];
123 // skills
124 std::vector<CSkillSummary> Skills;
127 public:
128 /// Constructor
129 CPlayerSheet();
131 /// Build the sheet from an external script.
132 virtual void build(const NLGEORGES::UFormElm &item);
134 /// Serialize character sheet into binary data file.
135 virtual void serial(NLMISC::IStream &f);
138 private:
139 void buildCharac(const NLGEORGES::UFormElm &item);
142 #endif // CL_PLAYER_SHEET_H
144 /* End of player_sheet.h */