CBuildingHandler.h 1.1 KB

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