Fix classique titles display
[ryzomcore.git] / ryzom / client / src / client_sheets / race_stats_sheet.h
blob5b83a40c836eebc94db5098234489cefd8ec9574
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/>.
18 #ifndef CL_RACE_STATS_SHEET_H
19 #define CL_RACE_STATS_SHEET_H
21 // Application
22 #include "entity_sheet.h"
23 #include "ground_fx_sheet.h"
24 #include "body_to_bone_sheet.h"
25 // Game Share
26 #include "game_share/people.h"
27 #include "game_share/slot_types.h"
28 #include "game_share/characteristics.h"
31 //=======================================================================================================
32 namespace NLGEORGES
34 class UFormElm;
37 /** Per Gender Infos. Used by RaceStats sheets
39 struct CGenderInfo
41 static const std::string UnknownItemName;
44 // skel
45 std::string Skelfilename;
46 // Anim set base name
47 std::string AnimSetBaseName;
48 // default equipment, sheath are not included
49 std::string Items[SLOTTYPE::NB_SLOT];
51 std::string LodCharacterName;
52 float LodCharacterDistance;
53 // value to scale the "pos" channel of the animation of the player.
54 float CharacterScalePos;
55 // ground fxs
56 std::vector<CGroundFXSheet> GroundFX;
58 // Blendshapes minimum and maximum values
59 float BlendShapeMin[8], BlendShapeMax[8];
61 // Name positions on Z axis
62 float NamePosZLow;
63 float NamePosZNormal;
64 float NamePosZHigh;
66 /////////////////////////////////////////////////////////////////////////////////////////////////////
67 /////////////////////////////////////////////////////////////////////////////////////////////////////
68 // ctor
69 CGenderInfo();
70 /// Build
71 void build(const NLGEORGES::UFormElm &form, const std::string &prefix);
72 /// Serialize
73 void serial(NLMISC::IStream &f);
75 /// Get the item name for a given slot.
76 const std::string &getItemName(SLOTTYPE::EVisualSlot slot) const;
80 //=======================================================================================================
82 /** Class to manage .race_stats sheets
84 class CRaceStatsSheet : public CEntitySheet
86 public:
87 enum { NumAttackLists = 8 };
88 EGSPD::CPeople::TPeople People;
89 // Start characteristics values for this race
90 sint8 CharacStartValue[CHARACTERISTICS::NUM_CHARACTERISTICS];
91 // Per gender infos. 0 is for male and 1 is for female
92 CGenderInfo GenderInfos[2];
93 /// Skin to use for this race.
94 uint8 Skin;
95 // Automaton Type
96 std::string Automaton;
97 // Body to bone. For meleeImpact localisation
98 CBodyToBoneSheet BodyToBone;
99 // attack lists filenames
100 std::vector<NLMISC::TSStringId> AttackLists;
101 public:
102 // ctor
103 CRaceStatsSheet();
105 virtual void build(const NLGEORGES::UFormElm &item);
106 /// Serialize rce_stats sheet into binary data file.
107 virtual void serial(NLMISC::IStream &f);
108 private:
109 void buildGroundFXs(const NLGEORGES::UFormElm &item, const std::string &name, std::vector<CGroundFXSheet> &dest);
114 #endif