CGeneralTextHandler.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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, const std::string &src, int &iter, int mode);
  16. std::string readTo(const 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. std::vector<std::string> colors; //names of player colors ("red",...)
  34. std::vector<std::string> capColors; //names of player colors with first letter capitalized ("Red",...)
  35. //artifacts
  36. std::vector<std::string> artifEvents;
  37. std::vector<std::string> artifNames;
  38. std::vector<std::string> artifDescriptions;
  39. //towns
  40. std::vector<std::string> tcommands, hcommands, fcommands; //texts for town screen, town hall screen and fort screen
  41. std::vector<std::string> tavernInfo;
  42. std::vector<std::vector<std::string> > townNames; //[type id] => vec of names of instances
  43. std::vector<std::string> townTypes; //castle, rampart, tower, etc
  44. std::map<int, std::map<int, std::pair<std::string, std::string> > > buildings; //map[town id][building id] => pair<name, description>
  45. std::vector<std::pair<std::string,std::string> > zelp;
  46. std::string lossCondtions[4];
  47. std::string victoryConditions[14];
  48. //objects
  49. std::vector<std::string> names; //vector of objects; i-th object in vector has subnumber i
  50. std::vector<std::string> creGens; //names of creatures' generators
  51. std::vector<std::string> creGens4; //names of multiple creatures' generators
  52. std::vector<std::string> advobtxt;
  53. std::vector<std::string> xtrainfo;
  54. std::vector<std::string> restypes; //names of resources
  55. std::vector<std::string> terrainNames;
  56. std::vector<std::string> randsign;
  57. std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
  58. std::vector<std::string> seerEmpty;
  59. std::vector <std::vector <std::vector <std::string> > > quests; //[quest][type][index]
  60. //type: quest, progress, complete, rollover, log OR time limit //index: 0-2 seer hut, 3-5 border guard
  61. std::vector<std::string> seerNames;
  62. //sec skills
  63. std::vector <std::string> skillName;
  64. std::vector <std::vector <std::string> > skillInfoTexts; //[id][level] : level 0 - basic; 2 - advanced
  65. std::vector<std::string> levels;
  66. //campaigns
  67. std::vector <std::string> campaignMapNames;
  68. std::vector < std::vector <std::string> > campaignRegionNames;
  69. std::string getTitle(const std::string & text);
  70. std::string getDescr(const std::string & text);
  71. void load();
  72. CGeneralTextHandler();
  73. };
  74. #endif // __CGENERALTEXTHANDLER_H__