[Song] Added Origin (#ORIGIN tag in .ssc)

This commit is contained in:
AJ Kelly
2011-04-30 19:23:29 -05:00
parent b053e931c2
commit c5be31ec69
6 changed files with 16 additions and 2 deletions
+4 -1
View File
@@ -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.
+1
View File
@@ -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
--------
+5
View File
@@ -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];
+1
View File
@@ -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() ) );
+2
View File
@@ -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<Steps*> &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 );
+3 -1
View File
@@ -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];