Change #PREVIEWBG to #PREVIEWVID and update the changelog

This commit is contained in:
Marcio Barrientos
2012-01-11 14:21:55 -06:00
parent da84ef04ad
commit 11a02660be
7 changed files with 24 additions and 17 deletions
+3
View File
@@ -9,6 +9,9 @@ change to JSON, but it is unsure if this will be done.
Implement .ssc at your own risk.
_______________________________________________________________________________
[v0.82] - cerbo
* add #PREVIEWVID tag. (to load the preview video, like #PREVIEW tag in .sma)
[v0.81] - freem
* add #JACKET, #CDIMAGE, and #DISCIMAGE tags. (similar to #BANNER, etc.)
+4
View File
@@ -8,6 +8,10 @@ ________________________________________________________________________________
StepMania 5.0 alpha 1 | 20120108
--------------------------------------------------------------------------------
2012/01/08
----------
* [Song] Add HasPreviewVid and GetPreviewVidPath lua binding [cerbo]
2012/01/08
----------
* [ScreenManager] Made AddScreenToTop take a second (optional) parameter for
+1 -1
View File
@@ -209,7 +209,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
out.m_sBackgroundFile = sParams[1];
else if( sValueName=="PREVIEW" )
out.m_sPreviewBGFile = sParams[1];
out.m_sPreviewVidFile = sParams[1];
// Save "#LYRICS" for later, so we can add an internal lyrics tag.
else if( sValueName=="LYRICSPATH" )
+2 -2
View File
@@ -325,9 +325,9 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
out.m_sBackgroundFile = sParams[1];
}
else if( sValueName=="PREVIEWBG" )
else if( sValueName=="PREVIEWVID" )
{
out.m_sPreviewBGFile = sParams[1];
out.m_sPreviewVidFile = sParams[1];
}
else if( sValueName=="JACKET" )
+1 -1
View File
@@ -222,7 +222,7 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
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() ) );
f.PutLine( ssprintf( "#PREVIEWBG:%s;", SmEscape(out.m_sPreviewBGFile).c_str() ) );
f.PutLine( ssprintf( "#PREVIEWVID:%s;", SmEscape(out.m_sPreviewVidFile).c_str() ) );
f.PutLine( ssprintf( "#JACKET:%s;", SmEscape(out.m_sJacketFile).c_str() ) );
f.PutLine( ssprintf( "#CDIMAGE:%s;", SmEscape(out.m_sCDFile).c_str() ) );
f.PutLine( ssprintf( "#DISCIMAGE:%s;", SmEscape(out.m_sDiscFile).c_str() ) );
+10 -10
View File
@@ -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 = 207;
const int FILE_CACHE_VERSION = 208;
/** @brief How long does a song sample last by default? */
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
@@ -1273,9 +1273,9 @@ bool Song::HasCDImage() const
{
return m_sCDFile != "" && IsAFile(GetCDImagePath());
}
bool Song::HasPreviewBG() const
bool Song::HasPreviewVid() const
{
return m_sPreviewBGFile != "" && IsAFile(GetPreviewBGPath());
return m_sPreviewVidFile != "" && IsAFile(GetPreviewVidPath());
}
const vector<BackgroundChange> &Song::GetBackgroundChanges( BackgroundLayer bl ) const
@@ -1410,9 +1410,9 @@ RString Song::GetCDImagePath() const
return GetSongAssetPath( m_sCDFile, m_sSongDir );
}
RString Song::GetPreviewBGPath() const
RString Song::GetPreviewVidPath() const
{
return GetSongAssetPath( m_sPreviewBGFile, m_sSongDir );
return GetSongAssetPath( m_sPreviewVidFile, m_sSongDir );
}
RString Song::GetDisplayMainTitle() const
@@ -1707,9 +1707,9 @@ public:
lua_pushnil(L);
return 1;
}
static int GetPreviewBGPath( T* p, lua_State *L )
static int GetPreviewVidPath( T* p, lua_State *L )
{
RString s = p->GetPreviewBGPath();
RString s = p->GetPreviewVidPath();
if( !s.empty() )
lua_pushstring(L, s);
else
@@ -1837,7 +1837,7 @@ public:
static int HasMusic( T* p, lua_State *L ) { lua_pushboolean(L, p->HasMusic()); return 1; }
static int HasBanner( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBanner()); return 1; }
static int HasBackground( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBackground()); return 1; }
static int HasPreviewBG( T* p, lua_State *L ) { lua_pushboolean(L, p->HasPreviewBG()); return 1; }
static int HasPreviewVid( T* p, lua_State *L ) { lua_pushboolean(L, p->HasPreviewVid()); return 1; }
static int HasJacket( T* p, lua_State *L ) { lua_pushboolean(L, p->HasJacket()); return 1; }
static int HasDisc( T* p, lua_State *L ) { lua_pushboolean(L, p->HasDisc()); return 1; }
static int HasCDImage( T* p, lua_State *L ) { lua_pushboolean(L, p->HasCDImage()); return 1; }
@@ -1994,8 +1994,8 @@ public:
ADD_METHOD( IsDisplayBpmConstant );
ADD_METHOD( IsDisplayBpmRandom );
ADD_METHOD( ShowInDemonstrationAndRanking );
ADD_METHOD( HasPreviewBG );
ADD_METHOD( GetPreviewBGPath );
ADD_METHOD( HasPreviewVid );
ADD_METHOD( GetPreviewVidPath );
}
};
+3 -3
View File
@@ -238,7 +238,7 @@ public:
RString m_sLyricsFile;
RString m_sBackgroundFile;
RString m_sCDTitleFile;
RString m_sPreviewBGFile;
RString m_sPreviewVidFile;
AttackArray m_Attacks;
vector<RString> m_sAttackString;
@@ -252,7 +252,7 @@ public:
RString GetLyricsPath() const;
RString GetBackgroundPath() const;
RString GetCDTitlePath() const;
RString GetPreviewBGPath() const;
RString GetPreviewVidPath() const;
// For loading only:
bool m_bHasMusic, m_bHasBanner, m_bHasBackground;
@@ -275,7 +275,7 @@ public:
bool HasBGChanges() const;
bool HasLyrics() const;
bool HasAttacks() const;
bool HasPreviewBG() const;
bool HasPreviewVid() const;
bool Matches(RString sGroup, RString sSong) const;