mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
MKinor bugfixes.
(cf http://vcmi.antypika.aplus.pl/forum/viewtopic.php?p=2980#2980 )
This commit is contained in:
parent
23803c9f17
commit
ac175895b1
@ -1445,7 +1445,7 @@ void CFortScreen::draw( CCastleInterface * owner, bool first)
|
|||||||
}
|
}
|
||||||
blitAt(icons,positions[i].x+261,positions[i].y+3,bg);
|
blitAt(icons,positions[i].x+261,positions[i].y+3,bg);
|
||||||
|
|
||||||
//atttack
|
//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,GEOR13,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);
|
printToWR(buf,positions[i].x+381,positions[i].y+18,GEOR13,zwykly,bg);
|
||||||
|
@ -395,9 +395,21 @@ static void setScreenRes(int w, int h, int bpp, bool fullscreen)
|
|||||||
if (bpp > 32) bpp = 32;
|
if (bpp > 32) bpp = 32;
|
||||||
|
|
||||||
// Try to use the best screen depth for the display
|
// Try to use the best screen depth for the display
|
||||||
if (((bpp = SDL_VideoModeOK(w, h, bpp, SDL_SWSURFACE|(fullscreen?SDL_FULLSCREEN:0))) == 0) ||
|
int suggestedBpp = SDL_VideoModeOK(w, h, bpp, SDL_SWSURFACE|(fullscreen?SDL_FULLSCREEN:0));
|
||||||
((screen = SDL_SetVideoMode(w, h, bpp, SDL_SWSURFACE|(fullscreen?SDL_FULLSCREEN:0))) == NULL)) {
|
if(suggestedBpp == 0)
|
||||||
tlog1 << "Requested screen resolution is not available (" << w << "x" << h << ")\n";
|
{
|
||||||
|
tlog2 << "Warning: SDL says that " << w << "x" << h << " resolution is not available!\n";
|
||||||
|
suggestedBpp = bpp;
|
||||||
|
}
|
||||||
|
else if(suggestedBpp != bpp)
|
||||||
|
{
|
||||||
|
tlog2 << "Warning: SDL says that " << bpp << "bpp is wrong and suggests " << suggestedBpp << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if((screen = SDL_SetVideoMode(w, h, suggestedBpp, SDL_SWSURFACE|(fullscreen?SDL_FULLSCREEN:0))) == NULL)
|
||||||
|
{
|
||||||
|
tlog1 << "Requested screen resolution is not available (" << w << "x" << h << "x" << suggestedBpp << "bpp)\n";
|
||||||
throw "Requested screen resolution is not available\n";
|
throw "Requested screen resolution is not available\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2945,15 +2945,16 @@ CTavernWindow::HeroPortrait::HeroPortrait(int &sel, int id, int x, int y, const
|
|||||||
{
|
{
|
||||||
hoverName = CGI->generaltexth->tavernInfo[4];
|
hoverName = CGI->generaltexth->tavernInfo[4];
|
||||||
boost::algorithm::replace_first(hoverName,"%s",H->name);
|
boost::algorithm::replace_first(hoverName,"%s",H->name);
|
||||||
|
|
||||||
|
int artifs = h->artifWorn.size() + h->artifacts.size();
|
||||||
|
for(int i=13; i<=17; i++) //war machines and spellbook don't count
|
||||||
|
if(vstd::contains(h->artifWorn,i))
|
||||||
|
artifs--;
|
||||||
|
sprintf_s(descr, sizeof(descr),CGI->generaltexth->allTexts[215].c_str(),
|
||||||
|
h->name.c_str(), h->level, h->type->heroClass->name.c_str(), artifs);
|
||||||
|
descr[sizeof(descr)-1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
int artifs = h->artifWorn.size() + h->artifacts.size();
|
|
||||||
for(int i=13; i<=17; i++) //war machines and spellbook don't count
|
|
||||||
if(vstd::contains(h->artifWorn,i))
|
|
||||||
artifs--;
|
|
||||||
sprintf_s(descr, sizeof(descr),CGI->generaltexth->allTexts[215].c_str(),
|
|
||||||
h->name.c_str(), h->level, h->type->heroClass->name.c_str(), artifs);
|
|
||||||
descr[sizeof(descr)-1] = '\0';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTavernWindow::HeroPortrait::show(SDL_Surface * to)
|
void CTavernWindow::HeroPortrait::show(SDL_Surface * to)
|
||||||
|
@ -79,7 +79,8 @@ Hydra HYDRATTK.wav HYDRDFND.wav HYDRKILL.wav HYDRMOVE.wav invalid HYDRWNCE.wav
|
|||||||
IceElemental ICELATTK.wav ICELDFND.wav ICELKILL.wav ICELMOVE.wav ICELSHOT.wav ICELWNCE.wav
|
IceElemental ICELATTK.wav ICELDFND.wav ICELKILL.wav ICELMOVE.wav ICELSHOT.wav ICELWNCE.wav
|
||||||
Imp IMPPATTK.wav IMPPDFND.wav IMPPKILL.wav IMPPMOVE.wav invalid IMPPWNCE.wav
|
Imp IMPPATTK.wav IMPPDFND.wav IMPPKILL.wav IMPPMOVE.wav invalid IMPPWNCE.wav
|
||||||
InfernalTroglodyte ITRGATTK.wav ITRGDFND.wav ITRGKILL.wav ITRGMOVE.wav invalid ITRGWNCE.wav
|
InfernalTroglodyte ITRGATTK.wav ITRGDFND.wav ITRGKILL.wav ITRGMOVE.wav invalid ITRGWNCE.wav
|
||||||
IronGolem IGLMATTK.wav IGLMDFND.wav IGLMKILL.wav IGLMMOVE.wav invalid IGLMWNCE.wav
|
# StoneGolem is actually an Iron Golem
|
||||||
|
StoneGolem IGLMATTK.wav IGLMDFND.wav IGLMKILL.wav IGLMMOVE.wav invalid IGLMWNCE.wav
|
||||||
LesserTitan LTITATTK.wav LTITDFND.wav LTITKILL.wav LTITMOVE.wav invalid LTITWNCE.wav
|
LesserTitan LTITATTK.wav LTITDFND.wav LTITKILL.wav LTITMOVE.wav invalid LTITWNCE.wav
|
||||||
Lich LICHATTK.wav LICHDFND.wav LICHKILL.wav LICHMOVE.wav LICHSHOT.wav LICHWNCE.wav LICHATK2.wav
|
Lich LICHATTK.wav LICHDFND.wav LICHKILL.wav LICHMOVE.wav LICHSHOT.wav LICHWNCE.wav LICHATK2.wav
|
||||||
LightCrossbowman LCRSATTK.wav LCRSDFND.wav LCRSKILL.wav LCRSMOVE.wav LCRSSHOT.wav LCRSWNCE.wav
|
LightCrossbowman LCRSATTK.wav LCRSDFND.wav LCRSKILL.wav LCRSMOVE.wav LCRSSHOT.wav LCRSWNCE.wav
|
||||||
@ -126,7 +127,8 @@ SkeletonWarrior SKLWATTK.wav SKLWDFND.wav SKLWKILL.wav SKLWMOVE.wav invalid SKLW
|
|||||||
Sprite SPRTATTK.wav SPRTDFND.wav SPRTKILL.wav SPRTMOVE.wav invalid SPRTWNCE.wav
|
Sprite SPRTATTK.wav SPRTDFND.wav SPRTKILL.wav SPRTMOVE.wav invalid SPRTWNCE.wav
|
||||||
StoneElemental MAGMATTK.wav MAGMDFND.wav MAGMKILL.wav MAGMMOVE.wav invalid MAGMWNCE.wav
|
StoneElemental MAGMATTK.wav MAGMDFND.wav MAGMKILL.wav MAGMMOVE.wav invalid MAGMWNCE.wav
|
||||||
StoneGargoyle SGRGATTK.wav SGRGDFND.wav SGRGKILL.wav SGRGMOVE.wav invalid SGRGWNCE.wav
|
StoneGargoyle SGRGATTK.wav SGRGDFND.wav SGRGKILL.wav SGRGMOVE.wav invalid SGRGWNCE.wav
|
||||||
StoneGolem SGLMATTK.wav SGLMDFND.wav SGLMKILL.wav SGLMMOVE.wav invalid SGLMWNCE.wav
|
# IronGolem is actually a Stone Golem
|
||||||
|
IronGolem SGLMATTK.wav SGLMDFND.wav SGLMKILL.wav SGLMMOVE.wav invalid SGLMWNCE.wav
|
||||||
StormElemental STORATTK.wav STORDFND.wav STORKILL.wav STORMOVE.wav STORSHOT.wav STORWNCE.wav
|
StormElemental STORATTK.wav STORDFND.wav STORKILL.wav STORMOVE.wav STORSHOT.wav STORWNCE.wav
|
||||||
Swordsman SWRDATTK.wav SWRDDFND.wav SWRDKILL.wav SWRDMOVE.wav invalid SWRDWNCE.wav
|
Swordsman SWRDATTK.wav SWRDDFND.wav SWRDKILL.wav SWRDMOVE.wav invalid SWRDWNCE.wav
|
||||||
Thunderbird TBRDATTK.wav TBRDDFND.wav TBRDKILL.wav TBRDMOVE.wav invalid TBRDWNCE.wav
|
Thunderbird TBRDATTK.wav TBRDDFND.wav TBRDKILL.wav TBRDMOVE.wav invalid TBRDWNCE.wav
|
||||||
|
Loading…
Reference in New Issue
Block a user