2001-11-04 19:34:28 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
File: Song.h
|
|
|
|
|
|
|
|
|
|
Desc: Holds metadata for a song and the song's step data.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001 Chris Danford. All rights reserved.
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
2001-11-03 10:52:42 +00:00
|
|
|
|
|
|
|
|
#ifndef _SONG_H_
|
|
|
|
|
#define _SONG_H_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "Steps.h"
|
2001-11-20 11:49:10 +00:00
|
|
|
class Steps; // why is this needed?
|
2001-11-03 10:52:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class Song
|
|
|
|
|
{
|
|
|
|
|
public:
|
2001-11-04 19:34:28 +00:00
|
|
|
Song();
|
|
|
|
|
|
2001-11-03 10:52:42 +00:00
|
|
|
bool LoadFromSongDir( CString sDir );
|
|
|
|
|
|
2001-11-20 11:49:10 +00:00
|
|
|
bool IsUsingMovieBG()
|
2001-11-03 10:52:42 +00:00
|
|
|
{
|
|
|
|
|
CString sBGFile = m_sBackground;
|
|
|
|
|
sBGFile.MakeLower();
|
2001-11-20 11:49:10 +00:00
|
|
|
return sBGFile.Right(3) == "avi" ||
|
|
|
|
|
sBGFile.Right(3) == "mpg";
|
2001-11-03 10:52:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
2001-11-04 19:34:28 +00:00
|
|
|
bool LoadSongInfoFromBMSFile( CString sPath );
|
|
|
|
|
bool LoadSongInfoFromMSDFile( CString sPath );
|
2001-11-03 10:52:42 +00:00
|
|
|
|
|
|
|
|
void FillEmptyValuesWithDefaults();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
CString GetSongFilePath() {return m_sSongDir + m_sSongFile; };
|
|
|
|
|
CString GetSongFileDir() {return m_sSongDir; };
|
|
|
|
|
CString GetMusicPath() {return m_sSongDir + m_sMusic; };
|
|
|
|
|
CString GetSamplePath() {return m_sSongDir + m_sSample; };
|
|
|
|
|
CString GetBannerPath() {return m_sSongDir + m_sBanner; };
|
|
|
|
|
CString GetBackgroundPath() {return m_sSongDir + m_sBackground; };
|
|
|
|
|
// Steps& GetStepsAt( int iIndex ) {return arraySteps[iIndex]; };
|
|
|
|
|
|
|
|
|
|
CString GetTitle() {return m_sTitle; };
|
|
|
|
|
CString GetArtist() {return m_sArtist; };
|
|
|
|
|
CString GetCreator() {return m_sCreator; };
|
2001-11-04 19:34:28 +00:00
|
|
|
float GetBeatOffset() {return m_fBeatOffset; };
|
|
|
|
|
float GetBPM() {return m_fBPM; };
|
|
|
|
|
float GetBeatsPerSecond() {return m_fBPM / 60.0f; };
|
2001-11-03 10:52:42 +00:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
CString m_sSongFile;
|
|
|
|
|
CString m_sSongDir;
|
|
|
|
|
|
|
|
|
|
CString m_sTitle;
|
|
|
|
|
CString m_sArtist;
|
|
|
|
|
CString m_sCreator;
|
2001-11-04 19:34:28 +00:00
|
|
|
float m_fBPM;
|
|
|
|
|
float m_fBeatOffset;
|
2001-11-03 10:52:42 +00:00
|
|
|
|
|
|
|
|
CString m_sMusic;
|
|
|
|
|
CString m_sSample;
|
|
|
|
|
CString m_sBanner;
|
|
|
|
|
CString m_sBackground;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
CArray<Steps, Steps&> arraySteps;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|