本文整理汇总了C++中MapObject::display方法的典型用法代码示例。如果您正苦于以下问题:C++ MapObject::display方法的具体用法?C++ MapObject::display怎么用?C++ MapObject::display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapObject
的用法示例。
在下文中一共展示了MapObject::display方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: displayObjects
// -----------------------------------------------------------------
// Name : displayObjects
// -----------------------------------------------------------------
void Map::displayObjects(PlayerManager * pPlayerMngr)
{
DisplayEngine * pDisplay = m_pTombGeometry->getDisplay();
for (int x = 0; x < m_iWidth; x++)
{
for (int y = 0; y < m_iHeight; y++)
{
Coords3D pos3D = pDisplay->get3DCoords(CoordsMap(x, y), BOARDPLANE);
MapObject * mapObj = m_pTiles[x][y]->getFirstMapObject(GOTYPE_TOWN);
if (mapObj != NULL)
mapObj->display();
mapObj = m_pTiles[x][y]->getFirstMapObject(GOTYPE_TEMPLE);
if (mapObj != NULL)
mapObj->display();
mapObj = m_pTiles[x][y]->getFirstMapObject(GOTYPE_DEAD_UNIT);
if (mapObj != NULL)
m_pTombGeometry->display(pos3D + Coords3D(0.6f, 0.1f), F_RGBA_NULL);
mapObj = m_pTiles[x][y]->getFirstMapObject(GOTYPE_UNIT);
if (mapObj != NULL)
{
mapObj->display();
Player * pPlayer = pPlayerMngr->findPlayer(mapObj->getOwner());
assert(pPlayer != NULL);
pPlayer->m_pBannerGeometry->display(pos3D + Coords3D(0.7f, 0.0f), pPlayer->m_Color);
}
Player * pPlayer = pPlayerMngr->getActiveLocalPlayer();
if (pPlayer != NULL)
{
if (m_pTiles[x][y]->m_pNbAlliesGeo != NULL)
{
// float fy = 0.31f;
if (m_pTiles[x][y]->m_pNbFoesGeo == NULL)
{
// fy = 0.62f;
m_pCountUnitsBgGeometry1L->display(pos3D + Coords3D(-0.1f, 0.0f), F_RGBA_NULL);
}
else
m_pCountUnitsBgGeometry2L->display(pos3D + Coords3D(-0.1f, 0.0f), F_RGBA_NULL);
pPlayer->m_pBannerGeometry->display(pos3D + Coords3D(-0.1f, 0.0f), pPlayer->m_Color);
m_pTiles[x][y]->m_pNbAlliesGeo->display(pos3D + Coords3D(0.15f, 0.0f), F_RGBA_NULL);
}
if (m_pTiles[x][y]->m_pNbFoesGeo != NULL)
{
float fy = 0.31f;
if (m_pTiles[x][y]->m_pNbAlliesGeo == NULL)
{
fy = 0.0f;
m_pCountUnitsBgGeometry1L->display(pos3D + Coords3D(-0.1f, 0.0f), F_RGBA_NULL);
}
m_pFoeBannerGeometry->display(pos3D + Coords3D(-0.1f, fy), rgb(0, 0, 0));
m_pTiles[x][y]->m_pNbFoesGeo->display(pos3D + Coords3D(0.15f, fy), F_RGBA_NULL);
}
}
}
}
}