Remove #INSTRUMENTTRACK. It's guitar only.
This commit is contained in:
@@ -9,6 +9,9 @@ change to JSON, but it is unsure if this will be done.
|
||||
Implement .ssc at your own risk.
|
||||
________________________________________________________________________________
|
||||
|
||||
[v0.78] - Wolfman2000
|
||||
* Remove the #INSTRUMENTTRACK tag.
|
||||
|
||||
[v0.77] - Wolfman2000
|
||||
* Add the cache tag #STEPFILENAME to gain access to the proper #NOTES when
|
||||
required.
|
||||
|
||||
@@ -11,6 +11,9 @@ StepMania 5.0 Preview 3 | 20110???
|
||||
2011/07/30
|
||||
----------
|
||||
* [ProfileManager] Fix an issue when deleting recently created profiles. [AJ]
|
||||
* Start removing anything related to Guitar mode. This was rushed in, and it
|
||||
is not worth us keeping at this time. This also means the #INSTRUMENTTRACK
|
||||
tag is no longer valid. [Wolfman2000]
|
||||
|
||||
2011/07/26
|
||||
----------
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#LYRICSPATH:;
|
||||
#CDTITLE:;
|
||||
#MUSIC:;
|
||||
#INSTRUMENTTRACK:;
|
||||
#MUSICLENGTH:;
|
||||
#OFFSET:;
|
||||
#BPMS:;
|
||||
|
||||
@@ -132,15 +132,6 @@ void AutoKeysounds::LoadTracks( const Song *pSong, RageSoundReader *&pShared, Ra
|
||||
if( !sMusicPath.empty() )
|
||||
vsMusicFile.push_back( sMusicPath );
|
||||
|
||||
FOREACH_ENUM( InstrumentTrack, it )
|
||||
{
|
||||
if( it == InstrumentTrack_Guitar )
|
||||
continue;
|
||||
if( pSong->HasInstrumentTrack(it) )
|
||||
vsMusicFile.push_back( pSong->GetInstrumentTrackPath(it) );
|
||||
}
|
||||
|
||||
|
||||
vector<RageSoundReader *> vpSounds;
|
||||
FOREACH( RString, vsMusicFile, s )
|
||||
{
|
||||
@@ -174,17 +165,6 @@ void AutoKeysounds::LoadTracks( const Song *pSong, RageSoundReader *&pShared, Ra
|
||||
pShared = pSongReader;
|
||||
}
|
||||
|
||||
|
||||
if( pSong->HasInstrumentTrack(InstrumentTrack_Guitar) )
|
||||
{
|
||||
RString sError;
|
||||
RageSoundReader *pGuitarTrackReader = RageSoundReader_FileReader::OpenFile( pSong->GetInstrumentTrackPath(InstrumentTrack_Guitar), sError );
|
||||
// Load the buffering filter before the effects filters, so effects aren't delayed.
|
||||
pGuitarTrackReader = new RageSoundReader_Extend( pGuitarTrackReader );
|
||||
pGuitarTrackReader = new RageSoundReader_ThreadedBuffer( pGuitarTrackReader );
|
||||
pPlayer1 = pGuitarTrackReader;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
//if( pSongReader->GetNumChannels() <= 2 )
|
||||
|
||||
@@ -179,23 +179,6 @@ void SMLoader::ProcessAttacks( AttackArray &attacks, MsdFile::value_t params )
|
||||
}
|
||||
}
|
||||
|
||||
void SMLoader::ProcessInstrumentTracks( Song &out, const RString &sParam )
|
||||
{
|
||||
vector<RString> vs1;
|
||||
split( sParam, ",", vs1 );
|
||||
FOREACH_CONST( RString, vs1, s )
|
||||
{
|
||||
vector<RString> vs2;
|
||||
split( *s, "=", vs2 );
|
||||
if( vs2.size() >= 2 )
|
||||
{
|
||||
InstrumentTrack it = StringToInstrumentTrack( vs2[0] );
|
||||
if( it != InstrumentTrack_Invalid )
|
||||
out.m_sInstrumentTrackFile[it] = vs2[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool SMLoader::ProcessBPMs( TimingData &out, const RString line, const int rowsPerBeat )
|
||||
{
|
||||
vector<RString> arrayBPMChangeExpressions;
|
||||
@@ -783,12 +766,6 @@ bool SMLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCache
|
||||
{
|
||||
ProcessTickcounts(out.m_SongTiming, sParams[1]);
|
||||
}
|
||||
|
||||
|
||||
else if( sValueName=="INSTRUMENTTRACK" )
|
||||
{
|
||||
ProcessInstrumentTracks( out, sParams[1] );
|
||||
}
|
||||
|
||||
else if( sValueName=="MUSICLENGTH" )
|
||||
{
|
||||
|
||||
@@ -224,11 +224,6 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
else if( sValueName=="MUSIC" )
|
||||
out.m_sMusicFile = sParams[1];
|
||||
|
||||
else if( sValueName=="INSTRUMENTTRACK" )
|
||||
{
|
||||
SMLoader::ProcessInstrumentTracks( out, sParams[1] );
|
||||
}
|
||||
|
||||
else if( sValueName=="MUSICLENGTH" )
|
||||
{
|
||||
continue;
|
||||
|
||||
@@ -341,11 +341,6 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
out.m_sMusicFile = sParams[1];
|
||||
}
|
||||
|
||||
else if( sValueName=="INSTRUMENTTRACK" )
|
||||
{
|
||||
SMLoader::ProcessInstrumentTracks( out, sParams[1] );
|
||||
}
|
||||
|
||||
else if( sValueName=="MUSICLENGTH" )
|
||||
{
|
||||
if( !bFromCache )
|
||||
|
||||
@@ -227,14 +227,6 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
|
||||
f.PutLine( ssprintf( "#CDTITLE:%s;", SmEscape(out.m_sCDTitleFile).c_str() ) );
|
||||
f.PutLine( ssprintf( "#MUSIC:%s;", SmEscape(out.m_sMusicFile).c_str() ) );
|
||||
|
||||
{
|
||||
vector<RString> vs = out.GetInstrumentTracksToVectorString();
|
||||
if( !vs.empty() )
|
||||
{
|
||||
RString s = join( ",", vs );
|
||||
f.PutLine( "#INSTRUMENTTRACK:" + s + ";\n" );
|
||||
}
|
||||
}
|
||||
f.PutLine( ssprintf( "#OFFSET:%.6f;", out.m_SongTiming.m_fBeat0OffsetInSeconds ) );
|
||||
f.PutLine( ssprintf( "#SAMPLESTART:%.6f;", out.m_fMusicSampleStartSeconds ) );
|
||||
f.PutLine( ssprintf( "#SAMPLELENGTH:%.6f;", out.m_fMusicSampleLengthSeconds ) );
|
||||
|
||||
+1
-36
@@ -41,7 +41,7 @@
|
||||
* @brief The internal version of the cache for StepMania.
|
||||
*
|
||||
* Increment this value to invalidate the current cache. */
|
||||
const int FILE_CACHE_VERSION = 198;
|
||||
const int FILE_CACHE_VERSION = 199;
|
||||
|
||||
/** @brief How long does a song sample last by default? */
|
||||
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
|
||||
@@ -50,14 +50,6 @@ static Preference<float> g_fLongVerSongSeconds( "LongVerSongSeconds", 60*2.5f );
|
||||
static Preference<float> g_fMarathonVerSongSeconds( "MarathonVerSongSeconds", 60*5.f );
|
||||
static Preference<bool> g_BackUpAllSongSaves( "BackUpAllSongSaves", false );
|
||||
|
||||
static const char *InstrumentTrackNames[] = {
|
||||
"Guitar",
|
||||
"Rhythm",
|
||||
"Bass",
|
||||
};
|
||||
XToString( InstrumentTrack );
|
||||
StringToX( InstrumentTrack );
|
||||
|
||||
Song::Song()
|
||||
{
|
||||
FOREACH_BackgroundLayer( i )
|
||||
@@ -454,9 +446,6 @@ void Song::TidyUpData( bool fromCache, bool duringCache )
|
||||
ASSERT_M( m_sSongDir.Left(3) != "../", m_sSongDir ); // meaningless
|
||||
FixupPath( m_sSongDir, "" );
|
||||
FixupPath( m_sMusicFile, m_sSongDir );
|
||||
FOREACH_ENUM( InstrumentTrack, i )
|
||||
if( !m_sInstrumentTrackFile[i].empty() )
|
||||
FixupPath( m_sInstrumentTrackFile[i], m_sSongDir );
|
||||
FixupPath( m_sBannerFile, m_sSongDir );
|
||||
//FixupPath( m_sJacketFile, m_sSongDir );
|
||||
//FixupPath( m_sDiscFile, m_sSongDir );
|
||||
@@ -1204,10 +1193,6 @@ bool Song::HasBanner() const
|
||||
{
|
||||
return m_sBannerFile != "" && IsAFile(GetBannerPath());
|
||||
}
|
||||
bool Song::HasInstrumentTrack( InstrumentTrack it ) const
|
||||
{
|
||||
return m_sInstrumentTrackFile[it] != "" && IsAFile(GetInstrumentTrackPath(it));
|
||||
}
|
||||
bool Song::HasLyrics() const
|
||||
{
|
||||
return m_sLyricsFile != "" && IsAFile(GetLyricsPath());
|
||||
@@ -1275,21 +1260,6 @@ vector<RString> Song::GetFGChanges1ToVectorString() const
|
||||
return this->GetChangesToVectorString(this->GetForegroundChanges());
|
||||
}
|
||||
|
||||
vector<RString> Song::GetInstrumentTracksToVectorString() const
|
||||
{
|
||||
vector<RString> ret;
|
||||
FOREACH_ENUM(InstrumentTrack, it)
|
||||
{
|
||||
if (this->HasInstrumentTrack(it))
|
||||
{
|
||||
ret.push_back(InstrumentTrackToString(it)
|
||||
+ "="
|
||||
+ this->m_sInstrumentTrackFile[it]);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
RString GetSongAssetPath( RString sPath, const RString &sSongPath )
|
||||
{
|
||||
if( sPath == "" )
|
||||
@@ -1324,11 +1294,6 @@ RString Song::GetMusicPath() const
|
||||
return GetSongAssetPath( m_sMusicFile, m_sSongDir );
|
||||
}
|
||||
|
||||
RString Song::GetInstrumentTrackPath( InstrumentTrack it ) const
|
||||
{
|
||||
return GetSongAssetPath( m_sInstrumentTrackFile[it], m_sSongDir );
|
||||
}
|
||||
|
||||
RString Song::GetBannerPath() const
|
||||
{
|
||||
return GetSongAssetPath( m_sBannerFile, m_sSongDir );
|
||||
|
||||
+1
-18
@@ -20,7 +20,7 @@ void FixupPath( RString &path, const RString &sSongPath );
|
||||
RString GetSongAssetPath( RString sPath, const RString &sSongPath );
|
||||
|
||||
/** @brief The version of the .ssc file format. */
|
||||
const static float STEPFILE_VERSION_NUMBER = 0.77f;
|
||||
const static float STEPFILE_VERSION_NUMBER = 0.78f;
|
||||
|
||||
/** @brief How many edits for this song can each profile have? */
|
||||
const int MAX_EDITS_PER_SONG_PER_PROFILE = 15;
|
||||
@@ -42,18 +42,6 @@ enum BackgroundLayer
|
||||
/** @brief A custom foreach loop for the different background layers. */
|
||||
#define FOREACH_BackgroundLayer( bl ) FOREACH_ENUM( BackgroundLayer, bl )
|
||||
|
||||
/** @brief The different instrument tracks for band type games. */
|
||||
enum InstrumentTrack
|
||||
{
|
||||
InstrumentTrack_Guitar,
|
||||
InstrumentTrack_Rhythm,
|
||||
InstrumentTrack_Bass,
|
||||
NUM_InstrumentTrack,
|
||||
InstrumentTrack_Invalid
|
||||
};
|
||||
const RString& InstrumentTrackToString( InstrumentTrack it );
|
||||
InstrumentTrack StringToInstrumentTrack( const RString& s );
|
||||
|
||||
/** @brief The collection of lyrics for the Song. */
|
||||
struct LyricSegment
|
||||
{
|
||||
@@ -225,7 +213,6 @@ public:
|
||||
RString m_sOrigin; // song origin (for .ssc format)
|
||||
|
||||
RString m_sMusicFile;
|
||||
RString m_sInstrumentTrackFile[NUM_InstrumentTrack];
|
||||
|
||||
/** @brief The length of the music file. */
|
||||
float m_fMusicLengthSeconds;
|
||||
@@ -248,7 +235,6 @@ public:
|
||||
vector<RString> m_sAttackString;
|
||||
|
||||
RString GetMusicPath() const;
|
||||
RString GetInstrumentTrackPath( InstrumentTrack it ) const;
|
||||
RString GetBannerPath() const;
|
||||
//RString GetJacketPath() const;
|
||||
//RString GetCDImagePath() const;
|
||||
@@ -261,7 +247,6 @@ public:
|
||||
bool m_bHasMusic, m_bHasBanner, m_bHasBackground;
|
||||
|
||||
bool HasMusic() const;
|
||||
bool HasInstrumentTrack( InstrumentTrack it ) const;
|
||||
/**
|
||||
* @brief Does this song have a banner?
|
||||
* @return true if it does, false otherwise. */
|
||||
@@ -331,8 +316,6 @@ public:
|
||||
vector<RString> GetBGChanges2ToVectorString() const;
|
||||
vector<RString> GetFGChanges1ToVectorString() const;
|
||||
|
||||
vector<RString> GetInstrumentTracksToVectorString() const;
|
||||
|
||||
/**
|
||||
* @brief The list of LyricSegments.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user