GetFullDisplayTitle -> GetDisplayFullTitle

This commit is contained in:
Chris Danford
2005-05-23 00:38:09 +00:00
parent 56b8a409a2
commit 41becb56a4
21 changed files with 48 additions and 46 deletions
+6 -6
View File
@@ -685,7 +685,7 @@ CString Course::GetDisplaySubTitle() const
return m_sSubTitle;
}
CString Course::GetFullDisplayTitle() const
CString Course::GetDisplayFullTitle() const
{
CString Title = GetDisplayMainTitle();
CString SubTitle = GetDisplaySubTitle();
@@ -694,7 +694,7 @@ CString Course::GetFullDisplayTitle() const
return Title;
}
CString Course::GetFullTranslitTitle() const
CString Course::GetTranslitFullTitle() const
{
CString Title = GetTranslitMainTitle();
CString SubTitle = GetTranslitSubTitle();
@@ -1327,14 +1327,14 @@ public:
LunaCourse() { LUA->Register( Register ); }
static int GetPlayMode( T* p, lua_State *L ) { lua_pushnumber(L, p->GetPlayMode() ); return 1; }
static int GetFullDisplayTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetFullDisplayTitle() ); return 1; }
static int GetFullTranslitTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetFullTranslitTitle() ); return 1; }
static int GetDisplayFullTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayFullTitle() ); return 1; }
static int GetTranslitFullTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitFullTitle() ); return 1; }
static void Register(lua_State *L)
{
ADD_METHOD( GetPlayMode )
ADD_METHOD( GetFullDisplayTitle )
ADD_METHOD( GetFullTranslitTitle )
ADD_METHOD( GetDisplayFullTitle )
ADD_METHOD( GetTranslitFullTitle )
Luna<T>::Register( L );
}
};
+2 -2
View File
@@ -121,8 +121,8 @@ public:
CString GetTranslitSubTitle() const { return m_sSubTitleTranslit.size()? m_sSubTitleTranslit: m_sSubTitle; }
/* "title subtitle" */
CString GetFullDisplayTitle() const;
CString GetFullTranslitTitle() const;
CString GetDisplayFullTitle() const;
CString GetTranslitFullTitle() const;
// Dereferences course_entries and returns only the playable Songs and Steps
Trail* GetTrail( StepsType st, CourseDifficulty cd=DIFFICULTY_MEDIUM ) const;
+3 -3
View File
@@ -15,8 +15,8 @@
//
static bool CompareCoursePointersByName( const Course* pCourse1, const Course* pCourse2 )
{
CString sName1 = pCourse1->GetFullDisplayTitle();
CString sName2 = pCourse2->GetFullDisplayTitle();
CString sName1 = pCourse1->GetDisplayFullTitle();
CString sName2 = pCourse2->GetDisplayFullTitle();
return sName1.CompareNoCase( sName2 ) < 0;
}
@@ -200,7 +200,7 @@ void CourseID::FromCourse( const Course *p )
if( p->m_bIsAutogen )
{
sPath = "";
sFullTitle = p->GetFullTranslitTitle();
sFullTitle = p->GetTranslitFullTitle();
}
else
{
+2 -2
View File
@@ -396,7 +396,7 @@ void EditCoursesMenu::OnRowValueChanged( Row row )
{
case ROW_COURSE:
CHECKPOINT;
m_textValue[ROW_COURSE].SetText( pCourse->GetFullDisplayTitle() );
m_textValue[ROW_COURSE].SetText( pCourse->GetDisplayFullTitle() );
m_CourseBanner.LoadFromCourse( pCourse );
m_CourseBanner.ScaleToClipped( COURSE_BANNER_WIDTH, COURSE_BANNER_HEIGHT );
m_iSelection[ROW_ENTRY] = 0;
@@ -442,7 +442,7 @@ void EditCoursesMenu::OnRowValueChanged( Row row )
const bool *bShow = g_bRowEnabledForType[GetSelectedEntry()->type];
if( bShow[song] )
as.push_back( pEntry->pSong ? pEntry->pSong->GetFullTranslitTitle() : CString("(missing song)") );
as.push_back( pEntry->pSong ? pEntry->pSong->GetTranslitFullTitle() : CString("(missing song)") );
if( bShow[group] )
as.push_back( pEntry->group_name.empty() ? CString("(no group)") : pEntry->group_name );
if( bShow[difficulty] )
+2 -2
View File
@@ -1556,7 +1556,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
RankingFeat feat;
feat.Type = RankingFeat::COURSE;
feat.pCourse = pCourse;
feat.Feat = ssprintf("MR #%d in %s", i+1, pCourse->GetFullDisplayTitle().c_str() );
feat.Feat = ssprintf("MR #%d in %s", i+1, pCourse->GetDisplayFullTitle().c_str() );
if( cd != DIFFICULTY_MEDIUM )
feat.Feat += " " + CourseDifficultyToThemedString(cd);
feat.pStringToFill = &hs.sName;
@@ -1582,7 +1582,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
RankingFeat feat;
feat.Type = RankingFeat::COURSE;
feat.pCourse = pCourse;
feat.Feat = ssprintf("PR #%d in %s", i+1, pCourse->GetFullDisplayTitle().c_str() );
feat.Feat = ssprintf("PR #%d in %s", i+1, pCourse->GetDisplayFullTitle().c_str() );
feat.pStringToFill = &hs.sName;
feat.grade = GRADE_NO_DATA;
feat.iScore = hs.iScore;
+2 -2
View File
@@ -57,12 +57,12 @@ void MusicList::AddSongsToGroup(const vector<Song*> &Songs)
continue;
}
CString sTitle = Songs[iIndex]->GetFullDisplayTitle();
CString sTitle = Songs[iIndex]->GetDisplayFullTitle();
// TODO: Move this crop threshold into a theme metric or make automatic based on column width
if( sTitle.GetLength() > 40 )
sTitle = sTitle.Left( 37 ) + "...";
CString sTrTitle = Songs[iIndex]->GetFullTranslitTitle();
CString sTrTitle = Songs[iIndex]->GetTranslitFullTitle();
if( sTrTitle.GetLength() > 40 )
sTrTitle = sTrTitle.Left( 37 ) + "...";
+2 -2
View File
@@ -151,8 +151,8 @@ void MusicWheelItem::LoadFromWheelItemData( WheelItemData* pWID, bool bExpanded
bt = &m_textSection;
break;
case TYPE_COURSE:
sDisplayName = data->m_pCourse->GetFullDisplayTitle();
sTranslitName = data->m_pCourse->GetFullTranslitTitle();
sDisplayName = data->m_pCourse->GetDisplayFullTitle();
sTranslitName = data->m_pCourse->GetTranslitFullTitle();
bt = &m_textCourse;
break;
case TYPE_SORT:
+1 -1
View File
@@ -430,7 +430,7 @@ void NetworkSyncManager::StartRequest(short position)
}
if (GAMESTATE->m_pCurCourse != NULL)
m_packet.WriteNT(GAMESTATE->m_pCurCourse->GetFullDisplayTitle());
m_packet.WriteNT(GAMESTATE->m_pCurCourse->GetDisplayFullTitle());
else
m_packet.WriteNT(CString(""));
+1 -1
View File
@@ -348,7 +348,7 @@ bool NotesWriterDWI::Write( CString sPath, const Song &out )
RageException::Throw( "Error opening song file \"%s\" for writing: \"%s\"", sPath.c_str(), f.GetError().c_str() );
/* Write transliterations, if we have them, since DWI doesn't support UTF-8. */
f.PutLine( ssprintf("#TITLE:%s;", out.GetFullTranslitTitle().c_str()) );
f.PutLine( ssprintf("#TITLE:%s;", out.GetTranslitFullTitle().c_str()) );
f.PutLine( ssprintf("#ARTIST:%s;", out.GetTranslitArtist().c_str()) );
ASSERT( out.m_Timing.m_BPMSegments[0].m_iStartIndex == 0 );
f.PutLine( ssprintf("#FILE:%s;", out.m_sMusicFile.c_str()) );
+1 -1
View File
@@ -484,7 +484,7 @@ public:
FOREACH_CONST( Song*, vpSongs, p )
{
defOut.choices.push_back( (*p)->GetFullTranslitTitle() );
defOut.choices.push_back( (*p)->GetTranslitFullTitle() );
GameCommand mc;
mc.m_pSong = *p;
ListEntries.push_back( mc );
+1 -1
View File
@@ -1328,7 +1328,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
if( bUsesThisSong )
{
g_CourseMode.rows[0].choices.push_back( crs->GetFullDisplayTitle() );
g_CourseMode.rows[0].choices.push_back( crs->GetDisplayFullTitle() );
if( crs == m_pAttacksFromCourse )
g_CourseMode.rows[0].iDefaultChoice = g_CourseMode.rows[0].choices.size()-1;
}
+1 -1
View File
@@ -41,7 +41,7 @@ void ScreenMusicScroll::Init()
Song* pSong = arraySongs[i];
bt->LoadFromFont( THEME->GetPathF("ScreenMusicScroll","titles") );
bt->SetText( pSong->GetFullDisplayTitle(), pSong->GetFullTranslitTitle() );
bt->SetText( pSong->GetDisplayFullTitle(), pSong->GetTranslitFullTitle() );
bt->SetDiffuse( SONGMAN->GetSongColor(pSong) );
bt->SetZoom( TEXT_ZOOM );
+3 -3
View File
@@ -786,7 +786,7 @@ float ScreenRanking::SetPage( PageToShow pts )
return SECONDS_PER_PAGE;
case PAGE_TYPE_TRAIL:
{
m_textCourseTitle.SetText( pts.pCourse->GetFullDisplayTitle() );
m_textCourseTitle.SetText( pts.pCourse->GetDisplayFullTitle() );
m_Banner.LoadFromCourse( pts.pCourse );
m_textStepsType.SetText( GameManager::StepsTypeToThemedString(pts.st) );
@@ -844,7 +844,7 @@ float ScreenRanking::SetPage( PageToShow pts )
ScoreRowItem &item = m_vScoreRowItem[s];
const Song* pSong = item.m_pSong;
item.m_textTitle.SetText( pSong->GetFullDisplayTitle() );
item.m_textTitle.SetText( pSong->GetDisplayFullTitle() );
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), iter )
{
@@ -891,7 +891,7 @@ float ScreenRanking::SetPage( PageToShow pts )
ScoreRowItem &item = m_vScoreRowItem[c];
const Course* pCourse = item.m_pCourse;
item.m_textTitle.SetText( pCourse->GetFullDisplayTitle() );
item.m_textTitle.SetText( pCourse->GetDisplayFullTitle() );
FOREACH_CONST( CourseDifficulty, COURSE_DIFFICULTIES_TO_SHOW.GetValue(), cd )
{
BitmapText* pTextStepsScore = &item.m_textScore[*cd];
+1 -1
View File
@@ -27,7 +27,7 @@ static CString GetPromptText()
s += ssprintf(
"You have changed the timing of\n\n"
"%s:\n\n",
GAMESTATE->m_pCurSong->GetFullDisplayTitle().c_str() );
GAMESTATE->m_pCurSong->GetDisplayFullTitle().c_str() );
{
float fOld = GAMESTATE->m_pTimingDataOriginal->m_fBeat0OffsetInSeconds;
+1 -1
View File
@@ -125,7 +125,7 @@ void ScreenUnlock::Init()
ASSERT( pCourse );
text->SetMaxWidth( MaxWidth );
text->SetText( pCourse->GetFullDisplayTitle() );
text->SetText( pCourse->GetDisplayFullTitle() );
text->SetDiffuse( RageColor(0,1,0,1) );
}
break;
+11 -7
View File
@@ -1285,7 +1285,7 @@ CString Song::GetDisplayArtist() const
}
CString Song::GetFullDisplayTitle() const
CString Song::GetDisplayFullTitle() const
{
CString Title = GetDisplayMainTitle();
CString SubTitle = GetDisplaySubTitle();
@@ -1294,7 +1294,7 @@ CString Song::GetFullDisplayTitle() const
return Title;
}
CString Song::GetFullTranslitTitle() const
CString Song::GetTranslitFullTitle() const
{
CString Title = GetTranslitMainTitle();
CString SubTitle = GetTranslitSubTitle();
@@ -1357,7 +1357,7 @@ bool Song::Matches(CString sGroup, CString sSong) const
// match on song dir or title (ala DWI)
if( !sSong.CompareNoCase(sLastBit) )
return true;
if( !sSong.CompareNoCase(this->GetFullTranslitTitle()) )
if( !sSong.CompareNoCase(this->GetTranslitFullTitle()) )
return true;
return false;
@@ -1477,8 +1477,10 @@ class LunaSong : public Luna<T>
public:
LunaSong() { LUA->Register( Register ); }
static int GetFullDisplayTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetFullDisplayTitle() ); return 1; }
static int GetFullTranslitTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetFullTranslitTitle() ); return 1; }
static int GetDisplayFullTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayFullTitle() ); return 1; }
static int GetTranslitFullTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitFullTitle() ); return 1; }
static int GetDisplayMainTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayMainTitle() ); return 1; }
static int GetTranslitMainTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitMainTitle() ); return 1; }
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; }
@@ -1500,8 +1502,10 @@ public:
static int GetBackgroundPath( T* p, lua_State *L ) { if( !p->HasBackground() ) lua_pushnil(L); else lua_pushstring(L, p->GetBackgroundPath()); return 1; }
static void Register(lua_State *L)
{
ADD_METHOD( GetFullDisplayTitle )
ADD_METHOD( GetFullTranslitTitle )
ADD_METHOD( GetDisplayFullTitle )
ADD_METHOD( GetTranslitFullTitle )
ADD_METHOD( GetDisplayMainTitle )
ADD_METHOD( GetTranslitMainTitle )
ADD_METHOD( GetDisplayArtist )
ADD_METHOD( GetTranslitArtist )
ADD_METHOD( GetGenre )
+4 -4
View File
@@ -1039,7 +1039,7 @@ Course* SongManager::GetCourseFromName( CString sName )
return NULL;
for( unsigned int i=0; i<m_pCourses.size(); i++ )
if( sName.CompareNoCase(m_pCourses[i]->GetFullDisplayTitle()) == 0 )
if( sName.CompareNoCase(m_pCourses[i]->GetDisplayFullTitle()) == 0 )
return m_pCourses[i];
return NULL;
@@ -1093,7 +1093,7 @@ Course *SongManager::FindCourse( CString sName )
{
for( unsigned i = 0; i < m_pCourses.size(); i++ )
{
if( !sName.CompareNoCase(m_pCourses[i]->GetFullDisplayTitle()) )
if( !sName.CompareNoCase(m_pCourses[i]->GetDisplayFullTitle()) )
return m_pCourses[i];
}
@@ -1329,7 +1329,7 @@ int LuaFunc_##func( lua_State *L ) { \
} \
LuaFunction( func ); /* register it */
LuaFunction_Song( SongFullDisplayTitle, p->GetFullDisplayTitle() );
LuaFunction_Song( SongFullDisplayTitle, p->GetDisplayFullTitle() );
static bool CheckPointer( const Steps *p )
{
@@ -1360,7 +1360,7 @@ CString GetCurrentSongDisplayTitle()
const Song* pSong = GAMESTATE->m_pCurSong;
if( pSong == NULL )
return "";
return pSong->GetFullDisplayTitle();
return pSong->GetDisplayFullTitle();
}
CString GetCurrentSongDisplayArtist()
+1 -1
View File
@@ -26,7 +26,7 @@ void StageStats::AssertValid( PlayerNumber pn ) const
ASSERT( vpPlayedSongs.size() != 0 );
ASSERT( vpPossibleSongs.size() != 0 );
if( vpPlayedSongs[0] )
CHECKPOINT_M( vpPlayedSongs[0]->GetFullTranslitTitle() );
CHECKPOINT_M( vpPlayedSongs[0]->GetTranslitFullTitle() );
ASSERT( m_player[pn].vpPlayedSteps.size() != 0 );
ASSERT( m_player[pn].vpPlayedSteps[0] );
ASSERT_M( playMode < NUM_PLAY_MODES, ssprintf("playmode %i", playMode) );
-2
View File
@@ -913,13 +913,11 @@ public:
static int GetMetric( T* p, lua_State *L ) { lua_pushstring(L, p->GetMetric(SArg(1),SArg(2)) ); return 1; }
static int GetPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetPath((ElementCategory)IArg(1),SArg(2),SArg(3)) ); return 1; }
static int GetModifierNames( T* p, lua_State *L ) { vector<CString> v; p->GetModifierNames(v); LuaHelpers::CreateTableFromArray(v,LUA->L); return 1; }
static void Register(lua_State *L)
{
ADD_METHOD( GetMetric )
ADD_METHOD( GetPath )
ADD_METHOD( GetModifierNames )
Luna<T>::Register( L );
+1 -1
View File
@@ -29,7 +29,7 @@ Trail *TrailID::ToTrail( const Course *p, bool bAllowNull ) const
Trail *ret = p->GetTrail( st, cd );
if( !bAllowNull && ret == NULL )
RageException::Throw( "%i, %i, \"%s\"", st, cd, p->GetFullDisplayTitle().c_str() );
RageException::Throw( "%i, %i, \"%s\"", st, cd, p->GetDisplayFullTitle().c_str() );
return ret;
}
+2 -2
View File
@@ -110,8 +110,8 @@ public:
CString GetTranslitArtist() const { return m_sArtistTranslit.size()? m_sArtistTranslit:m_sArtist; }
/* "title subtitle" */
CString GetFullDisplayTitle() const;
CString GetFullTranslitTitle() const;
CString GetDisplayFullTitle() const;
CString GetTranslitFullTitle() const;
CString m_sGenre;