2007-06-10 18:04:15 +00:00
# ifndef CBUILDINGHANDLER_H
# define CBUILDINGHANDLER_H
2008-03-02 13:16:11 +00:00
# include "../global.h"
2008-03-02 18:16:08 +00:00
# include <map>
2008-08-01 11:21:15 +00:00
# include <vector>
2008-03-02 18:16:08 +00:00
//enum EbuildingType {NEUTRAL=-1, CASTLE, RAMPART, TOWER, INFERNO, NECROPOLIS, DUNGEON, STRONGHOLD, FORTRESS, CONFLUX};
2008-06-19 06:08:05 +00:00
class DLL_EXPORT CBuilding //a typical building encountered in every castle ;]
2007-06-10 18:04:15 +00:00
{
public :
std : : string name ;
std : : string refName ; //reference name, for identification
2008-08-01 11:21:15 +00:00
std : : vector < int > resources ;
2007-06-10 18:04:15 +00:00
std : : string description ;
2008-03-02 18:16:08 +00:00
//EbuildingType type; //type of building (occures in many castles or is specific for one castle)
//bool isDwelling; //true, if this building is a dwelling
2007-06-10 18:04:15 +00:00
} ;
2008-06-19 06:08:05 +00:00
class DLL_EXPORT CBuildingHandler
2007-06-10 18:04:15 +00:00
{
public :
2008-03-02 18:16:08 +00:00
std : : map < int , std : : map < int , CBuilding * > > buildings ; ///< first int is the castle ID, second the building ID (in ERM-U format)
2008-03-09 23:06:35 +00:00
std : : map < int , std : : pair < std : : string , std : : vector < std : : vector < std : : vector < int > > > > > hall ; //map<castle ID, pair<hall bg name, std::vector< std::vector<building id> >[5]> - external vector is the vector of buildings in the row, internal is the list of buildings for the specific slot
void loadBuildings ( ) ; //main loader
2007-06-10 18:04:15 +00:00
} ;
2008-08-02 15:08:03 +00:00
# endif //CBUILDINGHANDLER_H