diff --git a/Docs/Changelog_SSCformat.txt b/Docs/Changelog_SSCformat.txt index 205aac7c06..3c3378adfe 100644 --- a/Docs/Changelog_SSCformat.txt +++ b/Docs/Changelog_SSCformat.txt @@ -6,9 +6,12 @@ a changelog is provided here between each version. Notice: .ssc is not a finalized format at the moment. There are plans for a 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.57] - AJ +* Add #ORIGIN tag to metadata. + [v0.56] - Wolfman2000 * Implement #WARPS tag to replace negative bpm/stop gimmicks. diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index d4dd8722a6..11c3298de0 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -21,6 +21,7 @@ sm-ssc v1.2.5 | 20110??? * [ScreenOptions] Added SelectMultipleMessageCommand, ChangeValueMessageCommand. [AJ] * [UnlockEntry] Added GetCourse, GetCode Lua bindings. [AJ] * [UnlockManager] Added UnlockRequirement_NumUnlocked enum. [AJ] +* [Song] Added Origin (#ORIGIN tag in .ssc) [AJ] 20110428 -------- diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index 409999960d..1b9c7033de 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -178,6 +178,11 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach out.m_sGenre = sParams[1]; } + else if( sValueName=="ORIGIN" ) + { + out.m_sOrigin = sParams[1]; + } + else if( sValueName=="CREDIT" ) { out.m_sCredit = sParams[1]; diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index 3b19eb4270..5c01700586 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -55,6 +55,7 @@ static void WriteGlobalTags( RageFile &f, const Song &out ) f.PutLine( ssprintf( "#SUBTITLETRANSLIT:%s;", SmEscape(out.m_sSubTitleTranslit).c_str() ) ); f.PutLine( ssprintf( "#ARTISTTRANSLIT:%s;", SmEscape(out.m_sArtistTranslit).c_str() ) ); f.PutLine( ssprintf( "#GENRE:%s;", SmEscape(out.m_sGenre).c_str() ) ); + f.PutLine( ssprintf( "#ORIGIN:%s;", SmEscape(out.m_sOrigin).c_str() ) ); f.PutLine( ssprintf( "#CREDIT:%s;", SmEscape(out.m_sCredit).c_str() ) ); f.PutLine( ssprintf( "#BANNER:%s;", SmEscape(out.m_sBannerFile).c_str() ) ); f.PutLine( ssprintf( "#BACKGROUND:%s;", SmEscape(out.m_sBackgroundFile).c_str() ) ); diff --git a/src/Song.cpp b/src/Song.cpp index 96d74b4d57..5b1d7d51a2 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -1502,6 +1502,7 @@ public: static int GetDisplayArtist( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayArtist() ); return 1; } static int GetTranslitArtist( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitArtist() ); return 1; } static int GetGenre( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGenre ); return 1; } + static int GetOrigin( T* p, lua_State *L ) { lua_pushstring(L, p->m_sOrigin ); return 1; } static int GetAllSteps( T* p, lua_State *L ) { const vector &v = p->GetAllSteps(); @@ -1627,6 +1628,7 @@ public: ADD_METHOD( GetDisplayArtist ); ADD_METHOD( GetTranslitArtist ); ADD_METHOD( GetGenre ); + ADD_METHOD( GetOrigin ); ADD_METHOD( GetAllSteps ); ADD_METHOD( GetStepsByStepsType ); ADD_METHOD( GetSongDir ); diff --git a/src/Song.h b/src/Song.h index d8dd4a20ee..c8cd697210 100644 --- a/src/Song.h +++ b/src/Song.h @@ -17,7 +17,7 @@ struct lua_State; struct BackgroundChange; /** @brief The version of the .ssc file format. */ -const static float STEPFILE_VERSION_NUMBER = 0.56f; +const static float STEPFILE_VERSION_NUMBER = 0.57f; /** @brief How many edits for this song can each profile have? */ const int MAX_EDITS_PER_SONG_PER_PROFILE = 5; @@ -222,6 +222,8 @@ public: * This is read and saved, but never actually used. */ RString m_sCredit; + RString m_sOrigin; // song origin (for .ssc format) + RString m_sMusicFile; RString m_sInstrumentTrackFile[NUM_InstrumentTrack];