CGeneralTextHandler.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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"), tmp;
  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. loadToIt(tmp, strs, itr, 3);
  28. arraytxt.push_back(tmp);
  29. }
  30. itr = 0;
  31. std::string strin = CGI->bitmaph->getTextFile("PRISKILL.TXT");
  32. for(int hh=0; hh<4; ++hh)
  33. {
  34. loadToIt(tmp, strin, itr, 3);
  35. primarySkillNames.push_back(tmp);
  36. }
  37. itr = 0;
  38. std::string strin2 = CGI->bitmaph->getTextFile("JKTEXT.TXT");
  39. for(int hh=0; hh<45; ++hh)
  40. {
  41. loadToIt(tmp, strin2, itr, 3);
  42. jktexts.push_back(tmp);
  43. }
  44. itr = 0;
  45. std::string strin3 = CGI->bitmaph->getTextFile("HEROSCRN.TXT");
  46. for(int hh=0; hh<33; ++hh)
  47. {
  48. loadToIt(tmp, strin3, itr, 3);
  49. heroscrn.push_back(tmp);
  50. }
  51. strin3 = CGI->bitmaph->getTextFile("ARTEVENT.TXT");
  52. for(itr = 0; itr<strin3.size();itr++)
  53. {
  54. loadToIt(tmp, strin3, itr, 3);
  55. artifEvents.push_back(tmp);
  56. }
  57. }