mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
gcc compilation fixes.
This commit is contained in:
parent
62cb72975c
commit
e3eeed0b70
@ -799,7 +799,7 @@ int SelectionTab::getLine()
|
||||
{
|
||||
int line = -1;
|
||||
Point clickPos(GH.current->button.x, GH.current->button.y);
|
||||
clickPos -= pos.topLeft();
|
||||
clickPos = clickPos - pos.topLeft();
|
||||
|
||||
if (clickPos.y > 115 && clickPos.y < 564 && clickPos.x > 52 && clickPos.x < 366)
|
||||
{
|
||||
@ -1674,4 +1674,4 @@ void CTextInput::setText( const std::string &nText, bool callCb )
|
||||
redraw();
|
||||
if(callCb)
|
||||
cb(text);
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ struct Point
|
||||
template<typename T>
|
||||
Point operator-(const T &b) const
|
||||
{
|
||||
return Point(x+b.x,y+b.y);
|
||||
return Point(x - b.x, y - b.y);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
@ -2105,7 +2105,7 @@ void CSplitWindow::clickLeft(tribool down, bool previousState)
|
||||
if(down)
|
||||
{
|
||||
Point click(GH.current->motion.x,GH.current->motion.y);
|
||||
click -= pos.topLeft();
|
||||
click = click - pos.topLeft();
|
||||
if(Rect(19,216,105,40).isIn(click)) //left picture
|
||||
which = 0;
|
||||
else if(Rect(175,216,105,40).isIn(click)) //right picture
|
||||
|
@ -2181,7 +2181,7 @@ int CGCreature::takenAction(const CGHeroInstance *h, bool allowJoin) const
|
||||
myKindCres.insert(subID); //we
|
||||
myKindCres.insert(VLC->creh->creatures[subID].upgrades.begin(),VLC->creh->creatures[subID].upgrades.end()); //our upgrades
|
||||
for(std::vector<CCreature>::iterator i=VLC->creh->creatures.begin(); i!=VLC->creh->creatures.end(); i++)
|
||||
if(vstd::contains(i->upgrades,id)) //it's our base creatures
|
||||
if(vstd::contains(i->upgrades, (ui32) id)) //it's our base creatures
|
||||
myKindCres.insert(i->idNumber);
|
||||
|
||||
int count = 0, //how many creatures of our kind has hero
|
||||
@ -3655,7 +3655,7 @@ void CGScholar::onHeroVisit( const CGHeroInstance * h ) const
|
||||
int ssl = h->getSecSkillLevel(bid); //current sec skill level, used if bonusType == 1
|
||||
if((type == 1
|
||||
&& ((ssl == 3) || (!ssl && h->secSkills.size() == SKILL_PER_HERO))) ////hero already has expert level in the skill or (don't know skill and doesn't have free slot)
|
||||
|| (type == 2 && (!h->getArt(17) || vstd::contains(h->spells,bid)))) //hero doesn't have a spellbook or already knows the spell
|
||||
|| (type == 2 && (!h->getArt(17) || vstd::contains(h->spells, (ui32) bid)))) //hero doesn't have a spellbook or already knows the spell
|
||||
{
|
||||
type = 0;
|
||||
bid = ran() % PRIMARY_SKILLS;
|
||||
|
@ -700,7 +700,8 @@ struct TradeComponents : public CPackForClient, public CPackForServer
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
h & id & heroid & objectid & available & chosen & bought;
|
||||
//FIXME: Deal with id properly.
|
||||
h /* & id */ & heroid & objectid & available & chosen & bought;
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user