CGeneralTextHandler.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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, 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::string> tavernInfo;
  30. std::vector<std::vector<std::string> > townNames; //[type id] => vec of names of instances
  31. std::vector<std::string> townTypes; //castle, rampart, tower, etc
  32. std::map<int, std::map<int, std::pair<std::string, std::string> > > buildings; //map[town id][building id] => pair<name, description>
  33. std::vector<std::pair<std::string,std::string> > zelp;
  34. std::string lossCondtions[4];
  35. std::string victoryConditions[14];
  36. //objects
  37. std::vector<std::string> names; //vector of objects; i-th object in vector has subnumber i
  38. std::vector<std::string> creGens; //names of creatures' generators
  39. std::vector<std::string> advobtxt;
  40. std::vector<std::string> xtrainfo;
  41. std::vector<std::string> restypes;
  42. std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
  43. //sec skills
  44. std::vector <std::string> skillName;
  45. std::vector <std::vector <std::string> > skillInfoTexts; //[id][level] : level 0 - basic; 2 - advanced
  46. std::vector<std::string> levels;
  47. std::string getTitle(std::string text);
  48. std::string getDescr(std::string text);
  49. void load();
  50. CGeneralTextHandler();
  51. };
  52. #endif // __CGENERALTEXTHANDLER_H__