Use configured resolution for login/outgame/ingame
[ryzomcore.git] / ryzom / tools / leveldesign / mp_generator / moulinette.h
blobf5ad6f98a68e93f2ac7116f8fa8b072075351e72
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/>.
17 #ifndef MOULINETTE_H_
18 #define MOULINETTE_H_
21 //////////////////////////////////
22 // INCLUDE FILES //
23 //////////////////////////////////
24 #include <nel/misc/types_nl.h>
25 #include <nel/misc/sstring.h>
26 #include "nel/misc/path.h"
27 #include <nel/misc/file.h>
29 //////////////////////////////////
30 // USED NAMESPACES //
31 //////////////////////////////////
32 using namespace NLMISC;
33 using namespace std;
36 //////////////////////////////////
37 // DATA STRUCTURES //
38 //////////////////////////////////
40 enum
42 NumMPStats= 34,
43 NumMPCraftParts= 26, // Warning: changing this value won't be sufficient.
44 // You'll have to look deeper into code
47 // Contains Craft Part description and different stats related
48 struct CraftPart
50 CSString Desc;
51 bool Carac[NumMPStats];
54 // Raw mats stats for craft
55 struct MPCraftStats
57 CSString Craft;
58 bool UsedAsCraftRequirement;
59 int bestStatA;
60 int worstStatA1;
61 int worstStatA2;
62 int bestStatB;
63 int worstStatB1;
64 int worstStatB2;
65 int color;
67 MPCraftStats()
69 UsedAsCraftRequirement= false;
73 // Allows to sort strings
74 struct ItemSort : public std::less<NLMISC::CSString>
76 bool operator()( const NLMISC::CSString& x, const NLMISC::CSString& y ) const
78 return x.icompare( y );
81 typedef set<CSString, ItemSort> CSortedStringSet;
83 // Describe a item generated for a creature raw mat
84 struct CreatureMPItem
86 char eco;
87 int itemLevel;
88 int creatureLevel;
89 CSString codeCreature;
90 CSortedStringSet generatedItems;
91 CSString creatureFileName;
93 typedef list<CreatureMPItem*> ListeCreatureMP;
95 // Misc Info on a MP family
96 class CExtraInfo
98 public:
99 bool DropOrSell;
101 CExtraInfo()
103 DropOrSell= false;
107 //////////////////////////////////
108 // GLOBAL VARIABLES //
109 //////////////////////////////////
111 // Craft parts list
112 CraftPart craftParts[NumMPCraftParts];
114 // .creature files list
115 map<string, string> creatureFiles;
117 // generated names for each item
118 CSortedStringSet itemNames;
120 // Items list to generate for each creature code
121 map<CSString, ListeCreatureMP> itemsAGenerer;
123 // MP Family list
124 class CMPFamily
126 public:
127 // Name of the family
128 CSString Name;
129 // Icon
130 CSString Icon;
132 std::vector<CMPFamily> MPFamilies;
135 // directories pathes
136 CSString LEVEL_DESIGN_PATH;
137 CSString TRANSLATION_PATH;
139 CSString ITEM_MP_FAMILY_TYP;
140 CSString ITEM_MP_GROUPE_TYP;
141 CSString ITEM_MP_PARAM_DFN;
142 CSString MP_DIRECTORY;
143 CSString DEPOSIT_MPS;
144 CSString RAW_MATERIAL_ASSIGN;
145 CSString IC_FAMILIES_FORAGE_SOURCE;
147 CSString WK_UXT;
148 CSString ITEM_WORDS_WK;
150 #endif