1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-28 03:57:02 +02:00
vcmi/hch/CBuildingHandler.h

27 lines
1.1 KiB
C
Raw Normal View History

#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>
#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 ;]
{
public:
std::string name;
std::string refName; //reference name, for identification
std::vector<int> resources;
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
};
2008-06-19 06:08:05 +00:00
class DLL_EXPORT CBuildingHandler
{
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
};
#endif //CBUILDINGHANDLER_H