From 1f1b24b7b16a74cdf1dd58a3ea5c0cb431de8331 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 30 Aug 2004 22:15:57 +0000 Subject: [PATCH] add Course::GetAllCachedTrails --- stepmania/src/Course.cpp | 8 ++++++++ stepmania/src/Course.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 7fa160c148..bfe2b9d352 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -1111,6 +1111,14 @@ bool Course::IsRanking() const return false; } +void Course::GetAllCachedTrails( vector &out ) +{ + FOREACH_StepsType( st ) + FOREACH_ShownCourseDifficulty( cd ) + if( m_TrailCacheValid[st][cd] && !m_TrailCacheNull[st][cd] ) + out.push_back( &m_TrailCache[st][cd] ); +} + /* * (c) 2001-2004 Chris Danford, Glenn Maynard * All rights reserved. diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index 4af5b585cc..9a895088a9 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -149,6 +149,8 @@ public: /* Call when a Song or its Steps are deleted/changed. */ void Invalidate( Song *pStaleSong ); + void GetAllCachedTrails( vector &out ); + private: bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;