Fix reading pre-split timing ssc files.

Welcome to the first cache of the next series.
Start placing your bets again on what the final
cache value will be for SM5 final.

As a reminder, we are on cache version 202 now.
This commit is contained in:
Jason Felds
2011-08-21 01:19:50 -04:00
parent 11259af04b
commit acaaf1bfba
3 changed files with 75 additions and 27 deletions
+9
View File
@@ -4,6 +4,15 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes
from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt. from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
________________________________________________________________________________ ________________________________________________________________________________
================================================================================
StepMania 5.0 ????????? | 2011????
--------------------------------------------------------------------------------
2011/08/21
----------
* [NotesLoaderSSC] Fix loading pre-split timing files that had blank timing
tags inside of them. Thanks to Vin.il for the catch. [Wolfman2000]
================================================================================ ================================================================================
StepMania 5.0 Preview 3 | 20110820 StepMania 5.0 Preview 3 | 20110820
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
+39
View File
@@ -622,83 +622,122 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
} }
else if( sValueName=="BPMS" ) else if( sValueName=="BPMS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
if( SMLoader::ProcessBPMs(stepsTiming, sParams[1]) ) if( SMLoader::ProcessBPMs(stepsTiming, sParams[1]) )
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="STOPS" ) else if( sValueName=="STOPS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
SMLoader::ProcessStops(stepsTiming, sParams[1]); SMLoader::ProcessStops(stepsTiming, sParams[1]);
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="DELAYS" ) else if( sValueName=="DELAYS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
SMLoader::ProcessDelays(stepsTiming, sParams[1]); SMLoader::ProcessDelays(stepsTiming, sParams[1]);
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="TIMESIGNATURES" ) else if( sValueName=="TIMESIGNATURES" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
SMLoader::ProcessTimeSignatures(stepsTiming, sParams[1]); SMLoader::ProcessTimeSignatures(stepsTiming, sParams[1]);
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="TICKCOUNTS" ) else if( sValueName=="TICKCOUNTS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
SMLoader::ProcessTickcounts(stepsTiming, sParams[1]); SMLoader::ProcessTickcounts(stepsTiming, sParams[1]);
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="COMBOS" ) else if( sValueName=="COMBOS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
ProcessCombos(stepsTiming, sParams[1]); ProcessCombos(stepsTiming, sParams[1]);
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="WARPS" ) else if( sValueName=="WARPS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
ProcessWarps(stepsTiming, sParams[1], out.m_fVersion); ProcessWarps(stepsTiming, sParams[1], out.m_fVersion);
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="SPEEDS" ) else if( sValueName=="SPEEDS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
ProcessSpeeds( stepsTiming, sParams[1] ); ProcessSpeeds( stepsTiming, sParams[1] );
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="SCROLLS" ) else if( sValueName=="SCROLLS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
ProcessScrolls( stepsTiming, sParams[1] ); ProcessScrolls( stepsTiming, sParams[1] );
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="FAKES" ) else if( sValueName=="FAKES" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
ProcessFakes( stepsTiming, sParams[1] ); ProcessFakes( stepsTiming, sParams[1] );
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="LABELS" ) else if( sValueName=="LABELS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
ProcessLabels(stepsTiming, sParams[1]); ProcessLabels(stepsTiming, sParams[1]);
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
/* If this is called, the chart does not use the same attacks /* If this is called, the chart does not use the same attacks
* as the Song's timing. No other changes are required. */ * as the Song's timing. No other changes are required. */
else if( sValueName=="ATTACKS" ) else if( sValueName=="ATTACKS" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
ProcessAttackString(pNewNotes->m_sAttackString, sParams); ProcessAttackString(pNewNotes->m_sAttackString, sParams);
ProcessAttacks(pNewNotes->m_Attacks, sParams); ProcessAttacks(pNewNotes->m_Attacks, sParams);
} }
}
else if( sValueName=="OFFSET" ) else if( sValueName=="OFFSET" )
{
if (out.m_fVersion >= VERSION_SPLIT_TIMING)
{ {
stepsTiming.m_fBeat0OffsetInSeconds = StringToFloat( sParams[1] ); stepsTiming.m_fBeat0OffsetInSeconds = StringToFloat( sParams[1] );
bHasOwnTiming = true; bHasOwnTiming = true;
} }
}
else if( sValueName=="DISPLAYBPM" ) else if( sValueName=="DISPLAYBPM" )
{ {
+1 -1
View File
@@ -41,7 +41,7 @@
* @brief The internal version of the cache for StepMania. * @brief The internal version of the cache for StepMania.
* *
* Increment this value to invalidate the current cache. */ * Increment this value to invalidate the current cache. */
const int FILE_CACHE_VERSION = 201; const int FILE_CACHE_VERSION = 202;
/** @brief How long does a song sample last by default? */ /** @brief How long does a song sample last by default? */
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f; const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;