CGeneralTextHandler.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef __CGENERALTEXTHANDLER_H__
  2. #define __CGENERALTEXTHANDLER_H__
  3. #include "../global.h"
  4. #include <string>
  5. #include <vector>
  6. DLL_EXPORT void loadToIt(std::string &dest, std::string &src, int &iter, int mode);
  7. std::string readTo(std::string &in, unsigned int &it, char end);
  8. class DLL_EXPORT CGeneralTextHandler //Handles general texts
  9. {
  10. public:
  11. class HeroTexts
  12. {
  13. public:
  14. std::string bonusName, shortBonus, longBonus; //for special abilities
  15. std::string biography; //biography, of course
  16. };
  17. std::vector<HeroTexts> hTxts;
  18. std::vector<std::string> allTexts;
  19. std::vector<std::string> arraytxt;
  20. std::vector<std::string> primarySkillNames;
  21. std::vector<std::string> jktexts;
  22. std::vector<std::string> heroscrn;
  23. //artifacts
  24. std::vector<std::string> artifEvents;
  25. std::vector<std::string> artifNames;
  26. std::vector<std::string> artifDescriptions;
  27. //towns
  28. std::vector<std::string> tcommands, hcommands; //texts for town screen and town hall screen
  29. std::vector<std::vector<std::string> > townNames; //[type id] => vec of names of instances
  30. std::vector<std::string> townTypes; //castle, rampart, tower, etc
  31. std::map<int, std::map<int, std::pair<std::string, std::string> > > buildings; //map[town id][building id] => pair<name, description>
  32. std::vector<std::pair<std::string,std::string> > zelp;
  33. std::string lossCondtions[4];
  34. std::string victoryConditions[14];
  35. std::string getTitle(std::string text);
  36. std::string getDescr(std::string text);
  37. void loadTexts();
  38. void load();
  39. };
  40. #endif // __CGENERALTEXTHANDLER_H__