CGeneralTextHandler.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #pragma once
  2. /*
  3. * CGeneralTextHandler.h, part of VCMI engine
  4. *
  5. * Authors: listed in file AUTHORS in main folder
  6. *
  7. * License: GNU General Public License v2.0 or later
  8. * Full text of license available in license.txt file, in main folder
  9. *
  10. */
  11. DLL_LINKAGE void loadToIt(std::string &dest, const std::string &src, int &iter, int mode);
  12. std::string readTo(const std::string &in, int &it, char end);
  13. class DLL_LINKAGE CGeneralTextHandler //Handles general texts
  14. {
  15. public:
  16. class HeroTexts
  17. {
  18. public:
  19. std::string bonusName, shortBonus, longBonus; //for special abilities
  20. std::string biography; //biography, of course
  21. };
  22. std::vector<HeroTexts> hTxts;
  23. std::vector<std::string> allTexts;
  24. std::vector<std::string> arraytxt;
  25. std::vector<std::string> primarySkillNames;
  26. std::vector<std::string> jktexts;
  27. std::vector<std::string> heroscrn;
  28. std::vector<std::string> overview;//text for Kingdom Overview window
  29. std::vector<std::string> colors; //names of player colors ("red",...)
  30. std::vector<std::string> capColors; //names of player colors with first letter capitalized ("Red",...)
  31. std::vector<std::string> turnDurations; //turn durations for pregame (1 Minute ... Unlimited)
  32. //artifacts
  33. std::vector<std::string> artifEvents;
  34. std::vector<std::string> artifNames;
  35. std::vector<std::string> artifDescriptions;
  36. //towns
  37. std::vector<std::string> tcommands, hcommands, fcommands; //texts for town screen, town hall screen and fort screen
  38. std::vector<std::string> tavernInfo;
  39. std::vector<std::vector<std::string> > townNames; //[type id] => vec of names of instances
  40. std::vector<std::string> townTypes; //castle, rampart, tower, etc
  41. std::map<int, std::map<int, std::pair<std::string, std::string> > > buildings; //map[town id][building id] => pair<name, description>
  42. std::vector<std::pair<std::string,std::string> > zelp;
  43. std::string lossCondtions[4];
  44. std::string victoryConditions[14];
  45. //objects
  46. std::vector<std::string> names; //vector of objects; i-th object in vector has subnumber i
  47. std::vector<std::string> creGens; //names of creatures' generators
  48. std::vector<std::string> creGens4; //names of multiple creatures' generators
  49. std::vector<std::string> advobtxt;
  50. std::vector<std::string> xtrainfo;
  51. std::vector<std::string> restypes; //names of resources
  52. std::vector<std::string> terrainNames;
  53. std::vector<std::string> randsign;
  54. std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
  55. std::vector<std::string> seerEmpty;
  56. std::vector <std::vector <std::vector <std::string> > > quests; //[quest][type][index]
  57. //type: quest, progress, complete, rollover, log OR time limit //index: 0-2 seer hut, 3-5 border guard
  58. std::vector<std::string> seerNames;
  59. std::vector<std::string> threat; //power rating for neutral stacks
  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::vector<std::string> zcrexp; //more or less useful content of that file
  65. //campaigns
  66. std::vector <std::string> campaignMapNames;
  67. std::vector < std::vector <std::string> > campaignRegionNames;
  68. std::string getTitle(const std::string & text);
  69. std::string getDescr(const std::string & text);
  70. void load();
  71. CGeneralTextHandler();
  72. };