2002-06-14 22:25:22 +00:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: ScreenSelectCourse
|
|
|
|
|
|
|
|
|
|
Desc: See header.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "ScreenSelectCourse.h"
|
|
|
|
|
#include "ScreenManager.h"
|
|
|
|
|
#include "PrefsManager.h"
|
|
|
|
|
#include "SongManager.h"
|
|
|
|
|
#include "GameManager.h"
|
|
|
|
|
#include "RageMusic.h"
|
|
|
|
|
#include "GameConstantsAndTypes.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
#include "PrefsManager.h"
|
2002-06-14 22:25:22 +00:00
|
|
|
#include "RageLog.h"
|
|
|
|
|
#include "InputMapper.h"
|
|
|
|
|
#include "InputQueue.h"
|
|
|
|
|
#include "AnnouncerManager.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
#include "GameState.h"
|
2002-08-01 03:15:27 +00:00
|
|
|
#include "RageMusic.h"
|
2002-09-02 21:59:58 +00:00
|
|
|
#include "CodeDetector.h"
|
2002-06-14 22:25:22 +00:00
|
|
|
|
|
|
|
|
|
2002-08-27 03:59:22 +00:00
|
|
|
#define BANNER_FRAME_X THEME->GetMetricF("ScreenSelectCourse","BannerFrameX")
|
|
|
|
|
#define BANNER_FRAME_Y THEME->GetMetricF("ScreenSelectCourse","BannerFrameY")
|
|
|
|
|
#define BANNER_X THEME->GetMetricF("ScreenSelectCourse","BannerX")
|
|
|
|
|
#define BANNER_Y THEME->GetMetricF("ScreenSelectCourse","BannerY")
|
|
|
|
|
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectCourse","BannerWidth")
|
|
|
|
|
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectCourse","BannerHeight")
|
|
|
|
|
#define STAGES_X THEME->GetMetricF("ScreenSelectCourse","StagesX")
|
|
|
|
|
#define STAGES_Y THEME->GetMetricF("ScreenSelectCourse","StagesY")
|
|
|
|
|
#define TIME_X THEME->GetMetricF("ScreenSelectCourse","TimeX")
|
|
|
|
|
#define TIME_Y THEME->GetMetricF("ScreenSelectCourse","TimeY")
|
|
|
|
|
#define CONTENTS_X THEME->GetMetricF("ScreenSelectCourse","ContentsX")
|
|
|
|
|
#define CONTENTS_Y THEME->GetMetricF("ScreenSelectCourse","ContentsY")
|
|
|
|
|
#define WHEEL_X THEME->GetMetricF("ScreenSelectCourse","WheelX")
|
|
|
|
|
#define WHEEL_Y THEME->GetMetricF("ScreenSelectCourse","WheelY")
|
2002-08-29 20:18:41 +00:00
|
|
|
#define SCORE_X( p ) THEME->GetMetricF("ScreenSelectCourse",ssprintf("ScoreP%dX",p+1))
|
|
|
|
|
#define SCORE_Y( i ) THEME->GetMetricF("ScreenSelectCourse",ssprintf("ScoreP%dY",i+1))
|
2002-08-27 03:59:22 +00:00
|
|
|
#define HELP_TEXT THEME->GetMetric("ScreenSelectCourse","HelpText")
|
|
|
|
|
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectCourse","TimerSeconds")
|
2002-08-22 09:31:32 +00:00
|
|
|
|
2002-06-14 22:25:22 +00:00
|
|
|
|
|
|
|
|
const float TWEEN_TIME = 0.5f;
|
|
|
|
|
|
2002-08-27 23:31:41 +00:00
|
|
|
const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User+1);
|
|
|
|
|
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User+2);
|
2002-06-14 22:25:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ScreenSelectCourse::ScreenSelectCourse()
|
|
|
|
|
{
|
2002-07-31 19:40:40 +00:00
|
|
|
LOG->Trace( "ScreenSelectCourse::ScreenSelectCourse()" );
|
2002-08-22 09:31:32 +00:00
|
|
|
|
2002-08-27 03:59:22 +00:00
|
|
|
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","select course music") );
|
2002-08-01 03:15:27 +00:00
|
|
|
|
2002-07-27 19:29:51 +00:00
|
|
|
m_bMadeChoice = false;
|
|
|
|
|
m_bGoToOptions = false;
|
2002-06-14 22:25:22 +00:00
|
|
|
|
|
|
|
|
m_Menu.Load(
|
2002-08-13 23:26:46 +00:00
|
|
|
THEME->GetPathTo("Graphics","select course background"),
|
|
|
|
|
THEME->GetPathTo("Graphics","select course top edge"),
|
2002-09-03 22:31:06 +00:00
|
|
|
HELP_TEXT, true, true, TIMER_SECONDS
|
2002-07-11 19:02:26 +00:00
|
|
|
);
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_Menu );
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-08-22 09:31:32 +00:00
|
|
|
m_Banner.SetXY( BANNER_X, BANNER_Y );
|
|
|
|
|
m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_Banner );
|
2002-08-22 09:31:32 +00:00
|
|
|
|
|
|
|
|
m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","select course info frame") );
|
|
|
|
|
m_sprBannerFrame.SetXY( BANNER_FRAME_X, BANNER_FRAME_Y );
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_sprBannerFrame );
|
2002-08-22 09:31:32 +00:00
|
|
|
|
2002-09-03 22:31:06 +00:00
|
|
|
m_textNumSongs.LoadFromFont( THEME->GetPathTo("Fonts","select course num songs") );
|
|
|
|
|
m_textNumSongs.SetXY( STAGES_X, STAGES_Y );
|
|
|
|
|
m_textNumSongs.TurnShadowOff();
|
|
|
|
|
this->AddChild( &m_textNumSongs );
|
2002-08-22 09:31:32 +00:00
|
|
|
|
2002-09-03 22:31:06 +00:00
|
|
|
m_textTime.LoadFromFont( THEME->GetPathTo("Fonts","select course total time") );
|
2002-08-22 09:31:32 +00:00
|
|
|
m_textTime.SetXY( TIME_X, TIME_Y );
|
2002-08-28 22:42:40 +00:00
|
|
|
m_textTime.TurnShadowOff();
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_textTime );
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-08-22 09:31:32 +00:00
|
|
|
m_CourseContentsFrame.SetXY( CONTENTS_X, CONTENTS_Y );
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_CourseContentsFrame );
|
2002-06-14 22:25:22 +00:00
|
|
|
|
|
|
|
|
m_MusicWheel.SetXY( WHEEL_X, WHEEL_Y );
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_MusicWheel );
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-08-22 09:31:32 +00:00
|
|
|
for( int 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 );
|
2002-08-29 20:18:41 +00:00
|
|
|
m_sprHighScoreFrame[p].SetXY( SCORE_X(p), SCORE_Y(p) );
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_sprHighScoreFrame[p] );
|
2002-08-22 09:31:32 +00:00
|
|
|
|
2002-08-29 20:18:41 +00:00
|
|
|
m_HighScore[p].SetXY( SCORE_X(p), SCORE_Y(p) );
|
2002-08-22 09:31:32 +00:00
|
|
|
m_HighScore[p].SetZoom( 0.6f );
|
2002-09-02 21:59:58 +00:00
|
|
|
m_HighScore[p].SetDiffuse( PlayerToColor(p) );
|
|
|
|
|
this->AddChild( &m_HighScore[p] );
|
2002-08-22 09:31:32 +00:00
|
|
|
}
|
|
|
|
|
|
2002-08-13 23:26:46 +00:00
|
|
|
m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","Stage") );
|
2002-06-14 22:25:22 +00:00
|
|
|
m_textHoldForOptions.SetXY( CENTER_X, CENTER_Y );
|
2002-07-27 19:29:51 +00:00
|
|
|
m_textHoldForOptions.SetText( "press START again for options" );
|
2002-06-14 22:25:22 +00:00
|
|
|
m_textHoldForOptions.SetZoom( 1 );
|
|
|
|
|
m_textHoldForOptions.SetZoomY( 0 );
|
2002-09-02 21:59:58 +00:00
|
|
|
m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
|
|
|
|
this->AddChild( &m_textHoldForOptions );
|
2002-06-14 22:25:22 +00:00
|
|
|
|
|
|
|
|
|
2002-08-13 23:26:46 +00:00
|
|
|
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
|
2002-09-02 21:59:58 +00:00
|
|
|
m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music change options") );
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-08-27 23:31:41 +00:00
|
|
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("select course intro") );
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-08-27 16:53:25 +00:00
|
|
|
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","select course music") );
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
UpdateOptionsDisplays();
|
|
|
|
|
|
2002-06-14 22:25:22 +00:00
|
|
|
AfterCourseChange();
|
|
|
|
|
TweenOnScreen();
|
|
|
|
|
m_Menu.TweenOnScreenFromMenu( SM_None );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ScreenSelectCourse::~ScreenSelectCourse()
|
|
|
|
|
{
|
2002-07-31 19:40:40 +00:00
|
|
|
LOG->Trace( "ScreenSelectCourse::~ScreenSelectCourse()" );
|
2002-06-14 22:25:22 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ScreenSelectCourse::DrawPrimitives()
|
|
|
|
|
{
|
|
|
|
|
m_Menu.DrawBottomLayer();
|
|
|
|
|
Screen::DrawPrimitives();
|
|
|
|
|
m_Menu.DrawTopLayer();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ScreenSelectCourse::TweenOnScreen()
|
|
|
|
|
{
|
2002-09-03 22:31:06 +00:00
|
|
|
Actor* pActorsInCourseInfoFrame[] = { &m_sprBannerFrame, &m_Banner, &m_textNumSongs, &m_textTime };
|
2002-08-22 09:31:32 +00:00
|
|
|
const int iNumActorsInGroupInfoFrame = sizeof(pActorsInCourseInfoFrame) / sizeof(Actor*);
|
|
|
|
|
int i;
|
|
|
|
|
for( i=0; i<iNumActorsInGroupInfoFrame; i++ )
|
|
|
|
|
{
|
|
|
|
|
float fOriginalX = pActorsInCourseInfoFrame[i]->GetX();
|
|
|
|
|
pActorsInCourseInfoFrame[i]->SetX( fOriginalX-400 );
|
|
|
|
|
pActorsInCourseInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_END );
|
|
|
|
|
pActorsInCourseInfoFrame[i]->SetTweenX( fOriginalX );
|
|
|
|
|
}
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-08-22 09:31:32 +00:00
|
|
|
m_CourseContentsFrame.SetXY( CONTENTS_X - 400, CONTENTS_Y );
|
2002-09-02 21:59:58 +00:00
|
|
|
m_CourseContentsFrame.BeginTweening( TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
2002-08-22 09:31:32 +00:00
|
|
|
m_CourseContentsFrame.SetTweenXY( CONTENTS_X, CONTENTS_Y );
|
|
|
|
|
|
|
|
|
|
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 );
|
|
|
|
|
}
|
2002-07-27 19:29:51 +00:00
|
|
|
|
2002-06-14 22:25:22 +00:00
|
|
|
m_MusicWheel.TweenOnScreen();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ScreenSelectCourse::TweenOffScreen()
|
|
|
|
|
{
|
2002-09-03 22:31:06 +00:00
|
|
|
Actor* pActorsInCourseInfoFrame[] = { &m_sprBannerFrame, &m_Banner, &m_textNumSongs, &m_textTime };
|
2002-08-22 09:31:32 +00:00
|
|
|
const int iNumActorsInGroupInfoFrame = sizeof(pActorsInCourseInfoFrame) / sizeof(Actor*);
|
|
|
|
|
int i;
|
|
|
|
|
for( i=0; i<iNumActorsInGroupInfoFrame; i++ )
|
|
|
|
|
{
|
2002-09-02 21:59:58 +00:00
|
|
|
pActorsInCourseInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_BEGIN );
|
2002-08-22 09:31:32 +00:00
|
|
|
pActorsInCourseInfoFrame[i]->SetTweenX( pActorsInCourseInfoFrame[i]->GetX()-400 );
|
|
|
|
|
}
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
m_CourseContentsFrame.BeginTweening( TWEEN_TIME, Actor::TWEEN_BOUNCE_BEGIN );
|
2002-08-22 09:31:32 +00:00
|
|
|
m_CourseContentsFrame.SetTweenXY( CONTENTS_X - 400, CONTENTS_Y );
|
|
|
|
|
|
|
|
|
|
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 );
|
|
|
|
|
}
|
2002-07-27 19:29:51 +00:00
|
|
|
|
2002-06-14 22:25:22 +00:00
|
|
|
m_MusicWheel.TweenOffScreen();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ScreenSelectCourse::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
|
|
|
|
{
|
2002-07-31 19:40:40 +00:00
|
|
|
LOG->Trace( "ScreenSelectCourse::Input()" );
|
2002-09-02 21:59:58 +00:00
|
|
|
|
|
|
|
|
if( type == IET_RELEASE ) return; // don't care
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
if( m_Menu.IsClosing() ) return; // ignore
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
if( !GameI.IsValid() ) return; // don't care
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
|
2002-07-27 19:29:51 +00:00
|
|
|
{
|
|
|
|
|
m_bGoToOptions = true;
|
|
|
|
|
m_textHoldForOptions.SetText( "Entering Options..." );
|
2002-08-13 23:26:46 +00:00
|
|
|
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
|
2002-07-27 19:29:51 +00:00
|
|
|
return;
|
|
|
|
|
}
|
2002-09-02 21:59:58 +00:00
|
|
|
|
2002-07-28 20:28:37 +00:00
|
|
|
if( m_bMadeChoice )
|
|
|
|
|
return;
|
|
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( CodeDetector::DetectAndAdjustOptions(GameI.controller) )
|
|
|
|
|
{
|
|
|
|
|
m_soundOptionsChange.Play();
|
|
|
|
|
UpdateOptionsDisplays();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2002-06-14 22:25:22 +00:00
|
|
|
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ScreenSelectCourse::HandleScreenMessage( const ScreenMessage SM )
|
|
|
|
|
{
|
|
|
|
|
Screen::HandleScreenMessage( SM );
|
|
|
|
|
|
|
|
|
|
switch( SM )
|
|
|
|
|
{
|
|
|
|
|
case SM_MenuTimer:
|
|
|
|
|
MenuStart(PLAYER_1);
|
|
|
|
|
break;
|
2002-08-27 23:31:41 +00:00
|
|
|
case SM_GoToPrevScreen:
|
2002-08-27 03:59:22 +00:00
|
|
|
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
2002-06-14 22:25:22 +00:00
|
|
|
break;
|
2002-08-27 23:31:41 +00:00
|
|
|
case SM_GoToNextScreen:
|
2002-06-14 22:25:22 +00:00
|
|
|
|
|
|
|
|
// find out if the Next button is being held down on any of the pads
|
|
|
|
|
bool bIsHoldingNext;
|
|
|
|
|
bIsHoldingNext = false;
|
|
|
|
|
int player;
|
|
|
|
|
for( player=0; player<NUM_PLAYERS; player++ )
|
|
|
|
|
{
|
|
|
|
|
MenuInput mi( (PlayerNumber)player, MENU_BUTTON_START );
|
|
|
|
|
if( INPUTMAPPER->IsButtonDown( mi ) )
|
|
|
|
|
bIsHoldingNext = true;
|
|
|
|
|
}
|
|
|
|
|
|
2002-07-27 19:29:51 +00:00
|
|
|
if( bIsHoldingNext || m_bGoToOptions )
|
2002-08-27 03:59:22 +00:00
|
|
|
SCREENMAN->SetNewScreen( "ScreenPlayerOptions" );
|
2002-06-14 22:25:22 +00:00
|
|
|
else
|
2002-08-27 03:59:22 +00:00
|
|
|
SCREENMAN->SetNewScreen( "ScreenStage" );
|
|
|
|
|
|
2002-06-14 22:25:22 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-04 03:49:08 +00:00
|
|
|
void ScreenSelectCourse::MenuLeft( PlayerNumber pn, const InputEventType type )
|
2002-06-14 22:25:22 +00:00
|
|
|
{
|
|
|
|
|
m_MusicWheel.PrevMusic();
|
|
|
|
|
|
|
|
|
|
AfterCourseChange();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2002-09-04 03:49:08 +00:00
|
|
|
void ScreenSelectCourse::MenuRight( PlayerNumber pn, const InputEventType type )
|
2002-06-14 22:25:22 +00:00
|
|
|
{
|
|
|
|
|
m_MusicWheel.NextMusic();
|
|
|
|
|
|
|
|
|
|
AfterCourseChange();
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-04 03:49:08 +00:00
|
|
|
void ScreenSelectCourse::MenuStart( PlayerNumber pn )
|
2002-06-14 22:25:22 +00:00
|
|
|
{
|
|
|
|
|
// this needs to check whether valid Notes are selected!
|
2002-06-23 11:43:53 +00:00
|
|
|
m_MusicWheel.Select();
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-06-23 11:43:53 +00:00
|
|
|
switch( m_MusicWheel.GetSelectedType() )
|
2002-06-14 22:25:22 +00:00
|
|
|
{
|
2002-06-23 11:43:53 +00:00
|
|
|
case TYPE_COURSE:
|
2002-08-27 23:31:41 +00:00
|
|
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("select course comment general") );
|
2002-06-23 11:43:53 +00:00
|
|
|
|
|
|
|
|
TweenOffScreen();
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
m_soundSelect.Play();
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2002-07-27 19:29:51 +00:00
|
|
|
m_bMadeChoice = true;
|
|
|
|
|
|
2002-06-23 11:43:53 +00:00
|
|
|
// show "hold START for options"
|
2002-09-02 21:59:58 +00:00
|
|
|
m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
|
|
|
|
m_textHoldForOptions.BeginTweening( 0.25f ); // fade in
|
2002-06-23 11:43:53 +00:00
|
|
|
m_textHoldForOptions.SetTweenZoomY( 1 );
|
2002-09-02 21:59:58 +00:00
|
|
|
m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
|
|
|
|
m_textHoldForOptions.BeginTweening( 2.0f ); // sleep
|
|
|
|
|
m_textHoldForOptions.BeginTweening( 0.25f ); // fade out
|
|
|
|
|
m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
2002-06-23 11:43:53 +00:00
|
|
|
m_textHoldForOptions.SetTweenZoomY( 0 );
|
2002-06-23 02:50:33 +00:00
|
|
|
|
2002-06-23 11:43:53 +00:00
|
|
|
m_Menu.TweenOffScreenToBlack( SM_None, false );
|
2002-06-23 02:50:33 +00:00
|
|
|
|
2002-07-28 20:28:37 +00:00
|
|
|
Course* pCourse = m_MusicWheel.GetSelectedCourse();
|
|
|
|
|
GAMESTATE->m_pCurCourse = pCourse;
|
|
|
|
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
|
|
|
|
pCourse->GetPlayerOptions( &GAMESTATE->m_PlayerOptions[p] );
|
|
|
|
|
pCourse->GetSongOptions( &GAMESTATE->m_SongOptions );
|
2002-07-04 21:05:18 +00:00
|
|
|
|
2002-08-22 09:31:32 +00:00
|
|
|
m_Menu.StopTimer();
|
|
|
|
|
|
2002-08-27 23:31:41 +00:00
|
|
|
this->SendScreenMessage( SM_GoToNextScreen, 2.5f );
|
2002-06-23 11:43:53 +00:00
|
|
|
|
|
|
|
|
break;
|
2002-06-14 22:25:22 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2002-09-04 03:49:08 +00:00
|
|
|
void ScreenSelectCourse::MenuBack( PlayerNumber pn )
|
2002-06-14 22:25:22 +00:00
|
|
|
{
|
|
|
|
|
MUSIC->Stop();
|
|
|
|
|
|
2002-08-27 23:31:41 +00:00
|
|
|
m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true );
|
2002-06-14 22:25:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ScreenSelectCourse::AfterCourseChange()
|
|
|
|
|
{
|
|
|
|
|
switch( m_MusicWheel.GetSelectedType() )
|
|
|
|
|
{
|
|
|
|
|
case TYPE_COURSE:
|
|
|
|
|
{
|
|
|
|
|
Course* pCourse = m_MusicWheel.GetSelectedCourse();
|
2002-08-22 09:31:32 +00:00
|
|
|
|
2002-09-03 22:31:06 +00:00
|
|
|
m_textNumSongs.SetText( ssprintf("%d", pCourse->m_iStages) );
|
2002-08-22 09:31:32 +00:00
|
|
|
float fTotalSeconds = 0;
|
|
|
|
|
for( int i=0; i<pCourse->m_iStages; i++ )
|
|
|
|
|
fTotalSeconds += pCourse->m_apSongs[i]->m_fMusicLengthSeconds;
|
|
|
|
|
m_textTime.SetText( SecondsToTime(fTotalSeconds) );
|
|
|
|
|
|
|
|
|
|
m_Banner.SetFromCourse( pCourse );
|
|
|
|
|
|
2002-06-14 22:25:22 +00:00
|
|
|
m_CourseContentsFrame.SetFromCourse( pCourse );
|
|
|
|
|
}
|
|
|
|
|
break;
|
2002-08-22 09:31:32 +00:00
|
|
|
case TYPE_SECTION: // if we get here, there are no courses
|
2002-07-27 19:29:51 +00:00
|
|
|
break;
|
2002-06-14 22:25:22 +00:00
|
|
|
default:
|
|
|
|
|
ASSERT(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
void ScreenSelectCourse::UpdateOptionsDisplays()
|
|
|
|
|
{
|
|
|
|
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
|
|
|
|
{
|
|
|
|
|
if( GAMESTATE->IsPlayerEnabled(p) )
|
|
|
|
|
{
|
|
|
|
|
CString s = GAMESTATE->m_PlayerOptions[p].GetString();
|
|
|
|
|
s.Replace( ", ", "\n" );
|
|
|
|
|
// m_textPlayerOptions[p].SetText( s );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CString s = GAMESTATE->m_SongOptions.GetString();
|
|
|
|
|
s.Replace( ", ", "\n" );
|
|
|
|
|
// m_textSongOptions.SetText( s );
|
|
|
|
|
}
|