2004-01-25 01:59:21 +00:00
|
|
|
#include "global.h"
|
|
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
File: SongCreditDisplay.h
|
|
|
|
|
|
|
|
|
|
Desc: A graphic displayed in the SongCreditDisplay during Dancing.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "SongCreditDisplay.h"
|
|
|
|
|
#include "ThemeManager.h"
|
|
|
|
|
#include "GameState.h"
|
|
|
|
|
#include "song.h"
|
|
|
|
|
#include "Steps.h"
|
2004-01-25 05:35:18 +00:00
|
|
|
#include "SongManager.h"
|
2004-01-25 01:59:21 +00:00
|
|
|
|
|
|
|
|
SongCreditDisplay::SongCreditDisplay()
|
|
|
|
|
{
|
2004-01-25 04:42:38 +00:00
|
|
|
this->LoadFromFont( THEME->GetPathToF("SongCreditDisplay",(CString)"text") );
|
2004-02-13 23:49:40 +00:00
|
|
|
if( GAMESTATE->IsCourseMode() )
|
2004-01-31 09:53:48 +00:00
|
|
|
return;
|
2004-02-13 23:49:40 +00:00
|
|
|
Song* pSong = GAMESTATE->m_pCurSong;
|
|
|
|
|
ASSERT( pSong );
|
2004-01-31 09:53:48 +00:00
|
|
|
|
2004-01-25 01:59:21 +00:00
|
|
|
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;
|
|
|
|
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
|
|
|
|
{
|
2004-01-25 06:32:34 +00:00
|
|
|
if( !GAMESTATE->IsHumanPlayer(p) )
|
|
|
|
|
continue; // skip
|
|
|
|
|
|
|
|
|
|
Steps* pSteps = GAMESTATE->m_pCurNotes[p];
|
|
|
|
|
bool bAlreadyAdded = find( vpStepsToShow.begin(), vpStepsToShow.end(), pSteps ) != vpStepsToShow.end();
|
|
|
|
|
if( !bAlreadyAdded )
|
|
|
|
|
vpStepsToShow.push_back( pSteps );
|
2004-01-25 01:59:21 +00:00
|
|
|
}
|
|
|
|
|
for( unsigned i=0; i<vpStepsToShow.size(); i++ )
|
|
|
|
|
{
|
|
|
|
|
Steps* pSteps = vpStepsToShow[i];
|
2004-01-25 05:35:18 +00:00
|
|
|
CString sDifficulty = SONGMAN->GetDifficultyThemeName( pSteps->GetDifficulty() );
|
|
|
|
|
|
|
|
|
|
// HACK: reset capitalization
|
|
|
|
|
sDifficulty.MakeLower();
|
|
|
|
|
sDifficulty = Capitalize( sDifficulty );
|
|
|
|
|
|
|
|
|
|
s += sDifficulty + " steps: " + pSteps->GetDescription();
|
2004-01-25 01:59:21 +00:00
|
|
|
s += "\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// erase the last newline
|
|
|
|
|
s.erase( s.end()-1 );
|
|
|
|
|
|
2004-01-25 04:42:38 +00:00
|
|
|
this->SetText( s );
|
2004-01-25 06:51:34 +00:00
|
|
|
}
|
|
|
|
|
|