2009-01-11 00:08:18 +02:00
|
|
|
#ifndef __CGENERALTEXTHANDLER_H__
|
|
|
|
#define __CGENERALTEXTHANDLER_H__
|
|
|
|
#include "../global.h"
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2009-04-15 17:03:31 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* CGeneralTextHandler.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-02-12 17:04:01 +02:00
|
|
|
DLL_EXPORT void loadToIt(std::string &dest, const std::string &src, int &iter, int mode);
|
|
|
|
std::string readTo(const std::string &in, int &it, char end);
|
2009-01-11 00:08:18 +02:00
|
|
|
class DLL_EXPORT CGeneralTextHandler //Handles general texts
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
class HeroTexts
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string bonusName, shortBonus, longBonus; //for special abilities
|
|
|
|
std::string biography; //biography, of course
|
|
|
|
};
|
|
|
|
|
|
|
|
std::vector<HeroTexts> hTxts;
|
|
|
|
std::vector<std::string> allTexts;
|
|
|
|
|
|
|
|
std::vector<std::string> arraytxt;
|
|
|
|
std::vector<std::string> primarySkillNames;
|
|
|
|
std::vector<std::string> jktexts;
|
|
|
|
std::vector<std::string> heroscrn;
|
2010-01-25 23:25:14 +02:00
|
|
|
std::vector<std::string> overview;//text for Kingdom Overview window
|
2010-02-01 19:07:46 +02:00
|
|
|
std::vector<std::string> colors; //names of player colors ("red",...)
|
|
|
|
std::vector<std::string> capColors; //names of player colors with first letter capitalized ("Red",...)
|
2011-01-28 04:33:26 +02:00
|
|
|
std::vector<std::string> turnDurations; //turn durations for pregame (1 Minute ... Unlimited)
|
2009-01-11 00:08:18 +02:00
|
|
|
|
|
|
|
//artifacts
|
|
|
|
std::vector<std::string> artifEvents;
|
|
|
|
std::vector<std::string> artifNames;
|
|
|
|
std::vector<std::string> artifDescriptions;
|
|
|
|
|
|
|
|
//towns
|
2009-12-23 03:46:15 +02:00
|
|
|
std::vector<std::string> tcommands, hcommands, fcommands; //texts for town screen, town hall screen and fort screen
|
2009-02-09 18:18:48 +02:00
|
|
|
std::vector<std::string> tavernInfo;
|
2009-01-11 00:08:18 +02:00
|
|
|
std::vector<std::vector<std::string> > townNames; //[type id] => vec of names of instances
|
|
|
|
std::vector<std::string> townTypes; //castle, rampart, tower, etc
|
|
|
|
std::map<int, std::map<int, std::pair<std::string, std::string> > > buildings; //map[town id][building id] => pair<name, description>
|
|
|
|
|
|
|
|
std::vector<std::pair<std::string,std::string> > zelp;
|
|
|
|
std::string lossCondtions[4];
|
|
|
|
std::string victoryConditions[14];
|
2009-01-06 20:42:20 +02:00
|
|
|
|
|
|
|
//objects
|
|
|
|
std::vector<std::string> names; //vector of objects; i-th object in vector has subnumber i
|
|
|
|
std::vector<std::string> creGens; //names of creatures' generators
|
2009-07-09 22:15:22 +03:00
|
|
|
std::vector<std::string> creGens4; //names of multiple creatures' generators
|
2009-01-06 20:42:20 +02:00
|
|
|
std::vector<std::string> advobtxt;
|
|
|
|
std::vector<std::string> xtrainfo;
|
2010-07-30 14:29:42 +03:00
|
|
|
std::vector<std::string> restypes; //names of resources
|
2009-10-22 05:09:14 +03:00
|
|
|
std::vector<std::string> terrainNames;
|
2009-03-19 16:17:19 +02:00
|
|
|
std::vector<std::string> randsign;
|
2009-01-11 00:08:18 +02:00
|
|
|
std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
|
2010-01-26 21:43:15 +02:00
|
|
|
std::vector<std::string> seerEmpty;
|
2009-12-31 13:43:37 +02:00
|
|
|
std::vector <std::vector <std::vector <std::string> > > quests; //[quest][type][index]
|
|
|
|
//type: quest, progress, complete, rollover, log OR time limit //index: 0-2 seer hut, 3-5 border guard
|
|
|
|
std::vector<std::string> seerNames;
|
2011-02-07 16:39:17 +02:00
|
|
|
std::vector<std::string> threat; //power rating for neutral stacks
|
2009-01-11 00:08:18 +02:00
|
|
|
|
2009-01-25 18:40:50 +02:00
|
|
|
//sec skills
|
|
|
|
std::vector <std::string> skillName;
|
|
|
|
std::vector <std::vector <std::string> > skillInfoTexts; //[id][level] : level 0 - basic; 2 - advanced
|
2009-01-11 00:08:18 +02:00
|
|
|
std::vector<std::string> levels;
|
2011-03-21 10:14:23 +02:00
|
|
|
std::vector<std::string> zcrexp; //more or less useful content of that file
|
2009-01-11 00:08:18 +02:00
|
|
|
|
2010-02-12 17:04:01 +02:00
|
|
|
//campaigns
|
|
|
|
std::vector <std::string> campaignMapNames;
|
|
|
|
std::vector < std::vector <std::string> > campaignRegionNames;
|
|
|
|
|
|
|
|
std::string getTitle(const std::string & text);
|
|
|
|
std::string getDescr(const std::string & text);
|
2009-01-11 00:08:18 +02:00
|
|
|
|
|
|
|
void load();
|
|
|
|
CGeneralTextHandler();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __CGENERALTEXTHANDLER_H__
|