split apart "GetSongCredits()"
This commit is contained in:
@@ -1280,20 +1280,37 @@ int LuaFunc_##func( lua_State *L ) { \
|
||||
LuaFunction( func ); /* register it */
|
||||
LuaFunction_Steps( StepsMeter, p->GetMeter() );
|
||||
|
||||
CString GetSongCredits()
|
||||
CString GetCurrentSongDisplayTitle()
|
||||
{
|
||||
if( GAMESTATE->IsCourseMode() )
|
||||
const Song* pSong = GAMESTATE->m_pCurSong;
|
||||
if( pSong == NULL )
|
||||
return "";
|
||||
return pSong->GetFullDisplayTitle();
|
||||
}
|
||||
|
||||
CString GetCurrentSongDisplayArtist()
|
||||
{
|
||||
const Song* pSong = GAMESTATE->m_pCurSong;
|
||||
if( pSong == NULL )
|
||||
return "";
|
||||
return pSong->GetDisplayArtist();
|
||||
}
|
||||
|
||||
CString GetCurrentSongCredit()
|
||||
{
|
||||
const Song* pSong = GAMESTATE->m_pCurSong;
|
||||
if( pSong == NULL )
|
||||
return "";
|
||||
return pSong->m_sCredit;
|
||||
}
|
||||
|
||||
CString GetCurrentStepsCredits()
|
||||
{
|
||||
const Song* pSong = GAMESTATE->m_pCurSong;
|
||||
if( pSong == NULL )
|
||||
return "";
|
||||
|
||||
CString s;
|
||||
s += pSong->GetFullDisplayTitle() + "\n";
|
||||
s += pSong->GetDisplayArtist() + "\n";
|
||||
if( !pSong->m_sCredit.empty() )
|
||||
s += pSong->m_sCredit + "\n";
|
||||
|
||||
// use a vector and not a set so that ordering is maintained
|
||||
vector<Steps*> vpStepsToShow;
|
||||
@@ -1325,7 +1342,10 @@ CString GetSongCredits()
|
||||
return s;
|
||||
}
|
||||
|
||||
LuaFunction_NoArgs( GetSongCredits, GetSongCredits() )
|
||||
LuaFunction_NoArgs( GetCurrentSongDisplayTitle, GetCurrentSongDisplayTitle() )
|
||||
LuaFunction_NoArgs( GetCurrentSongDisplayArtist, GetCurrentSongDisplayArtist() )
|
||||
LuaFunction_NoArgs( GetCurrentSongCredit, GetCurrentSongCredit() )
|
||||
LuaFunction_NoArgs( GetCurrentStepsCredits, GetCurrentStepsCredits() )
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
||||
|
||||
Reference in New Issue
Block a user