Fix classique titles display
[ryzomcore.git] / ryzom / client / src / hair_set.h
blob7b6eb21baa9532587b1889252e0e1d63d925dd68
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/>.
19 #ifndef CL_HAIR_SET_H
20 #define CL_HAIR_SET_H
22 #include "game_share/people.h"
24 namespace NLMISC
26 class IProgressCallback;
29 /** Records which hair item are valid for one race
30 * \author Nicolas Vizerie
31 * \author Nevrax France
32 * \date 2002
34 class CHairSet
36 public:
37 /** Init the hair item after all the sheets have been loaded
39 void init (NLMISC::IProgressCallback &progress);
41 // remove all infos about hairs
42 void clear();
44 /** get the number of hair item for the given race
46 uint getNumHairItem(EGSPD::CPeople::TPeople people) const;
48 /** get hair item id in sheet manager for the race
49 * or -1 if index is invalid
51 sint getHairItemId(EGSPD::CPeople::TPeople people, uint index) const;
53 // Tells whether this id in the sheet manager is the id of a hair item
54 bool isHairItemId(uint id) const;
56 // Gives the people for this hair id in the sheet manager, or unknown if not found
57 EGSPD::CPeople::TPeople getPeopleFromHairItemID(uint id) const;
60 /** Get the index of an hair item form its id in the sheet manager, or -1 if not found
62 sint getHairItemFromId(EGSPD::CPeople::TPeople people, uint Id) const;
64 private:
65 enum EPeople { Fyros = 0, Matis, Tryker, Zorai, NumPeople, DontKnow };
66 typedef std::vector<uint> TIntArray;
67 private:
68 TIntArray _Hairs[NumPeople]; // 4 races
69 private:
70 static EPeople convPeople(EGSPD::CPeople::TPeople people);
71 static EGSPD::CPeople::TPeople convPeople(EPeople people);
76 // the only instance of hair_set
78 extern CHairSet HairSet;
80 #endif