1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Make IObjectInterface::cb non-static

This commit is contained in:
Ivan Savenko
2024-01-01 16:37:48 +02:00
parent c37ce05d06
commit a15366f5a5
89 changed files with 502 additions and 445 deletions

View File

@ -21,8 +21,6 @@
VCMI_LIB_NAMESPACE_BEGIN
IGameCallback * IObjectInterface::cb = nullptr;
void IObjectInterface::showInfoDialog(const ui32 txtID, const ui16 soundID, EInfoWindowMode mode) const
{
InfoWindow iw;
@ -30,7 +28,7 @@ void IObjectInterface::showInfoDialog(const ui32 txtID, const ui16 soundID, EInf
iw.player = getOwner();
iw.type = mode;
iw.text.appendLocalString(EMetaText::ADVOB_TXT,txtID);
IObjectInterface::cb->sendAndApply(&iw);
cb->sendAndApply(&iw);
}
///IObjectInterface
@ -117,7 +115,7 @@ IBoatGenerator::EGeneratorState IBoatGenerator::shipyardStatus() const
if(!tile.valid())
return TILE_BLOCKED; //no available water
const TerrainTile *t = IObjectInterface::cb->getTile(tile);
const TerrainTile *t = getObject()->cb->getTile(tile);
if(!t)
return TILE_BLOCKED; //no available water