CCreatureHandler.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef CCREATUREHANDLER_H
  2. #define CCREATUREHANDLER_H
  3. #include <string>
  4. #include <vector>
  5. class CCreature
  6. {
  7. public:
  8. std::string namePl, nameSing; //name in singular and plural form
  9. int wood, mercury, ore, sulfur, crystal, gems, gold, fightValue, AIValue, growth, hordeGrowth, hitPoints, speed, attack, defence, shots, spells;
  10. int low1, low2, high1, high2; //TODO - co to w ogóle jest???
  11. std::string abilityText; //description of abilities
  12. std::string abilityRefs; //references to abilities, in textformat
  13. int idNumber;
  14. ///animation info
  15. float timeBetweenFidgets, walkAnimationTime, attackAnimationTime, flightAnimationDistance;
  16. int upperRightMissleOffsetX, rightMissleOffsetX, lowerRightMissleOffsetX, upperRightMissleOffsetY, rightMissleOffsetY, lowerRightMissleOffsetY;
  17. float missleFrameAngles[12];
  18. int troopCountLocationOffset, attackClimaxFrame;
  19. ///end of anim info
  20. //TODO - zdolnoœci - na typie wyliczeniowym czy czymœ
  21. };
  22. class CCreatureSet //seven combined creatures
  23. {
  24. public:
  25. CCreature * slot1, * slot2, * slot3, * slot4, * slot5, * slot6, * slot7; //types of creatures on each slot
  26. unsigned int s1, s2, s3, s4, s5, s6, s7; //amounts of units in slots
  27. bool formation; //false - wide, true - tight
  28. };
  29. class CCreatureHandler
  30. {
  31. public:
  32. std::vector<CCreature> creatures;
  33. void loadCreatures();
  34. void loadAnimationInfo();
  35. void loadUnitAnimInfo(CCreature & unit, std::string & src, int & i);
  36. };
  37. #endif //CCREATUREHANDLER_H