1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

* added visitDir bitfield in CGDefInfo specifying from which directions object can be visited

* fixed crashbug in heroList (showing after dismissing hero)
This commit is contained in:
Michał W. Urbańczyk
2008-02-15 18:40:58 +00:00
parent d5a4dcc6cd
commit 77fadf561d
4 changed files with 19 additions and 3 deletions

View File

@ -1380,7 +1380,7 @@ SDL_Surface * CPlayerInterface::drawPrimarySkill(const CGHeroInstance *curh, SDL
SDL_Surface * CPlayerInterface::drawHeroInfoWin(const CGHeroInstance * curh)
{
char * buf = new char[10];
SDL_Surface * ret = copySurface(hInfo);
SDL_Surface * ret = SDL_DisplayFormat(hInfo);
SDL_SetColorKey(ret,SDL_SRCCOLORKEY,SDL_MapRGB(ret->format,0,255,255));
blueToPlayersAdv(ret,playerID,1);
printAt(curh->name,75,15,GEOR13,zwykly,ret);
@ -1875,6 +1875,13 @@ void CHeroList::genList()
}
void CHeroList::select(int which)
{
if (which<0)
{
selected = which;
LOCPLINT->adventureInt->selection.selected = LOCPLINT->adventureInt->terrain.currentPath = NULL;
draw();
LOCPLINT->adventureInt->infoBar.draw(NULL);
}
if (which>=items.size())
return;
selected = which;
@ -2012,6 +2019,8 @@ void CHeroList::updateHList()
{
items.clear();
genList();
if(selected>=items.size())
select(items.size()-1);
}
void CHeroList::updateMove(const CGHeroInstance* which) //draws move points bar
{