1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

[mingw] finally fix broken compilation after rev 3183

This commit is contained in:
alexvins
2013-02-12 15:46:43 +00:00
parent 6ac70d6a0b
commit 506d54478f
2 changed files with 13 additions and 6 deletions

View File

@ -132,7 +132,7 @@ bool CCallback::dismissHero(const CGHeroInstance *hero)
} }
// int CCallback::getMySerial() const // int CCallback::getMySerial() const
// { // {
// boost::shared_lock<boost::shared_mutex> lock(*gs->mx); // boost::shared_lock<boost::shared_mutex> lock(*gs->mx);
// return gs->players[player].serial; // return gs->players[player].serial;
// } // }
@ -287,13 +287,19 @@ void CCallback::buildBoat( const IShipyard *obj )
sendRequest(&bb); sendRequest(&bb);
} }
CCallback::CCallback( CGameState * GS, boost::optional<TPlayerColor> Player, CClient *C ) CCallback::CCallback( CGameState * GS, boost::optional<TPlayerColor> Player, CClient *C )
:CBattleCallback(GS, Player, C) :CBattleCallback(GS, Player, C)
{ {
waitTillRealize = false; waitTillRealize = false;
unlockGsWhenWaiting = false; unlockGsWhenWaiting = false;
} }
CCallback::~CCallback()
{
//trivial, but required. Don`t remove.
}
const CGPathNode * CCallback::getPathInfo( int3 tile ) const CGPathNode * CCallback::getPathInfo( int3 tile )
{ {
if (!gs->map->isInTheMap(tile)) if (!gs->map->isInTheMap(tile))
@ -355,7 +361,7 @@ void CCallback::validatePaths()
if(h && ( cl->pathInfo->hero != h //wrong hero if(h && ( cl->pathInfo->hero != h //wrong hero
|| cl->pathInfo->hpos != h->getPosition(false) //wrong hero positoin || cl->pathInfo->hpos != h->getPosition(false) //wrong hero positoin
|| !cl->pathInfo->isValid)) //paths invalidated by game event || !cl->pathInfo->isValid)) //paths invalidated by game event
{ {
recalculatePaths(); recalculatePaths();
} }
} }

View File

@ -44,7 +44,7 @@ public:
//hero //hero
virtual bool moveHero(const CGHeroInstance *h, int3 dst) =0; //dst must be free, neighbouring tile (this function can move hero only by one tile) virtual bool moveHero(const CGHeroInstance *h, int3 dst) =0; //dst must be free, neighbouring tile (this function can move hero only by one tile)
virtual bool dismissHero(const CGHeroInstance * hero)=0; //dismisses given hero; true - successfuly, false - not successfuly virtual bool dismissHero(const CGHeroInstance * hero)=0; //dismisses given hero; true - successfuly, false - not successfuly
virtual void dig(const CGObjectInstance *hero)=0; virtual void dig(const CGObjectInstance *hero)=0;
virtual void castSpell(const CGHeroInstance *hero, SpellID spellID, const int3 &pos = int3(-1, -1, -1))=0; //cast adventure map spell virtual void castSpell(const CGHeroInstance *hero, SpellID spellID, const int3 &pos = int3(-1, -1, -1))=0; //cast adventure map spell
//town //town
@ -89,7 +89,7 @@ public:
CBattleCallback(CGameState *GS, boost::optional<TPlayerColor> Player, CClient *C); CBattleCallback(CGameState *GS, boost::optional<TPlayerColor> Player, CClient *C);
int battleMakeAction(BattleAction* action) OVERRIDE;//for casting spells by hero - DO NOT use it for moving active stack int battleMakeAction(BattleAction* action) OVERRIDE;//for casting spells by hero - DO NOT use it for moving active stack
bool battleMakeTacticAction(BattleAction * action) OVERRIDE; // performs tactic phase actions bool battleMakeTacticAction(BattleAction * action) OVERRIDE; // performs tactic phase actions
friend class CCallback; friend class CCallback;
friend class CClient; friend class CClient;
}; };
@ -102,6 +102,7 @@ private:
public: public:
CCallback(CGameState * GS, boost::optional<TPlayerColor> Player, CClient *C); CCallback(CGameState * GS, boost::optional<TPlayerColor> Player, CClient *C);
virtual ~CCallback();
//client-specific functionalities (pathfinding) //client-specific functionalities (pathfinding)
virtual const CGPathNode *getPathInfo(int3 tile); //uses main, client pathfinder info virtual const CGPathNode *getPathInfo(int3 tile); //uses main, client pathfinder info
@ -141,7 +142,7 @@ public:
void save(const std::string &fname); void save(const std::string &fname);
void sendMessage(const std::string &mess); void sendMessage(const std::string &mess);
void buildBoat(const IShipyard *obj); void buildBoat(const IShipyard *obj);
void dig(const CGObjectInstance *hero); void dig(const CGObjectInstance *hero);
void castSpell(const CGHeroInstance *hero, SpellID spellID, const int3 &pos = int3(-1, -1, -1)); void castSpell(const CGHeroInstance *hero, SpellID spellID, const int3 &pos = int3(-1, -1, -1));
//friends //friends