Changed: #1246 Build on PPC machines (patch provided by Jeru)

This commit is contained in:
kervala 2011-01-30 15:48:02 +01:00
parent fa63539729
commit fc1deec2e8

View file

@ -50,46 +50,6 @@ extern ULandscape *Landscape;
namespace R2 namespace R2
{ {
// *********************************************************************************************************
CDisplayerVisualGroup::CDisplayerVisualGroup()
{
_ArrayName = "Components";
_DrawnThisFrame = false;
_TimeOver = 0;
_CurrPrimValid = true;
touch();
_Active = false;
_CurrPrimInaccessible = false;
_ContextualVisibilityActive = false;
_ContextualVisibilityDate = -1;
_VisibleLastFrame = false;
}
// *********************************************************************************************************
void CDisplayerVisualGroup::touch()
{
//H_AUTO(R2_CDisplayerVisualGroup_touch)
_PrimTouched = true;
_InstanceListTouched = true;
_AccessibilityTouched = true;
}
// *********************************************************************************************************
void CDisplayerVisualGroup::setDisplayedInstance(CInstance *instance)
{
//H_AUTO(R2_CDisplayerVisualGroup_setDisplayedInstance)
CDisplayerVisual::setDisplayedInstance(instance);
_Prim.DisplayedInstance = instance;
}
// *********************************************************************************************************
CCtrlPolygon *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlPolygon() const
{
//H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender)
nlassert(DisplayedInstance);
// create a special selectable polygon // create a special selectable polygon
class CCtrlPolygonSelectable : public CCtrlPolygon, public IDisplayerUIHandle class CCtrlPolygonSelectable : public CCtrlPolygon, public IDisplayerUIHandle
{ {
@ -134,19 +94,7 @@ CCtrlPolygon *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlPolygon() con
gm->worldToWindow(dest, src); gm->worldToWindow(dest, src);
} }
}; };
CCtrlPolygonSelectable *result = new CCtrlPolygonSelectable(*DisplayedInstance);
result->setId(DisplayedInstance->getId());
result->setToolTipParent(CCtrlBase::TTMouse);
result->setToolTipParentPosRef(Hotspot_BR);
result->setToolTipPosRef(Hotspot_TL);
return result;
}
// *********************************************************************************************************
CCtrlQuad *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlQuad(uint edgeIndex) const
{
//H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender)
nlassert(DisplayedInstance);
// create a special selectable polygon // create a special selectable polygon
class CCtrlQuadSelectable : public CCtrlQuad, public IDisplayerUIHandle class CCtrlQuadSelectable : public CCtrlQuad, public IDisplayerUIHandle
{ {
@ -191,6 +139,59 @@ CCtrlQuad *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlQuad(uint edgeIn
CInstance &Instance; CInstance &Instance;
uint EdgeIndex; uint EdgeIndex;
}; };
// *********************************************************************************************************
CDisplayerVisualGroup::CDisplayerVisualGroup()
{
_ArrayName = "Components";
_DrawnThisFrame = false;
_TimeOver = 0;
_CurrPrimValid = true;
touch();
_Active = false;
_CurrPrimInaccessible = false;
_ContextualVisibilityActive = false;
_ContextualVisibilityDate = -1;
_VisibleLastFrame = false;
}
// *********************************************************************************************************
void CDisplayerVisualGroup::touch()
{
//H_AUTO(R2_CDisplayerVisualGroup_touch)
_PrimTouched = true;
_InstanceListTouched = true;
_AccessibilityTouched = true;
}
// *********************************************************************************************************
void CDisplayerVisualGroup::setDisplayedInstance(CInstance *instance)
{
//H_AUTO(R2_CDisplayerVisualGroup_setDisplayedInstance)
CDisplayerVisual::setDisplayedInstance(instance);
_Prim.DisplayedInstance = instance;
}
// *********************************************************************************************************
CCtrlPolygon *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlPolygon() const
{
//H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender)
nlassert(DisplayedInstance);
CCtrlPolygonSelectable *result = new CCtrlPolygonSelectable(*DisplayedInstance);
result->setId(DisplayedInstance->getId());
result->setToolTipParent(CCtrlBase::TTMouse);
result->setToolTipParentPosRef(Hotspot_BR);
result->setToolTipPosRef(Hotspot_TL);
return result;
}
// *********************************************************************************************************
CCtrlQuad *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlQuad(uint edgeIndex) const
{
//H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender)
nlassert(DisplayedInstance);
CCtrlQuadSelectable *result = new CCtrlQuadSelectable(*DisplayedInstance, edgeIndex); CCtrlQuadSelectable *result = new CCtrlQuadSelectable(*DisplayedInstance, edgeIndex);
result->setToolTipParent(CCtrlBase::TTMouse); result->setToolTipParent(CCtrlBase::TTMouse);
result->setToolTipParentPosRef(Hotspot_BR); result->setToolTipParentPosRef(Hotspot_BR);