Fix .sm-style edits not being loaded.
This commit is contained in:
@@ -18,6 +18,7 @@ sm-ssc v1.2.3 | 201102??
|
||||
* Reverted ArrowSpacing back to 64 (which was the previous value).
|
||||
Please re-adjust your speed mods accordingly. [AJ]
|
||||
* [OptionRow] Added GetLayoutType() and GetSelectType() Lua bindings. [AJ]
|
||||
* Fix .sm-style edits not being loaded. [AJ]
|
||||
|
||||
================================================================================
|
||||
sm-ssc v1.2.2 | 20110220
|
||||
|
||||
@@ -951,7 +951,7 @@ bool SSCLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePat
|
||||
Song* pSong = NULL;
|
||||
Steps* pNewNotes;
|
||||
bool bSSCFormat = false;
|
||||
|
||||
|
||||
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||
{
|
||||
int iNumParams = msd.GetNumParams(i);
|
||||
@@ -967,23 +967,24 @@ bool SSCLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePat
|
||||
LOG->UserLog( "Edit file", sEditFilePath, "has more than one #SONG tag." );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
RString sSongFullTitle = sParams[1];
|
||||
sSongFullTitle.Replace( '\\', '/' );
|
||||
|
||||
|
||||
pSong = SONGMAN->FindSong( sSongFullTitle );
|
||||
if( pSong == NULL )
|
||||
{
|
||||
LOG->UserLog( "Edit file", sEditFilePath, "requires a song \"%s\" that isn't present.", sSongFullTitle.c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if( pSong->GetNumStepsLoadedFromProfile(slot) >= MAX_EDITS_PER_SONG_PER_PROFILE )
|
||||
{
|
||||
LOG->UserLog( "Song file", sSongFullTitle, "already has the maximum number of edits allowed for ProfileSlotP%d.", slot+1 );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
else if( sValueName=="NOTEDATA" )
|
||||
{
|
||||
pNewNotes = new Steps;
|
||||
@@ -1107,7 +1108,7 @@ bool SSCLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePat
|
||||
SAFE_DELETE( pNewNotes );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
pSong->AddSteps( pNewNotes );
|
||||
return true; // Only allow one Steps per edit file!
|
||||
}
|
||||
@@ -1117,7 +1118,9 @@ bool SSCLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePat
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
//return true;
|
||||
// only load a SSC edit if it passes the checks. -aj
|
||||
return bSSCFormat;
|
||||
}
|
||||
|
||||
void SSCLoader::TidyUpData( Song &song, bool bFromCache )
|
||||
|
||||
+9
-7
@@ -16,6 +16,7 @@
|
||||
#include "NoteSkinManager.h"
|
||||
#include "NotesLoaderDWI.h"
|
||||
#include "NotesLoaderSSC.h"
|
||||
#include "NotesLoaderSM.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "Profile.h"
|
||||
#include "ProfileManager.h"
|
||||
@@ -460,10 +461,8 @@ RageColor SongManager::GetSongColor( const Song* pSong ) const
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* XXX:
|
||||
* Previously, this matched all notes, which set a song to "extra" if
|
||||
* it had any 10-foot steps at all, even edits or doubles.
|
||||
/* XXX: Previously, this matched all notes, which set a song to "extra"
|
||||
* if it had any 10-foot steps at all, even edits or doubles.
|
||||
*
|
||||
* For now, only look at notes for the current note type. This means
|
||||
* that if a song has 10-foot steps on Doubles, it'll only show up red
|
||||
@@ -471,8 +470,7 @@ RageColor SongManager::GetSongColor( const Song* pSong ) const
|
||||
* in the song scroll, which is a little odd but harmless.
|
||||
*
|
||||
* XXX: Ack. This means this function can only be called when we have
|
||||
* a style set up, which is too restrictive. How to handle this?
|
||||
*/
|
||||
* a style set up, which is too restrictive. How to handle this? */
|
||||
//const StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
||||
const vector<Steps*>& vpSteps = pSong->GetAllSteps();
|
||||
for( unsigned i=0; i<vpSteps.size(); i++ )
|
||||
@@ -1656,7 +1654,11 @@ void SongManager::LoadStepEditsFromProfileDir( const RString &sProfileDir, Profi
|
||||
{
|
||||
RString fn = vsFiles[i];
|
||||
|
||||
SSCLoader::LoadEditFromFile( fn, slot, true );
|
||||
bool bLoadedFromSSC = SSCLoader::LoadEditFromFile( fn, slot, true );
|
||||
// If we don't load the edit from a .ssc-style .edit, then we should
|
||||
// also try the .sm-style edit file. -aj
|
||||
if( !bLoadedFromSSC )
|
||||
SMLoader::LoadEditFromFile( fn, slot, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user