draw boundaries underneath "just barely"

This commit is contained in:
Chris Danford
2005-05-07 16:47:48 +00:00
parent 5871532ecd
commit 082c38688f
2 changed files with 21 additions and 20 deletions
+20 -19
View File
@@ -42,11 +42,12 @@ void GraphDisplay::Unload()
m_pTexture = NULL;
m_sprJustBarely.Unload();
FOREACH( AutoActor*, m_vpSongBoundaries, p )
SAFE_DELETE( *p );
m_vpSongBoundaries.clear();
m_sprJustBarely.Unload();
ActorFrame::RemoveAllChildren();
}
@@ -62,6 +63,24 @@ void GraphDisplay::LoadFromStageStats( const StageStats &ss, const PlayerStageSt
UpdateVerts();
//
// Show song boundaries
//
float fSec = 0;
FOREACH_CONST( Song*, ss.vpPossibleSongs, song )
{
if( song == ss.vpPossibleSongs.end()-1 )
continue;
fSec += (*song)->GetStepsSeconds();
AutoActor *p = new AutoActor;
m_vpSongBoundaries.push_back( p );
p->Load( sSongBoundaryPath );
float fX = SCALE( fSec, 0, fTotalStepSeconds, m_quadVertices.left, m_quadVertices.right );
(*p)->SetX( fX );
this->AddChild( *p );
}
//
// Search for the min life record
//
@@ -92,24 +111,6 @@ void GraphDisplay::LoadFromStageStats( const StageStats &ss, const PlayerStageSt
}
this->AddChild( m_sprJustBarely );
}
//
// Show song boundaries
//
float fSec = 0;
FOREACH_CONST( Song*, ss.vpPossibleSongs, song )
{
if( song == ss.vpPossibleSongs.end()-1 )
continue;
fSec += (*song)->GetStepsSeconds();
AutoActor *p = new AutoActor;
m_vpSongBoundaries.push_back( p );
p->Load( sSongBoundaryPath );
float fX = SCALE( fSec, 0, fTotalStepSeconds, m_quadVertices.left, m_quadVertices.right );
(*p)->SetX( fX );
this->AddChild( *p );
}
}
void GraphDisplay::UpdateVerts()