From 57b0be925ee5943b9ee448e6bf9dff9eb6cd3239 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 1 Feb 2004 06:16:36 +0000 Subject: [PATCH] fixes --- stepmania/src/ActorScroller.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/stepmania/src/ActorScroller.cpp b/stepmania/src/ActorScroller.cpp index f8fd5f9594..8b6c397603 100644 --- a/stepmania/src/ActorScroller.cpp +++ b/stepmania/src/ActorScroller.cpp @@ -60,12 +60,23 @@ void ActorScroller::Update( float fDeltaTime ) void ActorScroller::DrawPrimitives() { - if( m_bLoaded ) + // Optimization: If we weren't loaded, then fall back to the ActorFrame logic + if( !m_bLoaded ) { - for( unsigned i=0; i=m_SubActors.size() ) + continue; // skip + float fItemOffset = i - m_fCurrentItem; + DISPLAY->PushMatrix(); + if( m_vRotationDegrees[0] ) DISPLAY->RotateX( m_vRotationDegrees[0]*fItemOffset ); if( m_vRotationDegrees[1] ) @@ -84,10 +95,8 @@ void ActorScroller::DrawPrimitives() ); m_SubActors[i]->Draw(); + + DISPLAY->PopMatrix(); } } - else - { - ActorFrame::DrawPrimitives(); - } }