CBuildingHandler.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 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 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::vector<CBuilding> buildings; //vector of buildings
  21. //std::vector<CBuilding> resourceSilos; //vector with resource silos only - for castle profiled descriptions
  22. //std::vector<CBuilding> grails; //vector with grail - type buildings only - for castle profiled descriptions
  23. //std::vector<CBuilding> blacksmiths; //vector with names and descriptions for blacksmith (castle - dependent)
  24. //CBuilding blacksmith; //global name and description for blacksmiths
  25. //CBuilding moat; //description and name of moat
  26. //CBuilding shipyard; //castle - independent name and description of shipyard
  27. //CBuilding shipyardWithShip; //name and description for shipyard with ship
  28. //CBuilding artMerchant; //name and description of artifact merchant
  29. //CBuilding l1horde, l2horde, l3horde, l4horde, l5horde; //castle - independent horde names and descriptions
  30. //CBuilding grail; //castle - independent grail description
  31. //CBuilding resSilo; //castle - independent resource silo name and description
  32. void loadBuildings(); //main loader, calls loading functions below
  33. void loadNames(); //loads castle - specufuc names and descriptoins
  34. void loadNeutNames(); //loads castle independent names and descriptions
  35. void loadDwellingNames(); //load names for dwellgins
  36. };
  37. #endif //CBUILDINGHANDLER_H