2008-01-09 19:21:31 +02:00
|
|
|
#include "../stdafx.h"
|
2007-06-08 22:56:35 +03:00
|
|
|
#include "CAbilityHandler.h"
|
2007-08-30 13:11:53 +03:00
|
|
|
#include "../CGameInfo.h"
|
2007-08-04 22:01:22 +03:00
|
|
|
#include "CGeneralTextHandler.h"
|
2007-08-29 15:18:31 +03:00
|
|
|
#include "CLodHandler.h"
|
2008-01-15 20:50:52 +02:00
|
|
|
#include "CDefHandler.h"
|
|
|
|
|
2007-06-08 22:56:35 +03:00
|
|
|
void CAbilityHandler::loadAbilities()
|
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("SSTRAITS.TXT");
|
|
|
|
int it=0;
|
2007-06-08 22:56:35 +03:00
|
|
|
std::string dump;
|
2007-08-04 22:01:22 +03:00
|
|
|
for(int i=0; i<2; ++i)
|
2007-06-08 22:56:35 +03:00
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
CGeneralTextHandler::loadToIt(dump,buf,it,3);
|
2007-06-08 22:56:35 +03:00
|
|
|
}
|
2007-08-04 22:01:22 +03:00
|
|
|
for (int i=0; i<SKILL_QUANTITY; i++)
|
2007-06-08 22:56:35 +03:00
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
CAbility * nab = new CAbility; //new skill, that will be read
|
|
|
|
CGeneralTextHandler::loadToIt(nab->name,buf,it,4);
|
|
|
|
CGeneralTextHandler::loadToIt(nab->basicText,buf,it,4);
|
|
|
|
CGeneralTextHandler::loadToIt(nab->advText,buf,it,4);
|
|
|
|
CGeneralTextHandler::loadToIt(nab->expText,buf,it,3);
|
2007-07-16 17:42:44 +03:00
|
|
|
nab->idNumber = abilities.size();
|
2007-06-08 22:56:35 +03:00
|
|
|
abilities.push_back(nab);
|
|
|
|
}
|
2008-01-15 20:50:52 +02:00
|
|
|
abils32 = CGI->spriteh->giveDef("SECSK32.DEF");
|
|
|
|
abils44 = CGI->spriteh->giveDef("SECSKILL.DEF");
|
|
|
|
abils82 = CGI->spriteh->giveDef("SECSK82.DEF");
|
|
|
|
|
|
|
|
buf = CGameInfo::mainObj->bitmaph->getTextFile("SKILLLEV.TXT");
|
|
|
|
it=0;
|
|
|
|
for(int i=0; i<6; ++i)
|
|
|
|
{
|
|
|
|
std::string buffo;
|
|
|
|
CGeneralTextHandler::loadToIt(buffo,buf,it,3);
|
|
|
|
levels.push_back(buffo);
|
|
|
|
}
|
2007-06-08 22:56:35 +03:00
|
|
|
}
|