1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/CAbilityHandler.cpp
mateuszb ae279c79c5 * first version of player interface displaying
* taking some txt files from lods
* some minor changes
2007-08-04 19:01:22 +00:00

24 lines
749 B
C++

#include "stdafx.h"
#include "CAbilityHandler.h"
#include "CGameInfo.h"
#include "CGeneralTextHandler.h"
void CAbilityHandler::loadAbilities()
{
std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("SSTRAITS.TXT");
int it=0;
std::string dump;
for(int i=0; i<2; ++i)
{
CGeneralTextHandler::loadToIt(dump,buf,it,3);
}
for (int i=0; i<SKILL_QUANTITY; i++)
{
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);
nab->idNumber = abilities.size();
abilities.push_back(nab);
}
}