Add Miss Combo support in #COMBOS tag.
This commit is contained in:
@@ -9,6 +9,11 @@ change to JSON, but it is unsure if this will be done.
|
|||||||
Implement .ssc at your own risk.
|
Implement .ssc at your own risk.
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
|
[v0.76] - Wolfman2000
|
||||||
|
* Expand the #COMBOS tag to allow for Miss Combos. Anyone that is crazy enough
|
||||||
|
to put in a 51 miss combo in their tags should be...oh wait: it's already
|
||||||
|
been done.
|
||||||
|
|
||||||
[v0.75] - Wolfman2000
|
[v0.75] - Wolfman2000
|
||||||
* Add Step based #DISPLAYBPM for those songs that have...very varied syncing.
|
* Add Step based #DISPLAYBPM for those songs that have...very varied syncing.
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ ________________________________________________________________________________
|
|||||||
StepMania 5.0 ????????? | 20110???
|
StepMania 5.0 ????????? | 20110???
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
2011/07/09
|
||||||
|
----------
|
||||||
|
* [NotesTheUsual] Update the #COMBOS tag to allow for a Miss Combo attribute.
|
||||||
|
Any files that only use the Combo attribute will have that value copied to
|
||||||
|
miss combo on next launch. [Wolfman2000]
|
||||||
|
|
||||||
2011/07/07
|
2011/07/07
|
||||||
----------
|
----------
|
||||||
* [ScreenEdit] Fix the NoMines transformation bug, issue 363. [Wolfman2000]
|
* [ScreenEdit] Fix the NoMines transformation bug, issue 363. [Wolfman2000]
|
||||||
|
|||||||
@@ -1248,7 +1248,7 @@ Enter a new Stop value.=Enter a new Stop value.\n\nType "0" to remove.
|
|||||||
Enter a new Delay value.=Enter a new Delay value.\n\nType "0" to remove.
|
Enter a new Delay value.=Enter a new Delay value.\n\nType "0" to remove.
|
||||||
Enter a new Time Signature.=Enter a new time signature.\nUse the format "x/y".\nEnter the previous value to remove.
|
Enter a new Time Signature.=Enter a new time signature.\nUse the format "x/y".\nEnter the previous value to remove.
|
||||||
Enter a new Tickcount value.=Enter a new Tickcount value.\n\nEnter the previous value to remove.
|
Enter a new Tickcount value.=Enter a new Tickcount value.\n\nEnter the previous value to remove.
|
||||||
Enter a new Combo value.=Enter a new Combo value.\n\nEnter the previous value to remove.
|
Enter a new Combo value.=Enter a new Combo value.\nUse the format "x/y".\nEnter the previous value to remove.
|
||||||
Enter a new Label value.=Enter a name for this section of the chart.\n\nEnter a previously used label to remove.
|
Enter a new Label value.=Enter a name for this section of the chart.\n\nEnter a previously used label to remove.
|
||||||
Enter a new Warp value.=Enter the number of beats you will warp over.\n\nType "0" to remove this segment.
|
Enter a new Warp value.=Enter the number of beats you will warp over.\n\nType "0" to remove this segment.
|
||||||
Enter a new Speed percent value.=Enter the ratio for speed scrolling.\nEnter the previous value to remove.\n1 is the default scroll.
|
Enter a new Speed percent value.=Enter the ratio for speed scrolling.\nEnter the previous value to remove.\n1 is the default scroll.
|
||||||
|
|||||||
+3
-3
@@ -577,7 +577,7 @@ void NoteField::DrawTickcountText( const float fBeat, int iTicks )
|
|||||||
m_textMeasureNumber.Draw();
|
m_textMeasureNumber.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteField::DrawComboText( const float fBeat, int iCombo )
|
void NoteField::DrawComboText( const float fBeat, int iCombo, int iMiss )
|
||||||
{
|
{
|
||||||
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, 0, fBeat );
|
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, 0, fBeat );
|
||||||
const float fYPos = ArrowEffects::GetYPos( m_pPlayerState, 0, fYOffset, m_fYReverseOffsetPixels );
|
const float fYPos = ArrowEffects::GetYPos( m_pPlayerState, 0, fYOffset, m_fYReverseOffsetPixels );
|
||||||
@@ -589,7 +589,7 @@ void NoteField::DrawComboText( const float fBeat, int iCombo )
|
|||||||
m_textMeasureNumber.SetHorizAlign( COMBO_IS_LEFT_SIDE ? align_right : align_left );
|
m_textMeasureNumber.SetHorizAlign( COMBO_IS_LEFT_SIDE ? align_right : align_left );
|
||||||
m_textMeasureNumber.SetDiffuse( COMBO_COLOR );
|
m_textMeasureNumber.SetDiffuse( COMBO_COLOR );
|
||||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,RageFastCos(RageTimer::GetTimeSinceStartFast()*2)/2+0.5f) );
|
m_textMeasureNumber.SetGlow( RageColor(1,1,1,RageFastCos(RageTimer::GetTimeSinceStartFast()*2)/2+0.5f) );
|
||||||
m_textMeasureNumber.SetText( ssprintf("%d", iCombo) );
|
m_textMeasureNumber.SetText( ssprintf("%d/%d", iCombo, iMiss) );
|
||||||
m_textMeasureNumber.SetXY( (COMBO_IS_LEFT_SIDE ? -xBase - xOffset : xBase + xOffset), fYPos );
|
m_textMeasureNumber.SetXY( (COMBO_IS_LEFT_SIDE ? -xBase - xOffset : xBase + xOffset), fYPos );
|
||||||
m_textMeasureNumber.Draw();
|
m_textMeasureNumber.Draw();
|
||||||
}
|
}
|
||||||
@@ -981,7 +981,7 @@ void NoteField::DrawPrimitives()
|
|||||||
{
|
{
|
||||||
float fBeat = seg->GetBeat();
|
float fBeat = seg->GetBeat();
|
||||||
if( IS_ON_SCREEN(fBeat) )
|
if( IS_ON_SCREEN(fBeat) )
|
||||||
DrawComboText( fBeat, seg->GetCombo() );
|
DrawComboText( fBeat, seg->GetCombo(), seg->GetMissCombo() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ protected:
|
|||||||
void DrawWarpText( const float fBeat, const float fNewBeat );
|
void DrawWarpText( const float fBeat, const float fNewBeat );
|
||||||
void DrawTimeSignatureText( const float fBeat, int iNumerator, int iDenominator );
|
void DrawTimeSignatureText( const float fBeat, int iNumerator, int iDenominator );
|
||||||
void DrawTickcountText( const float fBeat, int iTicks );
|
void DrawTickcountText( const float fBeat, int iTicks );
|
||||||
void DrawComboText( const float fBeat, int iCombo );
|
void DrawComboText( const float fBeat, int iCombo, int iMiss );
|
||||||
void DrawLabelText( const float fBeat, RString sLabel );
|
void DrawLabelText( const float fBeat, RString sLabel );
|
||||||
void DrawSpeedText( const float fBeat, float fPercent, float fWait, unsigned short usMode );
|
void DrawSpeedText( const float fBeat, float fPercent, float fWait, unsigned short usMode );
|
||||||
void DrawScrollText( const float fBeat, float fPercent );
|
void DrawScrollText( const float fBeat, float fPercent );
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, const Song &song,
|
|||||||
else if (BeginsWith(sRowString, "|M") || BeginsWith(sRowString, "|C"))
|
else if (BeginsWith(sRowString, "|M") || BeginsWith(sRowString, "|C"))
|
||||||
{
|
{
|
||||||
// multipliers/combo
|
// multipliers/combo
|
||||||
stepsTiming.SetComboAtBeat( fCurBeat, static_cast<int>(numTemp) );
|
stepsTiming.SetHitComboAtBeat( fCurBeat, static_cast<int>(numTemp) );
|
||||||
}
|
}
|
||||||
else if (BeginsWith(sRowString, "|S"))
|
else if (BeginsWith(sRowString, "|S"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,17 +23,22 @@ void SMALoader::ProcessMultipliers( TimingData &out, const int iRowsPerBeat, con
|
|||||||
{
|
{
|
||||||
vector<RString> arrayMultiplierValues;
|
vector<RString> arrayMultiplierValues;
|
||||||
split( arrayMultiplierExpressions[f], "=", arrayMultiplierValues );
|
split( arrayMultiplierExpressions[f], "=", arrayMultiplierValues );
|
||||||
if( arrayMultiplierValues.size() != 2 )
|
unsigned size = arrayMultiplierValues.size();
|
||||||
|
if( size < 2 )
|
||||||
{
|
{
|
||||||
LOG->UserLog("Song file",
|
LOG->UserLog("Song file",
|
||||||
this->GetSongTitle(),
|
this->GetSongTitle(),
|
||||||
"has an invalid #MULTIPLIER value \"%s\" (must have exactly one '='), ignored.",
|
"has an invalid #MULTIPLIER value \"%s\" (must have at least one '='), ignored.",
|
||||||
arrayMultiplierExpressions[f].c_str() );
|
arrayMultiplierExpressions[f].c_str() );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const float fComboBeat = RowToBeat( arrayMultiplierValues[0], iRowsPerBeat );
|
const float fComboBeat = RowToBeat( arrayMultiplierValues[0], iRowsPerBeat );
|
||||||
const int iCombos = StringToInt( arrayMultiplierValues[1] );
|
const int iCombos = StringToInt( arrayMultiplierValues[1] ); // always true.
|
||||||
ComboSegment new_seg( fComboBeat, iCombos );
|
// hoping I'm right here: SMA files can use 6 values after the row/beat.
|
||||||
|
const int iMisses = (size == 2 || size == 4 ?
|
||||||
|
iCombos :
|
||||||
|
StringToInt(arrayMultiplierValues[2]));
|
||||||
|
ComboSegment new_seg( fComboBeat, iCombos, iMisses );
|
||||||
out.AddComboSegment( new_seg );
|
out.AddComboSegment( new_seg );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,17 +94,19 @@ void SSCLoader::ProcessCombos( TimingData &out, const RString line, const int ro
|
|||||||
{
|
{
|
||||||
vector<RString> arrayComboValues;
|
vector<RString> arrayComboValues;
|
||||||
split( arrayComboExpressions[f], "=", arrayComboValues );
|
split( arrayComboExpressions[f], "=", arrayComboValues );
|
||||||
if( arrayComboValues.size() != 2 )
|
unsigned size = arrayComboValues.size();
|
||||||
|
if( size < 2 )
|
||||||
{
|
{
|
||||||
LOG->UserLog("Song file",
|
LOG->UserLog("Song file",
|
||||||
this->GetSongTitle(),
|
this->GetSongTitle(),
|
||||||
"has an invalid #COMBOS value \"%s\" (must have exactly one '='), ignored.",
|
"has an invalid #COMBOS value \"%s\" (must have at least one '='), ignored.",
|
||||||
arrayComboExpressions[f].c_str() );
|
arrayComboExpressions[f].c_str() );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const float fComboBeat = StringToFloat( arrayComboValues[0] );
|
const float fComboBeat = StringToFloat( arrayComboValues[0] );
|
||||||
const int iCombos = StringToInt( arrayComboValues[1] );
|
const int iCombos = StringToInt( arrayComboValues[1] );
|
||||||
ComboSegment new_seg( fComboBeat, iCombos );
|
const int iMisses = (size == 2 ? iCombos : StringToInt(arrayComboValues[2]));
|
||||||
|
ComboSegment new_seg( fComboBeat, iCombos, iMisses );
|
||||||
out.AddComboSegment( new_seg );
|
out.AddComboSegment( new_seg );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,7 +128,12 @@ static void GetTimingTags( vector<RString> &lines, TimingData timing, bool bIsSo
|
|||||||
ASSERT( !timing.m_ComboSegments.empty() );
|
ASSERT( !timing.m_ComboSegments.empty() );
|
||||||
w.Init( "COMBOS" );
|
w.Init( "COMBOS" );
|
||||||
FOREACH_CONST( ComboSegment, timing.m_ComboSegments, cs )
|
FOREACH_CONST( ComboSegment, timing.m_ComboSegments, cs )
|
||||||
|
{
|
||||||
|
if (cs->GetCombo() == cs->GetMissCombo())
|
||||||
w.Write( cs->GetRow(), cs->GetCombo() );
|
w.Write( cs->GetRow(), cs->GetCombo() );
|
||||||
|
else
|
||||||
|
w.Write( cs->GetRow(), cs->GetCombo(), cs->GetMissCombo() );
|
||||||
|
}
|
||||||
w.Finish();
|
w.Finish();
|
||||||
|
|
||||||
// Song Timing should only have the initial value.
|
// Song Timing should only have the initial value.
|
||||||
|
|||||||
@@ -447,17 +447,17 @@ void ScoreKeeperNormal::HandleComboInternal( int iNumHitContinueCombo, int iNumH
|
|||||||
{
|
{
|
||||||
m_pPlayerStageStats->m_iCurMissCombo = 0;
|
m_pPlayerStageStats->m_iCurMissCombo = 0;
|
||||||
}
|
}
|
||||||
|
TimingData td = GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->m_Timing;
|
||||||
if( iNumBreakCombo == 0 )
|
if( iNumBreakCombo == 0 )
|
||||||
{
|
{
|
||||||
TimingData td = GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->m_Timing;
|
|
||||||
int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow( iRow ).GetCombo() );
|
int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow( iRow ).GetCombo() );
|
||||||
m_pPlayerStageStats->m_iCurCombo += iNumHitContinueCombo * multiplier;
|
m_pPlayerStageStats->m_iCurCombo += iNumHitContinueCombo * multiplier;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_pPlayerStageStats->m_iCurCombo = 0;
|
m_pPlayerStageStats->m_iCurCombo = 0;
|
||||||
m_pPlayerStageStats->m_iCurMissCombo += ( m_MissComboIsPerRow ? 1 : iNumBreakCombo );
|
int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow(iRow).GetMissCombo());
|
||||||
|
m_pPlayerStageStats->m_iCurMissCombo += ( m_MissComboIsPerRow ? 1 : iNumBreakCombo ) * multiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -467,10 +467,10 @@ void ScoreKeeperNormal::HandleRowComboInternal( TapNoteScore tns, int iNumTapsIn
|
|||||||
{
|
{
|
||||||
iNumTapsInRow = min( iNumTapsInRow, 1);
|
iNumTapsInRow = min( iNumTapsInRow, 1);
|
||||||
}
|
}
|
||||||
|
TimingData td = GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->m_Timing;
|
||||||
if ( tns >= m_MinScoreToContinueCombo )
|
if ( tns >= m_MinScoreToContinueCombo )
|
||||||
{
|
{
|
||||||
m_pPlayerStageStats->m_iCurMissCombo = 0;
|
m_pPlayerStageStats->m_iCurMissCombo = 0;
|
||||||
TimingData td = GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->m_Timing;
|
|
||||||
int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow( iRow ).GetCombo() );
|
int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow( iRow ).GetCombo() );
|
||||||
m_pPlayerStageStats->m_iCurCombo += iNumTapsInRow * multiplier;
|
m_pPlayerStageStats->m_iCurCombo += iNumTapsInRow * multiplier;
|
||||||
}
|
}
|
||||||
@@ -479,7 +479,10 @@ void ScoreKeeperNormal::HandleRowComboInternal( TapNoteScore tns, int iNumTapsIn
|
|||||||
m_pPlayerStageStats->m_iCurCombo = 0;
|
m_pPlayerStageStats->m_iCurCombo = 0;
|
||||||
|
|
||||||
if( tns <= m_MaxScoreToIncrementMissCombo )
|
if( tns <= m_MaxScoreToIncrementMissCombo )
|
||||||
m_pPlayerStageStats->m_iCurMissCombo += ( m_MissComboIsPerRow ? 1 : iNumTapsInRow );
|
{
|
||||||
|
int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow(iRow).GetMissCombo());
|
||||||
|
m_pPlayerStageStats->m_iCurMissCombo += ( m_MissComboIsPerRow ? 1 : iNumTapsInRow ) * multiplier;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-10
@@ -3006,10 +3006,10 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
}
|
}
|
||||||
else if ( SM == SM_BackFromComboChange && !ScreenTextEntry::s_bCancelledLast )
|
else if ( SM == SM_BackFromComboChange && !ScreenTextEntry::s_bCancelledLast )
|
||||||
{
|
{
|
||||||
int iCombo = StringToInt( ScreenTextEntry::s_sLastAnswer );
|
int iCombo, iMiss;
|
||||||
if ( iCombo >= 0 )
|
if (sscanf(ScreenTextEntry::s_sLastAnswer.c_str(), " %d / %d ", &iCombo, &iMiss) == 2)
|
||||||
{
|
{
|
||||||
GetAppropriateTiming().SetComboAtBeat( GetBeat(), iCombo );
|
GetAppropriateTiming().SetComboAtBeat( GetBeat(), iCombo, iMiss );
|
||||||
}
|
}
|
||||||
SetDirty( true );
|
SetDirty( true );
|
||||||
}
|
}
|
||||||
@@ -3587,10 +3587,14 @@ void ScreenEdit::DisplayTimingMenu()
|
|||||||
g_TimingDataInformation.rows[bpm].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetBPMAtBeat( fBeat ) ) );
|
g_TimingDataInformation.rows[bpm].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetBPMAtBeat( fBeat ) ) );
|
||||||
g_TimingDataInformation.rows[stop].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetStopAtBeat( fBeat ) ) ) ;
|
g_TimingDataInformation.rows[stop].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetStopAtBeat( fBeat ) ) ) ;
|
||||||
g_TimingDataInformation.rows[delay].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetDelayAtBeat( fBeat ) ) );
|
g_TimingDataInformation.rows[delay].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetDelayAtBeat( fBeat ) ) );
|
||||||
g_TimingDataInformation.rows[time_signature].SetOneUnthemedChoice( ssprintf("%d / %d", pTime.GetTimeSignatureNumeratorAtBeat( fBeat ), pTime.GetTimeSignatureDenominatorAtBeat( fBeat ) ) );
|
g_TimingDataInformation.rows[time_signature].SetOneUnthemedChoice(ssprintf("%d / %d",
|
||||||
|
pTime.GetTimeSignatureNumeratorAtBeat( fBeat ),
|
||||||
|
pTime.GetTimeSignatureDenominatorAtBeat( fBeat ) ) );
|
||||||
g_TimingDataInformation.rows[label].SetOneUnthemedChoice( pTime.GetLabelAtBeat( fBeat ).c_str() );
|
g_TimingDataInformation.rows[label].SetOneUnthemedChoice( pTime.GetLabelAtBeat( fBeat ).c_str() );
|
||||||
g_TimingDataInformation.rows[tickcount].SetOneUnthemedChoice( ssprintf("%d", pTime.GetTickcountAtBeat( fBeat ) ) );
|
g_TimingDataInformation.rows[tickcount].SetOneUnthemedChoice( ssprintf("%d", pTime.GetTickcountAtBeat( fBeat ) ) );
|
||||||
g_TimingDataInformation.rows[combo].SetOneUnthemedChoice( ssprintf("%d", pTime.GetComboAtBeat( fBeat ) ) );
|
g_TimingDataInformation.rows[combo].SetOneUnthemedChoice( ssprintf("%d / %d",
|
||||||
|
pTime.GetComboAtBeat( fBeat ),
|
||||||
|
pTime.GetMissComboAtBeat( fBeat ) ) );
|
||||||
g_TimingDataInformation.rows[warp].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetWarpAtBeat( fBeat ) ) );
|
g_TimingDataInformation.rows[warp].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetWarpAtBeat( fBeat ) ) );
|
||||||
g_TimingDataInformation.rows[speed_percent].SetOneUnthemedChoice( bHasSpeedOnThisRow ? ssprintf("%.6f", pTime.GetSpeedPercentAtBeat( fBeat ) ) : "---" );
|
g_TimingDataInformation.rows[speed_percent].SetOneUnthemedChoice( bHasSpeedOnThisRow ? ssprintf("%.6f", pTime.GetSpeedPercentAtBeat( fBeat ) ) : "---" );
|
||||||
g_TimingDataInformation.rows[speed_wait].SetOneUnthemedChoice( bHasSpeedOnThisRow ? ssprintf("%.6f", pTime.GetSpeedWaitAtBeat( fBeat ) ) : "---" );
|
g_TimingDataInformation.rows[speed_wait].SetOneUnthemedChoice( bHasSpeedOnThisRow ? ssprintf("%.6f", pTime.GetSpeedWaitAtBeat( fBeat ) ) : "---" );
|
||||||
@@ -4566,13 +4570,16 @@ void ScreenEdit::HandleTimingDataInformationChoice( TimingDataInformationChoice
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case combo:
|
case combo:
|
||||||
ScreenTextEntry::TextEntry(
|
{
|
||||||
SM_BackFromComboChange,
|
ComboSegment &cs = GetAppropriateTiming().GetComboSegmentAtBeat(GetBeat());
|
||||||
|
ScreenTextEntry::TextEntry(SM_BackFromComboChange,
|
||||||
ENTER_COMBO_VALUE,
|
ENTER_COMBO_VALUE,
|
||||||
ssprintf( "%d", GetAppropriateTiming().GetComboAtBeat( GetBeat() ) ),
|
ssprintf( "%d/%d",
|
||||||
4
|
cs.GetCombo(),
|
||||||
);
|
cs.GetMissCombo()),
|
||||||
|
7);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case label:
|
case label:
|
||||||
ScreenTextEntry::TextEntry(
|
ScreenTextEntry::TextEntry(
|
||||||
SM_BackFromLabelChange,
|
SM_BackFromLabelChange,
|
||||||
|
|||||||
+1
-1
@@ -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 = 189;
|
const int FILE_CACHE_VERSION = 190;
|
||||||
|
|
||||||
/** @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;
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ void FixupPath( RString &path, const RString &sSongPath );
|
|||||||
RString GetSongAssetPath( RString sPath, const RString &sSongPath );
|
RString GetSongAssetPath( RString sPath, const RString &sSongPath );
|
||||||
|
|
||||||
/** @brief The version of the .ssc file format. */
|
/** @brief The version of the .ssc file format. */
|
||||||
const static float STEPFILE_VERSION_NUMBER = 0.75f;
|
const static float STEPFILE_VERSION_NUMBER = 0.76f;
|
||||||
|
|
||||||
/** @brief How many edits for this song can each profile have? */
|
/** @brief How many edits for this song can each profile have? */
|
||||||
const int MAX_EDITS_PER_SONG_PER_PROFILE = 15;
|
const int MAX_EDITS_PER_SONG_PER_PROFILE = 15;
|
||||||
|
|||||||
+37
-8
@@ -166,12 +166,16 @@ void TimingData::SetTimeSignatureAtRow( int iRow, int iNumerator, int iDenominat
|
|||||||
|
|
||||||
void TimingData::SetTimeSignatureNumeratorAtRow( int iRow, int iNumerator )
|
void TimingData::SetTimeSignatureNumeratorAtRow( int iRow, int iNumerator )
|
||||||
{
|
{
|
||||||
SetTimeSignatureAtRow( iRow, iNumerator, GetTimeSignatureSegmentAtBeat( NoteRowToBeat( iRow ) ).GetDen() );
|
this->SetTimeSignatureAtRow(iRow,
|
||||||
|
iNumerator,
|
||||||
|
GetTimeSignatureSegmentAtRow(iRow).GetDen());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimingData::SetTimeSignatureDenominatorAtRow( int iRow, int iDenominator )
|
void TimingData::SetTimeSignatureDenominatorAtRow( int iRow, int iDenominator )
|
||||||
{
|
{
|
||||||
SetTimeSignatureAtRow( iRow, GetTimeSignatureSegmentAtBeat( NoteRowToBeat( iRow ) ).GetNum(), iDenominator );
|
this->SetTimeSignatureAtRow(iRow,
|
||||||
|
GetTimeSignatureSegmentAtRow(iRow).GetNum(),
|
||||||
|
iDenominator);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimingData::SetWarpAtRow( int iRow, float fNew )
|
void TimingData::SetWarpAtRow( int iRow, float fNew )
|
||||||
@@ -222,7 +226,7 @@ void TimingData::SetTickcountAtRow( int iRow, int iTicks )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimingData::SetComboAtRow( int iRow, int iCombo )
|
void TimingData::SetComboAtRow( int iRow, int iCombo, int iMiss )
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
for( i=0; i<m_ComboSegments.size(); i++ )
|
for( i=0; i<m_ComboSegments.size(); i++ )
|
||||||
@@ -231,16 +235,35 @@ void TimingData::SetComboAtRow( int iRow, int iCombo )
|
|||||||
|
|
||||||
if( i == m_ComboSegments.size() || m_ComboSegments[i].GetRow() != iRow )
|
if( i == m_ComboSegments.size() || m_ComboSegments[i].GetRow() != iRow )
|
||||||
{
|
{
|
||||||
if( i == 0 || m_ComboSegments[i-1].GetCombo() != iCombo )
|
if(i == 0 || m_ComboSegments[i-1].GetCombo() != iCombo ||
|
||||||
|
m_ComboSegments[i-1].GetMissCombo() != iMiss)
|
||||||
AddComboSegment( ComboSegment(iRow, iCombo ) );
|
AddComboSegment( ComboSegment(iRow, iCombo ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( i > 0 && m_ComboSegments[i-1].GetCombo() == iCombo )
|
if(i > 0 && m_ComboSegments[i-1].GetCombo() == iCombo &&
|
||||||
|
m_ComboSegments[i-1].GetMissCombo() == iMiss)
|
||||||
m_ComboSegments.erase( m_ComboSegments.begin()+i, m_ComboSegments.begin()+i+1 );
|
m_ComboSegments.erase( m_ComboSegments.begin()+i, m_ComboSegments.begin()+i+1 );
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_ComboSegments[i].SetCombo(iCombo);
|
m_ComboSegments[i].SetCombo(iCombo);
|
||||||
|
m_ComboSegments[i].SetMissCombo(iMiss);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TimingData::SetHitComboAtRow(int iRow, int iCombo)
|
||||||
|
{
|
||||||
|
this->SetComboAtRow(iRow,
|
||||||
|
iCombo,
|
||||||
|
this->GetComboSegmentAtRow(iRow).GetMissCombo());
|
||||||
|
}
|
||||||
|
|
||||||
|
void TimingData::SetMissComboAtRow(int iRow, int iMiss)
|
||||||
|
{
|
||||||
|
this->SetComboAtRow(iRow,
|
||||||
|
this->GetComboSegmentAtRow(iRow).GetCombo(),
|
||||||
|
iMiss);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimingData::SetLabelAtRow( int iRow, const RString sLabel )
|
void TimingData::SetLabelAtRow( int iRow, const RString sLabel )
|
||||||
@@ -398,7 +421,12 @@ float TimingData::GetDelayAtRow( int iRow ) const
|
|||||||
|
|
||||||
int TimingData::GetComboAtRow( int iNoteRow ) const
|
int TimingData::GetComboAtRow( int iNoteRow ) const
|
||||||
{
|
{
|
||||||
return m_ComboSegments[GetComboSegmentIndexAtRow( iNoteRow )].GetCombo();
|
return m_ComboSegments[this->GetComboSegmentIndexAtRow(iNoteRow)].GetCombo();
|
||||||
|
}
|
||||||
|
|
||||||
|
int TimingData::GetMissComboAtRow(int iNoteRow) const
|
||||||
|
{
|
||||||
|
return m_ComboSegments[this->GetComboSegmentIndexAtRow(iNoteRow)].GetMissCombo();
|
||||||
}
|
}
|
||||||
|
|
||||||
RString TimingData::GetLabelAtRow( int iRow ) const
|
RString TimingData::GetLabelAtRow( int iRow ) const
|
||||||
@@ -1735,7 +1763,7 @@ void TimingData::TidyUpData()
|
|||||||
// Have a default combo segment of one just in case.
|
// Have a default combo segment of one just in case.
|
||||||
if( m_ComboSegments.empty() )
|
if( m_ComboSegments.empty() )
|
||||||
{
|
{
|
||||||
ComboSegment seg(0, 1);
|
ComboSegment seg(0, 1, 1);
|
||||||
m_ComboSegments.push_back( seg );
|
m_ComboSegments.push_back( seg );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1913,8 +1941,9 @@ public:
|
|||||||
FOREACH_CONST( ComboSegment, p->m_ComboSegments, seg )
|
FOREACH_CONST( ComboSegment, p->m_ComboSegments, seg )
|
||||||
{
|
{
|
||||||
const int combo = seg->GetCombo();
|
const int combo = seg->GetCombo();
|
||||||
|
const int miss = seg->GetMissCombo();
|
||||||
const float beat = seg->GetBeat();
|
const float beat = seg->GetBeat();
|
||||||
vCombos.push_back( ssprintf("%f=%d", beat, combo) );
|
vCombos.push_back( ssprintf("%f=%d=%d", beat, combo, miss) );
|
||||||
}
|
}
|
||||||
LuaHelpers::CreateTableFromArray(vCombos, L);
|
LuaHelpers::CreateTableFromArray(vCombos, L);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -668,6 +668,18 @@ public:
|
|||||||
* @return the Combo.
|
* @return the Combo.
|
||||||
*/
|
*/
|
||||||
int GetComboAtBeat( float fBeat ) const { return GetComboAtRow( BeatToNoteRow(fBeat) ); }
|
int GetComboAtBeat( float fBeat ) const { return GetComboAtRow( BeatToNoteRow(fBeat) ); }
|
||||||
|
/**
|
||||||
|
* @brief Retrieve the Miss Combo at the given row.
|
||||||
|
* @param iNoteRow the row in question.
|
||||||
|
* @return the Miss Combo.
|
||||||
|
*/
|
||||||
|
int GetMissComboAtRow( int iNoteRow ) const;
|
||||||
|
/**
|
||||||
|
* @brief Retrieve the Miss Combo at the given beat.
|
||||||
|
* @param fBeat the beat in question.
|
||||||
|
* @return the Miss Combo.
|
||||||
|
*/
|
||||||
|
int GetMissComboAtBeat( float fBeat ) const { return GetMissComboAtRow( BeatToNoteRow(fBeat) ); }
|
||||||
/**
|
/**
|
||||||
* @brief Set the row to have the new Combo.
|
* @brief Set the row to have the new Combo.
|
||||||
* @param iNoteRow the row to have the new Combo.
|
* @param iNoteRow the row to have the new Combo.
|
||||||
@@ -680,6 +692,44 @@ public:
|
|||||||
* @param iCombo the Combo.
|
* @param iCombo the Combo.
|
||||||
*/
|
*/
|
||||||
void SetComboAtBeat( float fBeat, int iCombo ) { SetComboAtRow( BeatToNoteRow( fBeat ), iCombo ); }
|
void SetComboAtBeat( float fBeat, int iCombo ) { SetComboAtRow( BeatToNoteRow( fBeat ), iCombo ); }
|
||||||
|
/**
|
||||||
|
* @brief Set the row to have the new Combo and Miss Combo.
|
||||||
|
* @param iNoteRow the row to have the new Combo and Miss Combo.
|
||||||
|
* @param iCombo the Combo.
|
||||||
|
* @param iMiss the Miss Combo.
|
||||||
|
*/
|
||||||
|
void SetComboAtRow( int iNoteRow, int iCombo, int iMiss );
|
||||||
|
/**
|
||||||
|
* @brief Set the beat to have the new Combo and Miss Combo.
|
||||||
|
* @param fBeat the beat to have the new Combo and Miss Combo.
|
||||||
|
* @param iCombo the Combo.
|
||||||
|
* @param iMiss the Miss Combo.
|
||||||
|
*/
|
||||||
|
void SetComboAtBeat( float fBeat, int iCombo, int iMiss ) { SetComboAtRow( BeatToNoteRow( fBeat ), iCombo, iMiss ); }
|
||||||
|
/**
|
||||||
|
* @brief Set the row to have the new Combo.
|
||||||
|
* @param iNoteRow the row to have the new Combo.
|
||||||
|
* @param iCombo the Combo.
|
||||||
|
*/
|
||||||
|
void SetHitComboAtRow( int iNoteRow, int iCombo );
|
||||||
|
/**
|
||||||
|
* @brief Set the beat to have the new Combo.
|
||||||
|
* @param fBeat the beat to have the new Combo.
|
||||||
|
* @param iCombo the Combo.
|
||||||
|
*/
|
||||||
|
void SetHitComboAtBeat( float fBeat, int iCombo ) { SetHitComboAtRow( BeatToNoteRow( fBeat ), iCombo ); }
|
||||||
|
/**
|
||||||
|
* @brief Set the row to have the new Miss Combo.
|
||||||
|
* @param iNoteRow the row to have the new Miss Combo.
|
||||||
|
* @param iCombo the Miss Combo.
|
||||||
|
*/
|
||||||
|
void SetMissComboAtRow( int iNoteRow, int iCombo );
|
||||||
|
/**
|
||||||
|
* @brief Set the beat to have the new Miss Combo.
|
||||||
|
* @param fBeat the beat to have the new Miss Combo.
|
||||||
|
* @param iCombo the Miss Combo.
|
||||||
|
*/
|
||||||
|
void SetMissComboAtBeat( float fBeat, int iCombo ) { SetMissComboAtRow( BeatToNoteRow( fBeat ), iCombo ); }
|
||||||
/**
|
/**
|
||||||
* @brief Retrieve the ComboSegment at the specified row.
|
* @brief Retrieve the ComboSegment at the specified row.
|
||||||
* @param iNoteRow the row that has a ComboSegment.
|
* @param iNoteRow the row that has a ComboSegment.
|
||||||
|
|||||||
@@ -125,10 +125,21 @@ void ComboSegment::SetCombo(const int i)
|
|||||||
this->combo = i;
|
this->combo = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ComboSegment::GetMissCombo() const
|
||||||
|
{
|
||||||
|
return this->missCombo;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboSegment::SetMissCombo(const int i)
|
||||||
|
{
|
||||||
|
this->missCombo = i;
|
||||||
|
}
|
||||||
|
|
||||||
bool ComboSegment::operator<( const ComboSegment &other ) const
|
bool ComboSegment::operator<( const ComboSegment &other ) const
|
||||||
{
|
{
|
||||||
LTCOMPARE(GetRow());
|
LTCOMPARE(GetRow());
|
||||||
LTCOMPARE(GetCombo());
|
LTCOMPARE(GetCombo());
|
||||||
|
LTCOMPARE(GetMissCombo());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+26
-2
@@ -344,7 +344,8 @@ struct ComboSegment : public TimingSegment<ComboSegment>
|
|||||||
|
|
||||||
ComboSegment(const ComboSegment &other) :
|
ComboSegment(const ComboSegment &other) :
|
||||||
TimingSegment<ComboSegment>(other),
|
TimingSegment<ComboSegment>(other),
|
||||||
combo(other.GetCombo()) {};
|
combo(other.GetCombo()),
|
||||||
|
missCombo(other.GetMissCombo()) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Combo Segment with the specified values.
|
* @brief Creates a Combo Segment with the specified values.
|
||||||
@@ -354,18 +355,39 @@ struct ComboSegment : public TimingSegment<ComboSegment>
|
|||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
ComboSegment( StartType s, int t ):
|
ComboSegment( StartType s, int t ):
|
||||||
TimingSegment<ComboSegment>(max((StartType)0, s)),
|
TimingSegment<ComboSegment>(max((StartType)0, s)),
|
||||||
combo(max(0,t)) {}
|
combo(max(0,t)), missCombo(max(0,t)) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Creates a Combo Segment with the specified values.
|
||||||
|
* @param s the starting row / beat of this segment.
|
||||||
|
* @param t the amount the combo increases on a succesful hit.
|
||||||
|
* @param m the amount the miss combo increases on missing.
|
||||||
|
*/
|
||||||
|
template <typename StartType>
|
||||||
|
ComboSegment(StartType s, int t, int m):
|
||||||
|
TimingSegment<ComboSegment>(max((StartType)0, s)),
|
||||||
|
combo(max(0,t)), missCombo(max(0,m)) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the combo in this ComboSegment.
|
* @brief Get the combo in this ComboSegment.
|
||||||
* @return the combo. */
|
* @return the combo. */
|
||||||
int GetCombo() const;
|
int GetCombo() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the miss combo in this ComboSegment.
|
||||||
|
* @return the miss combo. */
|
||||||
|
int GetMissCombo() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the combo in this ComboSegment.
|
* @brief Set the combo in this ComboSegment.
|
||||||
* @param i the combo. */
|
* @param i the combo. */
|
||||||
void SetCombo(const int i);
|
void SetCombo(const int i);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the miss combo in this ComboSegment.
|
||||||
|
* @param i the miss combo. */
|
||||||
|
void SetMissCombo(const int i);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Compares two ComboSegments to see if one is less than the other.
|
* @brief Compares two ComboSegments to see if one is less than the other.
|
||||||
* @param other the other ComboSegment to compare to.
|
* @param other the other ComboSegment to compare to.
|
||||||
@@ -377,6 +399,8 @@ private:
|
|||||||
* @brief The amount the combo increases at this point.
|
* @brief The amount the combo increases at this point.
|
||||||
*/
|
*/
|
||||||
int combo;
|
int combo;
|
||||||
|
/** @brief The amount of miss combos given at this point. */
|
||||||
|
int missCombo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user