make m_sSongDir private

This commit is contained in:
Glenn Maynard
2002-12-13 23:41:46 +00:00
parent 2b19012e40
commit 42a8e049a6
2 changed files with 10 additions and 7 deletions
+7 -5
View File
@@ -19,6 +19,7 @@
#include "NoteData.h"
#include "MsdFile.h"
#include "RageSoundStream.h"
#include "RageSound.h"
#include "RageException.h"
#include "SongCacheIndex.h"
#include "GameManager.h"
@@ -389,9 +390,15 @@ void Song::TidyUpData()
if( HasMusic() )
{
#if 1
RageSoundStream sound;
sound.Load( GetMusicPath() );
#else
RageSound sound;
sound.Load( GetMusicPath(), false ); /* don't pre-cache */
#endif
m_fMusicLengthSeconds = sound.GetLengthSeconds();
/* XXX: if(m_fMusicLengthSeconds == -1), warn and throw out the song */
}
else // ! HasMusic()
{
@@ -1087,11 +1094,6 @@ CString Song::GetBackgroundPath() const
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
* players are active, they often have the same start beat, but they don't
* have to.
+3 -2
View File
@@ -47,6 +47,8 @@ struct BackgroundChange
class Song
{
CString m_sSongDir;
public:
/* Set when this song should be displayed in the music wheel: */
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
/* Directory this song data came from: */
const CString &GetSongDir() const;
CString m_sSongDir;
const CString &GetSongDir() const { return m_sSongDir; }
/* Filename associated with this file. This will always have
* an .SM extension. If we loaded an .SM, this will point to