make m_sSongDir private
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
#include "NoteData.h"
|
#include "NoteData.h"
|
||||||
#include "MsdFile.h"
|
#include "MsdFile.h"
|
||||||
#include "RageSoundStream.h"
|
#include "RageSoundStream.h"
|
||||||
|
#include "RageSound.h"
|
||||||
#include "RageException.h"
|
#include "RageException.h"
|
||||||
#include "SongCacheIndex.h"
|
#include "SongCacheIndex.h"
|
||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
@@ -389,9 +390,15 @@ void Song::TidyUpData()
|
|||||||
|
|
||||||
if( HasMusic() )
|
if( HasMusic() )
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
RageSoundStream sound;
|
RageSoundStream sound;
|
||||||
sound.Load( GetMusicPath() );
|
sound.Load( GetMusicPath() );
|
||||||
|
#else
|
||||||
|
RageSound sound;
|
||||||
|
sound.Load( GetMusicPath(), false ); /* don't pre-cache */
|
||||||
|
#endif
|
||||||
m_fMusicLengthSeconds = sound.GetLengthSeconds();
|
m_fMusicLengthSeconds = sound.GetLengthSeconds();
|
||||||
|
/* XXX: if(m_fMusicLengthSeconds == -1), warn and throw out the song */
|
||||||
}
|
}
|
||||||
else // ! HasMusic()
|
else // ! HasMusic()
|
||||||
{
|
{
|
||||||
@@ -1087,11 +1094,6 @@ CString Song::GetBackgroundPath() const
|
|||||||
return m_sSongDir+m_sBackgroundFile;
|
return m_sSongDir+m_sBackgroundFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CString& Song::GetSongDir() const
|
|
||||||
{
|
|
||||||
return m_sSongDir;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the first/last beat of any currently active note pattern. If two
|
/* Get the first/last beat of any currently active note pattern. If two
|
||||||
* players are active, they often have the same start beat, but they don't
|
* players are active, they often have the same start beat, but they don't
|
||||||
* have to.
|
* have to.
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ struct BackgroundChange
|
|||||||
|
|
||||||
class Song
|
class Song
|
||||||
{
|
{
|
||||||
|
CString m_sSongDir;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/* Set when this song should be displayed in the music wheel: */
|
/* Set when this song should be displayed in the music wheel: */
|
||||||
enum { SHOW_ALWAYS, /* all the time */
|
enum { SHOW_ALWAYS, /* all the time */
|
||||||
@@ -77,8 +79,7 @@ public:
|
|||||||
void AutoGen( NotesType ntTo, NotesType ntFrom ); // create Notes of type ntTo from Notes of type ntFrom
|
void AutoGen( NotesType ntTo, NotesType ntFrom ); // create Notes of type ntTo from Notes of type ntFrom
|
||||||
|
|
||||||
/* Directory this song data came from: */
|
/* Directory this song data came from: */
|
||||||
const CString &GetSongDir() const;
|
const CString &GetSongDir() const { return m_sSongDir; }
|
||||||
CString m_sSongDir;
|
|
||||||
|
|
||||||
/* Filename associated with this file. This will always have
|
/* Filename associated with this file. This will always have
|
||||||
* an .SM extension. If we loaded an .SM, this will point to
|
* an .SM extension. If we loaded an .SM, this will point to
|
||||||
|
|||||||
Reference in New Issue
Block a user