From 082c38688f829c3c900988d6a7d29d7f890e64a7 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 7 May 2005 16:47:48 +0000 Subject: [PATCH] draw boundaries underneath "just barely" --- stepmania/src/GraphDisplay.cpp | 39 +++++++++++++++++----------------- stepmania/src/GraphDisplay.h | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/stepmania/src/GraphDisplay.cpp b/stepmania/src/GraphDisplay.cpp index 235ff1fff4..224beb81e5 100644 --- a/stepmania/src/GraphDisplay.cpp +++ b/stepmania/src/GraphDisplay.cpp @@ -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() diff --git a/stepmania/src/GraphDisplay.h b/stepmania/src/GraphDisplay.h index e8bc397cc0..62a9f95f8a 100644 --- a/stepmania/src/GraphDisplay.h +++ b/stepmania/src/GraphDisplay.h @@ -34,8 +34,8 @@ private: RageTexture *m_pTexture; - AutoActor m_sprJustBarely; vector m_vpSongBoundaries; + AutoActor m_sprJustBarely; }; #endif