some cleanup
This commit is contained in:
@@ -35,7 +35,7 @@ static map<RString,RString> CharAliasRepl;
|
|||||||
// old SPiGuMuS kanji font hack.
|
// old SPiGuMuS kanji font hack.
|
||||||
// a more modern implementation would likely involve a Lua file in Data for the
|
// a more modern implementation would likely involve a Lua file in Data for the
|
||||||
// base character aliases, and any alias not encountered in the list would be
|
// base character aliases, and any alias not encountered in the list would be
|
||||||
// added at the next possible code point. -aj
|
// added at the next possible internal code point. -aj
|
||||||
|
|
||||||
/* Here's a copy-and-paste for a basic Japanese font page:
|
/* Here's a copy-and-paste for a basic Japanese font page:
|
||||||
|
|
||||||
@@ -345,6 +345,7 @@ static void InitCharAliases()
|
|||||||
{ "auxrb", INTERNAL },
|
{ "auxrb", INTERNAL },
|
||||||
{ "auxlt", INTERNAL },
|
{ "auxlt", INTERNAL },
|
||||||
{ "auxrt", INTERNAL },
|
{ "auxrt", INTERNAL },
|
||||||
|
{ "auxback", INTERNAL },
|
||||||
|
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|||||||
+6
-9
@@ -745,11 +745,9 @@ void Song::ReCalculateRadarValuesAndLastBeat()
|
|||||||
|
|
||||||
pSteps->CalculateRadarValues( m_fMusicLengthSeconds );
|
pSteps->CalculateRadarValues( m_fMusicLengthSeconds );
|
||||||
|
|
||||||
//
|
|
||||||
// calculate lastBeat
|
// calculate lastBeat
|
||||||
//
|
|
||||||
|
|
||||||
/* If it's autogen, then first/last beat will come from the parent. */
|
// If it's autogen, then first/last beat will come from the parent.
|
||||||
if( pSteps->IsAutogen() )
|
if( pSteps->IsAutogen() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -845,9 +843,9 @@ bool Song::SaveToSMFile( RString sPath, bool bSavingCache )
|
|||||||
{
|
{
|
||||||
Steps *pSteps = *s;
|
Steps *pSteps = *s;
|
||||||
if( pSteps->IsAutogen() )
|
if( pSteps->IsAutogen() )
|
||||||
continue; /* don't write autogen notes */
|
continue; // don't write autogen notes
|
||||||
|
|
||||||
/* Only save steps that weren't loaded from a profile. */
|
// Only save steps that weren't loaded from a profile.
|
||||||
if( pSteps->WasLoadedFromProfile() )
|
if( pSteps->WasLoadedFromProfile() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -932,7 +930,7 @@ void Song::AddAutoGenNotes()
|
|||||||
if( HasNotes[stMissing] )
|
if( HasNotes[stMissing] )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* If m_bAutogenSteps is disabled, only autogen lights. */
|
// If m_bAutogenSteps is disabled, only autogen lights.
|
||||||
if( !PREFSMAN->m_bAutogenSteps && stMissing != StepsType_lights_cabinet )
|
if( !PREFSMAN->m_bAutogenSteps && stMissing != StepsType_lights_cabinet )
|
||||||
continue;
|
continue;
|
||||||
if( !GAMEMAN->GetStepsTypeInfo(stMissing).bAllowAutogen )
|
if( !GAMEMAN->GetStepsTypeInfo(stMissing).bAllowAutogen )
|
||||||
@@ -950,7 +948,7 @@ void Song::AddAutoGenNotes()
|
|||||||
if( !HasNotes[st] )
|
if( !HasNotes[st] )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* has (non-autogen) Steps of this type */
|
// has (non-autogen) Steps of this type
|
||||||
const int iNumTracks = GAMEMAN->GetStepsTypeInfo(st).iNumTracks;
|
const int iNumTracks = GAMEMAN->GetStepsTypeInfo(st).iNumTracks;
|
||||||
const int iTrackDifference = abs(iNumTracks-iNumTracksOfMissing);
|
const int iTrackDifference = abs(iNumTracks-iNumTracksOfMissing);
|
||||||
if( iTrackDifference < iBestTrackDifference )
|
if( iTrackDifference < iBestTrackDifference )
|
||||||
@@ -996,7 +994,7 @@ void Song::RemoveAutoGenNotes()
|
|||||||
{
|
{
|
||||||
if( m_vpStepsByType[st][j]->IsAutogen() )
|
if( m_vpStepsByType[st][j]->IsAutogen() )
|
||||||
{
|
{
|
||||||
// delete m_vpSteps[j]; // delete below
|
// delete m_vpSteps[j]; // delete below
|
||||||
m_vpStepsByType[st].erase( m_vpStepsByType[st].begin()+j );
|
m_vpStepsByType[st].erase( m_vpStepsByType[st].begin()+j );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1236,7 +1234,6 @@ void Song::DeleteSteps( const Steps* pSteps, bool bReAutoGen )
|
|||||||
if( bReAutoGen )
|
if( bReAutoGen )
|
||||||
RemoveAutoGenNotes();
|
RemoveAutoGenNotes();
|
||||||
|
|
||||||
|
|
||||||
vector<Steps*> &vpSteps = m_vpStepsByType[pSteps->m_StepsType];
|
vector<Steps*> &vpSteps = m_vpStepsByType[pSteps->m_StepsType];
|
||||||
for( int j=vpSteps.size()-1; j>=0; j-- )
|
for( int j=vpSteps.size()-1; j>=0; j-- )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -87,9 +87,7 @@ bool StepsUtil::HasMatching( const Song *pSong, const StepsCriteria &stc )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Sorting stuff
|
// Sorting stuff
|
||||||
//
|
|
||||||
map<const Steps*, RString> steps_sort_val;
|
map<const Steps*, RString> steps_sort_val;
|
||||||
|
|
||||||
static bool CompareStepsPointersBySortValueAscending(const Steps *pSteps1, const Steps *pSteps2)
|
static bool CompareStepsPointersBySortValueAscending(const Steps *pSteps1, const Steps *pSteps2)
|
||||||
|
|||||||
Reference in New Issue
Block a user