big checkin - new noteskin format and XY positioning. I probably broke a lot of things.

This commit is contained in:
Chris Danford
2002-08-13 23:26:46 +00:00
parent 9346564080
commit 7c1bfb3a0d
133 changed files with 4813 additions and 2626 deletions
+287 -49
View File
@@ -32,29 +32,100 @@
#include "GameState.h"
const float SONG_INFO_FRAME_X = 160;
const float SONG_INFO_FRAME_Y = SCREEN_TOP+118;
const float DIFFICULTY_X = SONG_INFO_FRAME_X;
const float DIFFICULTY_Y = CENTER_Y-26;
const float ICON_X[NUM_PLAYERS] = { DIFFICULTY_X - 106, DIFFICULTY_X + 106 };
const float ICON_Y = DIFFICULTY_Y;
const float RADAR_X = SONG_INFO_FRAME_X;
const float RADAR_Y = CENTER_Y+58;
const float METER_FRAME_X = SONG_INFO_FRAME_X;
const float METER_FRAME_Y = SCREEN_BOTTOM-64;
const float METER_X[NUM_PLAYERS] = { METER_FRAME_X-66, METER_FRAME_X+66 };
const float METER_Y[NUM_PLAYERS] = { METER_FRAME_Y-12, METER_FRAME_Y+11 };
const float WHEEL_X = CENTER_X+160;
const float WHEEL_Y = CENTER_Y+8;
#define BANNER_FRAME_X THEME->GetMetricF("SelectMusic","BannerFrameX")
#define BANNER_FRAME_Y THEME->GetMetricF("SelectMusic","BannerFrameY")
#define BANNER_X THEME->GetMetricF("SelectMusic","BannerX")
#define BANNER_Y THEME->GetMetricF("SelectMusic","BannerY")
#define BANNER_WIDTH THEME->GetMetricF("SelectMusic","BannerWidth")
#define BANNER_HEIGHT THEME->GetMetricF("SelectMusic","BannerHeight")
#define BPM_X THEME->GetMetricF("SelectMusic","BPMX")
#define BPM_Y THEME->GetMetricF("SelectMusic","BPMY")
#define STAGE_X THEME->GetMetricF("SelectMusic","StageX")
#define STAGE_Y THEME->GetMetricF("SelectMusic","StageY")
#define CD_TITLE_X THEME->GetMetricF("SelectMusic","CDTitleX")
#define CD_TITLE_Y THEME->GetMetricF("SelectMusic","CDTitleY")
#define DIFFICULTY_X THEME->GetMetricF("SelectMusic","DifficultyX")
#define DIFFICULTY_Y THEME->GetMetricF("SelectMusic","DifficultyY")
#define ICON_P1_X THEME->GetMetricF("SelectMusic","IconP1X")
#define ICON_P1_Y THEME->GetMetricF("SelectMusic","IconP1Y")
#define ICON_P2_X THEME->GetMetricF("SelectMusic","IconP2X")
#define ICON_P2_Y THEME->GetMetricF("SelectMusic","IconP2Y")
#define RADAR_X THEME->GetMetricF("SelectMusic","RadarX")
#define RADAR_Y THEME->GetMetricF("SelectMusic","RadarY")
#define SORT_ICON_X THEME->GetMetricF("SelectMusic","SortIconX")
#define SORT_ICON_Y THEME->GetMetricF("SelectMusic","SortIconY")
#define SCORE_P1_X THEME->GetMetricF("SelectMusic","ScoreP1X")
#define SCORE_P1_Y THEME->GetMetricF("SelectMusic","ScoreP1Y")
#define SCORE_P2_X THEME->GetMetricF("SelectMusic","ScoreP2X")
#define SCORE_P2_Y THEME->GetMetricF("SelectMusic","ScoreP2Y")
#define METER_FRAME_X THEME->GetMetricF("SelectMusic","MeterFrameX")
#define METER_FRAME_Y THEME->GetMetricF("SelectMusic","MeterFrameY")
#define METER_P1_X THEME->GetMetricF("SelectMusic","MeterP1X")
#define METER_P1_Y THEME->GetMetricF("SelectMusic","MeterP1Y")
#define METER_P2_X THEME->GetMetricF("SelectMusic","MeterP2X")
#define METER_P2_Y THEME->GetMetricF("SelectMusic","MeterP2Y")
#define WHEEL_X THEME->GetMetricF("SelectMusic","WheelX")
#define WHEEL_Y THEME->GetMetricF("SelectMusic","WheelY")
#define PLAYER_OPTIONS_P1_X THEME->GetMetricF("SelectMusic","PlayerOptionsP1X")
#define PLAYER_OPTIONS_P1_Y THEME->GetMetricF("SelectMusic","PlayerOptionsP1Y")
#define PLAYER_OPTIONS_P2_X THEME->GetMetricF("SelectMusic","PlayerOptionsP2X")
#define PLAYER_OPTIONS_P2_Y THEME->GetMetricF("SelectMusic","PlayerOptionsP2Y")
#define SONG_OPTIONS_X THEME->GetMetricF("SelectMusic","SongOptionsX")
#define SONG_OPTIONS_Y THEME->GetMetricF("SelectMusic","SongOptionsY")
const float TWEEN_TIME = 0.5f;
float ICON_X( int p ) {
switch( p ) {
case PLAYER_1: return ICON_P1_X;
case PLAYER_2: return ICON_P2_X;
default: ASSERT(0); return 0;
}
}
float ICON_Y( int p ) {
switch( p ) {
case PLAYER_1: return ICON_P1_Y;
case PLAYER_2: return ICON_P2_Y;
default: ASSERT(0); return 0;
}
}
float HIGH_SCORE_X( int p ) {
switch( p ) {
case PLAYER_1: return SCORE_P1_X;
case PLAYER_2: return SCORE_P2_X;
default: ASSERT(0); return 0;
}
}
float HIGH_SCORE_Y( int p ) {
switch( p ) {
case PLAYER_1: return SCORE_P1_Y;
case PLAYER_2: return SCORE_P2_Y;
default: ASSERT(0); return 0;
}
}
float METER_X( int p ) {
switch( p ) {
case PLAYER_1: return METER_P1_X;
case PLAYER_2: return METER_P2_X;
default: ASSERT(0); return 0;
}
}
float METER_Y( int p ) {
switch( p ) {
case PLAYER_1: return METER_P1_Y;
case PLAYER_2: return METER_P2_Y;
default: ASSERT(0); return 0;
}
}
#define PLAYER_OPTIONS_X(p) ( p==PLAYER_1 ? PLAYER_OPTIONS_P1_X : PLAYER_OPTIONS_P2_X )
float PLAYER_OPTIONS_Y( int p ) {
switch( p ) {
case PLAYER_1: return PLAYER_OPTIONS_P1_Y;
case PLAYER_2: return PLAYER_OPTIONS_P2_Y;
default: ASSERT(0); return 0;
}
}
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User+1);
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User+2);
@@ -73,44 +144,85 @@ ScreenSelectMusic::ScreenSelectMusic()
int p;
m_Menu.Load(
THEME->GetPathTo(GRAPHIC_SELECT_MUSIC_BACKGROUND),
THEME->GetPathTo(GRAPHIC_SELECT_MUSIC_TOP_EDGE),
THEME->GetPathTo("Graphics","select music background"),
THEME->GetPathTo("Graphics","select music top edge"),
ssprintf("%c or %c change music Hold %c and %c then press START to change sort\n%c%c easier difficulty %c%c harder difficulty",
char(1), char(2), char(1), char(2), char(3), char(3), char(4), char(4) ),
false, true, 60
);
this->AddSubActor( &m_Menu );
m_SongInfoFrame.SetXY( SONG_INFO_FRAME_X, SONG_INFO_FRAME_Y );
this->AddSubActor( &m_SongInfoFrame );
// these guys get loaded SetSong and TweenToSong
m_Banner.SetXY( BANNER_X, BANNER_Y );
m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
this->AddSubActor( &m_Banner );
m_sprDifficultyFrame.Load( THEME->GetPathTo(GRAPHIC_SELECT_MUSIC_DIFFICULTY_FRAME) );
m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","select music info frame") );
m_sprBannerFrame.SetXY( BANNER_FRAME_X, BANNER_FRAME_Y );
this->AddSubActor( &m_sprBannerFrame );
m_BPMDisplay.SetXY( BPM_X, BPM_Y );
m_BPMDisplay.SetZoomX( 1.0f );
this->AddSubActor( &m_BPMDisplay );
m_textStage.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
m_textStage.TurnShadowOff();
m_textStage.SetZoomX( 1.0f );
m_textStage.SetXY( STAGE_X, STAGE_Y );
m_textStage.SetText( GAMESTATE->GetStageText() );
m_textStage.SetDiffuseColor( GAMESTATE->GetStageColor() );
this->AddSubActor( &m_textStage );
m_sprCDTitle.Load( THEME->GetPathTo("Graphics","fallback cd title") );
m_sprCDTitle.TurnShadowOff();
m_sprCDTitle.SetXY( CD_TITLE_X, CD_TITLE_Y );
this->AddSubActor( &m_sprCDTitle );
m_sprDifficultyFrame.Load( THEME->GetPathTo("Graphics","select music difficulty frame") );
m_sprDifficultyFrame.SetXY( DIFFICULTY_X, DIFFICULTY_Y );
this->AddSubActor( &m_sprDifficultyFrame );
for( p=0; p<NUM_PLAYERS; p++ )
{
m_DifficultyIcon[p].SetXY( ICON_X[p], ICON_Y );
m_DifficultyIcon[p].SetXY( ICON_X(p), ICON_Y(p) );
this->AddSubActor( &m_DifficultyIcon[p] );
}
m_GrooveRadar.SetXY( RADAR_X, RADAR_Y );
this->AddSubActor( &m_GrooveRadar );
m_textSongOptions.Load( THEME->GetPathTo(FONT_NORMAL) );
m_textSongOptions.SetXY( RADAR_X, RADAR_Y );
m_textSongOptions.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textSongOptions.SetXY( SONG_OPTIONS_X, SONG_OPTIONS_Y );
m_textSongOptions.SetZoom( 0.5f );
m_textSongOptions.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_textSongOptions.SetEffectCamelion( 2.5f, D3DXCOLOR(1,0,0,1), D3DXCOLOR(1,1,1,1) ); // blink red
m_textSongOptions.SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // white
this->AddSubActor( &m_textSongOptions );
m_sprMeterFrame.Load( THEME->GetPathTo(GRAPHIC_SELECT_MUSIC_METER_FRAME) );
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
m_textPlayerOptions[p].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textPlayerOptions[p].SetXY( PLAYER_OPTIONS_X(p), PLAYER_OPTIONS_Y(p) );
m_textPlayerOptions[p].SetZoom( 0.5f );
m_textPlayerOptions[p].SetHorizAlign( p==PLAYER_1 ? Actor::align_left : Actor::align_right );
m_textPlayerOptions[p].SetVertAlign( Actor::align_middle );
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_textPlayerOptions[p].SetEffectCamelion( 2.5f, D3DXCOLOR(1,0,0,1), D3DXCOLOR(1,1,1,1) ); // blink red
m_textPlayerOptions[p].SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // white
this->AddSubActor( &m_textPlayerOptions[p] );
}
m_sprMeterFrame.Load( THEME->GetPathTo("Graphics","select music meter frame") );
m_sprMeterFrame.SetXY( METER_FRAME_X, METER_FRAME_Y );
this->AddSubActor( &m_sprMeterFrame );
for( p=0; p<NUM_PLAYERS; p++ )
{
m_FootMeter[p].Load( THEME->GetPathTo(FONT_METER) );
m_FootMeter[p].SetXY( METER_X[p], METER_Y[p] );
m_FootMeter[p].LoadFromFont( THEME->GetPathTo("Fonts","meter") );
m_FootMeter[p].SetXY( METER_X(p), METER_Y(p) );
m_FootMeter[p].SetShadowLength( 2 );
this->AddSubActor( &m_FootMeter[p] );
}
@@ -118,7 +230,30 @@ ScreenSelectMusic::ScreenSelectMusic()
m_MusicWheel.SetXY( WHEEL_X, WHEEL_Y );
this->AddSubActor( &m_MusicWheel );
m_textHoldForOptions.Load( THEME->GetPathTo(FONT_STAGE) );
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
continue; // skip
m_sprHighScoreFrame[p].Load( THEME->GetPathTo("Graphics","select music score frame") );
m_sprHighScoreFrame[p].StopAnimating();
m_sprHighScoreFrame[p].SetState( p );
m_sprHighScoreFrame[p].SetXY( HIGH_SCORE_X(p), HIGH_SCORE_Y(p) );
this->AddSubActor( &m_sprHighScoreFrame[p] );
m_HighScore[p].SetXY( HIGH_SCORE_X(p), HIGH_SCORE_Y(p) );
m_HighScore[p].SetZoom( 0.6f );
m_HighScore[p].SetDiffuseColor( PlayerToColor(p) );
this->AddSubActor( &m_HighScore[p] );
}
m_MusicSortDisplay.SetXY( SORT_ICON_X, SORT_ICON_Y );
m_MusicSortDisplay.SetEffectGlowing( 1.0f );
m_MusicSortDisplay.Set( GAMESTATE->m_SongSortOrder );
this->AddSubActor( &m_MusicSortDisplay );
m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","stage") );
m_textHoldForOptions.SetXY( CENTER_X, CENTER_Y );
m_textHoldForOptions.SetText( "press START again for options" );
m_textHoldForOptions.SetZoom( 1 );
@@ -128,9 +263,9 @@ ScreenSelectMusic::ScreenSelectMusic()
this->AddSubActor( &m_textHoldForOptions );
m_soundSelect.Load( THEME->GetPathTo(SOUND_MENU_START) );
m_soundChangeNotes.Load( THEME->GetPathTo(SOUND_SELECT_MUSIC_CHANGE_NOTES) );
m_soundLocked.Load( THEME->GetPathTo(SOUND_SELECT_MUSIC_WHEEL_LOCKED) );
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","select music change notes") );
m_soundLocked.Load( THEME->GetPathTo("Sounds","select music wheel locked") );
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_SELECT_MUSIC_INTRO) );
@@ -162,9 +297,16 @@ void ScreenSelectMusic::TweenOnScreen()
{
float fOriginalZoomY;
m_SongInfoFrame.SetXY( SONG_INFO_FRAME_X - 400, SONG_INFO_FRAME_Y );
m_SongInfoFrame.BeginTweening( TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_SongInfoFrame.SetTweenXY( SONG_INFO_FRAME_X, SONG_INFO_FRAME_Y );
Actor* pActorsInGroupInfoFrame[] = { &m_sprBannerFrame, &m_Banner, &m_BPMDisplay, &m_textStage, &m_sprCDTitle };
const int iNumActorsInGroupInfoFrame = sizeof(pActorsInGroupInfoFrame) / sizeof(Actor*);
int i;
for( i=0; i<iNumActorsInGroupInfoFrame; i++ )
{
float fOriginalX = pActorsInGroupInfoFrame[i]->GetX();
pActorsInGroupInfoFrame[i]->SetX( fOriginalX-400 );
pActorsInGroupInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_END );
pActorsInGroupInfoFrame[i]->SetTweenX( fOriginalX );
}
fOriginalZoomY = m_sprDifficultyFrame.GetZoomY();
m_sprDifficultyFrame.BeginTweening( TWEEN_TIME );
@@ -176,11 +318,16 @@ void ScreenSelectMusic::TweenOnScreen()
m_GrooveRadar.TweenOnScreen();
fOriginalZoomY = m_textSongOptions.GetZoomY();
m_textSongOptions.BeginTweening( TWEEN_TIME );
m_textSongOptions.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textSongOptions.SetTweenZoomY( fOriginalZoomY );
for( int p=0; p<NUM_PLAYERS; p++ )
{
fOriginalZoomY = m_textPlayerOptions[p].GetZoomY();
m_textPlayerOptions[p].BeginTweening( TWEEN_TIME );
m_textPlayerOptions[p].SetTweenZoomY( fOriginalZoomY );
fOriginalZoomY = m_DifficultyIcon[p].GetZoomY();
m_DifficultyIcon[p].BeginTweening( TWEEN_TIME );
m_DifficultyIcon[p].SetTweenZoomY( fOriginalZoomY );
@@ -190,13 +337,33 @@ void ScreenSelectMusic::TweenOnScreen()
m_FootMeter[p].SetTweenZoomY( fOriginalZoomY );
}
m_MusicSortDisplay.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_MusicSortDisplay.BeginTweening( TWEEN_TIME );
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
Actor* pActorsInScore[] = { &m_sprHighScoreFrame[0], &m_sprHighScoreFrame[1], &m_HighScore[0], &m_HighScore[1] };
const int iNumActorsInScore = sizeof(pActorsInScore) / sizeof(Actor*);
for( i=0; i<iNumActorsInScore; i++ )
{
float fOriginalX = pActorsInScore[i]->GetX();
pActorsInScore[i]->SetX( fOriginalX+400 );
pActorsInScore[i]->BeginTweening( TWEEN_TIME, TWEEN_BIAS_END );
pActorsInScore[i]->SetTweenX( fOriginalX );
}
m_MusicWheel.TweenOnScreen();
}
void ScreenSelectMusic::TweenOffScreen()
{
m_SongInfoFrame.BeginTweening( TWEEN_TIME, Actor::TWEEN_BOUNCE_END );
m_SongInfoFrame.SetTweenXY( SONG_INFO_FRAME_X - 400, SONG_INFO_FRAME_Y );
Actor* pActorsInGroupInfoFrame[] = { &m_sprBannerFrame, &m_Banner, &m_BPMDisplay, &m_textStage, &m_sprCDTitle };
const int iNumActorsInGroupInfoFrame = sizeof(pActorsInGroupInfoFrame) / sizeof(Actor*);
int i;
for( i=0; i<iNumActorsInGroupInfoFrame; i++ )
{
pActorsInGroupInfoFrame[i]->BeginTweeningQueued( TWEEN_TIME, TWEEN_BOUNCE_BEGIN );
pActorsInGroupInfoFrame[i]->SetTweenX( pActorsInGroupInfoFrame[i]->GetX()-400 );
}
m_sprDifficultyFrame.BeginTweening( TWEEN_TIME );
m_sprDifficultyFrame.SetTweenZoomY( 0 );
@@ -207,10 +374,13 @@ void ScreenSelectMusic::TweenOffScreen()
m_GrooveRadar.TweenOffScreen();
m_textSongOptions.BeginTweening( TWEEN_TIME );
m_textSongOptions.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textSongOptions.SetTweenZoomY( 0 );
for( int p=0; p<NUM_PLAYERS; p++ )
{
m_textPlayerOptions[p].BeginTweening( TWEEN_TIME );
m_textPlayerOptions[p].SetTweenZoomY( 0 );
m_DifficultyIcon[p].BeginTweening( TWEEN_TIME );
m_DifficultyIcon[p].SetTweenZoomY( 0 );
@@ -218,9 +388,35 @@ void ScreenSelectMusic::TweenOffScreen()
m_FootMeter[p].SetTweenZoomY( 0 );
}
m_MusicSortDisplay.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_MusicSortDisplay.SetEffectNone();
m_MusicSortDisplay.BeginTweening( TWEEN_TIME );
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
Actor* pActorsInScore[] = { &m_sprHighScoreFrame[0], &m_sprHighScoreFrame[1], &m_HighScore[0], &m_HighScore[1] };
const int iNumActorsInScore = sizeof(pActorsInScore) / sizeof(Actor*);
for( i=0; i<iNumActorsInScore; i++ )
{
pActorsInScore[i]->BeginTweening( TWEEN_TIME, TWEEN_BIAS_BEGIN );
pActorsInScore[i]->SetTweenX( pActorsInScore[i]->GetX()+400 );
}
m_MusicWheel.TweenOffScreen();
}
void ScreenSelectMusic::Update( float fDeltaTime )
{
Screen::Update( fDeltaTime );
float fNewRotation = m_sprCDTitle.GetRotationY()+D3DX_PI*fDeltaTime/2;
fNewRotation = fmodf( fNewRotation, D3DX_PI*2 );
m_sprCDTitle.SetRotationY( fNewRotation );
if( fNewRotation > D3DX_PI/2 && fNewRotation <= D3DX_PI*3.0f/2 )
m_sprCDTitle.SetDiffuseColor( D3DXCOLOR(0.2f,0.2f,0.2f,1) );
else
m_sprCDTitle.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
}
const GameButton DANCE_EASIER_DIFFICULTY_PATTERN[] = { DANCE_BUTTON_UP, DANCE_BUTTON_UP };
const int DANCE_EASIER_DIFFICULTY_PATTERN_SIZE = sizeof(DANCE_EASIER_DIFFICULTY_PATTERN) / sizeof(GameButton);
@@ -247,7 +443,7 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType
{
m_bGoToOptions = true;
m_textHoldForOptions.SetText( "Entering Options..." );
SOUND->PlayOnceStreamed( THEME->GetPathTo(SOUND_MENU_START) );
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
return;
}
@@ -401,7 +597,15 @@ void ScreenSelectMusic::MenuStart( const PlayerNumber p )
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_soundLocked.Play();
else
{
m_MusicSortDisplay.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_MusicSortDisplay.SetState( GAMESTATE->m_SongSortOrder );
m_MusicSortDisplay.BeginTweening( 0.3f ); // sleep
m_MusicSortDisplay.BeginTweeningQueued( 0.3f ); // fade in
m_MusicSortDisplay.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_MusicWheel.NextSort();
}
return;
}
@@ -494,6 +698,17 @@ void ScreenSelectMusic::AfterNotesChange( const PlayerNumber p )
GAMESTATE->m_pCurNotes[p] = pNotes;
// m_BPMDisplay.SetZoomY( 0 );
// m_BPMDisplay.BeginTweening( 0.2f );
// m_BPMDisplay.SetTweenZoomY( 1.2f );
DifficultyClass dc = GAMESTATE->m_PreferredDifficultyClass[p];
Song* pSong = GAMESTATE->m_pCurSong;
Notes* m_pNotes = GAMESTATE->m_pCurNotes[p];
if( m_pNotes )
m_HighScore[p].SetScore( (float)m_pNotes->m_iTopScore );
m_DifficultyIcon[p].SetFromNotes( pNotes );
m_FootMeter[p].SetFromNotes( pNotes );
m_GrooveRadar.SetFromNotes( p, pNotes );
@@ -512,18 +727,31 @@ void ScreenSelectMusic::AfterMusicChange()
case TYPE_SECTION:
{
CString sGroup = m_MusicWheel.GetSelectedSection();
m_SongInfoFrame.SetFromGroup( sGroup ); // if this isn't a group, it'll default to the fallback banner
for( int p=0; p<NUM_PLAYERS; p++ )
{
m_iSelection[p] = -1;
}
m_Banner.SetFromGroup( sGroup ); // if this isn't a group, it'll default to the fallback banner
m_BPMDisplay.SetBPMRange( 0, 0 );
m_sprCDTitle.UnloadTexture();
}
break;
case TYPE_SONG:
{
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, m_arrayNotes );
SortNotesArrayByDifficulty( m_arrayNotes );
m_SongInfoFrame.SetFromSong( pSong );
m_Banner.SetFromSong( pSong );
float fMinBPM, fMaxBPM;
pSong->GetMinMaxBPM( fMinBPM, fMaxBPM );
m_BPMDisplay.SetBPMRange( fMinBPM, fMaxBPM );
if( pSong->HasCDTitle() )
m_sprCDTitle.Load( pSong->GetCDTitlePath() );
else
m_sprCDTitle.Load( THEME->GetPathTo("Graphics","fallback cd title") );
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( PlayerNumber(p) ) )
@@ -537,7 +765,9 @@ void ScreenSelectMusic::AfterMusicChange()
}
break;
case TYPE_ROULETTE:
m_SongInfoFrame.SetRoulette();
m_Banner.SetRoulette();
m_BPMDisplay.SetBPMRange( 0, 0 );
m_sprCDTitle.UnloadTexture();
break;
}
@@ -570,10 +800,18 @@ void ScreenSelectMusic::PlayMusicSample()
void ScreenSelectMusic::UpdateOptionsDisplays()
{
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( GAMESTATE->IsPlayerEnabled(p) )
m_Menu.OverrideCreditsMessage( (PlayerNumber)p, GAMESTATE->m_PlayerOptions[p].GetString() );
{
CString s = GAMESTATE->m_PlayerOptions[p].GetString();
s.Replace( ", ", "\n" );
m_textPlayerOptions[p].SetText( s );
}
}
m_textSongOptions.SetText( GAMESTATE->m_SongOptions.GetString() );
CString s = GAMESTATE->m_SongOptions.GetString();
s.Replace( ", ", "\n" );
m_textSongOptions.SetText( s );
}