pretty much equivalent to 23b02ce-adf0feb. [Chris Danford; some other cleanup by AJ]

This commit is contained in:
AJ Kelly
2010-06-12 14:37:20 -05:00
parent 4c44d9f3b6
commit cd2a78e09a
8 changed files with 113 additions and 73 deletions
+3 -11
View File
@@ -16,14 +16,6 @@
#include "Song.h"
#include "Steps.h"
static RString EscapeBackgroundColor( const RString color )
{
// Comma separates values in a background change. Caret separates RGBA values in a color value, and NotesLoaderSM switches them to commas on load.
RString c = color;
c.Replace(",", "^");
return c;
}
static RString BackgroundChangeToString( const BackgroundChange &bgc )
{
// TODO: Technically we need to double-escape the filename (because it might contain '=') and then
@@ -39,15 +31,15 @@ static RString BackgroundChangeToString( const BackgroundChange &bgc )
bgc.m_def.m_sEffect.c_str(),
bgc.m_def.m_sFile2.c_str(),
bgc.m_sTransition.c_str(),
SmEscape(EscapeBackgroundColor(bgc.m_def.m_sColor1)).c_str(),
SmEscape(EscapeBackgroundColor(bgc.m_def.m_sColor2)).c_str()
SmEscape(RageColor::NormalizeColorString(bgc.m_def.m_sColor1)).c_str(),
SmEscape(RageColor::NormalizeColorString(bgc.m_def.m_sColor2)).c_str()
);
return s;
}
static void WriteGlobalTags( RageFile &f, const Song &out )
{
//f.PutLine( ssprintf( "#SMVERSION:;", SmEscape(RString("ssc-v1.0_b2")).c_str() ) );
//f.PutLine( ssprintf( "#SMVERSION:;", SmEscape(RString("ssc-v1.0")).c_str() ) );
f.PutLine( ssprintf( "#TITLE:%s;", SmEscape(out.m_sMainTitle).c_str() ) );
f.PutLine( ssprintf( "#SUBTITLE:%s;", SmEscape(out.m_sSubTitle).c_str() ) );
f.PutLine( ssprintf( "#ARTIST:%s;", SmEscape(out.m_sArtist).c_str() ) );