cleanup
This commit is contained in:
@@ -234,19 +234,17 @@ void ActorScroller::PositionItemsAndDrawPrimitives( bool bPosition, bool bDrawPr
|
|||||||
if( m_SubActors.empty() )
|
if( m_SubActors.empty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// write to z buffer so that top and bottom are clipped
|
|
||||||
float fPositionFullyOnScreenTop = -(m_fNumItemsToDraw-1)/2.f;
|
|
||||||
float fPositionFullyOnScreenBottom = (m_fNumItemsToDraw-1)/2.f;
|
|
||||||
float fPositionFullyOffScreenTop = fPositionFullyOnScreenTop - 1;
|
|
||||||
float fPositionFullyOffScreenBottom = fPositionFullyOnScreenBottom + 1;
|
|
||||||
float fPositionOnEdgeOfScreenTop = -(m_fNumItemsToDraw)/2.f;
|
|
||||||
float fPositionOnEdgeOfScreenBottom = (m_fNumItemsToDraw)/2.f;
|
|
||||||
|
|
||||||
float fFirstItemToDraw = 0;
|
float fFirstItemToDraw = 0;
|
||||||
float fLastItemToDraw = 0;
|
float fLastItemToDraw = 0;
|
||||||
|
|
||||||
if( m_bUseMask )
|
if( m_bUseMask )
|
||||||
{
|
{
|
||||||
|
// write to z buffer so that top and bottom are clipped
|
||||||
|
float fPositionFullyOnScreenTop = -(m_fNumItemsToDraw-1)/2.f;
|
||||||
|
float fPositionFullyOnScreenBottom = (m_fNumItemsToDraw-1)/2.f;
|
||||||
|
float fPositionFullyOffScreenTop = fPositionFullyOnScreenTop - 1;
|
||||||
|
float fPositionFullyOffScreenBottom = fPositionFullyOnScreenBottom + 1;
|
||||||
|
|
||||||
if( bPosition ) m_exprTransformFunction.PositionItem( &m_quadMask, fPositionFullyOffScreenTop, -1, m_SubActors.size() );
|
if( bPosition ) m_exprTransformFunction.PositionItem( &m_quadMask, fPositionFullyOffScreenTop, -1, m_SubActors.size() );
|
||||||
if( bDrawPrimitives ) m_quadMask.Draw();
|
if( bDrawPrimitives ) m_quadMask.Draw();
|
||||||
|
|
||||||
@@ -258,6 +256,9 @@ void ActorScroller::PositionItemsAndDrawPrimitives( bool bPosition, bool bDrawPr
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
float fPositionOnEdgeOfScreenTop = -(m_fNumItemsToDraw)/2.f;
|
||||||
|
float fPositionOnEdgeOfScreenBottom = (m_fNumItemsToDraw)/2.f;
|
||||||
|
|
||||||
fFirstItemToDraw = fPositionOnEdgeOfScreenTop + m_fCurrentItem;
|
fFirstItemToDraw = fPositionOnEdgeOfScreenTop + m_fCurrentItem;
|
||||||
fLastItemToDraw = fPositionOnEdgeOfScreenBottom + m_fCurrentItem;
|
fLastItemToDraw = fPositionOnEdgeOfScreenBottom + m_fCurrentItem;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user