add accessors; pull some stuff out of the header
This commit is contained in:
@@ -23,6 +23,16 @@
|
|||||||
#include "SongOptions.h"
|
#include "SongOptions.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
|
||||||
|
Course::Course()
|
||||||
|
{
|
||||||
|
m_iStages = 0;
|
||||||
|
m_bRepeat = false;
|
||||||
|
m_bRandomize = false;
|
||||||
|
m_iLives = 4;
|
||||||
|
m_iExtra = 0;
|
||||||
|
for( int i=0; i<MAX_COURSE_STAGES; i++ )
|
||||||
|
m_apSongs[i] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void Course::LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs )
|
void Course::LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs )
|
||||||
{
|
{
|
||||||
@@ -206,6 +216,31 @@ Notes* Course::GetNotesForStage( int iStage )
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Song *Course::GetSong( int iStage )
|
||||||
|
{
|
||||||
|
return m_apSongs[iStage];
|
||||||
|
}
|
||||||
|
|
||||||
|
CString Course::GetDescription( int iStage )
|
||||||
|
{
|
||||||
|
return m_asDescriptions[iStage];
|
||||||
|
}
|
||||||
|
|
||||||
|
CString Course::GetModifiers( int iStage )
|
||||||
|
{
|
||||||
|
return m_asModifiers[iStage];
|
||||||
|
}
|
||||||
|
|
||||||
|
void Course::AddStage( Song* pSong, CString sDescription, CString sModifiers )
|
||||||
|
{
|
||||||
|
ASSERT( m_iStages <= MAX_COURSE_STAGES - 1 );
|
||||||
|
m_apSongs[m_iStages] = pSong;
|
||||||
|
m_asDescriptions[m_iStages] = sDescription;
|
||||||
|
m_asModifiers[m_iStages] = sModifiers;
|
||||||
|
SongOrdering[m_iStages] = m_iStages;
|
||||||
|
|
||||||
|
m_iStages++;
|
||||||
|
}
|
||||||
|
|
||||||
/* When bShuffled is true, returns courses in the song ordering list. */
|
/* When bShuffled is true, returns courses in the song ordering list. */
|
||||||
void Course::GetSongAndNotesForCurrentStyle(
|
void Course::GetSongAndNotesForCurrentStyle(
|
||||||
|
|||||||
+5
-21
@@ -24,16 +24,7 @@ const int MAX_COURSE_STAGES = 300; // Increased since the user can place all Bem
|
|||||||
class Course
|
class Course
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Course()
|
Course();
|
||||||
{
|
|
||||||
m_iStages = 0;
|
|
||||||
m_bRepeat = false;
|
|
||||||
m_bRandomize = false;
|
|
||||||
m_iLives = 4;
|
|
||||||
m_iExtra = 0;
|
|
||||||
for( int i=0; i<MAX_COURSE_STAGES; i++ )
|
|
||||||
m_apSongs[i] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
CString m_sName;
|
CString m_sName;
|
||||||
CString m_sBannerPath;
|
CString m_sBannerPath;
|
||||||
@@ -48,22 +39,15 @@ public:
|
|||||||
int m_iLives; // -1 means use bar life meter
|
int m_iLives; // -1 means use bar life meter
|
||||||
int m_iExtra; // extra stage number...
|
int m_iExtra; // extra stage number...
|
||||||
|
|
||||||
|
Song *GetSong( int iStage );
|
||||||
|
CString GetDescription( int iStage );
|
||||||
|
CString GetModifiers( int iStage );
|
||||||
void GetPlayerOptions( PlayerOptions* pPO_out );
|
void GetPlayerOptions( PlayerOptions* pPO_out );
|
||||||
void GetSongOptions( SongOptions* pSO_out);
|
void GetSongOptions( SongOptions* pSO_out);
|
||||||
|
|
||||||
void LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs );
|
void LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs );
|
||||||
void CreateEndlessCourseFromGroupAndDifficulty( CString sGroupName, Difficulty dc, CArray<Song*,Song*> &apSongsInGroup );
|
void CreateEndlessCourseFromGroupAndDifficulty( CString sGroupName, Difficulty dc, CArray<Song*,Song*> &apSongsInGroup );
|
||||||
|
void AddStage( Song* pSong, CString sDescription, CString sModifiers );
|
||||||
void AddStage( Song* pSong, CString sDescription, CString sModifiers )
|
|
||||||
{
|
|
||||||
ASSERT( m_iStages <= MAX_COURSE_STAGES - 1 );
|
|
||||||
m_apSongs[m_iStages] = pSong;
|
|
||||||
m_asDescriptions[m_iStages] = sDescription;
|
|
||||||
m_asModifiers[m_iStages] = sModifiers;
|
|
||||||
SongOrdering[m_iStages] = m_iStages;
|
|
||||||
|
|
||||||
m_iStages++;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GetSongAndNotesForCurrentStyle( CArray<Song*,Song*>& apSongsOut, CArray<Notes*,Notes*>& apNotesOut, CStringArray& asModifiersOut, bool bShuffled );
|
void GetSongAndNotesForCurrentStyle( CArray<Song*,Song*>& apSongsOut, CArray<Notes*,Notes*>& apNotesOut, CStringArray& asModifiersOut, bool bShuffled );
|
||||||
RageColor GetColor();
|
RageColor GetColor();
|
||||||
|
|||||||
Reference in New Issue
Block a user