Files
itgmania212121/stepmania/src/Course.h
T

68 lines
1.8 KiB
C++
Raw Normal View History

2002-06-14 22:25:22 +00:00
#pragma once
/*
-----------------------------------------------------------------------------
2002-07-27 19:29:51 +00:00
Class: Course
2002-06-14 22:25:22 +00:00
Desc: A queue of songs and notes.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "GameConstantsAndTypes.h"
2002-07-28 20:28:37 +00:00
struct PlayerOptions;
struct SongOptions;
2002-06-14 22:25:22 +00:00
class Song;
struct Notes;
2002-07-27 19:29:51 +00:00
2002-06-14 22:25:22 +00:00
const int MAX_COURSE_STAGES = 100;
class Course
{
public:
Course()
{
m_iStages = 0;
2002-07-02 17:34:20 +00:00
m_bRepeat = false;
2002-07-29 03:06:55 +00:00
m_bRandomize = false;
2002-07-27 19:29:51 +00:00
m_iLives = 4;
2002-06-14 22:25:22 +00:00
for( int i=0; i<MAX_COURSE_STAGES; i++ )
m_apSongs[i] = NULL;
}
CString m_sName;
CString m_sBannerPath;
CString m_sCDTitlePath;
int m_iStages;
Song* m_apSongs[MAX_COURSE_STAGES];
2002-07-23 01:41:40 +00:00
CString m_asDescriptions[MAX_COURSE_STAGES];
Notes* GetNotesForStage( int iStage );
2002-07-02 17:34:20 +00:00
bool m_bRepeat; // repeat after last song?
2002-07-29 03:06:55 +00:00
bool m_bRandomize; // play the songs in a random order
2002-07-27 19:29:51 +00:00
int m_iLives; // -1 means use bar life meter
CString m_sModifiers; // contains player options and song options
2002-07-02 17:34:20 +00:00
2002-07-28 20:28:37 +00:00
void GetPlayerOptions( PlayerOptions* pPO_out );
void GetSongOptions( SongOptions* pSO_out);
2002-06-14 22:25:22 +00:00
2002-07-23 01:41:40 +00:00
void LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs );
2002-07-29 03:06:55 +00:00
void CreateEndlessCourseFromGroupAndDifficultyClass( CString sGroupName, DifficultyClass dc, CArray<Song*,Song*> &apSongsInGroup );
2002-07-23 01:41:40 +00:00
void AddStage( Song* pSong, CString sDescription )
2002-06-14 22:25:22 +00:00
{
ASSERT( m_iStages <= MAX_COURSE_STAGES );
m_apSongs[m_iStages] = pSong;
2002-07-23 01:41:40 +00:00
m_asDescriptions[m_iStages] = sDescription;
2002-06-14 22:25:22 +00:00
m_iStages++;
}
2002-07-23 01:41:40 +00:00
void GetSongAndNotesForCurrentStyle( CArray<Song*,Song*>& apSongsOut, CArray<Notes*,Notes*> apNotesOut[NUM_PLAYERS] );
2002-07-27 19:29:51 +00:00
D3DXCOLOR GetColor();
2002-06-14 22:25:22 +00:00
};
2002-07-27 19:29:51 +00:00
void SortCoursePointerArrayByDifficulty( CArray<Course*,Course*> &apCourses );