CBuildingHandler.h 1.1 KB

12345678910111213141516171819202122232425
  1. #ifndef CBUILDINGHANDLER_H
  2. #define CBUILDINGHANDLER_H
  3. #include "../global.h"
  4. #include <map>
  5. //enum EbuildingType {NEUTRAL=-1, CASTLE, RAMPART, TOWER, INFERNO, NECROPOLIS, DUNGEON, STRONGHOLD, FORTRESS, CONFLUX};
  6. class DLL_EXPORT CBuilding //a typical building encountered in every castle ;]
  7. {
  8. public:
  9. std::string name;
  10. std::string refName; //reference name, for identification
  11. int resources[7];
  12. std::string description;
  13. //EbuildingType type; //type of building (occures in many castles or is specific for one castle)
  14. //bool isDwelling; //true, if this building is a dwelling
  15. };
  16. class DLL_EXPORT CBuildingHandler
  17. {
  18. public:
  19. std::map<int, std::map<int, CBuilding*> > buildings; ///< first int is the castle ID, second the building ID (in ERM-U format)
  20. 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
  21. void loadBuildings(); //main loader
  22. };
  23. #endif //CBUILDINGHANDLER_H