CGeneralTextHandler.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #ifndef __CGENERALTEXTHANDLER_H__
  2. #define __CGENERALTEXTHANDLER_H__
  3. #include "../global.h"
  4. #include <string>
  5. #include <vector>
  6. /*
  7. * CGeneralTextHandler.h, part of VCMI engine
  8. *
  9. * Authors: listed in file AUTHORS in main folder
  10. *
  11. * License: GNU General Public License v2.0 or later
  12. * Full text of license available in license.txt file, in main folder
  13. *
  14. */
  15. DLL_EXPORT void loadToIt(std::string &dest, std::string &src, int &iter, int mode);
  16. std::string readTo(std::string &in, int &it, char end);
  17. class DLL_EXPORT CGeneralTextHandler //Handles general texts
  18. {
  19. public:
  20. class HeroTexts
  21. {
  22. public:
  23. std::string bonusName, shortBonus, longBonus; //for special abilities
  24. std::string biography; //biography, of course
  25. };
  26. std::vector<HeroTexts> hTxts;
  27. std::vector<std::string> allTexts;
  28. std::vector<std::string> arraytxt;
  29. std::vector<std::string> primarySkillNames;
  30. std::vector<std::string> jktexts;
  31. std::vector<std::string> heroscrn;
  32. std::vector<std::string> overview;//text for Kingdom Overview window
  33. //artifacts
  34. std::vector<std::string> artifEvents;
  35. std::vector<std::string> artifNames;
  36. std::vector<std::string> artifDescriptions;
  37. //towns
  38. std::vector<std::string> tcommands, hcommands, fcommands; //texts for town screen, town hall screen and fort screen
  39. std::vector<std::string> tavernInfo;
  40. std::vector<std::vector<std::string> > townNames; //[type id] => vec of names of instances
  41. std::vector<std::string> townTypes; //castle, rampart, tower, etc
  42. std::map<int, std::map<int, std::pair<std::string, std::string> > > buildings; //map[town id][building id] => pair<name, description>
  43. std::vector<std::pair<std::string,std::string> > zelp;
  44. std::string lossCondtions[4];
  45. std::string victoryConditions[14];
  46. //objects
  47. std::vector<std::string> names; //vector of objects; i-th object in vector has subnumber i
  48. std::vector<std::string> creGens; //names of creatures' generators
  49. std::vector<std::string> creGens4; //names of multiple creatures' generators
  50. std::vector<std::string> advobtxt;
  51. std::vector<std::string> xtrainfo;
  52. std::vector<std::string> restypes;
  53. std::vector<std::string> terrainNames;
  54. std::vector<std::string> randsign;
  55. std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
  56. std::vector<std::string> seerEmpty;
  57. std::vector <std::vector <std::vector <std::string> > > quests; //[quest][type][index]
  58. //type: quest, progress, complete, rollover, log OR time limit //index: 0-2 seer hut, 3-5 border guard
  59. std::vector<std::string> seerNames;
  60. //sec skills
  61. std::vector <std::string> skillName;
  62. std::vector <std::vector <std::string> > skillInfoTexts; //[id][level] : level 0 - basic; 2 - advanced
  63. std::vector<std::string> levels;
  64. std::string getTitle(std::string text);
  65. std::string getDescr(std::string text);
  66. void load();
  67. CGeneralTextHandler();
  68. };
  69. #endif // __CGENERALTEXTHANDLER_H__