"DrawCond"
This commit is contained in:
@@ -540,6 +540,8 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
|
||||
ini.GetValue( sLayer, "Lighting", m_bLighting );
|
||||
ini.GetValue( sLayer, "TexCoordVelocityX", m_fTexCoordVelocityX );
|
||||
ini.GetValue( sLayer, "TexCoordVelocityY", m_fTexCoordVelocityY );
|
||||
ini.GetValue( sLayer, "DrawCond", m_sDrawCond );
|
||||
|
||||
// compat:
|
||||
ini.GetValue( sLayer, "StretchTexCoordVelocityX", m_fTexCoordVelocityX );
|
||||
ini.GetValue( sLayer, "StretchTexCoordVelocityY", m_fTexCoordVelocityY );
|
||||
@@ -935,6 +937,17 @@ void BGAnimationLayer::Update( float fDeltaTime )
|
||||
}
|
||||
}
|
||||
|
||||
bool BGAnimationLayer::EarlyAbortDraw()
|
||||
{
|
||||
if( m_sDrawCond.empty() )
|
||||
return false;
|
||||
|
||||
if( !Lua::RunExpression( m_sDrawCond ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void BGAnimationLayer::DrawPrimitives()
|
||||
{
|
||||
if( m_fFOV != -1 )
|
||||
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
|
||||
void Update( float fDeltaTime );
|
||||
void DrawPrimitives();
|
||||
bool EarlyAbortDraw();
|
||||
|
||||
float GetMaxTweenTimeLeft() const;
|
||||
void GainingFocus( float fRate, bool bRewindMovie, bool bLoop );
|
||||
@@ -96,6 +97,8 @@ protected:
|
||||
float m_fFOV; // -1 = no change
|
||||
bool m_bLighting;
|
||||
|
||||
CString m_sDrawCond;
|
||||
|
||||
// stretch stuff
|
||||
float m_fTexCoordVelocityX;
|
||||
float m_fTexCoordVelocityY;
|
||||
|
||||
Reference in New Issue
Block a user