2008-01-09 17:21:31 +00:00
|
|
|
#include "../stdafx.h"
|
2007-07-08 17:28:08 +00:00
|
|
|
#include "CGeneralTextHandler.h"
|
2007-08-30 10:11:53 +00:00
|
|
|
#include "../CGameInfo.h"
|
2007-08-29 12:18:31 +00:00
|
|
|
#include "CLodHandler.h"
|
2007-07-08 17:28:08 +00:00
|
|
|
#include <fstream>
|
|
|
|
|
|
|
|
void CGeneralTextHandler::load()
|
|
|
|
{
|
2008-08-25 10:25:16 +00:00
|
|
|
std::string buf = CGI->bitmaph->getTextFile("GENRLTXT.TXT"), tmp;
|
2007-07-16 14:42:44 +00:00
|
|
|
int andame = buf.size();
|
2007-07-08 17:28:08 +00:00
|
|
|
int i=0; //buf iterator
|
|
|
|
for(i; i<andame; ++i)
|
|
|
|
{
|
|
|
|
if(buf[i]=='\r')
|
|
|
|
break;
|
|
|
|
}
|
2008-08-02 15:08:03 +00:00
|
|
|
|
2007-07-08 17:28:08 +00:00
|
|
|
i+=2;
|
2008-10-26 20:58:34 +00:00
|
|
|
std::string buflet;
|
2007-07-09 11:40:39 +00:00
|
|
|
for(int jj=0; jj<764; ++jj)
|
|
|
|
{
|
|
|
|
loadToIt(buflet, buf, i, 2);
|
2008-10-26 20:58:34 +00:00
|
|
|
if(buflet[0] == '"' && buflet[buflet.size()-1] == '"')
|
|
|
|
buflet = buflet.substr(1,buflet.size()-2);
|
2007-07-09 11:40:39 +00:00
|
|
|
allTexts.push_back(buflet);
|
|
|
|
}
|
2007-11-18 22:58:28 +00:00
|
|
|
|
|
|
|
std::string strs = CGI->bitmaph->getTextFile("ARRAYTXT.TXT");
|
2008-08-02 15:08:03 +00:00
|
|
|
|
2007-11-18 22:58:28 +00:00
|
|
|
int itr=0;
|
|
|
|
while(itr<strs.length()-1)
|
|
|
|
{
|
2008-06-13 08:16:51 +00:00
|
|
|
loadToIt(tmp, strs, itr, 3);
|
2007-11-18 22:58:28 +00:00
|
|
|
arraytxt.push_back(tmp);
|
|
|
|
}
|
|
|
|
|
2008-01-13 16:24:24 +00:00
|
|
|
itr = 0;
|
|
|
|
std::string strin = CGI->bitmaph->getTextFile("PRISKILL.TXT");
|
|
|
|
for(int hh=0; hh<4; ++hh)
|
|
|
|
{
|
2008-06-13 08:16:51 +00:00
|
|
|
loadToIt(tmp, strin, itr, 3);
|
2008-01-13 16:24:24 +00:00
|
|
|
primarySkillNames.push_back(tmp);
|
|
|
|
}
|
|
|
|
|
2008-01-15 18:50:52 +00:00
|
|
|
itr = 0;
|
|
|
|
std::string strin2 = CGI->bitmaph->getTextFile("JKTEXT.TXT");
|
|
|
|
for(int hh=0; hh<45; ++hh)
|
|
|
|
{
|
2008-06-13 08:16:51 +00:00
|
|
|
loadToIt(tmp, strin2, itr, 3);
|
2008-01-15 18:50:52 +00:00
|
|
|
jktexts.push_back(tmp);
|
|
|
|
}
|
2008-01-31 12:10:59 +00:00
|
|
|
|
|
|
|
itr = 0;
|
|
|
|
std::string strin3 = CGI->bitmaph->getTextFile("HEROSCRN.TXT");
|
|
|
|
for(int hh=0; hh<33; ++hh)
|
|
|
|
{
|
2008-06-13 08:16:51 +00:00
|
|
|
loadToIt(tmp, strin3, itr, 3);
|
2008-01-31 12:10:59 +00:00
|
|
|
heroscrn.push_back(tmp);
|
|
|
|
}
|
2008-08-25 10:25:16 +00:00
|
|
|
|
|
|
|
strin3 = CGI->bitmaph->getTextFile("ARTEVENT.TXT");
|
|
|
|
for(itr = 0; itr<strin3.size();itr++)
|
|
|
|
{
|
|
|
|
loadToIt(tmp, strin3, itr, 3);
|
|
|
|
artifEvents.push_back(tmp);
|
|
|
|
}
|
2008-06-13 08:16:51 +00:00
|
|
|
}
|