1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Callback jugglery, part 1.

Fixed #252.
This commit is contained in:
Michał W. Urbańczyk
2011-05-03 03:14:18 +00:00
parent aca90abd38
commit b4144dc616
24 changed files with 1218 additions and 1216 deletions

View File

@@ -130,7 +130,7 @@ CPlayerInterface::~CPlayerInterface()
LOCPLINT = NULL;
}
void CPlayerInterface::init(ICallback * CB)
void CPlayerInterface::init(CCallback * CB)
{
cb = dynamic_cast<CCallback*>(CB);
if(observerInDuelMode)
@@ -234,7 +234,7 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details)
if(LOCPLINT != this)
return;
boost::unique_lock<boost::recursive_mutex> un(*pim);
const CGHeroInstance * ho = cb->getHeroInfo(details.id); //object representing this hero
const CGHeroInstance * ho = cb->getHero(details.id); //object representing this hero
int3 hp = details.start;
adventureInt->centerOn(ho); //actualizing screen pos
@@ -1194,7 +1194,7 @@ void CPlayerInterface::objectPropertyChanged(const SetObjectProperty * sop)
boost::unique_lock<boost::recursive_mutex> un(*pim);
if(sop->what == ObjProperty::OWNER)
{
const CGObjectInstance * obj = cb->getObjectInfo(sop->id);
const CGObjectInstance * obj = cb->getObj(sop->id);
std::set<int3> pos = obj->getBlockedPos();
for(std::set<int3>::const_iterator it = pos.begin(); it != pos.end(); ++it)
{