#include "stdafx.h" #include "../CGameInfo.h" #include "CCreatureHandler.h" #include "CLodHandler.h" #include #include #include #include void CCreatureHandler::loadCreatures() { std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("ZCRTRAIT.TXT"); int andame = buf.size(); int i=0; //buf iterator int hmcr=0; for(i; i190 && buf.substr(i, buf.size()-i).find('\r')==std::string::npos) //{ // loadAnimationInfo(); // loadUnitAnimations(); // break; //} CCreature ncre; int befi=i; for(i; i> tempi >> temps; if (tempi>=creatures.size()) break; boost::assign::insert(nameToID)(temps,tempi); creatures[tempi].nameRef=temps; } ifs.close(); //loading 32x32px imgs CDefHandler *smi = CGI->spriteh->giveDef("CPRSMALL.DEF"); smi->notFreeImgs = true; for (int i=0; iourImages.size(); i++) { boost::assign::insert(smallImgs)(i-2,smi->ourImages[i].bitmap); } delete smi; } void CCreatureHandler::loadAnimationInfo() { //std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("CRANIM.TXT"); //int andame = buf.size(); //int i=0; //buf iterator //hmcr=0; //for(i; ispriteh->giveDef(defName); else creatures[s].battleAnimation = NULL; i+=2; } }