mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
- Moved most of text output to original fonts
- Temporary disabled ttf output
This commit is contained in:
parent
49e56e3749
commit
3dbeaa5ef8
@ -42,8 +42,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern TTF_Font * TNRB16, *TNR, *GEOR13, *GEORXX; //fonts
|
|
||||||
|
|
||||||
#define ADVOPT (conf.go()->ac)
|
#define ADVOPT (conf.go()->ac)
|
||||||
using namespace boost::logic;
|
using namespace boost::logic;
|
||||||
using namespace boost::assign;
|
using namespace boost::assign;
|
||||||
@ -1279,13 +1277,13 @@ void CResDataBar::draw(SDL_Surface * to)
|
|||||||
for (int i=0;i<7;i++)
|
for (int i=0;i<7;i++)
|
||||||
{
|
{
|
||||||
SDL_itoa(LOCPLINT->cb->getResourceAmount(i),buf,10);
|
SDL_itoa(LOCPLINT->cb->getResourceAmount(i),buf,10);
|
||||||
printAt(buf,txtpos[i].first,txtpos[i].second,GEOR13,zwykly,to);
|
printAt(buf,txtpos[i].first,txtpos[i].second,FONT_SMALL,zwykly,to);
|
||||||
}
|
}
|
||||||
std::vector<std::string> temp;
|
std::vector<std::string> temp;
|
||||||
SDL_itoa(LOCPLINT->cb->getDate(3),buf,10); temp+=std::string(buf);
|
SDL_itoa(LOCPLINT->cb->getDate(3),buf,10); temp+=std::string(buf);
|
||||||
SDL_itoa(LOCPLINT->cb->getDate(2),buf,10); temp+=std::string(buf);
|
SDL_itoa(LOCPLINT->cb->getDate(2),buf,10); temp+=std::string(buf);
|
||||||
SDL_itoa(LOCPLINT->cb->getDate(1),buf,10); temp+=std::string(buf);
|
SDL_itoa(LOCPLINT->cb->getDate(1),buf,10); temp+=std::string(buf);
|
||||||
printAt(processStr(datetext,temp),txtpos[7].first,txtpos[7].second,GEOR13,zwykly,to);
|
printAt(processStr(datetext,temp),txtpos[7].first,txtpos[7].second,FONT_SMALL,zwykly,to);
|
||||||
temp.clear();
|
temp.clear();
|
||||||
//updateRect(&pos,screen);
|
//updateRect(&pos,screen);
|
||||||
delete[] buf;
|
delete[] buf;
|
||||||
@ -1380,7 +1378,7 @@ void CInfoBar::blitAnim(int mode)//0 - day, 1 - week
|
|||||||
txt << CGI->generaltexth->allTexts[64] << " " << LOCPLINT->cb->getDate(1);
|
txt << CGI->generaltexth->allTexts[64] << " " << LOCPLINT->cb->getDate(1);
|
||||||
}
|
}
|
||||||
blitAt(anim->ourImages[pom].bitmap,pos.x+9,pos.y+10);
|
blitAt(anim->ourImages[pom].bitmap,pos.x+9,pos.y+10);
|
||||||
printAtMiddle(txt.str(),pos.x+95,pos.y+31,TNRB16,zwykly);
|
printAtMiddle(txt.str(),pos.x+95,pos.y+31,FONT_MEDIUM,zwykly);
|
||||||
if (pom == anim->ourImages.size()-1)
|
if (pom == anim->ourImages.size()-1)
|
||||||
toNextTick+=750;
|
toNextTick+=750;
|
||||||
}
|
}
|
||||||
@ -1425,8 +1423,8 @@ void CInfoBar::showComp(SComponent * comp, int time)
|
|||||||
SDL_Surface * b = BitmapHandler::loadBitmap("ADSTATOT.bmp");
|
SDL_Surface * b = BitmapHandler::loadBitmap("ADSTATOT.bmp");
|
||||||
blitAt(b,pos.x+8,pos.y+11);
|
blitAt(b,pos.x+8,pos.y+11);
|
||||||
blitAt(comp->getImg(),pos.x+52,pos.y+54);
|
blitAt(comp->getImg(),pos.x+52,pos.y+54);
|
||||||
printAtMiddle(comp->subtitle,pos.x+91,pos.y+158,GEOR13,zwykly);
|
printAtMiddle(comp->subtitle,pos.x+91,pos.y+158,FONT_SMALL,zwykly);
|
||||||
printAtMiddleWB(comp->description,pos.x+94,pos.y+31,GEOR13,26,zwykly);
|
printAtMiddleWB(comp->description,pos.x+94,pos.y+31,FONT_SMALL,26,zwykly);
|
||||||
SDL_FreeSurface(b);
|
SDL_FreeSurface(b);
|
||||||
activateTimer();
|
activateTimer();
|
||||||
mode = 6;
|
mode = 6;
|
||||||
|
@ -45,7 +45,6 @@ const double M_PI = 3.14159265358979323846;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
extern SDL_Surface * screen;
|
extern SDL_Surface * screen;
|
||||||
extern TTF_Font * TNRB16, *TNR, *GEOR13, *GEORXX, *GEORM, *GEOR16;
|
|
||||||
extern SDL_Color zwykly;
|
extern SDL_Color zwykly;
|
||||||
|
|
||||||
CondSh<bool> CBattleInterface::animsAreDisplayed;
|
CondSh<bool> CBattleInterface::animsAreDisplayed;
|
||||||
@ -3494,22 +3493,22 @@ void CBattleConsole::show(SDL_Surface * to)
|
|||||||
{
|
{
|
||||||
if(ingcAlter.size())
|
if(ingcAlter.size())
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAtMiddleWB(ingcAlter, pos.x + pos.w/2, pos.y + 10, GEOR13, 80, zwykly, to);
|
CSDL_Ext::printAtMiddleWB(ingcAlter, pos.x + pos.w/2, pos.y + 11, FONT_SMALL, 80, zwykly, to);
|
||||||
}
|
}
|
||||||
else if(alterTxt.size())
|
else if(alterTxt.size())
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAtMiddleWB(alterTxt, pos.x + pos.w/2, pos.y + 10, GEOR13, 80, zwykly, to);
|
CSDL_Ext::printAtMiddleWB(alterTxt, pos.x + pos.w/2, pos.y + 11, FONT_SMALL, 80, zwykly, to);
|
||||||
}
|
}
|
||||||
else if(texts.size())
|
else if(texts.size())
|
||||||
{
|
{
|
||||||
if(texts.size()==1)
|
if(texts.size()==1)
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAtMiddleWB(texts[0], pos.x + pos.w/2, pos.y + 10, GEOR13, 80, zwykly, to);
|
CSDL_Ext::printAtMiddleWB(texts[0], pos.x + pos.w/2, pos.y + 11, FONT_SMALL, 80, zwykly, to);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAtMiddleWB(texts[lastShown-1], pos.x + pos.w/2, pos.y + 10, GEOR13, 80, zwykly, to);
|
CSDL_Ext::printAtMiddleWB(texts[lastShown-1], pos.x + pos.w/2, pos.y + 11, FONT_SMALL, 80, zwykly, to);
|
||||||
CSDL_Ext::printAtMiddleWB(texts[lastShown], pos.x + pos.w/2, pos.y + 26, GEOR13, 80, zwykly, to);
|
CSDL_Ext::printAtMiddleWB(texts[lastShown], pos.x + pos.w/2, pos.y + 27, FONT_SMALL, 80, zwykly, to);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3574,19 +3573,19 @@ CBattleResultWindow::CBattleResultWindow(const BattleResult &br, const SDL_Rect
|
|||||||
|
|
||||||
if(br.winner==0) //attacker won
|
if(br.winner==0) //attacker won
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[410], 60, 122, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[410], 59, 124, FONT_SMALL, zwykly, background);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[411], 410, 122, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[411], 408, 124, FONT_SMALL, zwykly, background);
|
||||||
}
|
}
|
||||||
else //if(br.winner==1)
|
else //if(br.winner==1)
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[411], 60, 122, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[411], 59, 124, FONT_SMALL, zwykly, background);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[410], 410, 122, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[410], 412, 124, FONT_SMALL, zwykly, background);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[407], 235, 299, GEOR16, tytulowy, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[407], 232, 302, FONT_BIG, tytulowy, background);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[408], 235, 329, GEOR16, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[408], 232, 332, FONT_BIG, zwykly, background);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[409], 235, 426, GEOR16, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[409], 237, 428, FONT_BIG, zwykly, background);
|
||||||
|
|
||||||
std::string attackerName, defenderName;
|
std::string attackerName, defenderName;
|
||||||
|
|
||||||
@ -3636,14 +3635,14 @@ CBattleResultWindow::CBattleResultWindow(const BattleResult &br, const SDL_Rect
|
|||||||
}
|
}
|
||||||
|
|
||||||
//printing attacker and defender's names
|
//printing attacker and defender's names
|
||||||
CSDL_Ext::printAtMiddle(attackerName, 156, 44, GEOR16, zwykly, background);
|
CSDL_Ext::printAt(attackerName, 89, 37, FONT_SMALL, zwykly, background);
|
||||||
CSDL_Ext::printAtMiddle(defenderName, 314, 44, GEOR16, zwykly, background);
|
CSDL_Ext::printTo(defenderName, 381, 53, FONT_SMALL, zwykly, background);
|
||||||
//printing casualities
|
//printing casualities
|
||||||
for(int step = 0; step < 2; ++step)
|
for(int step = 0; step < 2; ++step)
|
||||||
{
|
{
|
||||||
if(br.casualties[step].size()==0)
|
if(br.casualties[step].size()==0)
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[523], 235, 360 + 97*step, GEOR16, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[523], 235, 360 + 97*step, FONT_SMALL, zwykly, background);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3654,7 +3653,7 @@ CBattleResultWindow::CBattleResultWindow(const BattleResult &br, const SDL_Rect
|
|||||||
blitAt(graphics->smallImgs[it->first], xPos, yPos, background);
|
blitAt(graphics->smallImgs[it->first], xPos, yPos, background);
|
||||||
std::ostringstream amount;
|
std::ostringstream amount;
|
||||||
amount<<it->second;
|
amount<<it->second;
|
||||||
CSDL_Ext::printAtMiddle(amount.str(), xPos+16, yPos + 42, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(amount.str(), xPos+16, yPos + 42, FONT_SMALL, zwykly, background);
|
||||||
xPos += 42;
|
xPos += 42;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3672,13 +3671,13 @@ CBattleResultWindow::CBattleResultWindow(const BattleResult &br, const SDL_Rect
|
|||||||
#else
|
#else
|
||||||
CGI->videoh->open(VIDEO_WIN, true);
|
CGI->videoh->open(VIDEO_WIN, true);
|
||||||
#endif
|
#endif
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[304], 235, 235, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[304], 235, 235, FONT_SMALL, zwykly, background);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CGI->musich->playMusic(musicBase::loseCombat);
|
CGI->musich->playMusic(musicBase::loseCombat);
|
||||||
CGI->videoh->open(VIDEO_LOSE_BATTLE_START);
|
CGI->videoh->open(VIDEO_LOSE_BATTLE_START);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[311], 235, 235, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[311], 235, 235, FONT_SMALL, zwykly, background);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1: //flee
|
case 1: //flee
|
||||||
@ -3690,13 +3689,13 @@ CBattleResultWindow::CBattleResultWindow(const BattleResult &br, const SDL_Rect
|
|||||||
#else
|
#else
|
||||||
CGI->videoh->open(VIDEO_WIN, true);
|
CGI->videoh->open(VIDEO_WIN, true);
|
||||||
#endif
|
#endif
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[303], 235, 235, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[303], 235, 235, FONT_SMALL, zwykly, background);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CGI->musich->playMusic(musicBase::retreatBattle);
|
CGI->musich->playMusic(musicBase::retreatBattle);
|
||||||
CGI->videoh->open(VIDEO_RETREAT_START);
|
CGI->videoh->open(VIDEO_RETREAT_START);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[310], 235, 235, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[310], 235, 235, FONT_SMALL, zwykly, background);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: //surrender
|
case 2: //surrender
|
||||||
@ -3708,13 +3707,13 @@ CBattleResultWindow::CBattleResultWindow(const BattleResult &br, const SDL_Rect
|
|||||||
#else
|
#else
|
||||||
CGI->videoh->open(VIDEO_WIN, true);
|
CGI->videoh->open(VIDEO_WIN, true);
|
||||||
#endif
|
#endif
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[302], 235, 235, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[302], 235, 235, FONT_SMALL, zwykly, background);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CGI->musich->playMusic(musicBase::surrenderBattle);
|
CGI->musich->playMusic(musicBase::surrenderBattle);
|
||||||
CGI->videoh->open(VIDEO_SURRENDER);
|
CGI->videoh->open(VIDEO_SURRENDER);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[309], 235, 235, GEOR13, zwykly, background);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[309], 235, 235, FONT_SMALL, zwykly, background);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -3758,8 +3757,12 @@ void CBattleResultWindow::bExitf()
|
|||||||
CBattleOptionsWindow::CBattleOptionsWindow(const SDL_Rect & position, CBattleInterface *owner): myInt(owner)
|
CBattleOptionsWindow::CBattleOptionsWindow(const SDL_Rect & position, CBattleInterface *owner): myInt(owner)
|
||||||
{
|
{
|
||||||
pos = position;
|
pos = position;
|
||||||
background = BitmapHandler::loadBitmap("comopbck.bmp", true);
|
SDL_Surface *hhlp = BitmapHandler::loadBitmap("comopbck.bmp", true);
|
||||||
graphics->blueToPlayersAdv(background, LOCPLINT->playerID);
|
graphics->blueToPlayersAdv(hhlp,LOCPLINT->playerID);
|
||||||
|
background = SDL_ConvertSurface(hhlp,screen->format,0);
|
||||||
|
SDL_SetColorKey(background,SDL_SRCCOLORKEY,SDL_MapRGB(background->format,0,255,255));
|
||||||
|
SDL_FreeSurface(hhlp);
|
||||||
|
|
||||||
|
|
||||||
viewGrid = new CHighlightableButton(boost::bind(&CBattleInterface::setPrintCellBorders, owner, true), boost::bind(&CBattleInterface::setPrintCellBorders, owner, false), boost::assign::map_list_of(0,CGI->generaltexth->zelp[427].first)(3,CGI->generaltexth->zelp[427].first), CGI->generaltexth->zelp[427].second, false, "sysopchk.def", NULL, 185, 140, false);
|
viewGrid = new CHighlightableButton(boost::bind(&CBattleInterface::setPrintCellBorders, owner, true), boost::bind(&CBattleInterface::setPrintCellBorders, owner, false), boost::assign::map_list_of(0,CGI->generaltexth->zelp[427].first)(3,CGI->generaltexth->zelp[427].first), CGI->generaltexth->zelp[427].second, false, "sysopchk.def", NULL, 185, 140, false);
|
||||||
viewGrid->select(LOCPLINT->sysOpts.printCellBorders);
|
viewGrid->select(LOCPLINT->sysOpts.printCellBorders);
|
||||||
@ -3781,29 +3784,29 @@ CBattleOptionsWindow::CBattleOptionsWindow(const SDL_Rect & position, CBattleInt
|
|||||||
std::swap(exit->imgs[0][0], exit->imgs[0][1]);
|
std::swap(exit->imgs[0][0], exit->imgs[0][1]);
|
||||||
|
|
||||||
//printing texts to background
|
//printing texts to background
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[392], 240, 32, GEOR16, tytulowy, background); //window title
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[392], 242, 32, FONT_BIG, tytulowy, background); //window title
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[393], 122, 211, GEOR16, tytulowy, background); //animation speed
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[393], 122, 214, FONT_MEDIUM, tytulowy, background); //animation speed
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[394], 122, 292, GEOR16, tytulowy, background); //music volume
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[394], 122, 293, FONT_MEDIUM, tytulowy, background); //music volume
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[395], 122, 358, GEOR16, tytulowy, background); //effects' volume
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[395], 122, 359, FONT_MEDIUM, tytulowy, background); //effects' volume
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[396], 353, 64, GEOR16, tytulowy, background); //auto - combat options
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[396], 353, 66, FONT_MEDIUM, tytulowy, background); //auto - combat options
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[397], 353, 264, GEOR16, tytulowy, background); //creature info
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[397], 353, 265, FONT_MEDIUM, tytulowy, background); //creature info
|
||||||
|
|
||||||
//auto - combat options
|
//auto - combat options
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[398], 283, 87, GEOR16, zwykly, background); //creatures
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[398], 283, 86, FONT_MEDIUM, zwykly, background); //creatures
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[399], 283, 117, GEOR16, zwykly, background); //spells
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[399], 283, 116, FONT_MEDIUM, zwykly, background); //spells
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[400], 283, 147, GEOR16, zwykly, background); //catapult
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[400], 283, 146, FONT_MEDIUM, zwykly, background); //catapult
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[151], 283, 177, GEOR16, zwykly, background); //ballista
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[151], 283, 176, FONT_MEDIUM, zwykly, background); //ballista
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[401], 283, 207, GEOR16, zwykly, background); //first aid tent
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[401], 283, 206, FONT_MEDIUM, zwykly, background); //first aid tent
|
||||||
|
|
||||||
//creature info
|
//creature info
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[402], 283, 286, GEOR16, zwykly, background); //all stats
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[402], 283, 285, FONT_MEDIUM, zwykly, background); //all stats
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[403], 283, 316, GEOR16, zwykly, background); //spells only
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[403], 283, 315, FONT_MEDIUM, zwykly, background); //spells only
|
||||||
|
|
||||||
//general options
|
//general options
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[404], 61, 58, GEOR16, zwykly, background); //hex grid
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[404], 61, 57, FONT_MEDIUM, zwykly, background); //hex grid
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[405], 61, 91, GEOR16, zwykly, background); //movement shadow
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[405], 61, 90, FONT_MEDIUM, zwykly, background); //movement shadow
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[406], 61, 124, GEOR16, zwykly, background); //cursor shadow
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[406], 61, 124, FONT_MEDIUM, zwykly, background); //cursor shadow
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[577], 61, 157, GEOR16, zwykly, background); //spellbook animation
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[577], 61, 156, FONT_MEDIUM, zwykly, background); //spellbook animation
|
||||||
//texts printed
|
//texts printed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ using namespace CSDL_Ext;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern TTF_Font * GEOR16;
|
|
||||||
CBuildingRect::CBuildingRect(Structure *Str)
|
CBuildingRect::CBuildingRect(Structure *Str)
|
||||||
:moi(false), offset(0), str(Str)
|
:moi(false), offset(0), str(Str)
|
||||||
{
|
{
|
||||||
@ -772,7 +771,7 @@ void CCastleInterface::showAll( SDL_Surface * to/*=NULL*/)
|
|||||||
creainfo[i]->show(to);
|
creainfo[i]->show(to);
|
||||||
|
|
||||||
//print name
|
//print name
|
||||||
CSDL_Ext::printAt(town->name,pos.x+85,pos.y+389,GEOR13,zwykly,to);
|
CSDL_Ext::printAt(town->name,pos.x+85,pos.y+389,FONT_SMALL,zwykly,to);
|
||||||
//blit town icon
|
//blit town icon
|
||||||
int pom = town->subID*2;
|
int pom = town->subID*2;
|
||||||
if (!town->hasFort())
|
if (!town->hasFort())
|
||||||
@ -1187,7 +1186,7 @@ void CCastleInterface::CCreaInfo::show(SDL_Surface * to)
|
|||||||
blitAt(graphics->smallImgs[crid],pos.x+8,pos.y,to);
|
blitAt(graphics->smallImgs[crid],pos.x+8,pos.y,to);
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << '+' << LOCPLINT->castleInt->town->creatureGrowth((bid-30)%CREATURES_PER_TOWN);
|
oss << '+' << LOCPLINT->castleInt->town->creatureGrowth((bid-30)%CREATURES_PER_TOWN);
|
||||||
CSDL_Ext::printAtMiddle(oss.str(),pos.x+24,pos.y+37,GEOR13,zwykly,to);
|
CSDL_Ext::printAtMiddle(oss.str(),pos.x+24,pos.y+37,FONT_TINY,zwykly,to);
|
||||||
}
|
}
|
||||||
|
|
||||||
CCastleInterface::CTownInfo::~CTownInfo()
|
CCastleInterface::CTownInfo::~CTownInfo()
|
||||||
@ -1266,7 +1265,7 @@ void CCastleInterface::CTownInfo::show(SDL_Surface * to)
|
|||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << LOCPLINT->castleInt->town->dailyIncome();
|
oss << LOCPLINT->castleInt->town->dailyIncome();
|
||||||
CSDL_Ext::printAtMiddle(oss.str(),pos.x+32,pos.y+32,GEOR13,zwykly,to);
|
CSDL_Ext::printAtMiddle(oss.str(),pos.x+32,pos.y+32,FONT_SMALL,zwykly,to);
|
||||||
}
|
}
|
||||||
else if ( bid == 6 )//no fort
|
else if ( bid == 6 )//no fort
|
||||||
blitAt(pic->ourImages[3].bitmap,pos.x,pos.y,to);
|
blitAt(pic->ourImages[3].bitmap,pos.x,pos.y,to);
|
||||||
@ -1419,7 +1418,7 @@ void CHallInterface::CBuildingBox::show(SDL_Surface * to)
|
|||||||
blitAt(ci->bars->ourImages[pom].bitmap,pos.x-1,pos.y+71,to);
|
blitAt(ci->bars->ourImages[pom].bitmap,pos.x-1,pos.y+71,to);
|
||||||
if(pom2>=0)
|
if(pom2>=0)
|
||||||
blitAt(ci->status->ourImages[pom2].bitmap,pos.x+135, pos.y+54,to);
|
blitAt(ci->status->ourImages[pom2].bitmap,pos.x+135, pos.y+54,to);
|
||||||
CSDL_Ext::printAtMiddle(CGI->buildh->buildings[ci->town->subID][BID]->Name(),pos.x-1+ci->bars->ourImages[0].bitmap->w/2,pos.y+71+ci->bars->ourImages[0].bitmap->h/2, GEOR13,zwykly,to);
|
CSDL_Ext::printAtMiddle(CGI->buildh->buildings[ci->town->subID][BID]->Name(),pos.x-1+ci->bars->ourImages[0].bitmap->w/2,pos.y+71+ci->bars->ourImages[0].bitmap->h/2, FONT_SMALL,zwykly,to);
|
||||||
}
|
}
|
||||||
CHallInterface::CBuildingBox::~CBuildingBox()
|
CHallInterface::CBuildingBox::~CBuildingBox()
|
||||||
{
|
{
|
||||||
@ -1526,7 +1525,7 @@ void CHallInterface::show(SDL_Surface * to)
|
|||||||
{
|
{
|
||||||
blitAt(bg,pos,to);
|
blitAt(bg,pos,to);
|
||||||
LOCPLINT->castleInt->statusbar->show(to);
|
LOCPLINT->castleInt->statusbar->show(to);
|
||||||
printAtMiddle(CGI->buildh->buildings[LOCPLINT->castleInt->town->subID][bid]->Name(),400+pos.x,13+pos.y,GEORXX,zwykly,to);
|
printAtMiddle(CGI->buildh->buildings[LOCPLINT->castleInt->town->subID][bid]->Name(),399+pos.x,12+pos.y,FONT_MEDIUM,zwykly,to);
|
||||||
resdatabar->show(to);
|
resdatabar->show(to);
|
||||||
exit->show(to);
|
exit->show(to);
|
||||||
for(int i=0; i<5; i++)
|
for(int i=0; i<5; i++)
|
||||||
@ -1651,9 +1650,9 @@ CHallInterface::CBuildWindow::CBuildWindow(int Tid, int Bid, int State, bool Mod
|
|||||||
pos.y = screen->h/2 - bitmap->h/2;
|
pos.y = screen->h/2 - bitmap->h/2;
|
||||||
blitAt(LOCPLINT->castleInt->bicons->ourImages[bid].bitmap,125,50,bitmap);
|
blitAt(LOCPLINT->castleInt->bicons->ourImages[bid].bitmap,125,50,bitmap);
|
||||||
std::vector<std::string> pom; pom.push_back(CGI->buildh->buildings[tid][bid]->Name());
|
std::vector<std::string> pom; pom.push_back(CGI->buildh->buildings[tid][bid]->Name());
|
||||||
CSDL_Ext::printAtMiddleWB(CGI->buildh->buildings[tid][bid]->Description(),197,168,GEOR16,40,zwykly,bitmap);
|
CSDL_Ext::printAtMiddleWB(CGI->buildh->buildings[tid][bid]->Description(),197,168,FONT_MEDIUM,43,zwykly,bitmap);
|
||||||
CSDL_Ext::printAtMiddleWB(getTextForState(state),197,248,GEOR13,50,zwykly,bitmap);
|
CSDL_Ext::printAtMiddleWB(getTextForState(state),199,248,FONT_SMALL,50,zwykly,bitmap);
|
||||||
CSDL_Ext::printAtMiddle(CSDL_Ext::processStr(CGI->generaltexth->hcommands[7],pom),197,30,GEOR16,tytulowy,bitmap);
|
CSDL_Ext::printAtMiddle(CSDL_Ext::processStr(CGI->generaltexth->hcommands[7],pom),197,30,FONT_BIG,tytulowy,bitmap);
|
||||||
|
|
||||||
int resamount=0;
|
int resamount=0;
|
||||||
for(int i=0;i<7;i++)
|
for(int i=0;i<7;i++)
|
||||||
@ -1663,7 +1662,7 @@ CHallInterface::CBuildWindow::CBuildWindow(int Tid, int Bid, int State, bool Mod
|
|||||||
resamount++;
|
resamount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int ah = (resamount>4) ? 304 : 341;
|
int ah = (resamount>4) ? 304 : 340;
|
||||||
int cn=-1, it=0;
|
int cn=-1, it=0;
|
||||||
int row1w = std::min(resamount,4) * 32 + (std::min(resamount,4)-1) * 45,
|
int row1w = std::min(resamount,4) * 32 + (std::min(resamount,4)-1) * 45,
|
||||||
row2w = (resamount-4) * 32 + (resamount-5) * 45;
|
row2w = (resamount-4) * 32 + (resamount-5) * 45;
|
||||||
@ -1675,12 +1674,12 @@ CHallInterface::CBuildWindow::CBuildWindow(int Tid, int Bid, int State, bool Mod
|
|||||||
SDL_itoa(CGI->buildh->buildings[tid][bid]->resources[cn],buf,10);
|
SDL_itoa(CGI->buildh->buildings[tid][bid]->resources[cn],buf,10);
|
||||||
if(it<4)
|
if(it<4)
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAtMiddle(buf,(bitmap->w/2-row1w/2)+77*it+16,ah+42,GEOR16,zwykly,bitmap);
|
CSDL_Ext::printAtMiddle(buf,(bitmap->w/2-row1w/2)+77*it+16,ah+47,FONT_SMALL,zwykly,bitmap);
|
||||||
blitAt(graphics->resources32->ourImages[cn].bitmap,(bitmap->w/2-row1w/2)+77*it++,ah,bitmap);
|
blitAt(graphics->resources32->ourImages[cn].bitmap,(bitmap->w/2-row1w/2)+77*it++,ah,bitmap);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAtMiddle(buf,(bitmap->w/2-row2w/2)+77*it+16-308,ah+42,GEOR16,zwykly,bitmap);
|
CSDL_Ext::printAtMiddle(buf,(bitmap->w/2-row2w/2)+77*it+16-308,ah+47,FONT_SMALL,zwykly,bitmap);
|
||||||
blitAt(graphics->resources32->ourImages[cn].bitmap,(bitmap->w/2-row2w/2)+77*it++ - 308,ah,bitmap);
|
blitAt(graphics->resources32->ourImages[cn].bitmap,(bitmap->w/2-row2w/2)+77*it++ - 308,ah,bitmap);
|
||||||
}
|
}
|
||||||
if(it==4)
|
if(it==4)
|
||||||
@ -1785,34 +1784,34 @@ void CFortScreen::draw( CCastleInterface * owner, bool first)
|
|||||||
graphics->blueToPlayersAdv(bg2,LOCPLINT->playerID);
|
graphics->blueToPlayersAdv(bg2,LOCPLINT->playerID);
|
||||||
bg = SDL_ConvertSurface(bg2,screen->format,0);
|
bg = SDL_ConvertSurface(bg2,screen->format,0);
|
||||||
SDL_FreeSurface(bg2);
|
SDL_FreeSurface(bg2);
|
||||||
printAtMiddle(CGI->buildh->buildings[owner->town->subID][owner->town->fortLevel()+6]->Name(),400,13,GEORXX,zwykly,bg);
|
printAtMiddle(CGI->buildh->buildings[owner->town->subID][owner->town->fortLevel()+6]->Name(),400,13,FONT_MEDIUM,zwykly,bg);
|
||||||
for(int i=0;i<CREATURES_PER_TOWN; i++)
|
for(int i=0;i<CREATURES_PER_TOWN; i++)
|
||||||
{
|
{
|
||||||
bool upgraded = owner->town->creatureDwelling(i,true);
|
bool upgraded = owner->town->creatureDwelling(i,true);
|
||||||
bool present = owner->town->creatureDwelling(i,false);
|
bool present = owner->town->creatureDwelling(i,false);
|
||||||
CCreature *c = &CGI->creh->creatures[upgraded ? owner->town->town->upgradedCreatures[i] : owner->town->town->basicCreatures[i]];
|
CCreature *c = &CGI->creh->creatures[upgraded ? owner->town->town->upgradedCreatures[i] : owner->town->town->basicCreatures[i]];
|
||||||
printAtMiddle(c->namePl,positions[i].x+79,positions[i].y+10,GEOR13,zwykly,bg); //cr. name
|
printAtMiddle(c->namePl,positions[i].x+79,positions[i].y+10,FONT_SMALL,zwykly,bg); //cr. name
|
||||||
blitAt(owner->bicons->ourImages[30+i+upgraded*7].bitmap,positions[i].x+4,positions[i].y+21,bg); //dwelling pic
|
blitAt(owner->bicons->ourImages[30+i+upgraded*7].bitmap,positions[i].x+4,positions[i].y+21,bg); //dwelling pic
|
||||||
printAtMiddle(CGI->buildh->buildings[owner->town->subID][30+i+upgraded*7]->Name(),positions[i].x+79,positions[i].y+100,GEOR13,zwykly,bg); //dwelling name
|
printAtMiddle(CGI->buildh->buildings[owner->town->subID][30+i+upgraded*7]->Name(),positions[i].x+79,positions[i].y+100,FONT_SMALL,zwykly,bg); //dwelling name
|
||||||
if(present) //if creature is present print avail able quantity
|
if(present) //if creature is present print avail able quantity
|
||||||
{
|
{
|
||||||
SDL_itoa(owner->town->creatures[i].first,buf,10);
|
SDL_itoa(owner->town->creatures[i].first,buf,10);
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[217] + buf,positions[i].x+79,positions[i].y+118,GEOR13,zwykly,bg);
|
printAtMiddle(CGI->generaltexth->allTexts[217] + buf,positions[i].x+79,positions[i].y+118,FONT_SMALL,zwykly,bg);
|
||||||
}
|
}
|
||||||
blitAt(icons,positions[i].x+261,positions[i].y+3,bg);
|
blitAt(icons,positions[i].x+261,positions[i].y+3,bg);
|
||||||
|
|
||||||
//attack
|
//attack
|
||||||
printAt(CGI->generaltexth->allTexts[190],positions[i].x+288,positions[i].y+5,GEOR13,zwykly,bg);
|
printAt(CGI->generaltexth->allTexts[190],positions[i].x+288,positions[i].y+5,FONT_SMALL,zwykly,bg);
|
||||||
SDL_itoa(c->attack,buf,10);
|
SDL_itoa(c->attack,buf,10);
|
||||||
printToWR(buf,positions[i].x+381,positions[i].y+18,GEOR13,zwykly,bg);
|
printTo(buf,positions[i].x+381,positions[i].y+21,FONT_SMALL,zwykly,bg);
|
||||||
|
|
||||||
//defense
|
//defense
|
||||||
printAt(CGI->generaltexth->allTexts[191],positions[i].x+288,positions[i].y+25,GEOR13,zwykly,bg);
|
printAt(CGI->generaltexth->allTexts[191],positions[i].x+288,positions[i].y+25,FONT_SMALL,zwykly,bg);
|
||||||
SDL_itoa(c->defence,buf,10);
|
SDL_itoa(c->defence,buf,10);
|
||||||
printToWR(buf,positions[i].x+381,positions[i].y+38,GEOR13,zwykly,bg);
|
printTo(buf,positions[i].x+381,positions[i].y+41,FONT_SMALL,zwykly,bg);
|
||||||
|
|
||||||
//damage
|
//damage
|
||||||
printAt(CGI->generaltexth->allTexts[199],positions[i].x+288,positions[i].y+46,GEOR13,zwykly,bg);
|
printAt(CGI->generaltexth->allTexts[199],positions[i].x+288,positions[i].y+46,FONT_SMALL,zwykly,bg);
|
||||||
SDL_itoa(c->damageMin,buf,10);
|
SDL_itoa(c->damageMin,buf,10);
|
||||||
int hlp;
|
int hlp;
|
||||||
if(c->damageMin > 0)
|
if(c->damageMin > 0)
|
||||||
@ -1821,23 +1820,23 @@ void CFortScreen::draw( CCastleInterface * owner, bool first)
|
|||||||
hlp = 2;
|
hlp = 2;
|
||||||
buf[hlp-1]=' '; buf[hlp]='-'; buf[hlp+1]=' ';
|
buf[hlp-1]=' '; buf[hlp]='-'; buf[hlp+1]=' ';
|
||||||
SDL_itoa(c->damageMax,buf+hlp+2,10);
|
SDL_itoa(c->damageMax,buf+hlp+2,10);
|
||||||
printToWR(buf,positions[i].x+381,positions[i].y+59,GEOR13,zwykly,bg);
|
printTo(buf,positions[i].x+381,positions[i].y+62,FONT_SMALL,zwykly,bg);
|
||||||
|
|
||||||
//health
|
//health
|
||||||
printAt(CGI->generaltexth->zelp[439].first,positions[i].x+288,positions[i].y+66,GEOR13,zwykly,bg);
|
printAt(CGI->generaltexth->zelp[439].first,positions[i].x+288,positions[i].y+66,FONT_SMALL,zwykly,bg);
|
||||||
SDL_itoa(c->hitPoints,buf,10);
|
SDL_itoa(c->hitPoints,buf,10);
|
||||||
printToWR(buf,positions[i].x+381,positions[i].y+79,GEOR13,zwykly,bg);
|
printTo(buf,positions[i].x+381,positions[i].y+82,FONT_SMALL,zwykly,bg);
|
||||||
|
|
||||||
//speed
|
//speed
|
||||||
printAt(CGI->generaltexth->zelp[441].first,positions[i].x+288,positions[i].y+87,GEOR13,zwykly,bg);
|
printAt(CGI->generaltexth->zelp[441].first,positions[i].x+288,positions[i].y+87,FONT_SMALL,zwykly,bg);
|
||||||
SDL_itoa(c->speed,buf,10);
|
SDL_itoa(c->speed,buf,10);
|
||||||
printToWR(buf,positions[i].x+381,positions[i].y+100,GEOR13,zwykly,bg);
|
printTo(buf,positions[i].x+381,positions[i].y+103,FONT_SMALL,zwykly,bg);
|
||||||
|
|
||||||
if(present)//growth
|
if(present)//growth
|
||||||
{
|
{
|
||||||
printAt(CGI->generaltexth->allTexts[194],positions[i].x+288,positions[i].y+107,GEOR13,zwykly,bg);
|
printAt(CGI->generaltexth->allTexts[194],positions[i].x+288,positions[i].y+107,FONT_SMALL,zwykly,bg);
|
||||||
SDL_itoa(owner->town->creatureGrowth(i),buf,10);
|
SDL_itoa(owner->town->creatureGrowth(i),buf,10);
|
||||||
printToWR(buf,positions[i].x+381,positions[i].y+120,GEOR13,zwykly,bg);
|
printTo(buf,positions[i].x+381,positions[i].y+123,FONT_SMALL,zwykly,bg);
|
||||||
}
|
}
|
||||||
if(first)
|
if(first)
|
||||||
{
|
{
|
||||||
@ -2000,10 +1999,10 @@ CBlacksmithDialog::CBlacksmithDialog(bool possible, int creMachineID, int aid, i
|
|||||||
cra.nextFrameMiddle(bmp,170,120,true,0,false);
|
cra.nextFrameMiddle(bmp,170,120,true,0,false);
|
||||||
char pom[75];
|
char pom[75];
|
||||||
sprintf(pom,CGI->generaltexth->allTexts[274].c_str(),CGI->creh->creatures[creMachineID].nameSing.c_str()); //build a new ...
|
sprintf(pom,CGI->generaltexth->allTexts[274].c_str(),CGI->creh->creatures[creMachineID].nameSing.c_str()); //build a new ...
|
||||||
printAtMiddle(pom,165,28,GEORXX,tytulowy,bmp);
|
printAtMiddle(pom,165,28,FONT_MEDIUM,tytulowy,bmp);
|
||||||
printAtMiddle(CGI->generaltexth->jktexts[43],165,218,GEOR16,zwykly,bmp); //resource cost
|
printAtMiddle(CGI->generaltexth->jktexts[43],165,218,FONT_MEDIUM,zwykly,bmp); //resource cost
|
||||||
SDL_itoa(CGI->arth->artifacts[aid].price,pom,10);
|
SDL_itoa(CGI->arth->artifacts[aid].price,pom,10);
|
||||||
printAtMiddle(pom,165,290,GEOR13,zwykly,bmp);
|
printAtMiddle(pom,165,290,FONT_MEDIUM,zwykly,bmp);
|
||||||
|
|
||||||
pos.w = bmp->w;
|
pos.w = bmp->w;
|
||||||
pos.h = bmp->h;
|
pos.h = bmp->h;
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
extern SDL_Surface * screen;
|
extern SDL_Surface * screen;
|
||||||
extern TTF_Font * GEOR16;
|
|
||||||
using namespace boost::assign;
|
using namespace boost::assign;
|
||||||
CHeroWindow::CHeroWindow(int playerColor):
|
CHeroWindow::CHeroWindow(int playerColor):
|
||||||
player(playerColor)
|
player(playerColor)
|
||||||
@ -417,41 +416,41 @@ void CHeroWindow::redrawCurBack()
|
|||||||
blitAt(graphics->portraitLarge[curHero->portrait], 19, 19, curBack);
|
blitAt(graphics->portraitLarge[curHero->portrait], 19, 19, curBack);
|
||||||
|
|
||||||
//printing hero's name
|
//printing hero's name
|
||||||
CSDL_Ext::printAtMiddle(curHero->name, 190, 40, GEORXX, tytulowy, curBack);
|
CSDL_Ext::printAtMiddle(curHero->name, 190, 38, FONT_BIG, tytulowy, curBack);
|
||||||
|
|
||||||
//printing hero's level
|
//printing hero's level
|
||||||
std::ostringstream secondLine;
|
std::ostringstream secondLine;
|
||||||
secondLine<<"Level "<<curHero->level<<" "<<curHero->type->heroClass->name;
|
secondLine<<"Level "<<curHero->level<<" "<<curHero->type->heroClass->name;
|
||||||
CSDL_Ext::printAtMiddle(secondLine.str(), 190, 66, TNRB16, zwykly, curBack);
|
CSDL_Ext::printAtMiddle(secondLine.str(), 190, 65, FONT_MEDIUM, zwykly, curBack);
|
||||||
|
|
||||||
//primary skills names
|
//primary skills names
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->jktexts[1], 53, 98, GEOR13, tytulowy, curBack);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->jktexts[1], 52, 99, FONT_SMALL, tytulowy, curBack);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->jktexts[2], 123, 98, GEOR13, tytulowy, curBack);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->jktexts[2], 123, 99, FONT_SMALL, tytulowy, curBack);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->jktexts[3], 193, 98, GEOR13, tytulowy, curBack);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->jktexts[3], 193, 99, FONT_SMALL, tytulowy, curBack);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->jktexts[4], 263, 98, GEOR13, tytulowy, curBack);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->jktexts[4], 262, 99, FONT_SMALL, tytulowy, curBack);
|
||||||
|
|
||||||
//dismiss / quest log
|
//dismiss / quest log
|
||||||
std::vector<std::string> * toPrin = CMessage::breakText(CGI->generaltexth->jktexts[8].substr(1, CGI->generaltexth->jktexts[8].size()-2));
|
std::vector<std::string> * toPrin = CMessage::breakText(CGI->generaltexth->jktexts[8].substr(1, CGI->generaltexth->jktexts[8].size()-2));
|
||||||
if(toPrin->size()==1)
|
if(toPrin->size()==1)
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAt((*toPrin)[0], 372, 440, GEOR13, zwykly, curBack);
|
CSDL_Ext::printAt((*toPrin)[0], 372, 439, FONT_SMALL, zwykly, curBack);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAt((*toPrin)[0], 372, 431, GEOR13, zwykly, curBack);
|
CSDL_Ext::printAt((*toPrin)[0], 372, 430, FONT_SMALL, zwykly, curBack);
|
||||||
CSDL_Ext::printAt((*toPrin)[1], 372, 447, GEOR13, zwykly, curBack);
|
CSDL_Ext::printAt((*toPrin)[1], 372, 446, FONT_SMALL, zwykly, curBack);
|
||||||
}
|
}
|
||||||
delete toPrin;
|
delete toPrin;
|
||||||
|
|
||||||
toPrin = CMessage::breakText(CGI->generaltexth->jktexts[9].substr(1, CGI->generaltexth->jktexts[9].size()-2));
|
toPrin = CMessage::breakText(CGI->generaltexth->jktexts[9].substr(1, CGI->generaltexth->jktexts[9].size()-2));
|
||||||
if(toPrin->size()==1)
|
if(toPrin->size()==1)
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAt((*toPrin)[0], 512, 440, GEOR13, zwykly, curBack);
|
CSDL_Ext::printAt((*toPrin)[0], 512, 439, FONT_SMALL, zwykly, curBack);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CSDL_Ext::printAt((*toPrin)[0], 512, 431, GEOR13, zwykly, curBack);
|
CSDL_Ext::printAt((*toPrin)[0], 512, 430, FONT_SMALL, zwykly, curBack);
|
||||||
CSDL_Ext::printAt((*toPrin)[1], 512, 447, GEOR13, zwykly, curBack);
|
CSDL_Ext::printAt((*toPrin)[1], 512, 446, FONT_SMALL, zwykly, curBack);
|
||||||
}
|
}
|
||||||
delete toPrin;
|
delete toPrin;
|
||||||
|
|
||||||
@ -460,7 +459,7 @@ void CHeroWindow::redrawCurBack()
|
|||||||
{
|
{
|
||||||
std::ostringstream primarySkill;
|
std::ostringstream primarySkill;
|
||||||
primarySkill<<curHero->getPrimSkillLevel(m);
|
primarySkill<<curHero->getPrimSkillLevel(m);
|
||||||
CSDL_Ext::printAtMiddle(primarySkill.str(), 53 + 70 * m, 165, TNRB16, zwykly, curBack);
|
CSDL_Ext::printAtMiddle(primarySkill.str(), 53 + 70 * m, 166, FONT_SMALL, zwykly, curBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
//morale and luck printing
|
//morale and luck printing
|
||||||
@ -502,25 +501,25 @@ void CHeroWindow::redrawCurBack()
|
|||||||
if(curHero->secSkills.size()>=g)
|
if(curHero->secSkills.size()>=g)
|
||||||
{
|
{
|
||||||
blitAt(graphics->abils44->ourImages[curHero->secSkills[g-1].first*3+3+curHero->secSkills[g-1].second-1].bitmap, g%2 ? 18 : 161, 276 + 48 * ((g-1)/2), curBack);
|
blitAt(graphics->abils44->ourImages[curHero->secSkills[g-1].first*3+3+curHero->secSkills[g-1].second-1].bitmap, g%2 ? 18 : 161, 276 + 48 * ((g-1)/2), curBack);
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->levels[curHero->secSkills[g-1].second-1], g%2 ? 69 : 213, 279 + 48 * ((g-1)/2), GEOR13, zwykly, curBack);
|
CSDL_Ext::printAt(CGI->generaltexth->levels[curHero->secSkills[g-1].second-1], g%2 ? 68 : 212, 280 + 48 * ((g-1)/2), FONT_SMALL, zwykly, curBack);
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->skillName[curHero->secSkills[g-1].first], g%2 ? 69 : 213, 299 + 48 * ((g-1)/2), GEOR13, zwykly, curBack);
|
CSDL_Ext::printAt(CGI->generaltexth->skillName[curHero->secSkills[g-1].first], g%2 ? 68 : 212, 300 + 48 * ((g-1)/2), FONT_SMALL, zwykly, curBack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//printing special ability
|
//printing special ability
|
||||||
blitAt(graphics->un44->ourImages[curHero->subID].bitmap, 18, 180, curBack);
|
blitAt(graphics->un44->ourImages[curHero->subID].bitmap, 18, 180, curBack);
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->jktexts[5].substr(1, CGI->generaltexth->jktexts[5].size()-2), 69, 183, GEOR13, tytulowy, curBack);
|
CSDL_Ext::printAt(CGI->generaltexth->jktexts[5].substr(1, CGI->generaltexth->jktexts[5].size()-2), 69, 183, FONT_SMALL, tytulowy, curBack);
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->hTxts[curHero->subID].bonusName, 69, 199, GEOR16, zwykly, curBack);
|
CSDL_Ext::printAt(CGI->generaltexth->hTxts[curHero->subID].bonusName, 69, 205, FONT_SMALL, zwykly, curBack);
|
||||||
|
|
||||||
//printing necessery texts
|
//printing necessery texts
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->jktexts[6].substr(1, CGI->generaltexth->jktexts[6].size()-2), 69, 231, GEOR13, tytulowy, curBack);
|
CSDL_Ext::printAt(CGI->generaltexth->jktexts[6].substr(1, CGI->generaltexth->jktexts[6].size()-2), 69, 232, FONT_SMALL, tytulowy, curBack);
|
||||||
std::ostringstream expstr;
|
std::ostringstream expstr;
|
||||||
expstr<<curHero->exp;
|
expstr<<curHero->exp;
|
||||||
CSDL_Ext::printAt(expstr.str(), 69, 247, GEOR16, zwykly, curBack);
|
CSDL_Ext::printAt(expstr.str(), 68, 252, FONT_SMALL, zwykly, curBack);
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->jktexts[7].substr(1, CGI->generaltexth->jktexts[7].size()-2), 212, 231, GEOR13, tytulowy, curBack);
|
CSDL_Ext::printAt(CGI->generaltexth->jktexts[7].substr(1, CGI->generaltexth->jktexts[7].size()-2), 213, 232, FONT_SMALL, tytulowy, curBack);
|
||||||
std::ostringstream manastr;
|
std::ostringstream manastr;
|
||||||
manastr << curHero->mana << '/' << curHero->manaLimit();
|
manastr << curHero->mana << '/' << curHero->manaLimit();
|
||||||
CSDL_Ext::printAt(manastr.str(), 212, 247, GEOR16, zwykly, curBack);
|
CSDL_Ext::printAt(manastr.str(), 211, 252, FONT_SMALL, zwykly, curBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHeroWindow::dispose()
|
void CHeroWindow::dispose()
|
||||||
|
@ -251,7 +251,7 @@ void CKingdomInterface::showAll( SDL_Surface * to/*=NULL*/)
|
|||||||
|
|
||||||
std::ostringstream ostrs;//objects count
|
std::ostringstream ostrs;//objects count
|
||||||
ostrs << (*it).second.first;
|
ostrs << (*it).second.first;
|
||||||
CSDL_Ext::printTo(ostrs.str(),pos.x+790,pos.y+94+curPos*57,GEOR13,zwykly,to);
|
CSDL_Ext::printTo(ostrs.str(),pos.x+790,pos.y+94+curPos*57,FONT_SMALL,zwykly,to);
|
||||||
|
|
||||||
ObjList[curPos]->hoverText = * (*it).second.second;
|
ObjList[curPos]->hoverText = * (*it).second.second;
|
||||||
curPos++;
|
curPos++;
|
||||||
@ -261,16 +261,16 @@ void CKingdomInterface::showAll( SDL_Surface * to/*=NULL*/)
|
|||||||
|
|
||||||
if (state == 1)
|
if (state == 1)
|
||||||
{//printing text "Town", "Harrisoned hero", "Visiting hero"
|
{//printing text "Town", "Harrisoned hero", "Visiting hero"
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[3],pos.x+145,pos.y+12,TNRB16,zwykly,to);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[3],pos.x+144,pos.y+14,FONT_MEDIUM,zwykly,to);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[4],pos.x+370,pos.y+12,TNRB16,zwykly,to);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[4],pos.x+373,pos.y+14,FONT_MEDIUM,zwykly,to);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[5],pos.x+600,pos.y+12,TNRB16,zwykly,to);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[5],pos.x+606,pos.y+14,FONT_MEDIUM,zwykly,to);
|
||||||
for (size_t i=0; i<size; i++)
|
for (size_t i=0; i<size; i++)
|
||||||
towns[i]->showAll(to);//show town list
|
towns[i]->showAll(to);//show town list
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{//text "Hero/stats" and "Skills"
|
{//text "Hero/stats" and "Skills"
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[0],pos.x+150,pos.y+12,TNRB16,zwykly,to);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[0],pos.x+150,pos.y+14,FONT_MEDIUM,zwykly,to);
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[1],pos.x+500,pos.y+12,TNRB16,zwykly,to);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[1],pos.x+500,pos.y+14,FONT_MEDIUM,zwykly,to);
|
||||||
for (size_t i=0; i<size; i++)
|
for (size_t i=0; i<size; i++)
|
||||||
heroes[i]->showAll(to);//show hero list
|
heroes[i]->showAll(to);//show hero list
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ void CKingdomInterface::showAll( SDL_Surface * to/*=NULL*/)
|
|||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << incomesVal[i];
|
oss << incomesVal[i];
|
||||||
CSDL_Ext::printAtMiddle(oss.str(),incomes[i]->pos.x+incomes[i]->pos.w/2,incomes[i]->pos.y+50,GEOR13,zwykly,to);
|
CSDL_Ext::printAtMiddle(oss.str(),incomes[i]->pos.x+incomes[i]->pos.w/2,incomes[i]->pos.y+50,FONT_SMALL,zwykly,to);
|
||||||
}
|
}
|
||||||
|
|
||||||
slider->showAll(to);
|
slider->showAll(to);
|
||||||
@ -609,7 +609,7 @@ void CKingdomInterface::CTownItem::showAll(SDL_Surface * to)
|
|||||||
if(town->builded >= MAX_BUILDING_PER_TURN)
|
if(town->builded >= MAX_BUILDING_PER_TURN)
|
||||||
townPic++;
|
townPic++;
|
||||||
blitAt(graphics->bigTownPic->ourImages[townPic].bitmap,pos.x+5,pos.y+6,to);
|
blitAt(graphics->bigTownPic->ourImages[townPic].bitmap,pos.x+5,pos.y+6,to);
|
||||||
CSDL_Ext::printAt(town->name,pos.x+73,pos.y+7,GEOR13,zwykly,to);
|
CSDL_Ext::printAt(town->name,pos.x+73,pos.y+8,FONT_SMALL,zwykly,to);
|
||||||
//fort pic
|
//fort pic
|
||||||
townPic = town->fortLevel()-1;
|
townPic = town->fortLevel()-1;
|
||||||
if (townPic==-1) townPic = 3;
|
if (townPic==-1) townPic = 3;
|
||||||
@ -620,7 +620,7 @@ void CKingdomInterface::CTownItem::showAll(SDL_Surface * to)
|
|||||||
//income pic
|
//income pic
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << town->dailyIncome();
|
oss << town->dailyIncome();
|
||||||
CSDL_Ext::printAtMiddle(oss.str(),pos.x+188,pos.y+60,GEOR13,zwykly,to);
|
CSDL_Ext::printAtMiddle(oss.str(),pos.x+189,pos.y+61,FONT_SMALL,zwykly,to);
|
||||||
// Creature bonuses/ Creature available texts - need to find text wrapper thingy (have "\n" inside text)
|
// Creature bonuses/ Creature available texts - need to find text wrapper thingy (have "\n" inside text)
|
||||||
// CSDL_Ext::printAtWR(CGI->generaltexth->allTexts[265],pos.x,pos.y+80,GEOR13,zwykly,to);
|
// CSDL_Ext::printAtWR(CGI->generaltexth->allTexts[265],pos.x,pos.y+80,GEOR13,zwykly,to);
|
||||||
// CSDL_Ext::printTo(CGI->generaltexth->allTexts[266],pos.x+350,pos.y+80,GEOR13,zwykly,to);
|
// CSDL_Ext::printTo(CGI->generaltexth->allTexts[266],pos.x+350,pos.y+80,GEOR13,zwykly,to);
|
||||||
@ -642,12 +642,12 @@ void CKingdomInterface::CTownItem::showAll(SDL_Surface * to)
|
|||||||
blitAt(graphics->smallImgs[crid],pos.x+56+i*37,pos.y+78,to);
|
blitAt(graphics->smallImgs[crid],pos.x+56+i*37,pos.y+78,to);
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << '+' << town->creatureGrowth(i);
|
oss << '+' << town->creatureGrowth(i);
|
||||||
CSDL_Ext::printTo(oss.str(),pos.x+87+i*37,pos.y+110,GEORM,zwykly,to);
|
CSDL_Ext::printTo(oss.str(),pos.x+87+i*37,pos.y+110,FONT_TINY,zwykly,to);
|
||||||
//creature available
|
//creature available
|
||||||
blitAt(graphics->smallImgs[crid],pos.x+409+i*37,pos.y+78,to);
|
blitAt(graphics->smallImgs[crid],pos.x+409+i*37,pos.y+78,to);
|
||||||
std::ostringstream ostrs;
|
std::ostringstream ostrs;
|
||||||
ostrs << town->creatures[i].first;
|
ostrs << town->creatures[i].first;
|
||||||
CSDL_Ext::printTo(ostrs.str(),pos.x+440+i*37,pos.y+110,GEORM,zwykly,to);
|
CSDL_Ext::printTo(ostrs.str(),pos.x+440+i*37,pos.y+110,FONT_TINY,zwykly,to);
|
||||||
}
|
}
|
||||||
|
|
||||||
garr->show(to);
|
garr->show(to);
|
||||||
@ -882,12 +882,12 @@ void CKingdomInterface::CHeroItem::showAll(SDL_Surface * to)
|
|||||||
}//print background, different for arts view/backpack mode
|
}//print background, different for arts view/backpack mode
|
||||||
blitAt(slots->ourImages[(artGroup!=2)?owner->PicCount:(owner->PicCount+1)].bitmap,pos.x,pos.y,to);
|
blitAt(slots->ourImages[(artGroup!=2)?owner->PicCount:(owner->PicCount+1)].bitmap,pos.x,pos.y,to);
|
||||||
//text "Artifacts"
|
//text "Artifacts"
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[2],pos.x+320,pos.y+55,GEOR13,zwykly,to);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->overview[2],pos.x+320,pos.y+55,FONT_SMALL,zwykly,to);
|
||||||
blitAt(graphics->portraitLarge[hero->portrait],pos.x+5,pos.y+6,to);
|
blitAt(graphics->portraitLarge[hero->portrait],pos.x+5,pos.y+6,to);
|
||||||
|
|
||||||
garr->show(to);
|
garr->show(to);
|
||||||
//hero name
|
//hero name
|
||||||
CSDL_Ext::printAt(hero->name,pos.x+73,pos.y+7,GEOR13,zwykly,to);
|
CSDL_Ext::printAt(hero->name,pos.x+73,pos.y+7,FONT_SMALL,zwykly,to);
|
||||||
for (int i = 0; i<6; i++)
|
for (int i = 0; i<6; i++)
|
||||||
{//primary skills, mana and exp. pics
|
{//primary skills, mana and exp. pics
|
||||||
blitAt(graphics->pskillst->ourImages[i].bitmap,(i<4)?(pos.x+78+36*i):(pos.x+539-52*i),
|
blitAt(graphics->pskillst->ourImages[i].bitmap,(i<4)?(pos.x+78+36*i):(pos.x+539-52*i),
|
||||||
@ -895,17 +895,17 @@ void CKingdomInterface::CHeroItem::showAll(SDL_Surface * to)
|
|||||||
if (i>3) continue;//primary skills text
|
if (i>3) continue;//primary skills text
|
||||||
std::ostringstream str;
|
std::ostringstream str;
|
||||||
str << (hero->primSkills[i]);
|
str << (hero->primSkills[i]);
|
||||||
CSDL_Ext::printAtMiddle(str.str(),pos.x+95+36*i,pos.y+65,GEOR13,zwykly,to);
|
CSDL_Ext::printAtMiddle(str.str(),pos.x+94+36*i,pos.y+66,FONT_SMALL,zwykly,to);
|
||||||
}
|
}
|
||||||
{//luck and morale pics, experience and mana text
|
{//luck and morale pics, experience and mana text
|
||||||
blitAt(graphics->luck30->ourImages[hero->getCurrentLuck()+3].bitmap,pos.x+222,pos.y+30,to);
|
blitAt(graphics->luck30->ourImages[hero->getCurrentLuck()+3].bitmap,pos.x+222,pos.y+30,to);
|
||||||
blitAt(graphics->morale30->ourImages[hero->getCurrentMorale()+3].bitmap,pos.x+222,pos.y+54,to);
|
blitAt(graphics->morale30->ourImages[hero->getCurrentMorale()+3].bitmap,pos.x+222,pos.y+54,to);
|
||||||
std::ostringstream str;
|
std::ostringstream str;
|
||||||
str << (hero->exp);
|
str << (hero->exp);
|
||||||
CSDL_Ext::printAtMiddle(str.str(),(pos.x+348),(pos.y+31),GEORM,zwykly,to);
|
CSDL_Ext::printAtMiddle(str.str(),(pos.x+348),(pos.y+31),FONT_TINY,zwykly,to);
|
||||||
std::ostringstream strnew;
|
std::ostringstream strnew;
|
||||||
strnew << (hero->mana)<<"/"<<(hero->manaLimit());
|
strnew << (hero->mana)<<"/"<<(hero->manaLimit());
|
||||||
CSDL_Ext::printAtMiddle(strnew.str(),(pos.x+298),(pos.y+31),GEORM,zwykly,to);
|
CSDL_Ext::printAtMiddle(strnew.str(),(pos.x+295),(pos.y+30),FONT_TINY,zwykly,to);
|
||||||
}
|
}
|
||||||
//hero speciality
|
//hero speciality
|
||||||
blitAt(graphics->un32->ourImages[hero->subID].bitmap, pos.x+375, pos.y+6, to);
|
blitAt(graphics->un32->ourImages[hero->subID].bitmap, pos.x+375, pos.y+6, to);
|
||||||
|
@ -362,7 +362,7 @@ SDL_Surface * CMessage::drawBoxTextBitmapSub( int player, std::string text, SDL_
|
|||||||
curh += imgToBmp;
|
curh += imgToBmp;
|
||||||
blitAt(bitmap,(ret->w/2)-(bitmap->w/2),curh,ret);
|
blitAt(bitmap,(ret->w/2)-(bitmap->w/2),curh,ret);
|
||||||
curh += bitmap->h + 5;
|
curh += bitmap->h + 5;
|
||||||
CSDL_Ext::printAtMiddle(sub,ret->w/2,curh+10,GEOR13,zwykly,ret);
|
CSDL_Ext::printAtMiddle(sub,ret->w/2,curh+10,FONT_SMALL,zwykly,ret);
|
||||||
delete tekst;
|
delete tekst;
|
||||||
delete txtg;
|
delete txtg;
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
extern SDL_Surface * screen;
|
extern SDL_Surface * screen;
|
||||||
extern SDL_Color tytulowy, zwykly, darkTitle;
|
extern SDL_Color tytulowy, zwykly, darkTitle;
|
||||||
extern TTF_Font *GEOR16;
|
|
||||||
|
|
||||||
SpellbookInteractiveArea::SpellbookInteractiveArea(const SDL_Rect & myRect, boost::function<void()> funcL, const std::string & textR, boost::function<void()> funcHon, boost::function<void()> funcHoff)
|
SpellbookInteractiveArea::SpellbookInteractiveArea(const SDL_Rect & myRect, boost::function<void()> funcL, const std::string & textR, boost::function<void()> funcHon, boost::function<void()> funcHoff)
|
||||||
{
|
{
|
||||||
@ -218,10 +217,6 @@ CSpellWindow::CSpellWindow(const SDL_Rect & myRect, const CGHeroInstance * _myHe
|
|||||||
background = BitmapHandler::loadBitmap("SpelBack.bmp");
|
background = BitmapHandler::loadBitmap("SpelBack.bmp");
|
||||||
graphics->blueToPlayersAdv(background, myHero->tempOwner);
|
graphics->blueToPlayersAdv(background, myHero->tempOwner);
|
||||||
|
|
||||||
std::ostringstream mana;
|
|
||||||
mana<<myHero->mana;
|
|
||||||
CSDL_Ext::printAtMiddle(mana.str(), 434, 425, GEOR16, tytulowy, background);
|
|
||||||
|
|
||||||
leftCorner = BitmapHandler::loadBitmap("SpelTrnL.bmp", true);
|
leftCorner = BitmapHandler::loadBitmap("SpelTrnL.bmp", true);
|
||||||
rightCorner = BitmapHandler::loadBitmap("SpelTrnR.bmp", true);
|
rightCorner = BitmapHandler::loadBitmap("SpelTrnR.bmp", true);
|
||||||
spells = CDefHandler::giveDef("Spells.def");
|
spells = CDefHandler::giveDef("Spells.def");
|
||||||
@ -420,6 +415,10 @@ void CSpellWindow::show(SDL_Surface *to)
|
|||||||
{
|
{
|
||||||
SDL_BlitSurface(background, NULL, to, &pos);
|
SDL_BlitSurface(background, NULL, to, &pos);
|
||||||
blitAt(spellTab->ourImages[selectedTab].bitmap, 524 + pos.x, 88 + pos.y, to);
|
blitAt(spellTab->ourImages[selectedTab].bitmap, 524 + pos.x, 88 + pos.y, to);
|
||||||
|
|
||||||
|
std::ostringstream mana;
|
||||||
|
mana<<myHero->mana;
|
||||||
|
CSDL_Ext::printAtMiddle(mana.str(), pos.x+435, pos.y +426, FONT_SMALL, tytulowy, to);
|
||||||
|
|
||||||
statusBar->show(to);
|
statusBar->show(to);
|
||||||
|
|
||||||
@ -476,14 +475,14 @@ void CSpellWindow::show(SDL_Surface *to)
|
|||||||
secondLineColor = zwykly;
|
secondLineColor = zwykly;
|
||||||
}
|
}
|
||||||
//printing spell's name
|
//printing spell's name
|
||||||
CSDL_Ext::printAtMiddle(spell->name, spellAreas[b]->pos.x + 39, spellAreas[b]->pos.y + 70, FONT_TIMES, firstLineColor, to);
|
CSDL_Ext::printAtMiddle(spell->name, spellAreas[b]->pos.x + 39, spellAreas[b]->pos.y + 70, FONT_TINY, firstLineColor, to);
|
||||||
//printing lvl
|
//printing lvl
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[171 + spell->level], spellAreas[b]->pos.x + 39, spellAreas[b]->pos.y + 82, FONT_TIMES, secondLineColor, to);
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[171 + spell->level], spellAreas[b]->pos.x + 39, spellAreas[b]->pos.y + 82, FONT_TINY, secondLineColor, to);
|
||||||
//printing cost
|
//printing cost
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss<<CGI->generaltexth->allTexts[387]<<": "<<LOCPLINT->cb->getSpellCost(spell, myHero);
|
ss<<CGI->generaltexth->allTexts[387]<<": "<<LOCPLINT->cb->getSpellCost(spell, myHero);
|
||||||
|
|
||||||
CSDL_Ext::printAtMiddle(ss.str(), spellAreas[b]->pos.x + 39, spellAreas[b]->pos.y + 94, FONT_TIMES, secondLineColor, to);
|
CSDL_Ext::printAtMiddle(ss.str(), spellAreas[b]->pos.x + 39, spellAreas[b]->pos.y + 94, FONT_TINY, secondLineColor, to);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,6 @@
|
|||||||
using namespace boost::assign;
|
using namespace boost::assign;
|
||||||
using namespace CSDL_Ext;
|
using namespace CSDL_Ext;
|
||||||
|
|
||||||
extern TTF_Font * GEOR16;
|
|
||||||
extern std::queue<SDL_Event*> events;
|
extern std::queue<SDL_Event*> events;
|
||||||
extern boost::mutex eventsM;
|
extern boost::mutex eventsM;
|
||||||
|
|
||||||
@ -354,7 +353,7 @@ void CGarrisonSlot::show(SDL_Surface * to)
|
|||||||
char buf[15];
|
char buf[15];
|
||||||
SDL_itoa(count,buf,10);
|
SDL_itoa(count,buf,10);
|
||||||
blitAt(imgs[creature->idNumber],pos,to);
|
blitAt(imgs[creature->idNumber],pos,to);
|
||||||
printToWR(buf, pos.x+pos.w-2, pos.y+pos.h-2, owner->smallIcons ? GEORM : GEOR16, zwykly, to);
|
printTo(buf, pos.x+pos.w, pos.y+pos.h+1, owner->smallIcons ? FONT_TINY : FONT_VERD, zwykly, to);
|
||||||
|
|
||||||
if((owner->highlighted==this)
|
if((owner->highlighted==this)
|
||||||
|| (owner->splitting && owner->highlighted->creature == creature))
|
|| (owner->splitting && owner->highlighted->creature == creature))
|
||||||
@ -1046,7 +1045,7 @@ void CSelectableComponent::select(bool on)
|
|||||||
void CSelectableComponent::show(SDL_Surface * to)
|
void CSelectableComponent::show(SDL_Surface * to)
|
||||||
{
|
{
|
||||||
blitAt(myBitmap,pos.x,pos.y,to);
|
blitAt(myBitmap,pos.x,pos.y,to);
|
||||||
printAtMiddleWB(subtitle,pos.x+pos.w/2,pos.y+pos.h+14,GEOR13,12,zwykly,to);
|
printAtMiddleWB(subtitle,pos.x+pos.w/2,pos.y+pos.h+25,FONT_SMALL,12,zwykly,to);
|
||||||
}
|
}
|
||||||
void CSimpleWindow::show(SDL_Surface * to)
|
void CSimpleWindow::show(SDL_Surface * to)
|
||||||
{
|
{
|
||||||
@ -1158,7 +1157,7 @@ void CStatusBar::show(SDL_Surface * to)
|
|||||||
{
|
{
|
||||||
SDL_Rect pom = genRect(pos.h,pos.w,pos.x,pos.y);
|
SDL_Rect pom = genRect(pos.h,pos.w,pos.x,pos.y);
|
||||||
SDL_BlitSurface(bg,&genRect(pos.h,pos.w,0,0),to,&pom);
|
SDL_BlitSurface(bg,&genRect(pos.h,pos.w,0,0),to,&pom);
|
||||||
printAtMiddle(current,middlex,middley,GEOR13,zwykly,to);
|
printAtMiddle(current,middlex,middley,FONT_SMALL,zwykly,to);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CStatusBar::getCurrent()
|
std::string CStatusBar::getCurrent()
|
||||||
@ -1910,10 +1909,10 @@ void CRecruitmentWindow::show(SDL_Surface * to)
|
|||||||
|
|
||||||
char pom[15];
|
char pom[15];
|
||||||
SDL_itoa(creatures[which].amount-slider->value,pom,10); //available
|
SDL_itoa(creatures[which].amount-slider->value,pom,10); //available
|
||||||
printAtMiddle(pom,pos.x+205,pos.y+252,GEOR13,zwykly,to);
|
printAtMiddle(pom,pos.x+205,pos.y+254,FONT_SMALL,zwykly,to);
|
||||||
SDL_itoa(slider->value,pom,10); //recruit
|
SDL_itoa(slider->value,pom,10); //recruit
|
||||||
printAtMiddle(pom,pos.x+279,pos.y+252,GEOR13,zwykly,to);
|
printAtMiddle(pom,pos.x+279,pos.y+254,FONT_SMALL,zwykly,to);
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[16] + " " + CGI->creh->creatures[creatures[which].ID].namePl,pos.x+243,pos.y+32,GEOR16,tytulowy,to); //eg "Recruit Dragon flies"
|
printAtMiddle(CGI->generaltexth->allTexts[16] + " " + CGI->creh->creatures[creatures[which].ID].namePl,pos.x+243,pos.y+32,FONT_BIG,tytulowy,to); //eg "Recruit Dragon flies"
|
||||||
|
|
||||||
int curx = pos.x+115-creatures[which].res.size()*16;
|
int curx = pos.x+115-creatures[which].res.size()*16;
|
||||||
for(int i=0;i<creatures[which].res.size();i++)
|
for(int i=0;i<creatures[which].res.size();i++)
|
||||||
@ -1921,9 +1920,9 @@ void CRecruitmentWindow::show(SDL_Surface * to)
|
|||||||
blitAt(graphics->resources32->ourImages[creatures[which].res[i].first].bitmap,curx,pos.y+243,to);
|
blitAt(graphics->resources32->ourImages[creatures[which].res[i].first].bitmap,curx,pos.y+243,to);
|
||||||
blitAt(graphics->resources32->ourImages[creatures[which].res[i].first].bitmap,curx+258,pos.y+243,to);
|
blitAt(graphics->resources32->ourImages[creatures[which].res[i].first].bitmap,curx+258,pos.y+243,to);
|
||||||
SDL_itoa(creatures[which].res[i].second,pom,10);
|
SDL_itoa(creatures[which].res[i].second,pom,10);
|
||||||
printAtMiddle(pom,curx+12,pos.y+286,GEOR13,zwykly,to);
|
printAtMiddle(pom,curx+14,pos.y+288,FONT_SMALL,zwykly,to);
|
||||||
SDL_itoa(creatures[which].res[i].second * slider->value,pom,10);
|
SDL_itoa(creatures[which].res[i].second * slider->value,pom,10);
|
||||||
printAtMiddle(pom,curx+12+258,pos.y+286,GEOR13,zwykly,to);
|
printAtMiddle(pom,curx+12+258,pos.y+286,FONT_SMALL,zwykly,to);
|
||||||
curx+=32;
|
curx+=32;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1959,10 +1958,10 @@ CRecruitmentWindow::CRecruitmentWindow(const CGDwelling *Dwelling, int Level, co
|
|||||||
|
|
||||||
initCres();
|
initCres();
|
||||||
|
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[346],113,231,GEOR13,zwykly,bitmap); //cost per troop t
|
printAtMiddle(CGI->generaltexth->allTexts[346],113,233,FONT_SMALL,zwykly,bitmap); //cost per troop t
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[465],205,231,GEOR13,zwykly,bitmap); //available t
|
printAtMiddle(CGI->generaltexth->allTexts[465],205,233,FONT_SMALL,zwykly,bitmap); //available t
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[16],279,231,GEOR13,zwykly,bitmap); //recruit t
|
printAtMiddle(CGI->generaltexth->allTexts[16],279,233,FONT_SMALL,zwykly,bitmap); //recruit t
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[466],373,231,GEOR13,zwykly,bitmap); //total cost t
|
printAtMiddle(CGI->generaltexth->allTexts[466],373,233,FONT_SMALL,zwykly,bitmap); //total cost t
|
||||||
drawBorder(bitmap,172,222,67,42,int3(239,215,123));
|
drawBorder(bitmap,172,222,67,42,int3(239,215,123));
|
||||||
drawBorder(bitmap,246,222,67,42,int3(239,215,123));
|
drawBorder(bitmap,246,222,67,42,int3(239,215,123));
|
||||||
drawBorder(bitmap,64,222,99,76,int3(239,215,123));
|
drawBorder(bitmap,64,222,99,76,int3(239,215,123));
|
||||||
@ -2050,9 +2049,12 @@ CSplitWindow::CSplitWindow(int cid, int max, CGarrisonInt *Owner, int Last, int
|
|||||||
c=cid;
|
c=cid;
|
||||||
slider = NULL;
|
slider = NULL;
|
||||||
gar = Owner;
|
gar = Owner;
|
||||||
bitmap = BitmapHandler::loadBitmap("GPUCRDIV.bmp");
|
|
||||||
graphics->blueToPlayersAdv(bitmap,LOCPLINT->playerID);
|
SDL_Surface *hhlp = BitmapHandler::loadBitmap("GPUCRDIV.bmp");
|
||||||
|
graphics->blueToPlayersAdv(hhlp,LOCPLINT->playerID);
|
||||||
|
bitmap = SDL_ConvertSurface(hhlp,screen->format,0);
|
||||||
SDL_SetColorKey(bitmap,SDL_SRCCOLORKEY,SDL_MapRGB(bitmap->format,0,255,255));
|
SDL_SetColorKey(bitmap,SDL_SRCCOLORKEY,SDL_MapRGB(bitmap->format,0,255,255));
|
||||||
|
SDL_FreeSurface(hhlp);
|
||||||
pos.x = screen->w/2 - bitmap->w/2;
|
pos.x = screen->w/2 - bitmap->w/2;
|
||||||
pos.y = screen->h/2 - bitmap->h/2;
|
pos.y = screen->h/2 - bitmap->h/2;
|
||||||
pos.w = bitmap->w;
|
pos.w = bitmap->w;
|
||||||
@ -2068,7 +2070,7 @@ CSplitWindow::CSplitWindow(int cid, int max, CGarrisonInt *Owner, int Last, int
|
|||||||
|
|
||||||
std::string title = CGI->generaltexth->allTexts[256];
|
std::string title = CGI->generaltexth->allTexts[256];
|
||||||
boost::algorithm::replace_first(title,"%s",CGI->creh->creatures[cid].namePl);
|
boost::algorithm::replace_first(title,"%s",CGI->creh->creatures[cid].namePl);
|
||||||
printAtMiddle(title,150,34,GEOR16,tytulowy,bitmap);
|
printAtMiddle(title,150,34,FONT_BIG,tytulowy,bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSplitWindow::~CSplitWindow() //d-tor
|
CSplitWindow::~CSplitWindow() //d-tor
|
||||||
@ -2123,8 +2125,8 @@ void CSplitWindow::show(SDL_Surface * to)
|
|||||||
ok->show(to);
|
ok->show(to);
|
||||||
cancel->show(to);
|
cancel->show(to);
|
||||||
slider->show(to);
|
slider->show(to);
|
||||||
printAtMiddle(boost::lexical_cast<std::string>(a1) + (!which ? "_" : ""),pos.x+70,pos.y+237,GEOR16,zwykly,to);
|
printAtMiddle(boost::lexical_cast<std::string>(a1) + (!which ? "_" : ""),pos.x+70,pos.y+237,FONT_BIG,zwykly,to);
|
||||||
printAtMiddle(boost::lexical_cast<std::string>(a2) + (which ? "_" : ""),pos.x+233,pos.y+237,GEOR16,zwykly,to);
|
printAtMiddle(boost::lexical_cast<std::string>(a2) + (which ? "_" : ""),pos.x+233,pos.y+237,FONT_BIG,zwykly,to);
|
||||||
anim->blitPic(to,pos.x+20,pos.y+54,false);
|
anim->blitPic(to,pos.x+20,pos.y+54,false);
|
||||||
anim->blitPic(to,pos.x+177,pos.y+54,false);
|
anim->blitPic(to,pos.x+177,pos.y+54,false);
|
||||||
}
|
}
|
||||||
@ -2189,7 +2191,7 @@ void CCreInfoWindow::show(SDL_Surface * to)
|
|||||||
if(++anf==4)
|
if(++anf==4)
|
||||||
anf=0;
|
anf=0;
|
||||||
if(count.size())
|
if(count.size())
|
||||||
printTo(count.c_str(),pos.x+114,pos.y+174,GEOR16,zwykly,to);
|
printTo(count.c_str(),pos.x+114,pos.y+174,FONT_TIMES,zwykly,to);
|
||||||
if(upgrade)
|
if(upgrade)
|
||||||
upgrade->show(to);
|
upgrade->show(to);
|
||||||
if(dismiss)
|
if(dismiss)
|
||||||
@ -2204,13 +2206,15 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState
|
|||||||
//active = false;
|
//active = false;
|
||||||
anf = 0;
|
anf = 0;
|
||||||
c = &CGI->creh->creatures[Cid];
|
c = &CGI->creh->creatures[Cid];
|
||||||
bitmap = BitmapHandler::loadBitmap("CRSTKPU.bmp");
|
SDL_Surface *hhlp = BitmapHandler::loadBitmap("CRSTKPU.bmp");
|
||||||
|
graphics->blueToPlayersAdv(hhlp,LOCPLINT->playerID);
|
||||||
|
bitmap = SDL_ConvertSurface(hhlp,screen->format,0);
|
||||||
|
SDL_SetColorKey(bitmap,SDL_SRCCOLORKEY,SDL_MapRGB(bitmap->format,0,255,255));
|
||||||
|
SDL_FreeSurface(hhlp);
|
||||||
pos.x = screen->w/2 - bitmap->w/2;
|
pos.x = screen->w/2 - bitmap->w/2;
|
||||||
pos.y = screen->h/2 - bitmap->h/2;
|
pos.y = screen->h/2 - bitmap->h/2;
|
||||||
pos.w = bitmap->w;
|
pos.w = bitmap->w;
|
||||||
pos.h = bitmap->h;
|
pos.h = bitmap->h;
|
||||||
graphics->blueToPlayersAdv(bitmap,LOCPLINT->playerID);
|
|
||||||
SDL_SetColorKey(bitmap,SDL_SRCCOLORKEY,SDL_MapRGB(bitmap->format,0,255,255));
|
|
||||||
anim = new CCreaturePic(c);
|
anim = new CCreaturePic(c);
|
||||||
if(!type) anim->anim->setType(2);
|
if(!type) anim->anim->setType(2);
|
||||||
|
|
||||||
@ -2222,10 +2226,10 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState
|
|||||||
count = pom;
|
count = pom;
|
||||||
}
|
}
|
||||||
|
|
||||||
printAtMiddle(c->namePl,149,30,GEOR13,tytulowy,bitmap); //creature name
|
printAtMiddle(c->namePl,149,30,FONT_SMALL,tytulowy,bitmap); //creature name
|
||||||
|
|
||||||
//atttack
|
//atttack
|
||||||
printAt(CGI->generaltexth->primarySkillNames[0],155,48,GEOR13,zwykly,bitmap);
|
printAt(CGI->generaltexth->primarySkillNames[0],155,48,FONT_SMALL,zwykly,bitmap);
|
||||||
SDL_itoa(c->attack,pom,10);
|
SDL_itoa(c->attack,pom,10);
|
||||||
if(State && State->attackBonus)
|
if(State && State->attackBonus)
|
||||||
{
|
{
|
||||||
@ -2239,10 +2243,10 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState
|
|||||||
hlp += 2+(int)log10f(State->attackBonus+c->attack);
|
hlp += 2+(int)log10f(State->attackBonus+c->attack);
|
||||||
pom[hlp] = ')'; pom[hlp+1] = '\0';
|
pom[hlp] = ')'; pom[hlp+1] = '\0';
|
||||||
}
|
}
|
||||||
printToWR(pom,276,61,GEOR13,zwykly,bitmap);
|
printTo(pom,276,61,FONT_SMALL,zwykly,bitmap);
|
||||||
|
|
||||||
//defense
|
//defense
|
||||||
printAt(CGI->generaltexth->primarySkillNames[1],155,67,GEOR13,zwykly,bitmap);
|
printAt(CGI->generaltexth->primarySkillNames[1],155,67,FONT_SMALL,zwykly,bitmap);
|
||||||
SDL_itoa(c->defence,pom,10);
|
SDL_itoa(c->defence,pom,10);
|
||||||
if(State && State->defenseBonus)
|
if(State && State->defenseBonus)
|
||||||
{
|
{
|
||||||
@ -2256,24 +2260,24 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState
|
|||||||
hlp += 2+(int)log10f(State->defenseBonus+c->defence);
|
hlp += 2+(int)log10f(State->defenseBonus+c->defence);
|
||||||
pom[hlp] = ')'; pom[hlp+1] = '\0';
|
pom[hlp] = ')'; pom[hlp+1] = '\0';
|
||||||
}
|
}
|
||||||
printToWR(pom,276,80,GEOR13,zwykly,bitmap);
|
printTo(pom,276,80,FONT_SMALL,zwykly,bitmap);
|
||||||
|
|
||||||
//shots
|
//shots
|
||||||
if(c->shots)
|
if(c->shots)
|
||||||
{
|
{
|
||||||
printAt(CGI->generaltexth->allTexts[198], 155, 86, GEOR13, zwykly, bitmap);
|
printAt(CGI->generaltexth->allTexts[198], 155, 86, FONT_SMALL, zwykly, bitmap);
|
||||||
if(State && State->shotsLeft >= 0)
|
if(State && State->shotsLeft >= 0)
|
||||||
sprintf(pom,"%d (%d)", c->shots, State->shotsLeft);
|
sprintf(pom,"%d (%d)", c->shots, State->shotsLeft);
|
||||||
else
|
else
|
||||||
SDL_itoa(c->shots, pom, 10);
|
SDL_itoa(c->shots, pom, 10);
|
||||||
printToWR(pom, 276, 99, GEOR13, zwykly, bitmap);
|
printTo(pom, 276, 99, FONT_SMALL, zwykly, bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
//damage
|
//damage
|
||||||
int dmgMin = c->damageMin * (State ? State->dmgMultiplier : 1);
|
int dmgMin = c->damageMin * (State ? State->dmgMultiplier : 1);
|
||||||
int dmgMax = c->damageMax * (State ? State->dmgMultiplier : 1);
|
int dmgMax = c->damageMax * (State ? State->dmgMultiplier : 1);
|
||||||
|
|
||||||
printAt(CGI->generaltexth->allTexts[199], 155, 105, GEOR13, zwykly, bitmap);
|
printAt(CGI->generaltexth->allTexts[199], 155, 105, FONT_SMALL, zwykly, bitmap);
|
||||||
SDL_itoa(dmgMin, pom, 10);
|
SDL_itoa(dmgMin, pom, 10);
|
||||||
if(dmgMin > 0)
|
if(dmgMin > 0)
|
||||||
hlp = log10f(dmgMin) + 2;
|
hlp = log10f(dmgMin) + 2;
|
||||||
@ -2281,26 +2285,26 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState
|
|||||||
hlp = 2;
|
hlp = 2;
|
||||||
pom[hlp-1]=' '; pom[hlp]='-'; pom[hlp+1]=' ';
|
pom[hlp-1]=' '; pom[hlp]='-'; pom[hlp+1]=' ';
|
||||||
SDL_itoa(dmgMax, pom+hlp+2, 10);
|
SDL_itoa(dmgMax, pom+hlp+2, 10);
|
||||||
printToWR(pom, 276, 118, GEOR13, zwykly, bitmap);
|
printTo(pom, 276, 118, FONT_SMALL, zwykly, bitmap);
|
||||||
|
|
||||||
//health
|
//health
|
||||||
printAt(CGI->generaltexth->allTexts[388],155,124,GEOR13,zwykly,bitmap);
|
printAt(CGI->generaltexth->allTexts[388],155,124,FONT_SMALL,zwykly,bitmap);
|
||||||
if(State && State->healthBonus)
|
if(State && State->healthBonus)
|
||||||
sprintf(pom,"%d (%d)",c->hitPoints, c->hitPoints + State->healthBonus);
|
sprintf(pom,"%d (%d)",c->hitPoints, c->hitPoints + State->healthBonus);
|
||||||
else
|
else
|
||||||
SDL_itoa(c->hitPoints,pom,10);
|
SDL_itoa(c->hitPoints,pom,10);
|
||||||
printToWR(pom,276,137,GEOR13,zwykly,bitmap);
|
printTo(pom,276,137,FONT_SMALL,zwykly,bitmap);
|
||||||
|
|
||||||
//remaining health
|
//remaining health
|
||||||
if(State && State->currentHealth)
|
if(State && State->currentHealth)
|
||||||
{
|
{
|
||||||
printAt(CGI->generaltexth->allTexts[200],155,143,GEOR13,zwykly,bitmap);
|
printAt(CGI->generaltexth->allTexts[200],155,143,FONT_SMALL,zwykly,bitmap);
|
||||||
SDL_itoa(State->currentHealth,pom,10);
|
SDL_itoa(State->currentHealth,pom,10);
|
||||||
printToWR(pom,276,156,GEOR13,zwykly,bitmap);
|
printTo(pom,276,156,FONT_SMALL,zwykly,bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
//speed
|
//speed
|
||||||
printAt(CGI->generaltexth->zelp[441].first,155,162,GEOR13,zwykly,bitmap);
|
printAt(CGI->generaltexth->zelp[441].first,155,162,FONT_SMALL,zwykly,bitmap);
|
||||||
SDL_itoa(c->speed,pom,10);
|
SDL_itoa(c->speed,pom,10);
|
||||||
if(State && State->speedBonus)
|
if(State && State->speedBonus)
|
||||||
{
|
{
|
||||||
@ -2314,7 +2318,7 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState
|
|||||||
hlp += 2+(int)log10f(c->speed + State->speedBonus);
|
hlp += 2+(int)log10f(c->speed + State->speedBonus);
|
||||||
pom[hlp] = ')'; pom[hlp+1] = '\0';
|
pom[hlp] = ')'; pom[hlp+1] = '\0';
|
||||||
}
|
}
|
||||||
printToWR(pom,276,175,GEOR13,zwykly,bitmap);
|
printTo(pom,276,175,FONT_SMALL,zwykly,bitmap);
|
||||||
|
|
||||||
|
|
||||||
//luck and morale
|
//luck and morale
|
||||||
@ -2365,7 +2369,7 @@ CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount, StackState
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printAtWB(c->abilityText,17,231,GEOR13,35,zwykly,bitmap);
|
printAtWB(c->abilityText,17,231,FONT_SMALL,35,zwykly,bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
//spell effects
|
//spell effects
|
||||||
@ -2467,9 +2471,12 @@ CLevelWindow::CLevelWindow(const CGHeroInstance *hero, int pskill, std::vector<u
|
|||||||
comps.push_back(new CSelectableComponent(SComponent::secskill44,skills[i],hero->getSecSkillLevel(skills[i])+1,boost::bind(&CLevelWindow::selectionChanged,this,i)));
|
comps.push_back(new CSelectableComponent(SComponent::secskill44,skills[i],hero->getSecSkillLevel(skills[i])+1,boost::bind(&CLevelWindow::selectionChanged,this,i)));
|
||||||
comps.back()->assignedKeys.insert(SDLK_1 + i);
|
comps.back()->assignedKeys.insert(SDLK_1 + i);
|
||||||
}
|
}
|
||||||
bitmap = BitmapHandler::loadBitmap("LVLUPBKG.bmp");
|
SDL_Surface *hhlp = BitmapHandler::loadBitmap("LVLUPBKG.bmp");
|
||||||
graphics->blueToPlayersAdv(bitmap,hero->tempOwner);
|
graphics->blueToPlayersAdv(hhlp,LOCPLINT->playerID);
|
||||||
|
bitmap = SDL_ConvertSurface(hhlp,screen->format,0);
|
||||||
SDL_SetColorKey(bitmap,SDL_SRCCOLORKEY,SDL_MapRGB(bitmap->format,0,255,255));
|
SDL_SetColorKey(bitmap,SDL_SRCCOLORKEY,SDL_MapRGB(bitmap->format,0,255,255));
|
||||||
|
SDL_FreeSurface(hhlp);
|
||||||
|
|
||||||
pos.x = screen->w/2 - bitmap->w/2;
|
pos.x = screen->w/2 - bitmap->w/2;
|
||||||
pos.y = screen->h/2 - bitmap->h/2;
|
pos.y = screen->h/2 - bitmap->h/2;
|
||||||
pos.w = bitmap->w;
|
pos.w = bitmap->w;
|
||||||
@ -2479,27 +2486,30 @@ CLevelWindow::CLevelWindow(const CGHeroInstance *hero, int pskill, std::vector<u
|
|||||||
char buf[100], buf2[100];
|
char buf[100], buf2[100];
|
||||||
strcpy(buf2,CGI->generaltexth->allTexts[444].c_str()); //%s has gained a level.
|
strcpy(buf2,CGI->generaltexth->allTexts[444].c_str()); //%s has gained a level.
|
||||||
sprintf(buf,buf2,hero->name.c_str());
|
sprintf(buf,buf2,hero->name.c_str());
|
||||||
printAtMiddle(buf,192,35,GEOR16,zwykly,bitmap);
|
printAtMiddle(buf,192,33,FONT_MEDIUM,zwykly,bitmap);
|
||||||
|
|
||||||
strcpy(buf2,CGI->generaltexth->allTexts[445].c_str()); //%s is now a level %d %s.
|
strcpy(buf2,CGI->generaltexth->allTexts[445].c_str()); //%s is now a level %d %s.
|
||||||
sprintf(buf,buf2,hero->name.c_str(),hero->level,hero->type->heroClass->name.c_str());
|
sprintf(buf,buf2,hero->name.c_str(),hero->level,hero->type->heroClass->name.c_str());
|
||||||
printAtMiddle(buf,192,162,GEOR16,zwykly,bitmap);
|
printAtMiddle(buf,192,162,FONT_MEDIUM,zwykly,bitmap);
|
||||||
|
|
||||||
blitAt(graphics->pskillsm->ourImages[pskill].bitmap,174,190,bitmap);
|
blitAt(graphics->pskillsm->ourImages[pskill].bitmap,174,190,bitmap);
|
||||||
|
|
||||||
printAtMiddle((CGI->generaltexth->primarySkillNames[pskill] + " +1"),192,252,GEOR16,zwykly,bitmap);
|
printAtMiddle((CGI->generaltexth->primarySkillNames[pskill] + " +1"),192,253,FONT_MEDIUM,zwykly,bitmap);
|
||||||
|
|
||||||
|
const Font *f = graphics->fonts[FONT_MEDIUM];
|
||||||
|
std::string text = CGI->generaltexth->allTexts[4];
|
||||||
|
int fontWidth = f->getWidth(text.c_str())/2;
|
||||||
|
int curx = bitmap->w/2 - ( skills.size()*44 + (skills.size()-1)*(36+fontWidth) )/2;
|
||||||
|
|
||||||
SDL_Surface * ort = TTF_RenderText_Blended(GEOR16,CGI->generaltexth->allTexts[4].c_str(),zwykly);
|
|
||||||
int curx = bitmap->w/2 - ( skills.size()*44 + (skills.size()-1)*(36+ort->w) )/2;
|
|
||||||
for(int i=0;i<comps.size();i++)
|
for(int i=0;i<comps.size();i++)
|
||||||
{
|
{
|
||||||
comps[i]->pos.x = curx+pos.x;
|
comps[i]->pos.x = curx+pos.x;
|
||||||
comps[i]->pos.y = 326+pos.y;
|
comps[i]->pos.y = 326+pos.y;
|
||||||
if( i < (comps.size()-1) )
|
if( i < (comps.size()-1) )
|
||||||
{
|
{
|
||||||
curx += 44 + 18; //skill width + margin to "or"
|
curx += 44+21; //skill width + margin to "or"
|
||||||
blitAt(ort,curx,346,bitmap);
|
printAtMiddle(text ,curx,346,FONT_MEDIUM,zwykly,bitmap);
|
||||||
curx += ort->w + 18;
|
curx += fontWidth+15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2511,9 +2521,6 @@ CLevelWindow::CLevelWindow(const CGHeroInstance *hero, int pskill, std::vector<u
|
|||||||
{
|
{
|
||||||
comps[0]->select(true);
|
comps[0]->select(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_FreeSurface(ort);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
void CLevelWindow::selectionChanged(unsigned to)
|
void CLevelWindow::selectionChanged(unsigned to)
|
||||||
{
|
{
|
||||||
@ -2560,7 +2567,7 @@ void CMinorResDataBar::show(SDL_Surface * to)
|
|||||||
for (int i=0;i<7;i++)
|
for (int i=0;i<7;i++)
|
||||||
{
|
{
|
||||||
SDL_itoa(LOCPLINT->cb->getResourceAmount(i),buf,10);
|
SDL_itoa(LOCPLINT->cb->getResourceAmount(i),buf,10);
|
||||||
CSDL_Ext::printAtMiddle(buf,pos.x + 50 + 76*i,pos.y+pos.h/2,GEOR13,zwykly,to);
|
CSDL_Ext::printAtMiddle(buf,pos.x + 50 + 76*i,pos.y+pos.h/2,FONT_SMALL,zwykly,to);
|
||||||
}
|
}
|
||||||
std::vector<std::string> temp;
|
std::vector<std::string> temp;
|
||||||
SDL_itoa(LOCPLINT->cb->getDate(3),buf,10); temp.push_back(std::string(buf));
|
SDL_itoa(LOCPLINT->cb->getDate(3),buf,10); temp.push_back(std::string(buf));
|
||||||
@ -2573,7 +2580,7 @@ void CMinorResDataBar::show(SDL_Surface * to)
|
|||||||
+ ": %s, "
|
+ ": %s, "
|
||||||
+ CGI->generaltexth->allTexts[64]
|
+ CGI->generaltexth->allTexts[64]
|
||||||
+ ": %s",temp)
|
+ ": %s",temp)
|
||||||
,pos.x+545+(pos.w-545)/2,pos.y+pos.h/2,GEOR13,zwykly,to);
|
,pos.x+545+(pos.w-545)/2,pos.y+pos.h/2,FONT_SMALL,zwykly,to);
|
||||||
}
|
}
|
||||||
|
|
||||||
CMinorResDataBar::CMinorResDataBar()
|
CMinorResDataBar::CMinorResDataBar()
|
||||||
@ -2703,8 +2710,8 @@ void CMarketplaceWindow::setMode( int mode )
|
|||||||
initItems(left,lpos,0,7,true,NULL);
|
initItems(left,lpos,0,7,true,NULL);
|
||||||
initItems(right,rpos,0,7,false,NULL);
|
initItems(right,rpos,0,7,false,NULL);
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[158],300,27,FONT_BIG,tytulowy,bg); //title
|
printAtMiddle(CGI->generaltexth->allTexts[158],300,27,FONT_BIG,tytulowy,bg); //title
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[270],155,148,FONT_SMALL,zwykly,bg); //kingdom res.
|
printAtMiddle(CGI->generaltexth->allTexts[270],154,148,FONT_SMALL,zwykly,bg); //kingdom res.
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[168],450,147,FONT_SMALL,zwykly,bg); //available for trade
|
printAtMiddle(CGI->generaltexth->allTexts[168],445,147,FONT_SMALL,zwykly,bg); //available for trade
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2870,24 +2877,27 @@ void CMarketplaceWindow::selectionChanged(bool side)
|
|||||||
CSystemOptionsWindow::CSystemOptionsWindow(const SDL_Rect &pos, CPlayerInterface * owner)
|
CSystemOptionsWindow::CSystemOptionsWindow(const SDL_Rect &pos, CPlayerInterface * owner)
|
||||||
{
|
{
|
||||||
this->pos = pos;
|
this->pos = pos;
|
||||||
background = BitmapHandler::loadBitmap("SysOpbck.bmp", true);
|
SDL_Surface *hhlp = BitmapHandler::loadBitmap("SysOpbck.bmp", true);
|
||||||
graphics->blueToPlayersAdv(background, LOCPLINT->playerID);
|
graphics->blueToPlayersAdv(hhlp,LOCPLINT->playerID);
|
||||||
|
background = SDL_ConvertSurface(hhlp,screen->format,0);
|
||||||
|
SDL_SetColorKey(background,SDL_SRCCOLORKEY,SDL_MapRGB(background->format,0,255,255));
|
||||||
|
SDL_FreeSurface(hhlp);
|
||||||
|
|
||||||
//printing texts
|
//printing texts
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[568], 240, 32, GEOR16, tytulowy, background); //window title
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[568], 242, 32, FONT_BIG, tytulowy, background); //window title
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[569], 122, 65, GEOR16, tytulowy, background); //hero speed
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[569], 122, 64, FONT_MEDIUM, tytulowy, background); //hero speed
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[570], 122, 131, GEOR16, tytulowy, background); //enemy speed
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[570], 122, 130, FONT_MEDIUM, tytulowy, background); //enemy speed
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[571], 122, 197, GEOR16, tytulowy, background); //map scroll speed
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[571], 122, 196, FONT_MEDIUM, tytulowy, background); //map scroll speed
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[20], 122, 263, GEOR16, tytulowy, background); //video quality
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[20], 122, 262, FONT_MEDIUM, tytulowy, background); //video quality
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[394], 122, 348, GEOR16, tytulowy, background); //music volume
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[394], 122, 347, FONT_MEDIUM, tytulowy, background); //music volume
|
||||||
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[395], 122, 414, GEOR16, tytulowy, background); //effects volume
|
CSDL_Ext::printAtMiddle(CGI->generaltexth->allTexts[395], 122, 412, FONT_MEDIUM, tytulowy, background); //effects volume
|
||||||
|
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[572], 283, 57, GEOR16, zwykly, background); //show move path
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[572], 282, 57, FONT_MEDIUM, zwykly, background); //show move path
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[573], 283, 89, GEOR16, zwykly, background); //show hero reminder
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[573], 282, 89, FONT_MEDIUM, zwykly, background); //show hero reminder
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[574], 283, 121, GEOR16, zwykly, background); //quick combat
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[574], 282, 121, FONT_MEDIUM, zwykly, background); //quick combat
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[575], 283, 153, GEOR16, zwykly, background); //video subtitles
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[575], 282, 153, FONT_MEDIUM, zwykly, background); //video subtitles
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[576], 283, 185, GEOR16, zwykly, background); //town building outlines
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[576], 282, 185, FONT_MEDIUM, zwykly, background); //town building outlines
|
||||||
CSDL_Ext::printAt(CGI->generaltexth->allTexts[577], 283, 217, GEOR16, zwykly, background); //spell book animation
|
CSDL_Ext::printAt(CGI->generaltexth->allTexts[577], 282, 217, FONT_MEDIUM, zwykly, background); //spell book animation
|
||||||
|
|
||||||
//setting up buttons
|
//setting up buttons
|
||||||
// load = new AdventureMapButton (CGI->generaltexth->zelp[321].first, CGI->generaltexth->zelp[321].second, boost::bind(&CSystemOptionsWindow::loadf, this), pos.x+246, pos.y+298, "SOLOAD.DEF", SDLK_l);
|
// load = new AdventureMapButton (CGI->generaltexth->zelp[321].first, CGI->generaltexth->zelp[321].second, boost::bind(&CSystemOptionsWindow::loadf, this), pos.x+246, pos.y+298, "SOLOAD.DEF", SDLK_l);
|
||||||
@ -3039,13 +3049,17 @@ CTavernWindow::CTavernWindow(const CGHeroInstance *H1, const CGHeroInstance *H2,
|
|||||||
else
|
else
|
||||||
selected = -1;
|
selected = -1;
|
||||||
oldSelected = -1;
|
oldSelected = -1;
|
||||||
bg = BitmapHandler::loadBitmap("TPTAVERN.bmp");
|
|
||||||
|
SDL_Surface *hhlp = BitmapHandler::loadBitmap("TPTAVERN.bmp");
|
||||||
|
graphics->blueToPlayersAdv(hhlp,LOCPLINT->playerID);
|
||||||
|
bg = SDL_ConvertSurface(hhlp,screen->format,0);
|
||||||
SDL_SetColorKey(bg,SDL_SRCCOLORKEY,SDL_MapRGB(bg->format,0,255,255));
|
SDL_SetColorKey(bg,SDL_SRCCOLORKEY,SDL_MapRGB(bg->format,0,255,255));
|
||||||
graphics->blueToPlayersAdv(bg,LOCPLINT->playerID);
|
SDL_FreeSurface(hhlp);
|
||||||
printAtMiddle(CGI->generaltexth->jktexts[37],200,35,GEOR16,tytulowy,bg);
|
|
||||||
printAtMiddle("2500",320,328,GEOR13,zwykly,bg);
|
printAtMiddle(CGI->generaltexth->jktexts[37],200,35,FONT_BIG,tytulowy,bg);
|
||||||
printAtMiddle(CGI->generaltexth->jktexts[38],146,283,GEOR16,tytulowy,bg);
|
printAtMiddle("2500",320,328,FONT_SMALL,zwykly,bg);
|
||||||
printAtMiddleWB(gossip,200,220,GEOR13,50,zwykly,bg);
|
// printAtMiddle(CGI->generaltexth->jktexts[38],146,283,FONT_BIG,tytulowy,bg); //what is this???
|
||||||
|
printAtMiddleWB(gossip,200,220,FONT_SMALL,50,zwykly,bg);
|
||||||
pos.w = bg->w;
|
pos.w = bg->w;
|
||||||
pos.h = bg->h;
|
pos.h = bg->h;
|
||||||
pos.x = (screen->w-bg->w)/2;
|
pos.x = (screen->w-bg->w)/2;
|
||||||
@ -3166,7 +3180,7 @@ void CTavernWindow::show(SDL_Surface * to)
|
|||||||
boost::algorithm::replace_first(recruit->hoverTexts[0],"%s",sel->h->type->heroClass->name);
|
boost::algorithm::replace_first(recruit->hoverTexts[0],"%s",sel->h->type->heroClass->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
printAtMiddleWB(sel->descr,pos.x+146,pos.y+389,GEOR13,40,zwykly,to);
|
printAtMiddleWB(sel->descr,pos.x+146,pos.y+389,FONT_SMALL,40,zwykly,to);
|
||||||
CSDL_Ext::drawBorder(to,sel->pos.x-2,sel->pos.y-2,sel->pos.w+4,sel->pos.h+4,int3(247,223,123));
|
CSDL_Ext::drawBorder(to,sel->pos.x-2,sel->pos.y-2,sel->pos.w+4,sel->pos.h+4,int3(247,223,123));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3265,7 +3279,7 @@ void CInGameConsole::show(SDL_Surface * to)
|
|||||||
{
|
{
|
||||||
leftBottomCorner = LOCPLINT->battleInt->pos.bottomLeft();
|
leftBottomCorner = LOCPLINT->battleInt->pos.bottomLeft();
|
||||||
}
|
}
|
||||||
CSDL_Ext::printAt(it->first, leftBottomCorner.x + 50, leftBottomCorner.y - texts.size() * 20 - 80 + number*20, TNRB16, green);
|
CSDL_Ext::printAt(it->first, leftBottomCorner.x + 50, leftBottomCorner.y - texts.size() * 20 - 80 + number*20, FONT_MEDIUM, green);
|
||||||
if(SDL_GetTicks() - it->second > defaultTimeout)
|
if(SDL_GetTicks() - it->second > defaultTimeout)
|
||||||
{
|
{
|
||||||
toDel.push_back(it);
|
toDel.push_back(it);
|
||||||
@ -3482,7 +3496,7 @@ void CGarrisonWindow::show(SDL_Surface * to)
|
|||||||
|
|
||||||
blitAt(graphics->flags->ourImages[garr->odown->getOwner()].bitmap,pos.x+28,pos.y+124,to);
|
blitAt(graphics->flags->ourImages[garr->odown->getOwner()].bitmap,pos.x+28,pos.y+124,to);
|
||||||
blitAt(graphics->portraitLarge[static_cast<const CGHeroInstance*>(garr->odown)->portrait],pos.x+29,pos.y+222,to);
|
blitAt(graphics->portraitLarge[static_cast<const CGHeroInstance*>(garr->odown)->portrait],pos.x+29,pos.y+222,to);
|
||||||
printAtMiddle(CGI->generaltexth->allTexts[709],pos.x+275,pos.y+30,GEOR16,tytulowy,to);
|
printAtMiddle(CGI->generaltexth->allTexts[709],pos.x+275,pos.y+30,FONT_BIG,tytulowy,to);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGarrisonWindow::CGarrisonWindow( const CArmedInstance *up, const CGHeroInstance *down, bool removableUnits )
|
CGarrisonWindow::CGarrisonWindow( const CArmedInstance *up, const CGHeroInstance *down, bool removableUnits )
|
||||||
@ -4291,9 +4305,9 @@ void CExchangeWindow::prepareBackground()
|
|||||||
//printing heroes' names and levels
|
//printing heroes' names and levels
|
||||||
std::ostringstream os, os2;
|
std::ostringstream os, os2;
|
||||||
os<<heroInst[0]->name<<", Level "<<heroInst[0]->level<<" "<<heroInst[0]->type->heroClass->name;
|
os<<heroInst[0]->name<<", Level "<<heroInst[0]->level<<" "<<heroInst[0]->type->heroClass->name;
|
||||||
CSDL_Ext::printAtMiddle(os.str(), 147, 23, GEOR13, zwykly, bg);
|
CSDL_Ext::printAtMiddle(os.str(), 147, 25, FONT_SMALL, zwykly, bg);
|
||||||
os2<<heroInst[1]->name<<", Level "<<heroInst[1]->level<<" "<<heroInst[1]->type->heroClass->name;
|
os2<<heroInst[1]->name<<", Level "<<heroInst[1]->level<<" "<<heroInst[1]->type->heroClass->name;
|
||||||
CSDL_Ext::printAtMiddle(os2.str(), 653, 23, GEOR13, zwykly, bg);
|
CSDL_Ext::printAtMiddle(os2.str(), 653, 25, FONT_SMALL, zwykly, bg);
|
||||||
|
|
||||||
//printing primary skills
|
//printing primary skills
|
||||||
CDefHandler * skilldef = CDefHandler::giveDef("PSKIL32.DEF");
|
CDefHandler * skilldef = CDefHandler::giveDef("PSKIL32.DEF");
|
||||||
@ -4312,7 +4326,7 @@ void CExchangeWindow::prepareBackground()
|
|||||||
{
|
{
|
||||||
std::ostringstream primarySkill;
|
std::ostringstream primarySkill;
|
||||||
primarySkill<<heroInst[b]->getPrimSkillLevel(m);
|
primarySkill<<heroInst[b]->getPrimSkillLevel(m);
|
||||||
CSDL_Ext::printAtMiddle(primarySkill.str(), 353 + 93 * b, 35 + 36 * m, TNRB16, zwykly, bg);
|
CSDL_Ext::printAtMiddle(primarySkill.str(), 352 + 93 * b, 35 + 36 * m, FONT_SMALL, zwykly, bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
//printing secondary skills
|
//printing secondary skills
|
||||||
@ -4326,11 +4340,11 @@ void CExchangeWindow::prepareBackground()
|
|||||||
|
|
||||||
//experience
|
//experience
|
||||||
blitAt(skilldef->ourImages[4].bitmap, 103 + 490*b, 45, bg);
|
blitAt(skilldef->ourImages[4].bitmap, 103 + 490*b, 45, bg);
|
||||||
printAtMiddle( makeNumberShort(heroInst[b]->exp), 119 + 490*b, 71, GEOR13, zwykly, bg );
|
printAtMiddle( makeNumberShort(heroInst[b]->exp), 119 + 490*b, 71, FONT_SMALL, zwykly, bg );
|
||||||
|
|
||||||
//mana points
|
//mana points
|
||||||
blitAt(skilldef->ourImages[5].bitmap, 139 + 490*b, 45, bg);
|
blitAt(skilldef->ourImages[5].bitmap, 139 + 490*b, 45, bg);
|
||||||
printAtMiddle( makeNumberShort(heroInst[b]->mana), 155 + 490*b, 71, GEOR13, zwykly, bg );
|
printAtMiddle( makeNumberShort(heroInst[b]->mana), 155 + 490*b, 71, FONT_SMALL, zwykly, bg );
|
||||||
|
|
||||||
//setting morale
|
//setting morale
|
||||||
blitAt(graphics->morale30->ourImages[heroInst[b]->getCurrentMorale()+3].bitmap, 177 + 490*b, 45, bg);
|
blitAt(graphics->morale30->ourImages[heroInst[b]->getCurrentMorale()+3].bitmap, 177 + 490*b, 45, bg);
|
||||||
@ -4578,9 +4592,9 @@ CShipyardWindow::CShipyardWindow(const std::vector<si32> &cost, int state, const
|
|||||||
std::string goldCost = boost::lexical_cast<std::string>(1000);
|
std::string goldCost = boost::lexical_cast<std::string>(1000);
|
||||||
std::string woodCost = boost::lexical_cast<std::string>(10);
|
std::string woodCost = boost::lexical_cast<std::string>(10);
|
||||||
blitAt(graphics->resources32->ourImages[6].bitmap, 100, 244, bg);
|
blitAt(graphics->resources32->ourImages[6].bitmap, 100, 244, bg);
|
||||||
printAtMiddle(goldCost.c_str(), 116, 290, GEOR13, zwykly, bg);
|
printAtMiddle(goldCost.c_str(), 118, 294, FONT_SMALL, zwykly, bg);
|
||||||
blitAt(graphics->resources32->ourImages[0].bitmap, 196, 244, bg);
|
blitAt(graphics->resources32->ourImages[0].bitmap, 196, 244, bg);
|
||||||
printAtMiddle(woodCost.c_str(), 212, 290, GEOR13, zwykly, bg);
|
printAtMiddle(woodCost.c_str(), 212, 294, FONT_SMALL, zwykly, bg);
|
||||||
|
|
||||||
bool affordable = true;
|
bool affordable = true;
|
||||||
for(int i = 0; i < cost.size(); i++)
|
for(int i = 0; i < cost.size(); i++)
|
||||||
@ -4599,8 +4613,8 @@ CShipyardWindow::CShipyardWindow(const std::vector<si32> &cost, int state, const
|
|||||||
if(!affordable)
|
if(!affordable)
|
||||||
build->block(true);
|
build->block(true);
|
||||||
|
|
||||||
printAtMiddle(CGI->generaltexth->jktexts[13], 165, 28, GEORXX, tytulowy, bg); //Build A New Ship
|
printAtMiddle(CGI->generaltexth->jktexts[13], 164, 27, FONT_BIG, tytulowy, bg); //Build A New Ship
|
||||||
printAtMiddle(CGI->generaltexth->jktexts[14], 165, 218, GEOR16, zwykly, bg); //Resource cost:
|
printAtMiddle(CGI->generaltexth->jktexts[14], 164, 220, FONT_MEDIUM, zwykly, bg); //Resource cost:
|
||||||
}
|
}
|
||||||
|
|
||||||
CPuzzleWindow::CPuzzleWindow()
|
CPuzzleWindow::CPuzzleWindow()
|
||||||
|
@ -45,7 +45,7 @@ SDL_Surface * Graphics::drawHeroInfoWin(const InfoAboutHero &curh)
|
|||||||
SDL_Surface * ret = SDL_DisplayFormat(hInfo);
|
SDL_Surface * ret = SDL_DisplayFormat(hInfo);
|
||||||
SDL_SetColorKey(ret,SDL_SRCCOLORKEY,SDL_MapRGB(ret->format,0,255,255));
|
SDL_SetColorKey(ret,SDL_SRCCOLORKEY,SDL_MapRGB(ret->format,0,255,255));
|
||||||
|
|
||||||
printAt(curh.name,75,15,GEOR13,zwykly,ret); //name
|
printAt(curh.name,75,13,FONT_SMALL,zwykly,ret); //name
|
||||||
blitAt(graphics->portraitLarge[curh.portrait],11,12,ret); //portrait
|
blitAt(graphics->portraitLarge[curh.portrait],11,12,ret); //portrait
|
||||||
|
|
||||||
//army
|
//army
|
||||||
@ -55,11 +55,11 @@ SDL_Surface * Graphics::drawHeroInfoWin(const InfoAboutHero &curh)
|
|||||||
if(curh.details)
|
if(curh.details)
|
||||||
{
|
{
|
||||||
SDL_itoa((*i).second.second,buf,10);
|
SDL_itoa((*i).second.second,buf,10);
|
||||||
printAtMiddle(buf,slotsPos[(*i).first].first+17,slotsPos[(*i).first].second+39,GEORM,zwykly,ret);
|
printAtMiddle(buf,slotsPos[(*i).first].first+17,slotsPos[(*i).first].second+41,FONT_TINY,zwykly,ret);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printAtMiddle(VLC->generaltexth->arraytxt[174 + 3*i->second.second],slotsPos[(*i).first].first+17,slotsPos[(*i).first].second+39,GEORM,zwykly,ret);
|
printAtMiddle(VLC->generaltexth->arraytxt[174 + 3*i->second.second],slotsPos[(*i).first].first+17,slotsPos[(*i).first].second+41,FONT_TINY,zwykly,ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,12 +68,12 @@ SDL_Surface * Graphics::drawHeroInfoWin(const InfoAboutHero &curh)
|
|||||||
for (int i = 0; i < PRIMARY_SKILLS; i++)
|
for (int i = 0; i < PRIMARY_SKILLS; i++)
|
||||||
{
|
{
|
||||||
SDL_itoa(curh.details->primskills[i], buf, 10);
|
SDL_itoa(curh.details->primskills[i], buf, 10);
|
||||||
printAtMiddle(buf,84+28*i,68,GEOR13,zwykly,ret);
|
printAtMiddle(buf,84+28*i,70,FONT_SMALL,zwykly,ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
//mana points
|
//mana points
|
||||||
SDL_itoa(curh.details->mana,buf,10);
|
SDL_itoa(curh.details->mana,buf,10);
|
||||||
printAtMiddle(buf,166,109,GEORM,zwykly,ret);
|
printAtMiddle(buf,167,108,FONT_TINY,zwykly,ret);
|
||||||
|
|
||||||
blitAt(morale22->ourImages[curh.details->morale+3].bitmap,14,84,ret); //luck
|
blitAt(morale22->ourImages[curh.details->morale+3].bitmap,14,84,ret); //luck
|
||||||
blitAt(luck22->ourImages[curh.details->morale+3].bitmap,14,101,ret); //morale
|
blitAt(luck22->ourImages[curh.details->morale+3].bitmap,14,101,ret); //morale
|
||||||
@ -102,7 +102,7 @@ SDL_Surface * Graphics::drawTownInfoWin( const InfoAboutTown & curh )
|
|||||||
SDL_Surface * ret = SDL_DisplayFormat(tInfo);
|
SDL_Surface * ret = SDL_DisplayFormat(tInfo);
|
||||||
SDL_SetColorKey(ret,SDL_SRCCOLORKEY,SDL_MapRGB(ret->format,0,255,255));
|
SDL_SetColorKey(ret,SDL_SRCCOLORKEY,SDL_MapRGB(ret->format,0,255,255));
|
||||||
|
|
||||||
printAt(curh.name,75,15,GEOR13,zwykly,ret); //name
|
printAt(curh.name,75,12,FONT_SMALL,zwykly,ret); //name
|
||||||
int pom = curh.fortLevel - 1; if(pom<0) pom = 3; //fort pic id
|
int pom = curh.fortLevel - 1; if(pom<0) pom = 3; //fort pic id
|
||||||
blitAt(forts->ourImages[pom].bitmap,115,42,ret); //fort
|
blitAt(forts->ourImages[pom].bitmap,115,42,ret); //fort
|
||||||
|
|
||||||
@ -115,14 +115,14 @@ SDL_Surface * Graphics::drawTownInfoWin( const InfoAboutTown & curh )
|
|||||||
{
|
{
|
||||||
// Show exact creature amount.
|
// Show exact creature amount.
|
||||||
SDL_itoa((*i).second.second,buf,10);
|
SDL_itoa((*i).second.second,buf,10);
|
||||||
printAtMiddle(buf,slotsPos[(*i).first].first+17,slotsPos[(*i).first].second+39,GEORM,zwykly,ret);
|
printAtMiddle(buf,slotsPos[(*i).first].first+17,slotsPos[(*i).first].second+41,FONT_TINY,zwykly,ret);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Show only a rough amount for creature stacks.
|
// Show only a rough amount for creature stacks.
|
||||||
// TODO: Deal with case when no information at all about size shold be presented.
|
// TODO: Deal with case when no information at all about size shold be presented.
|
||||||
std::string roughAmount = curh.obj->getRoughAmount(i->first);
|
std::string roughAmount = curh.obj->getRoughAmount(i->first);
|
||||||
printAtMiddle(roughAmount,slotsPos[(*i).first].first+17,slotsPos[(*i).first].second+39,GEORM,zwykly,ret);
|
printAtMiddle(roughAmount,slotsPos[(*i).first].first+17,slotsPos[(*i).first].second+41,FONT_TINY,zwykly,ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ SDL_Surface * Graphics::drawTownInfoWin( const InfoAboutTown & curh )
|
|||||||
|
|
||||||
if (curh.details->goldIncome >= 0) {
|
if (curh.details->goldIncome >= 0) {
|
||||||
SDL_itoa(curh.details->goldIncome, buf, 10); //gold income
|
SDL_itoa(curh.details->goldIncome, buf, 10); //gold income
|
||||||
printAtMiddle(buf, 167, 70, GEORM, zwykly, ret);
|
printAtMiddle(buf, 167, 70, FONT_TINY, zwykly, ret);
|
||||||
}
|
}
|
||||||
if(curh.details->garrisonedHero) //garrisoned hero icon
|
if(curh.details->garrisonedHero) //garrisoned hero icon
|
||||||
blitAt(graphics->heroInGarrison,158,87,ret);
|
blitAt(graphics->heroInGarrison,158,87,ret);
|
||||||
|
@ -78,7 +78,7 @@ void updateRect (SDL_Rect * rect, SDL_Surface * scr)
|
|||||||
SDL_UpdateRect(scr,rect->x,rect->y,rect->w,rect->h);
|
SDL_UpdateRect(scr,rect->x,rect->y,rect->w,rect->h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSDL_Ext::printAtMiddleWB(const std::string & text, int x, int y, TTF_Font * font, int charpr, SDL_Color kolor, SDL_Surface * dst)
|
/*void CSDL_Ext::printAtMiddleWB(const std::string & text, int x, int y, TTF_Font * font, int charpr, SDL_Color kolor, SDL_Surface * dst)
|
||||||
{
|
{
|
||||||
std::vector<std::string> * ws = CMessage::breakText(text,charpr);
|
std::vector<std::string> * ws = CMessage::breakText(text,charpr);
|
||||||
std::vector<SDL_Surface*> wesu;
|
std::vector<SDL_Surface*> wesu;
|
||||||
@ -107,9 +107,9 @@ void CSDL_Ext::printAtMiddleWB(const std::string & text, int x, int y, TTF_Font
|
|||||||
for (size_t i=0; i < wesu.size(); ++i)
|
for (size_t i=0; i < wesu.size(); ++i)
|
||||||
SDL_FreeSurface(wesu[i]);
|
SDL_FreeSurface(wesu[i]);
|
||||||
delete ws;
|
delete ws;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void CSDL_Ext::printAtWB(const std::string & text, int x, int y, TTF_Font * font, int charpr, SDL_Color kolor, SDL_Surface * dst)
|
/*void CSDL_Ext::printAtWB(const std::string & text, int x, int y, TTF_Font * font, int charpr, SDL_Color kolor, SDL_Surface * dst)
|
||||||
{
|
{
|
||||||
std::vector<std::string> * ws = CMessage::breakText(text,charpr);
|
std::vector<std::string> * ws = CMessage::breakText(text,charpr);
|
||||||
std::vector<SDL_Surface*> wesu;
|
std::vector<SDL_Surface*> wesu;
|
||||||
@ -128,6 +128,21 @@ void CSDL_Ext::printAtWB(const std::string & text, int x, int y, TTF_Font * font
|
|||||||
SDL_FreeSurface(wesu[i]);
|
SDL_FreeSurface(wesu[i]);
|
||||||
delete ws;
|
delete ws;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
void CSDL_Ext::printAtWB(const std::string & text, int x, int y, EFonts font, int charpr, SDL_Color kolor, SDL_Surface * dst, bool refresh)
|
||||||
|
{
|
||||||
|
const Font *f = graphics->fonts[font];
|
||||||
|
std::vector<std::string> * ws = CMessage::breakText(text,charpr);
|
||||||
|
|
||||||
|
int cury = y;
|
||||||
|
for (size_t i=0; i < ws->size(); ++i)
|
||||||
|
{
|
||||||
|
printAt((*ws)[i], x, cury, font, kolor, dst, refresh);
|
||||||
|
cury += f->height;
|
||||||
|
}
|
||||||
|
delete ws;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CSDL_Ext::printAtMiddleWB( const std::string & text, int x, int y, EFonts font, int charpr, SDL_Color kolor/*=tytulowy*/, SDL_Surface * dst/*=screen*/, bool refrsh /*= false*/ )
|
void CSDL_Ext::printAtMiddleWB( const std::string & text, int x, int y, EFonts font, int charpr, SDL_Color kolor/*=tytulowy*/, SDL_Surface * dst/*=screen*/, bool refrsh /*= false*/ )
|
||||||
{
|
{
|
||||||
@ -144,7 +159,7 @@ void CSDL_Ext::printAtMiddleWB( const std::string & text, int x, int y, EFonts f
|
|||||||
delete ws;
|
delete ws;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSDL_Ext::printAtMiddle(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality, bool refresh)
|
/*void CSDL_Ext::printAtMiddle(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality, bool refresh)
|
||||||
{
|
{
|
||||||
if(text.length()==0) return;
|
if(text.length()==0) return;
|
||||||
SDL_Surface * temp;
|
SDL_Surface * temp;
|
||||||
@ -172,7 +187,7 @@ void CSDL_Ext::printAtMiddle(const std::string & text, int x, int y, TTF_Font *
|
|||||||
if(refresh)
|
if(refresh)
|
||||||
SDL_UpdateRect(dst,x-(temp->w/2),y-(temp->h/2),temp->w,temp->h);
|
SDL_UpdateRect(dst,x-(temp->w/2),y-(temp->h/2),temp->w,temp->h);
|
||||||
SDL_FreeSurface(temp);
|
SDL_FreeSurface(temp);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void CSDL_Ext::printAtMiddle( const std::string & text, int x, int y, EFonts font, SDL_Color kolor/*=zwykly*/, SDL_Surface * dst/*=screen*/, bool refresh /*= false*/ )
|
void CSDL_Ext::printAtMiddle( const std::string & text, int x, int y, EFonts font, SDL_Color kolor/*=zwykly*/, SDL_Surface * dst/*=screen*/, bool refresh /*= false*/ )
|
||||||
{
|
{
|
||||||
@ -183,7 +198,7 @@ void CSDL_Ext::printAtMiddle( const std::string & text, int x, int y, EFonts fon
|
|||||||
printAt(text, nx, ny, font, kolor, dst, refresh);
|
printAt(text, nx, ny, font, kolor, dst, refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSDL_Ext::printAt(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality, bool refresh)
|
/*void CSDL_Ext::printAt(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality, bool refresh)
|
||||||
{
|
{
|
||||||
if (text.length()==0)
|
if (text.length()==0)
|
||||||
return;
|
return;
|
||||||
@ -212,7 +227,7 @@ void CSDL_Ext::printAt(const std::string & text, int x, int y, TTF_Font * font,
|
|||||||
if(refresh)
|
if(refresh)
|
||||||
SDL_UpdateRect(dst,x,y,temp->w,temp->h);
|
SDL_UpdateRect(dst,x,y,temp->w,temp->h);
|
||||||
SDL_FreeSurface(temp);
|
SDL_FreeSurface(temp);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void CSDL_Ext::printAt( const std::string & text, int x, int y, EFonts font, SDL_Color kolor/*=zwykly*/, SDL_Surface * dst/*=screen*/, bool refresh /*= false*/ )
|
void CSDL_Ext::printAt( const std::string & text, int x, int y, EFonts font, SDL_Color kolor/*=zwykly*/, SDL_Surface * dst/*=screen*/, bool refresh /*= false*/ )
|
||||||
{
|
{
|
||||||
@ -270,12 +285,12 @@ void CSDL_Ext::printAt( const std::string & text, int x, int y, EFonts font, SDL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSDL_Ext::printAtWR(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality)
|
/*void CSDL_Ext::printAtWR(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality)
|
||||||
{
|
{
|
||||||
printAt(text,x,y,font,kolor,dst,quality, true);
|
printAt(text,x,y,font,kolor,dst,quality, true);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void CSDL_Ext::printTo(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality)
|
/*void CSDL_Ext::printTo(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality)
|
||||||
{
|
{
|
||||||
if (text.length()==0)
|
if (text.length()==0)
|
||||||
return;
|
return;
|
||||||
@ -303,7 +318,7 @@ void CSDL_Ext::printTo(const std::string & text, int x, int y, TTF_Font * font,
|
|||||||
SDL_BlitSurface(temp,NULL,dst,&genRect(temp->h,temp->w,x-temp->w,y-temp->h));
|
SDL_BlitSurface(temp,NULL,dst,&genRect(temp->h,temp->w,x-temp->w,y-temp->h));
|
||||||
SDL_UpdateRect(dst,x-temp->w,y-temp->h,temp->w,temp->h);
|
SDL_UpdateRect(dst,x-temp->w,y-temp->h,temp->w,temp->h);
|
||||||
SDL_FreeSurface(temp);
|
SDL_FreeSurface(temp);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void CSDL_Ext::printTo( const std::string & text, int x, int y, EFonts font, SDL_Color kolor/*=zwykly*/, SDL_Surface * dst/*=screen*/, bool refresh /*= false*/ )
|
void CSDL_Ext::printTo( const std::string & text, int x, int y, EFonts font, SDL_Color kolor/*=zwykly*/, SDL_Surface * dst/*=screen*/, bool refresh /*= false*/ )
|
||||||
{
|
{
|
||||||
@ -311,7 +326,7 @@ void CSDL_Ext::printTo( const std::string & text, int x, int y, EFonts font, SDL
|
|||||||
printAt(text, x - f->getWidth(text.c_str()), y - f->height, font, kolor, dst, refresh);
|
printAt(text, x - f->getWidth(text.c_str()), y - f->height, font, kolor, dst, refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSDL_Ext::printToWR(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality)
|
/*void CSDL_Ext::printToWR(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor, SDL_Surface * dst, unsigned char quality)
|
||||||
{
|
{
|
||||||
if (text.length()==0)
|
if (text.length()==0)
|
||||||
return;
|
return;
|
||||||
@ -338,7 +353,7 @@ void CSDL_Ext::printToWR(const std::string & text, int x, int y, TTF_Font * font
|
|||||||
}
|
}
|
||||||
SDL_BlitSurface(temp,NULL,dst,&genRect(temp->h,temp->w,x-temp->w,y-temp->h));
|
SDL_BlitSurface(temp,NULL,dst,&genRect(temp->h,temp->w,x-temp->w,y-temp->h));
|
||||||
SDL_FreeSurface(temp);
|
SDL_FreeSurface(temp);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void CSDL_Ext::SDL_PutPixel(SDL_Surface *ekran, const int & x, const int & y, const Uint8 & R, const Uint8 & G, const Uint8 & B, Uint8 A)
|
void CSDL_Ext::SDL_PutPixel(SDL_Surface *ekran, const int & x, const int & y, const Uint8 & R, const Uint8 & G, const Uint8 & B, Uint8 A)
|
||||||
{
|
{
|
||||||
|
@ -117,14 +117,15 @@ namespace CSDL_Ext
|
|||||||
int blit8bppAlphaTo24bpp(const SDL_Surface * src, const SDL_Rect * srcRect, SDL_Surface * dst, SDL_Rect * dstRect); //blits 8 bpp surface with alpha channel to 24 bpp surface
|
int blit8bppAlphaTo24bpp(const SDL_Surface * src, const SDL_Rect * srcRect, SDL_Surface * dst, SDL_Rect * dstRect); //blits 8 bpp surface with alpha channel to 24 bpp surface
|
||||||
Uint32 colorToUint32(const SDL_Color * color); //little endian only
|
Uint32 colorToUint32(const SDL_Color * color); //little endian only
|
||||||
|
|
||||||
void printTo(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2);// quality: 0 - lowest, 1 - medium, 2 - highest; prints at right bottom corner of specific area. position of corner indicated by (x, y)
|
/* void printTo(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2);// quality: 0 - lowest, 1 - medium, 2 - highest; prints at right bottom corner of specific area. position of corner indicated by (x, y)
|
||||||
void printToWR(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2);// quality: 0 - lowest, 1 - medium, 2 - highest; prints at right bottom corner of specific area. position of corner indicated by (x, y)
|
void printToWR(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2);// quality: 0 - lowest, 1 - medium, 2 - highest; prints at right bottom corner of specific area. position of corner indicated by (x, y)
|
||||||
void printAtMiddle(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2, bool refresh = false); // quality: 0 - lowest, 1 - medium, 2 - highest
|
void printAtMiddle(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2, bool refresh = false); // quality: 0 - lowest, 1 - medium, 2 - highest
|
||||||
void printAtMiddleWB(const std::string & text, int x, int y, TTF_Font * font, int charpr, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen);
|
void printAtMiddleWB(const std::string & text, int x, int y, TTF_Font * font, int charpr, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen);
|
||||||
void printAtWB(const std::string & text, int x, int y, TTF_Font * font, int charpr, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen);
|
void printAtWB(const std::string & text, int x, int y, TTF_Font * font, int charpr, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen);
|
||||||
void printAt(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2, bool refresh = false); // quality: 0 - lowest, 1 - medium, 2 - highest
|
void printAt(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2, bool refresh = false); // quality: 0 - lowest, 1 - medium, 2 - highest
|
||||||
void printAtWR(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2); // quality: 0 - lowest, 1 - medium, 2 - highest
|
void printAtWR(const std::string & text, int x, int y, TTF_Font * font, SDL_Color kolor=tytulowy, SDL_Surface * dst=screen, unsigned char quality = 2); // quality: 0 - lowest, 1 - medium, 2 - highest
|
||||||
|
*/
|
||||||
|
void printAtWB(const std::string & text, int x, int y, EFonts font, int charpr, SDL_Color kolor=zwykly, SDL_Surface * dst=screen, bool refresh = false);
|
||||||
void printAt(const std::string & text, int x, int y, EFonts font, SDL_Color kolor=zwykly, SDL_Surface * dst=screen, bool refresh = false);
|
void printAt(const std::string & text, int x, int y, EFonts font, SDL_Color kolor=zwykly, SDL_Surface * dst=screen, bool refresh = false);
|
||||||
void printTo(const std::string & text, int x, int y, EFonts font, SDL_Color kolor=zwykly, SDL_Surface * dst=screen, bool refresh = false);
|
void printTo(const std::string & text, int x, int y, EFonts font, SDL_Color kolor=zwykly, SDL_Surface * dst=screen, bool refresh = false);
|
||||||
void printAtMiddle(const std::string & text, int x, int y, EFonts font, SDL_Color kolor=zwykly, SDL_Surface * dst=screen, bool refresh = false);
|
void printAtMiddle(const std::string & text, int x, int y, EFonts font, SDL_Color kolor=zwykly, SDL_Surface * dst=screen, bool refresh = false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user