CBuildingHandler.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef CBUILDINGHANDLER_H
  2. #define CBUILDINGHANDLER_H
  3. #include <vector>
  4. #include <string>
  5. enum EbuildingType {NEUTRAL=0, 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 wood, mercury, ore, sulfur, crystal, gems, gold;
  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::vector<CBuilding> buildings; //vector of buildings
  20. std::vector<CBuilding> resourceSilos; //vector with resource silos only - for castle profiled descriptions
  21. std::vector<CBuilding> grails; //vector with grail - type buildings only - for castle profiled descriptions
  22. std::vector<CBuilding> blacksmiths; //vector with names and descriptions for blacksmith (castle - dependent)
  23. CBuilding blacksmith; //global name and description for blacksmiths
  24. CBuilding moat; //description and name of moat
  25. CBuilding shipyard; //castle - independent name and description of shipyard
  26. CBuilding shipyardWithShip; //name and description for shipyard with ship
  27. CBuilding artMerchant; //name and description of artifact merchant
  28. CBuilding l1horde, l2horde, l3horde, l4horde, l5horde; //castle - independent horde names and descriptions
  29. CBuilding grail; //castle - independent grail description
  30. CBuilding resSilo; //castle - independent resource silo name and description
  31. void loadBuildings(); //main loader, calls loading functions below
  32. void loadNames(); //loads castle - specufuc names and descriptoins
  33. void loadNeutNames(); //loads castle independent names and descriptions
  34. void loadDwellingNames(); //load names for dwellgins
  35. };
  36. #endif //CBUILDINGHANDLER_H