Implemented TFlags for easy, type-safe bitflags

This commit is contained in:
parax0
2016-01-05 11:50:10 -07:00
parent ee5d5fae0a
commit 5375f34c19
63 changed files with 207 additions and 329 deletions

View File

@@ -198,7 +198,7 @@ void CDamageableTriggerExtra::AddToRenderer(CRenderer *pRenderer, const SViewInf
}
}
void CDamageableTriggerExtra::Draw(ERenderOptions Options, int /*ComponentIndex*/, const SViewInfo& ViewInfo)
void CDamageableTriggerExtra::Draw(FRenderOptions Options, int /*ComponentIndex*/, const SViewInfo& ViewInfo)
{
LoadModelMatrix();
CGraphics::sPixelBlock.TintColor = mpParent->TintColor(ViewInfo);

View File

@@ -36,7 +36,7 @@ public:
void PropertyModified(IProperty *pProperty);
bool ShouldDrawNormalAssets();
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo);
void Draw(ERenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);
void DrawSelection();
void RayAABoxIntersectTest(CRayCollisionTester& Tester, const SViewInfo& ViewInfo);
SRayIntersection RayNodeIntersectTest(const CRay& Ray, u32 ComponentIndex, const SViewInfo& ViewInfo);

View File

@@ -85,7 +85,7 @@ void CDoorExtra::AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo)
}
}
void CDoorExtra::Draw(ERenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo)
void CDoorExtra::Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo)
{
LoadModelMatrix();
mpParent->LoadLights(ViewInfo);
@@ -126,7 +126,7 @@ void CDoorExtra::RayAABoxIntersectTest(CRayCollisionTester& Tester, const SViewI
SRayIntersection CDoorExtra::RayNodeIntersectTest(const CRay &Ray, u32 AssetID, const SViewInfo& ViewInfo)
{
ERenderOptions Options = ViewInfo.pRenderer->RenderOptions();
FRenderOptions Options = ViewInfo.pRenderer->RenderOptions();
SRayIntersection out;
out.pNode = mpParent;

View File

@@ -16,7 +16,7 @@ public:
explicit CDoorExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent = 0);
void PropertyModified(IProperty *pProperty);
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo);
void Draw(ERenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);
void DrawSelection();
void RayAABoxIntersectTest(CRayCollisionTester& Tester, const SViewInfo& ViewInfo);
SRayIntersection RayNodeIntersectTest(const CRay &Ray, u32 AssetID, const SViewInfo& ViewInfo);

View File

@@ -36,7 +36,7 @@ void CRadiusSphereExtra::AddToRenderer(CRenderer *pRenderer, const SViewInfo& rk
}
}
void CRadiusSphereExtra::Draw(ERenderOptions /*Options*/, int /*ComponentIndex*/, const SViewInfo& /*rkViewInfo*/)
void CRadiusSphereExtra::Draw(FRenderOptions /*Options*/, int /*ComponentIndex*/, const SViewInfo& /*rkViewInfo*/)
{
glBlendFunc(GL_ONE, GL_ZERO);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);

View File

@@ -12,7 +12,7 @@ class CRadiusSphereExtra : public CScriptExtra
public:
explicit CRadiusSphereExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent = 0);
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo);
void Draw(ERenderOptions Options, int ComponentIndex, const SViewInfo& rkViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& rkViewInfo);
CColor Color() const;
CAABox Bounds() const;
};

View File

@@ -94,7 +94,7 @@ void CWaypointExtra::AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewIn
}
}
void CWaypointExtra::Draw(ERenderOptions /*Options*/, int ComponentIndex, const SViewInfo& /*ViewInfo*/)
void CWaypointExtra::Draw(FRenderOptions /*Options*/, int ComponentIndex, const SViewInfo& /*ViewInfo*/)
{
glBlendFunc(GL_ONE, GL_ZERO);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);

View File

@@ -24,7 +24,7 @@ public:
void LinksModified();
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo);
void Draw(ERenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);
};
#endif // CWAYPOINTEXTRA_H