"DrawCond"

This commit is contained in:
Glenn Maynard
2004-03-27 00:23:29 +00:00
parent 4740f1142d
commit aada5a8a91
2 changed files with 16 additions and 0 deletions
+13
View File
@@ -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 )
+3
View File
@@ -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;