From 42a8e049a6eae85fee6b0f7c424f7d7d8d1c5280 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 13 Dec 2002 23:41:46 +0000 Subject: [PATCH] make m_sSongDir private --- stepmania/src/Song.cpp | 12 +++++++----- stepmania/src/song.h | 5 +++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 3d3dfaf52a..7caf0f585a 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -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. diff --git a/stepmania/src/song.h b/stepmania/src/song.h index 4e6f9a3d70..318e48de33 100644 --- a/stepmania/src/song.h +++ b/stepmania/src/song.h @@ -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