mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Bugfix - it should work now.
This commit is contained in:
parent
58f1a2169f
commit
ae0be1f79e
@ -314,6 +314,12 @@ void CHeroList::hover (bool on)
|
||||
void CHeroList::keyPressed (SDL_KeyboardEvent & key)
|
||||
{
|
||||
}
|
||||
void CHeroList::updateMove(const CGHeroInstance* which) //draws move points bar
|
||||
{
|
||||
int ser = LOCPLINT->cb->getHeroSerial(which);
|
||||
int pom = (which->movement)/100;
|
||||
blitAtWR(mobile->ourImages[pom].bitmap,posmobx,posmoby+ser*32); //move point
|
||||
}
|
||||
void CHeroList::draw()
|
||||
{
|
||||
for (int iT=0+from;iT<5+from;iT++)
|
||||
|
@ -71,6 +71,7 @@ public:
|
||||
void hover (bool on);
|
||||
void keyPressed (SDL_KeyboardEvent & key);
|
||||
void updateHList();
|
||||
void updateMove(const CGHeroInstance* which); //draws move points bar
|
||||
void redrawAllOne(int which);
|
||||
void draw();
|
||||
void init();
|
||||
|
@ -350,6 +350,15 @@ int CCallback::getMyColor()
|
||||
{
|
||||
return player;
|
||||
}
|
||||
int CCallback::getHeroSerial(const CGHeroInstance * hero)
|
||||
{
|
||||
for (int i=0; i<gs->players[player].heroes.size();i++)
|
||||
{
|
||||
if (gs->players[player].heroes[i]==hero)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
int CCallback::getMySerial()
|
||||
{
|
||||
return gs->players[player].serial;
|
||||
|
@ -27,10 +27,11 @@ public:
|
||||
virtual const CGTownInstance * getTownInfo(int val, bool mode)=0; //mode = 0 -> val = serial; mode = 1 -> val = ID
|
||||
virtual int howManyTowns()=0;
|
||||
virtual std::vector < std::string > getObjDescriptions(int3 pos)=0; //returns descriptions of objects at pos in order from the lowest to the highest
|
||||
virtual std::vector < const CGHeroInstance *> * getHeroesInfo(bool onlyOur=true)=0;
|
||||
virtual std::vector < const CGHeroInstance *> getHeroesInfo(bool onlyOur=true)=0;
|
||||
virtual bool isVisible(int3 pos)=0;
|
||||
virtual int getMyColor()=0;
|
||||
virtual int getMySerial()=0;
|
||||
virtual int getHeroSerial(const CGHeroInstance * hero)=0;
|
||||
};
|
||||
|
||||
struct HeroMoveDetails
|
||||
@ -72,6 +73,7 @@ public:
|
||||
std::vector < const CGHeroInstance *> getHeroesInfo(bool onlyOur=true);
|
||||
bool isVisible(int3 pos);
|
||||
int getMyColor();
|
||||
int getHeroSerial(const CGHeroInstance * hero);
|
||||
int getMySerial();
|
||||
|
||||
//friends
|
||||
|
Loading…
Reference in New Issue
Block a user