CBuildingHandler.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 CGBuilding
  17. //{
  18. // int ID, subID;
  19. //
  20. // struct {
  21. // int x, y;
  22. // } pos;
  23. //
  24. // bool allowed;
  25. // bool built;
  26. //
  27. // std::string name, description
  28. //};
  29. class CBuildingHandler
  30. {
  31. public:
  32. std::vector<CBuilding> buildings; //vector of buildings
  33. std::vector<CBuilding> resourceSilos; //vector with resource silos only - for castle profiled descriptions
  34. std::vector<CBuilding> grails; //vector with grail - type buildings only - for castle profiled descriptions
  35. std::vector<CBuilding> blacksmiths; //vector with names and descriptions for blacksmith (castle - dependent)
  36. CBuilding blacksmith; //global name and description for blacksmiths
  37. CBuilding moat; //description and name of moat
  38. CBuilding shipyard; //castle - independent name and description of shipyard
  39. CBuilding shipyardWithShip; //name and description for shipyard with ship
  40. CBuilding artMerchant; //name and description of artifact merchant
  41. CBuilding l1horde, l2horde, l3horde, l4horde, l5horde; //castle - independent horde names and descriptions
  42. CBuilding grail; //castle - independent grail description
  43. CBuilding resSilo; //castle - independent resource silo name and description
  44. void loadBuildings(); //main loader, calls loading functions below
  45. void loadNames(); //loads castle - specufuc names and descriptoins
  46. void loadNeutNames(); //loads castle independent names and descriptions
  47. void loadDwellingNames(); //load names for dwellgins
  48. };
  49. #endif //CBUILDINGHANDLER_H