[default -> splittiming] Cleanliness.
This commit is contained in:
+10
-10
@@ -35,7 +35,7 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, const Song &song,
|
||||
// handle the data
|
||||
if( sValueName=="TICKCOUNT" )
|
||||
{
|
||||
iTickCount = atoi( sParams[1] );
|
||||
iTickCount = StringToInt( sParams[1] );
|
||||
if( iTickCount <= 0 )
|
||||
{
|
||||
LOG->UserLog( "Song file", sPath, "has an invalid tick count: %d.", iTickCount );
|
||||
@@ -51,7 +51,7 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, const Song &song,
|
||||
}
|
||||
else if( sValueName=="DIFFICULTY" )
|
||||
{
|
||||
out.SetMeter( max(atoi(sParams[1]), 0) );
|
||||
out.SetMeter( max(StringToInt(sParams[1]), 0) );
|
||||
}
|
||||
// new cases from Aldo_MX's fork:
|
||||
else if( sValueName=="PLAYER" )
|
||||
@@ -192,7 +192,7 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, const Song &song,
|
||||
else if ( BeginsWith(sRowString, "|T") )
|
||||
{
|
||||
RString temp = sRowString.substr(2,sRowString.size()-3);
|
||||
newTick = atoi(temp);
|
||||
newTick = StringToInt(temp);
|
||||
bTickChangeNeeded = true;
|
||||
out.m_Timing.AddTickcountSegment(TickcountSegment(fCurBeat, newTick));
|
||||
continue;
|
||||
@@ -289,12 +289,12 @@ static void LoadTags( const RString &str, Song &out )
|
||||
split( str, " - ", asBits, false );
|
||||
// Ignore the difficulty, since we get that elsewhere.
|
||||
if( asBits.size() == 3 && (
|
||||
!stricmp(asBits[2], "double") ||
|
||||
!stricmp(asBits[2], "easy") ||
|
||||
!stricmp(asBits[2], "normal") ||
|
||||
!stricmp(asBits[2], "hard") ||
|
||||
!stricmp(asBits[2], "crazy") ||
|
||||
!stricmp(asBits[2], "nightmare"))
|
||||
asBits[2].EqualsNoCase("double") ||
|
||||
asBits[2].EqualsNoCase("easy") ||
|
||||
asBits[2].EqualsNoCase("normal") ||
|
||||
asBits[2].EqualsNoCase("hard") ||
|
||||
asBits[2].EqualsNoCase("crazy") ||
|
||||
asBits[2].EqualsNoCase("nightmare"))
|
||||
)
|
||||
{
|
||||
asBits.erase( asBits.begin()+2, asBits.begin()+3 );
|
||||
@@ -404,7 +404,7 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant
|
||||
/* TICKCOUNT will be used below if there are DM compliant BPM changes
|
||||
* and stops. It will be called again in LoadFromKSFFile for the
|
||||
* actual steps. */
|
||||
iTickCount = atoi( sParams[1] );
|
||||
iTickCount = StringToInt( sParams[1] );
|
||||
iTickCount = iTickCount > 0 ? iTickCount : 2; // again, Direct Move uses 4 as a default.
|
||||
// add a tickcount for those using the [Player]
|
||||
// CheckpointsUseTimeSignatures metric. -aj
|
||||
|
||||
Reference in New Issue
Block a user