diff --git a/Docs/Changelog_SSCformat.txt b/Docs/Changelog_SSCformat.txt index de70721e81..4fbea4d747 100644 --- a/Docs/Changelog_SSCformat.txt +++ b/Docs/Changelog_SSCformat.txt @@ -9,6 +9,9 @@ change to JSON, but it is unsure if this will be done. Implement .ssc at your own risk. _______________________________________________________________________________ +[v0.80] - Wolfman2000 +* All timing tags are allowed regardless of timing. + [v0.79] - freem * Back to three significant decimal places. diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 29c55ac95b..2edf39b96b 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,11 @@ ________________________________________________________________________________ StepMania 5.0 $next | 2011???? -------------------------------------------------------------------------------- +2011/09/12 +---------- +* [NotesLoaderSSC/WriterSSC] Allow all timing tags regardless of what timing + is used. [Wolfman2000] + 2011/09/11 ---------- * [ScreenEvaluation] Added "evaluation full combo W1" and diff --git a/Themes/_fallback/Scripts/02 ActorDef.lua b/Themes/_fallback/Scripts/02 ActorDef.lua index 1c9d1d99a5..2ce2f98b54 100644 --- a/Themes/_fallback/Scripts/02 ActorDef.lua +++ b/Themes/_fallback/Scripts/02 ActorDef.lua @@ -209,6 +209,8 @@ function ShowStandardDecoration( MetricsName ) return THEME:GetMetric(Var "LoadingScreen","Show"..MetricsName) end +--blank actor because these come in handy from time to time +NullActor = { Class="Actor", _Source="(null actor)" } -- (c) 2006 Glenn Maynard -- All rights reserved. diff --git a/src/NoteField.cpp b/src/NoteField.cpp index 349a24215c..7fda085d1e 100644 --- a/src/NoteField.cpp +++ b/src/NoteField.cpp @@ -946,33 +946,27 @@ void NoteField::DrawPrimitives() } } - if( GAMESTATE->m_bIsUsingStepTiming ) + // Tickcount text + for (i = 0; i < segs[SEGMENT_TICKCOUNT].size(); i++) { - // Tickcount text - for (i = 0; i < segs[SEGMENT_TICKCOUNT].size(); i++) + TickcountSegment *seg = static_cast(segs[SEGMENT_TICKCOUNT][i]); + if( seg->GetRow() >= iFirstRowToDraw && seg->GetRow() <= iLastRowToDraw ) { - TickcountSegment *seg = static_cast(segs[SEGMENT_TICKCOUNT][i]); - if( seg->GetRow() >= iFirstRowToDraw && seg->GetRow() <= iLastRowToDraw ) - { - float fBeat = seg->GetBeat(); - if( IS_ON_SCREEN(fBeat) ) - DrawTickcountText( fBeat, seg->GetTicks() ); - } + float fBeat = seg->GetBeat(); + if( IS_ON_SCREEN(fBeat) ) + DrawTickcountText( fBeat, seg->GetTicks() ); } } - - if( GAMESTATE->m_bIsUsingStepTiming ) + + // Combo text + for (i = 0; i < segs[SEGMENT_COMBO].size(); i++) { - // Combo text - for (i = 0; i < segs[SEGMENT_COMBO].size(); i++) + ComboSegment *seg = static_cast(segs[SEGMENT_COMBO][i]); + if( seg->GetRow() >= iFirstRowToDraw && seg->GetRow() <= iLastRowToDraw ) { - ComboSegment *seg = static_cast(segs[SEGMENT_COMBO][i]); - if( seg->GetRow() >= iFirstRowToDraw && seg->GetRow() <= iLastRowToDraw ) - { - float fBeat = seg->GetBeat(); - if( IS_ON_SCREEN(fBeat) ) - DrawComboText( fBeat, seg->GetCombo(), seg->GetMissCombo() ); - } + float fBeat = seg->GetBeat(); + if( IS_ON_SCREEN(fBeat) ) + DrawComboText( fBeat, seg->GetCombo(), seg->GetMissCombo() ); } } @@ -988,34 +982,28 @@ void NoteField::DrawPrimitives() } } - if( GAMESTATE->m_bIsUsingStepTiming ) + // Speed text + for (i = 0; i < segs[SEGMENT_SPEED].size(); i++) { - // Speed text - for (i = 0; i < segs[SEGMENT_SPEED].size(); i++) + SpeedSegment *seg = static_cast(segs[SEGMENT_SPEED][i]); + if( seg->GetRow() >= iFirstRowToDraw && seg->GetRow() <= iLastRowToDraw ) { - SpeedSegment *seg = static_cast(segs[SEGMENT_SPEED][i]); - if( seg->GetRow() >= iFirstRowToDraw && seg->GetRow() <= iLastRowToDraw ) - { - float fBeat = seg->GetBeat(); - if( IS_ON_SCREEN(fBeat) ) - DrawSpeedText(fBeat, seg->GetRatio(), - seg->GetDelay(), seg->GetUnit() ); - } + float fBeat = seg->GetBeat(); + if( IS_ON_SCREEN(fBeat) ) + DrawSpeedText(fBeat, seg->GetRatio(), + seg->GetDelay(), seg->GetUnit() ); } } - + // Fake text - if( GAMESTATE->m_bIsUsingStepTiming ) + for (i = 0; i < segs[SEGMENT_FAKE].size(); i++) { - for (i = 0; i < segs[SEGMENT_FAKE].size(); i++) + FakeSegment *seg = static_cast(segs[SEGMENT_FAKE][i]); + if( seg->GetRow() >= iFirstRowToDraw && seg->GetRow() <= iLastRowToDraw ) { - FakeSegment *seg = static_cast(segs[SEGMENT_FAKE][i]); - if( seg->GetRow() >= iFirstRowToDraw && seg->GetRow() <= iLastRowToDraw ) - { - float fBeat = seg->GetBeat(); - if( IS_ON_SCREEN(fBeat) ) - DrawFakeText( fBeat, seg->GetLength() ); - } + float fBeat = seg->GetBeat(); + if( IS_ON_SCREEN(fBeat) ) + DrawFakeText( fBeat, seg->GetLength() ); } } diff --git a/src/NotesLoaderJson.cpp b/src/NotesLoaderJson.cpp index 147f4514c6..445ec41ee0 100644 --- a/src/NotesLoaderJson.cpp +++ b/src/NotesLoaderJson.cpp @@ -18,7 +18,7 @@ void NotesLoaderJson::GetApplicableFiles( const RString &sPath, vector static void Deserialize(TimingSegment &seg_, const Json::Value &root) { TimingSegment *seg = &seg_; - + float fBeat = root["Beat"].asDouble(); seg->SetBeat(fBeat); switch (seg->GetType()) @@ -203,7 +203,6 @@ static void Deserialize( Song &out, const Json::Value &root ) FOREACH( Steps*, vpSteps, iter ) out.AddSteps( *iter ); } - } bool NotesLoaderJson::LoadFromJsonFile( const RString &sPath, Song &out ) diff --git a/src/NotesLoaderPMS.cpp b/src/NotesLoaderPMS.cpp index 2c375ed5c7..1b74ea3808 100644 --- a/src/NotesLoaderPMS.cpp +++ b/src/NotesLoaderPMS.cpp @@ -13,6 +13,8 @@ #include "NoteTypes.h" #include "NotesLoader.h" +// XXX: this is mostly a copy of NotesLoaderBMS and should be consolidated there. -aj + typedef multimap NameToData_t; typedef map MeasureToTimeSig_t; diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index c99faebea1..80e64345e0 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -487,6 +487,18 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach { ProcessCombos( out.m_SongTiming, sParams[1] ); } + else if (sValueName=="SPEEDS") + { + ProcessSpeeds(out.m_SongTiming, sParams[1]); + } + else if (sValueName=="SCROLLS") + { + ProcessScrolls(out.m_SongTiming, sParams[1]); + } + else if (sValueName=="FAKES") + { + ProcessFakes(out.m_SongTiming, sParams[1]); + } /* The following are cache tags. Never fill their values * directly: only from the cached version. */ diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index f66e1cfb56..039195e9fe 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -197,9 +197,8 @@ static void WriteTimingTags( RageFile &f, const TimingData &timing, bool bIsSong join(",\r\n", timing.ToVectorString(SEGMENT_SPEED)).c_str())); f.PutLine(ssprintf("#SCROLLS:%s;", join(",\r\n", timing.ToVectorString(SEGMENT_SCROLL)).c_str())); - if (!bIsSong) - f.PutLine(ssprintf("#FAKES:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_FAKE)).c_str())); + f.PutLine(ssprintf("#FAKES:%s;", + join(",\r\n", timing.ToVectorString(SEGMENT_FAKE)).c_str())); f.PutLine(ssprintf("#LABELS:%s;", join(",\r\n", timing.ToVectorString(SEGMENT_LABEL)).c_str())); diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 544afd479a..baf74ce279 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -3601,13 +3601,8 @@ void ScreenEdit::DisplayTimingMenu() g_TimingDataInformation.rows[scroll].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetScrollAtBeat( fBeat ) ) ); g_TimingDataInformation.rows[fake].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetFakeAtBeat( fBeat ) ) ); - g_TimingDataInformation.rows[tickcount].bEnabled = GAMESTATE->m_bIsUsingStepTiming; - g_TimingDataInformation.rows[combo].bEnabled = GAMESTATE->m_bIsUsingStepTiming; - g_TimingDataInformation.rows[speed_percent].bEnabled = GAMESTATE->m_bIsUsingStepTiming; - g_TimingDataInformation.rows[speed_wait].bEnabled = GAMESTATE->m_bIsUsingStepTiming && bHasSpeedOnThisRow; - g_TimingDataInformation.rows[speed_mode].bEnabled = GAMESTATE->m_bIsUsingStepTiming && bHasSpeedOnThisRow; - g_TimingDataInformation.rows[fake].bEnabled = GAMESTATE->m_bIsUsingStepTiming; - g_TimingDataInformation.rows[scroll].bEnabled = GAMESTATE->m_bIsUsingStepTiming; + g_TimingDataInformation.rows[speed_wait].bEnabled = bHasSpeedOnThisRow; + g_TimingDataInformation.rows[speed_mode].bEnabled = bHasSpeedOnThisRow; EditMiniMenu( &g_TimingDataInformation, SM_BackFromTimingDataInformation ); } diff --git a/src/Song.cpp b/src/Song.cpp index 1d1abe9c7a..08182feaa6 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -41,7 +41,7 @@ * @brief The internal version of the cache for StepMania. * * Increment this value to invalidate the current cache. */ -const int FILE_CACHE_VERSION = 203; +const int FILE_CACHE_VERSION = 205; /** @brief How long does a song sample last by default? */ const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f; diff --git a/src/Song.h b/src/Song.h index bf4c2f07e9..1fd3c1a5d4 100644 --- a/src/Song.h +++ b/src/Song.h @@ -20,7 +20,7 @@ void FixupPath( RString &path, const RString &sSongPath ); RString GetSongAssetPath( RString sPath, const RString &sSongPath ); /** @brief The version of the .ssc file format. */ -const static float STEPFILE_VERSION_NUMBER = 0.79f; +const static float STEPFILE_VERSION_NUMBER = 0.80f; /** @brief How many edits for this song can each profile have? */ const int MAX_EDITS_PER_SONG_PER_PROFILE = 15; diff --git a/src/TimingSegments.h b/src/TimingSegments.h index ca3e7d8431..c0fd47943e 100644 --- a/src/TimingSegments.h +++ b/src/TimingSegments.h @@ -239,7 +239,7 @@ struct LabelSegment : public TimingSegment TimingSegmentType GetType() const { return SEGMENT_LABEL; } LabelSegment( int iStartRow = ROW_INVALID, const RString& sLabel = RString() ) : - TimingSegment(), m_sLabel(sLabel) { } + TimingSegment(iStartRow), m_sLabel(sLabel) { } LabelSegment(const LabelSegment &other) : TimingSegment( other.GetRow() ),