CAbilityHandler.cpp 749 B

123456789101112131415161718192021222324
  1. #include "stdafx.h"
  2. #include "CAbilityHandler.h"
  3. #include "CGameInfo.h"
  4. #include "CGeneralTextHandler.h"
  5. void CAbilityHandler::loadAbilities()
  6. {
  7. std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("SSTRAITS.TXT");
  8. int it=0;
  9. std::string dump;
  10. for(int i=0; i<2; ++i)
  11. {
  12. CGeneralTextHandler::loadToIt(dump,buf,it,3);
  13. }
  14. for (int i=0; i<SKILL_QUANTITY; i++)
  15. {
  16. CAbility * nab = new CAbility; //new skill, that will be read
  17. CGeneralTextHandler::loadToIt(nab->name,buf,it,4);
  18. CGeneralTextHandler::loadToIt(nab->basicText,buf,it,4);
  19. CGeneralTextHandler::loadToIt(nab->advText,buf,it,4);
  20. CGeneralTextHandler::loadToIt(nab->expText,buf,it,3);
  21. nab->idNumber = abilities.size();
  22. abilities.push_back(nab);
  23. }
  24. }