1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

* heroList

* functions for getting info about heroes in CCallback
* function for initializing GameState
* improvements in CHeroInstance
* added codename
* minor stuff
This commit is contained in:
Michał W. Urbańczyk
2007-09-14 13:11:10 +00:00
parent 55c0dc0229
commit 16a1861fc4
16 changed files with 469 additions and 86 deletions

View File

@ -6,6 +6,7 @@
#include <utility>
#include <algorithm>
#include "CMessage.h"
#include <boost/algorithm/string.hpp>
bool isItIn(const SDL_Rect * rect, int x, int y)
{
@ -670,3 +671,11 @@ void CSDL_Ext::fullAlphaTransform(SDL_Surface *& src)
src = hlp2;
}
std::string CSDL_Ext::processStr(std::string str, std::vector<std::string> & tor)
{
for (int i=0;(i<tor.size())&&(boost::find_first(str,"%s"));i++)
{
boost::replace_first(str,"%s",tor[i]);
}
return str;
}