CGeneralTextHandler.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #include "../stdafx.h"
  2. #include "CGeneralTextHandler.h"
  3. #include "../CGameInfo.h"
  4. #include "CLodHandler.h"
  5. #include <fstream>
  6. void CGeneralTextHandler::load()
  7. {
  8. std::string buf = CGI->bitmaph->getTextFile("GENRLTXT.TXT");
  9. int andame = buf.size();
  10. int i=0; //buf iterator
  11. for(i; i<andame; ++i)
  12. {
  13. if(buf[i]=='\r')
  14. break;
  15. }
  16. i+=2;
  17. for(int jj=0; jj<764; ++jj)
  18. {
  19. std::string buflet;
  20. loadToIt(buflet, buf, i, 2);
  21. allTexts.push_back(buflet);
  22. }
  23. std::string strs = CGI->bitmaph->getTextFile("ARRAYTXT.TXT");
  24. int itr=0;
  25. while(itr<strs.length()-1)
  26. {
  27. std::string tmp;
  28. loadToIt(tmp, strs, itr, 3);
  29. arraytxt.push_back(tmp);
  30. }
  31. itr = 0;
  32. std::string strin = CGI->bitmaph->getTextFile("PRISKILL.TXT");
  33. for(int hh=0; hh<4; ++hh)
  34. {
  35. std::string tmp;
  36. loadToIt(tmp, strin, itr, 3);
  37. primarySkillNames.push_back(tmp);
  38. }
  39. itr = 0;
  40. std::string strin2 = CGI->bitmaph->getTextFile("JKTEXT.TXT");
  41. for(int hh=0; hh<45; ++hh)
  42. {
  43. std::string tmp;
  44. loadToIt(tmp, strin2, itr, 3);
  45. jktexts.push_back(tmp);
  46. }
  47. itr = 0;
  48. std::string strin3 = CGI->bitmaph->getTextFile("HEROSCRN.TXT");
  49. for(int hh=0; hh<33; ++hh)
  50. {
  51. std::string tmp;
  52. loadToIt(tmp, strin3, itr, 3);
  53. heroscrn.push_back(tmp);
  54. }
  55. }