Files
itgmania212121/stepmania/src/ScreenSelectMusic.cpp
T

958 lines
28 KiB
C++
Raw Normal View History

2003-02-16 04:01:45 +00:00
#include "global.h"
2002-05-20 08:59:37 +00:00
/*
-----------------------------------------------------------------------------
2002-06-14 22:25:22 +00:00
Class: ScreenSelectMusic
2002-05-20 08:59:37 +00:00
2002-06-14 22:25:22 +00:00
Desc: See header.
2002-05-20 08:59:37 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-06-14 22:25:22 +00:00
Chris Danford
2002-05-20 08:59:37 +00:00
-----------------------------------------------------------------------------
*/
#include "ScreenSelectMusic.h"
#include "ScreenManager.h"
#include "PrefsManager.h"
#include "SongManager.h"
#include "GameManager.h"
2003-01-02 07:54:28 +00:00
#include "RageSoundManager.h"
2002-05-20 08:59:37 +00:00
#include "GameConstantsAndTypes.h"
2002-07-23 01:41:40 +00:00
#include "PrefsManager.h"
2002-05-20 08:59:37 +00:00
#include "RageLog.h"
#include "InputMapper.h"
#include "InputQueue.h"
#include "AnnouncerManager.h"
2002-07-23 01:41:40 +00:00
#include "InputMapper.h"
#include "GameState.h"
#include "CodeDetector.h"
#include <math.h>
#include "GameConstantsAndTypes.h"
#include "ThemeManager.h"
#include "Notes.h"
2003-04-13 21:17:14 +00:00
#include "ActorUtil.h"
#include "RageDisplay.h"
#include "RageTextureManager.h"
2003-04-13 21:17:14 +00:00
const int NUM_SCORE_DIGITS = 9;
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectMusic","BannerWidth")
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectMusic","BannerHeight")
#define SONG_OPTIONS_EXTRA_COMMAND THEME->GetMetric ("ScreenSelectMusic","SongOptionsExtraCommand")
#define SAMPLE_MUSIC_DELAY THEME->GetMetricF("ScreenSelectMusic","SampleMusicDelay")
2003-04-22 08:43:12 +00:00
#define SHOW_RADAR THEME->GetMetricB("ScreenSelectMusic","ShowRadar")
#define SHOW_GRAPH THEME->GetMetricB("ScreenSelectMusic","ShowGraph")
2002-05-20 08:59:37 +00:00
2003-02-17 00:39:33 +00:00
static const ScreenMessage SM_AllowOptionsMenuRepeat = ScreenMessage(SM_User+1);
2002-05-20 08:59:37 +00:00
/* We make a backface for the CDTitle by rotating it on Y and mirroring it
* on Y by flipping texture coordinates. */
static void FlipSpriteHorizontally(Sprite &s)
{
float Coords[8];
s.GetCurrentTextureCoords(Coords);
swap(Coords[0], Coords[6]); /* top left X <-> top right X */
swap(Coords[1], Coords[7]); /* top left Y <-> top right Y */
swap(Coords[2], Coords[4]); /* bottom left X <-> bottom left X */
swap(Coords[3], Coords[5]); /* bottom left Y <-> bottom left Y */
s.SetCustomTextureCoords(Coords);
}
2002-05-20 08:59:37 +00:00
2003-04-12 06:16:12 +00:00
ScreenSelectMusic::ScreenSelectMusic() : Screen("ScreenSelectMusic")
2002-05-20 08:59:37 +00:00
{
LOG->Trace( "ScreenSelectMusic::ScreenSelectMusic()" );
2002-05-20 08:59:37 +00:00
if( GAMESTATE->m_CurStyle == STYLE_INVALID )
RageException::Throw( "The Style has not been set. A theme must set the Style before loading ScreenSelectMusic." );
if( GAMESTATE->m_PlayMode == PLAY_MODE_INVALID )
RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before loading ScreenSelectMusic." );
CodeDetector::RefreshCacheItems();
2002-05-20 08:59:37 +00:00
int p;
2003-03-09 00:55:49 +00:00
m_Menu.Load( "ScreenSelectMusic" );
this->AddChild( &m_Menu );
2002-05-20 08:59:37 +00:00
2003-05-02 20:36:26 +00:00
m_MusicWheel.SetName( "Wheel" );
this->AddChild( &m_MusicWheel );
m_sprBannerMask.SetName( "Banner" ); // use the same metrics and animation as Banner
m_sprBannerMask.Load( THEME->GetPathToG("ScreenSelectMusic banner mask") );
m_sprBannerMask.SetBlendMode( BLEND_NO_EFFECT ); // don't draw to color buffer
m_sprBannerMask.SetUseZBuffer( true ); // do draw to the zbuffer
m_sprBannerMask.SetZ( m_sprBannerMask.GetZ()+0.05f );
this->AddChild( &m_sprBannerMask );
2003-04-13 21:17:14 +00:00
// this is loaded SetSong and TweenToSong
m_Banner.SetName( "Banner" );
m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
m_Banner.SetUseZBuffer( true ); // do have to pass the z test
this->AddChild( &m_Banner );
2003-04-13 21:17:14 +00:00
m_sprBannerFrame.SetName( "BannerFrame" );
m_sprBannerFrame.Load( THEME->GetPathToG("ScreenSelectMusic banner frame") );
this->AddChild( &m_sprBannerFrame );
2003-04-13 21:17:14 +00:00
m_BPMDisplay.SetName( "BPM" );
this->AddChild( &m_BPMDisplay );
2003-04-13 21:17:14 +00:00
m_sprStage.SetName( "Stage" );
m_sprStage.Load( THEME->GetPathToG("ScreenSelectMusic stage "+GAMESTATE->GetStageText()) );
this->AddChild( &m_sprStage );
m_sprCDTitleFront.SetName( "CDTitle" );
m_sprCDTitleFront.Load( THEME->GetPathToG("ScreenSelectMusic fallback cdtitle") );
m_sprCDTitleFront.SetUseBackfaceCull(true);
m_sprCDTitleFront.SetDiffuse( RageColor(1,1,1,1) );
m_sprCDTitleFront.SetEffectSpin( RageVector3(0, 90, 0) );
this->AddChild( &m_sprCDTitleFront );
m_sprCDTitleBack.SetName( "CDTitle" );
m_sprCDTitleBack.Load( THEME->GetPathToG("ScreenSelectMusic fallback cdtitle") );
FlipSpriteHorizontally(m_sprCDTitleBack);
m_sprCDTitleBack.SetUseBackfaceCull(true);
m_sprCDTitleBack.SetDiffuse( RageColor(0.2f,0.2f,0.2f,1) );
m_sprCDTitleBack.SetRotationY( 180 );
m_sprCDTitleBack.SetEffectSpin( RageVector3(0, 90, 0) );
this->AddChild( &m_sprCDTitleBack );
2003-04-13 21:17:14 +00:00
m_GrooveRadar.SetName( "Radar" );
2003-04-22 08:43:12 +00:00
if( SHOW_RADAR )
this->AddChild( &m_GrooveRadar );
m_GrooveGraph.SetName( "Graph" );
if( SHOW_GRAPH )
this->AddChild( &m_GrooveGraph );
2003-04-13 21:17:14 +00:00
m_textSongOptions.SetName( "SongOptions" );
m_textSongOptions.LoadFromFont( THEME->GetPathToF("Common normal") );
this->AddChild( &m_textSongOptions );
2002-05-20 08:59:37 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
2003-04-07 21:24:14 +00:00
if( !GAMESTATE->IsHumanPlayer(p) )
2002-09-03 06:33:08 +00:00
continue; // skip
2003-04-13 21:17:14 +00:00
m_sprDifficultyFrame[p].SetName( ssprintf("DifficultyFrameP%d",p+1) );
m_sprDifficultyFrame[p].Load( THEME->GetPathToG("ScreenSelectMusic difficulty frame 2x1") );
2002-09-03 06:33:08 +00:00
m_sprDifficultyFrame[p].StopAnimating();
m_sprDifficultyFrame[p].SetState( p );
this->AddChild( &m_sprDifficultyFrame[p] );
2003-04-13 21:17:14 +00:00
m_DifficultyIcon[p].SetName( ssprintf("DifficultyIconP%d",p+1) );
2003-05-09 06:04:50 +00:00
m_DifficultyIcon[p].Load( THEME->GetPathToG("ScreenSelectMusic difficulty icons 1x5") );
this->AddChild( &m_DifficultyIcon[p] );
2003-04-13 21:17:14 +00:00
m_AutoGenIcon[p].SetName( ssprintf("AutogenIconP%d",p+1) );
m_AutoGenIcon[p].Load( THEME->GetPathToG("ScreenSelectMusic autogen") );
this->AddChild( &m_AutoGenIcon[p] );
2002-05-20 08:59:37 +00:00
2003-04-13 21:17:14 +00:00
m_OptionIconRow[p].SetName( ssprintf("OptionIconsP%d",p+1) );
2002-09-03 06:33:08 +00:00
m_OptionIconRow[p].Refresh( (PlayerNumber)p );
this->AddChild( &m_OptionIconRow[p] );
2003-04-13 21:17:14 +00:00
m_sprMeterFrame[p].SetName( ssprintf("MeterFrameP%d",p+1) );
m_sprMeterFrame[p].Load( THEME->GetPathToG("ScreenSelectMusic meter frame") );
2002-09-03 06:33:08 +00:00
m_sprMeterFrame[p].StopAnimating();
m_sprMeterFrame[p].SetState( p );
this->AddChild( &m_sprMeterFrame[p] );
2003-04-13 21:17:14 +00:00
m_DifficultyMeter[p].SetName( ssprintf("MeterP%d",p+1) );
2003-03-09 00:55:49 +00:00
m_DifficultyMeter[p].SetShadowLength( 2 );
this->AddChild( &m_DifficultyMeter[p] );
2003-04-13 21:17:14 +00:00
m_sprHighScoreFrame[p].SetName( ssprintf("ScoreFrameP%d",p+1) );
m_sprHighScoreFrame[p].Load( THEME->GetPathToG("ScreenSelectMusic score frame 1x2") );
m_sprHighScoreFrame[p].StopAnimating();
m_sprHighScoreFrame[p].SetState( p );
this->AddChild( &m_sprHighScoreFrame[p] );
2003-04-13 21:17:14 +00:00
m_textHighScore[p].SetName( ssprintf("ScoreP%d",p+1) );
m_textHighScore[p].LoadFromNumbers( THEME->GetPathToN("ScreenSelectMusic score") );
m_textHighScore[p].EnableShadow( false );
m_textHighScore[p].SetDiffuse( PlayerToColor(p) );
this->AddChild( &m_textHighScore[p] );
}
2003-04-13 21:17:14 +00:00
m_MusicSortDisplay.SetName( "SortIcon" );
m_MusicSortDisplay.Set( GAMESTATE->m_SongSortOrder );
this->AddChild( &m_MusicSortDisplay );
2003-04-21 22:26:07 +00:00
m_sprBalloon.SetName( "Balloon" );
TEXTUREMAN->CacheTexture( THEME->GetPathToG("ScreenSelectMusic balloon long") );
TEXTUREMAN->CacheTexture( THEME->GetPathToG("ScreenSelectMusic balloon marathon") );
this->AddChild( &m_sprBalloon );
2003-04-13 21:17:14 +00:00
m_sprOptionsMessage.SetName( "OptionsMessage" );
m_sprOptionsMessage.Load( THEME->GetPathToG("ScreenSelectMusic options message 1x2") );
m_sprOptionsMessage.StopAnimating();
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) ); // invisible
//this->AddChild( &m_sprOptionsMessage ); // we have to draw this manually over the top of transitions
2002-05-20 08:59:37 +00:00
m_soundSelect.Load( THEME->GetPathToS("Common start") );
m_soundChangeNotes.Load( THEME->GetPathToS("ScreenSelectMusic difficulty") );
m_soundOptionsChange.Load( THEME->GetPathToS("ScreenSelectMusic options") );
m_soundLocked.Load( THEME->GetPathToS("ScreenSelectMusic locked") );
2002-05-20 08:59:37 +00:00
2003-01-02 08:13:34 +00:00
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select music intro") );
2002-05-20 08:59:37 +00:00
2002-06-14 22:25:22 +00:00
m_bMadeChoice = false;
m_bGoToOptions = false;
2002-10-06 16:56:58 +00:00
m_fPlaySampleCountdown = 0;
m_bAllowOptionsMenu = m_bAllowOptionsMenuRepeat = false;
2002-05-20 08:59:37 +00:00
UpdateOptionsDisplays();
2002-05-20 08:59:37 +00:00
AfterMusicChange();
TweenOnScreen();
}
ScreenSelectMusic::~ScreenSelectMusic()
{
LOG->Trace( "ScreenSelectMusic::~ScreenSelectMusic()" );
2002-05-20 08:59:37 +00:00
}
void ScreenSelectMusic::DrawPrimitives()
{
DISPLAY->LoadMenuPerspective(90);
2002-05-20 08:59:37 +00:00
m_Menu.DrawBottomLayer();
Screen::DrawPrimitives();
m_Menu.DrawTopLayer();
m_sprOptionsMessage.Draw();
DISPLAY->LoadMenuPerspective(0);
2002-05-20 08:59:37 +00:00
}
void ScreenSelectMusic::TweenOnScreen()
{
SET_XY_AND_ON_COMMAND( m_sprBannerMask );
2003-04-13 21:17:14 +00:00
SET_XY_AND_ON_COMMAND( m_Banner );
SET_XY_AND_ON_COMMAND( m_sprBannerFrame );
2003-04-13 21:17:14 +00:00
SET_XY_AND_ON_COMMAND( m_BPMDisplay );
SET_XY_AND_ON_COMMAND( m_sprStage );
SET_XY_AND_ON_COMMAND( m_sprCDTitleFront );
SET_XY_AND_ON_COMMAND( m_sprCDTitleBack );
m_GrooveRadar.TweenOnScreen();
2003-04-13 21:17:14 +00:00
SET_XY_AND_ON_COMMAND( m_GrooveRadar );
2003-04-22 08:43:12 +00:00
m_GrooveGraph.TweenOnScreen();
SET_XY_AND_ON_COMMAND( m_GrooveGraph );
2003-04-13 21:17:14 +00:00
SET_XY_AND_ON_COMMAND( m_textSongOptions );
SET_XY_AND_ON_COMMAND( m_MusicSortDisplay );
m_MusicWheel.TweenOnScreen();
2003-04-13 21:17:14 +00:00
SET_XY_AND_ON_COMMAND( m_MusicWheel );
for( int p=0; p<NUM_PLAYERS; p++ )
{
2003-04-13 21:17:14 +00:00
if( !GAMESTATE->IsHumanPlayer(p) )
continue; // skip
SET_XY_AND_ON_COMMAND( m_sprDifficultyFrame[p] );
SET_XY_AND_ON_COMMAND( m_sprMeterFrame[p] );
SET_XY_AND_ON_COMMAND( m_OptionIconRow[p] );
SET_XY_AND_ON_COMMAND( m_DifficultyIcon[p] );
SET_XY_AND_ON_COMMAND( m_AutoGenIcon[p] );
SET_XY_AND_ON_COMMAND( m_DifficultyMeter[p] );
SET_XY_AND_ON_COMMAND( m_sprHighScoreFrame[p] );
SET_XY_AND_ON_COMMAND( m_textHighScore[p] );
}
2002-05-20 08:59:37 +00:00
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_textSongOptions.Command( SONG_OPTIONS_EXTRA_COMMAND );
}
2002-05-20 08:59:37 +00:00
void ScreenSelectMusic::TweenOffScreen()
{
OFF_COMMAND( m_sprBannerMask );
2003-04-13 21:17:14 +00:00
OFF_COMMAND( m_Banner );
OFF_COMMAND( m_sprBannerFrame );
2003-04-13 21:17:14 +00:00
OFF_COMMAND( m_BPMDisplay );
OFF_COMMAND( m_sprStage );
OFF_COMMAND( m_sprCDTitleFront );
OFF_COMMAND( m_sprCDTitleBack );
2002-05-20 08:59:37 +00:00
m_GrooveRadar.TweenOffScreen();
2003-04-13 21:17:14 +00:00
OFF_COMMAND( m_GrooveRadar );
2003-04-22 08:43:12 +00:00
m_GrooveGraph.TweenOffScreen();
OFF_COMMAND( m_GrooveGraph );
2003-04-13 21:17:14 +00:00
OFF_COMMAND( m_textSongOptions );
OFF_COMMAND( m_MusicSortDisplay );
2002-05-20 08:59:37 +00:00
m_MusicWheel.TweenOffScreen();
2003-04-13 21:17:14 +00:00
OFF_COMMAND( m_MusicWheel );
2003-04-21 23:43:51 +00:00
OFF_COMMAND( m_sprBalloon );
for( int p=0; p<NUM_PLAYERS; p++ )
{
2003-04-13 21:17:14 +00:00
if( !GAMESTATE->IsHumanPlayer(p) )
continue; // skip
OFF_COMMAND( m_sprDifficultyFrame[p] );
OFF_COMMAND( m_sprMeterFrame[p] );
OFF_COMMAND( m_OptionIconRow[p] );
OFF_COMMAND( m_DifficultyIcon[p] );
OFF_COMMAND( m_AutoGenIcon[p] );
OFF_COMMAND( m_DifficultyMeter[p] );
OFF_COMMAND( m_sprHighScoreFrame[p] );
OFF_COMMAND( m_textHighScore[p] );
}
2002-05-20 08:59:37 +00:00
}
2002-08-28 22:42:40 +00:00
void ScreenSelectMusic::TweenScoreOnAndOffAfterChangeSort()
{
2003-01-16 05:09:13 +00:00
/* XXX metric this with MusicWheel::TweenOnScreen */
float factor = 0.25f;
2003-01-03 05:56:28 +00:00
vector<Actor*> apActorsInScore;
2002-08-28 22:42:40 +00:00
for( int p=0; p<NUM_PLAYERS; p++ )
{
2002-10-31 04:23:39 +00:00
apActorsInScore.push_back( &m_sprHighScoreFrame[p] );
apActorsInScore.push_back( &m_textHighScore[p] );
2002-08-28 22:42:40 +00:00
}
for( unsigned i=0; i<apActorsInScore.size(); i++ )
2002-08-28 22:42:40 +00:00
{
2003-01-16 05:09:13 +00:00
/* Grab the tween destination. (If we're tweening, this is where
* it'll end up; otherwise it's the static position.) */
2003-03-02 01:43:33 +00:00
Actor::TweenState original = apActorsInScore[i]->DestTweenState();
2003-01-16 05:09:13 +00:00
apActorsInScore[i]->StopTweening();
2002-08-29 20:18:41 +00:00
float fOriginalX = apActorsInScore[i]->GetX();
2003-03-25 01:39:01 +00:00
apActorsInScore[i]->BeginTweening( factor*0.5f, TWEEN_DECELERATE ); // tween off screen
2003-04-12 06:16:12 +00:00
apActorsInScore[i]->SetX( fOriginalX+400 );
2002-08-28 22:42:40 +00:00
2003-01-16 05:09:13 +00:00
apActorsInScore[i]->BeginTweening( factor*0.5f ); // sleep
2002-08-28 22:42:40 +00:00
2003-01-16 05:09:13 +00:00
/* Go back to where we were (or to where we were going.) */
2003-03-02 01:43:33 +00:00
apActorsInScore[i]->BeginTweening( factor*1, TWEEN_ACCELERATE ); // tween back on screen
apActorsInScore[i]->SetLatestTween(original);
2002-08-28 22:42:40 +00:00
}
}
void ScreenSelectMusic::Update( float fDeltaTime )
{
Screen::Update( fDeltaTime );
m_sprOptionsMessage.Update( fDeltaTime );
2002-10-06 16:56:58 +00:00
if( m_fPlaySampleCountdown > 0 )
{
m_fPlaySampleCountdown -= fDeltaTime;
2003-01-02 03:00:53 +00:00
/* Make sure we don't start the sample when rouletting is
* spinning down. */
if( m_fPlaySampleCountdown <= 0 && !m_MusicWheel.IsRouletting() )
{
if( !m_sSampleMusicToPlay.empty() )
{
SOUNDMAN->PlayMusic(
m_sSampleMusicToPlay,
true,
m_fSampleStartSeconds,
m_fSampleLengthSeconds,
1.5f); /* fade out for 1.5 seconds */
}
}
2002-10-06 16:56:58 +00:00
}
}
2003-01-02 03:00:53 +00:00
void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
2002-05-20 08:59:37 +00:00
{
2003-02-25 00:33:42 +00:00
// LOG->Trace( "ScreenSelectMusic::Input()" );
2003-02-11 23:52:18 +00:00
if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F9 )
{
if( type != IET_FIRST_PRESS ) return;
2003-05-20 04:41:47 +00:00
PREFSMAN->m_bShowNative ^= 1;
2003-03-31 23:06:15 +00:00
m_MusicWheel.RebuildMusicWheelItems();
2003-02-11 23:52:18 +00:00
return;
}
2003-01-02 03:00:53 +00:00
if( MenuI.button == MENU_BUTTON_RIGHT || MenuI.button == MENU_BUTTON_LEFT )
{
if( !MenuI.IsValid() ) return;
2003-04-07 21:24:14 +00:00
if( !GAMESTATE->IsHumanPlayer(MenuI.player) ) return;
2003-01-02 03:00:53 +00:00
/* If we're rouletting, hands off. */
if(m_MusicWheel.IsRouletting())
return;
int dir = 0;
if(INPUTMAPPER->IsButtonDown( MenuInput(MenuI.player, MENU_BUTTON_RIGHT) ) )
dir++;
if(INPUTMAPPER->IsButtonDown( MenuInput(MenuI.player, MENU_BUTTON_LEFT) ) )
dir--;
m_MusicWheel.Move(dir);
return;
}
if( type == IET_RELEASE ) return; // don't care
2002-05-20 08:59:37 +00:00
if( !GameI.IsValid() ) return; // don't care
2002-05-20 08:59:37 +00:00
if( m_bMadeChoice && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
2002-06-14 22:25:22 +00:00
{
if(m_bGoToOptions) return; /* got it already */
if(!m_bAllowOptionsMenu) return; /* not allowed */
if( !m_bAllowOptionsMenuRepeat &&
(type == IET_SLOW_REPEAT || type == IET_FAST_REPEAT ))
return; /* not allowed yet */
2002-06-14 22:25:22 +00:00
m_bGoToOptions = true;
m_sprOptionsMessage.SetState( 1 );
SOUNDMAN->PlayOnce( THEME->GetPathToS("Common start") );
2002-06-14 22:25:22 +00:00
return;
}
2003-03-09 00:55:49 +00:00
if( m_Menu.IsTransitioning() ) return; // ignore
2002-06-14 22:25:22 +00:00
if( m_bMadeChoice )
2002-05-20 08:59:37 +00:00
return;
PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller );
if( CodeDetector::EnteredEasierDifficulty(GameI.controller) )
2002-05-20 08:59:37 +00:00
{
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_soundLocked.Play();
else
EasierDifficulty( pn );
2002-05-20 08:59:37 +00:00
return;
}
if( CodeDetector::EnteredHarderDifficulty(GameI.controller) )
2002-05-20 08:59:37 +00:00
{
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_soundLocked.Play();
else
HarderDifficulty( pn );
2002-05-20 08:59:37 +00:00
return;
}
if( CodeDetector::EnteredNextSort(GameI.controller) )
2002-08-20 21:00:56 +00:00
{
if( ( GAMESTATE->IsExtraStage() && !PREFSMAN->m_bPickExtraStage ) || GAMESTATE->IsExtraStage2() )
2002-08-20 21:00:56 +00:00
m_soundLocked.Play();
else
if( m_MusicWheel.NextSort() )
{
2003-01-21 02:16:40 +00:00
SOUNDMAN->StopMusic();
2002-08-28 22:42:40 +00:00
2002-10-07 07:16:40 +00:00
// m_MusicSortDisplay.FadeOff( 0, "fade", TWEEN_TIME );
2002-08-28 22:42:40 +00:00
TweenScoreOnAndOffAfterChangeSort();
2002-08-20 21:00:56 +00:00
}
return;
}
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() && CodeDetector::DetectAndAdjustMusicOptions(GameI.controller) )
{
m_soundOptionsChange.Play();
UpdateOptionsDisplays();
return;
}
2002-05-20 08:59:37 +00:00
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
}
void ScreenSelectMusic::EasierDifficulty( PlayerNumber pn )
2002-05-20 08:59:37 +00:00
{
LOG->Trace( "ScreenSelectMusic::EasierDifficulty( %d )", pn );
2002-05-20 08:59:37 +00:00
2003-04-07 21:24:14 +00:00
if( !GAMESTATE->IsHumanPlayer(pn) )
2002-05-20 08:59:37 +00:00
return;
if( m_arrayNotes[pn].empty() )
2002-05-20 08:59:37 +00:00
return;
if( m_iSelection[pn] == 0 )
2002-05-20 08:59:37 +00:00
return;
m_iSelection[pn]--;
// the user explicity switched difficulties. Update the preferred difficulty
2003-01-02 22:10:51 +00:00
GAMESTATE->m_PreferredDifficulty[pn] = m_arrayNotes[pn][ m_iSelection[pn] ]->GetDifficulty();
m_soundChangeNotes.Play();
2002-05-20 08:59:37 +00:00
AfterNotesChange( pn );
2002-05-20 08:59:37 +00:00
}
void ScreenSelectMusic::HarderDifficulty( PlayerNumber pn )
2002-05-20 08:59:37 +00:00
{
LOG->Trace( "ScreenSelectMusic::HarderDifficulty( %d )", pn );
2002-05-20 08:59:37 +00:00
2003-04-07 21:24:14 +00:00
if( !GAMESTATE->IsHumanPlayer(pn) )
2002-05-20 08:59:37 +00:00
return;
if( m_arrayNotes[pn].empty() )
2002-05-20 08:59:37 +00:00
return;
if( m_iSelection[pn] == int(m_arrayNotes[pn].size()-1) )
2002-05-20 08:59:37 +00:00
return;
m_iSelection[pn]++;
// the user explicity switched difficulties. Update the preferred difficulty
2003-01-02 22:10:51 +00:00
GAMESTATE->m_PreferredDifficulty[pn] = m_arrayNotes[pn][ m_iSelection[pn] ]->GetDifficulty();
m_soundChangeNotes.Play();
2002-05-20 08:59:37 +00:00
AfterNotesChange( pn );
2002-05-20 08:59:37 +00:00
}
/* Adjust game options. These settings may be overridden again later by the
* SongOptions menu. */
void ScreenSelectMusic::AdjustOptions()
{
/* Find the easiest difficulty notes selected by either player. */
Difficulty dc = DIFFICULTY_INVALID;
for( int p=0; p<NUM_PLAYERS; p++ )
{
2003-04-07 21:24:14 +00:00
if( !GAMESTATE->IsHumanPlayer(p) )
continue; // skip
dc = min(dc, GAMESTATE->m_pCurNotes[p]->GetDifficulty());
}
2003-03-31 17:41:55 +00:00
/* This can still interfere a bit with the song options menu; eg. if a
* player changes to a mode easier than the preference setting, we might
* reset it to the preference later. XXX */
2003-04-01 20:10:35 +00:00
/* Never set the FailType harder than the preference. */
SongOptions::FailType ft = SongOptions::FAIL_ARCADE;
2003-03-31 17:41:55 +00:00
/* Easy and beginner are never harder than FAIL_END_OF_SONG. */
if(dc <= DIFFICULTY_EASY)
2003-04-01 20:10:35 +00:00
ft = SongOptions::FAIL_END_OF_SONG;
2003-03-31 17:41:55 +00:00
/* If beginner's steps were chosen, and this is the first stage,
* turn off failure completely--always give a second try. */
if(dc == DIFFICULTY_BEGINNER &&
2003-04-19 19:05:25 +00:00
PREFSMAN->m_bEventMode && /* stage index is meaningless in event mode */
2003-03-31 17:41:55 +00:00
GAMESTATE->m_iCurrentStageIndex == 0)
2003-04-01 20:10:35 +00:00
ft = SongOptions::FAIL_OFF;
// Redundant. -Chris
// else if(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2())
// {
// /* Extra stage. We need to make sure we undo any changes above from
// * previous rounds; eg. where one player is on beginner and the other
// * is on hard, we've changed the fail mode in previous rounds and we
// * want to reset it for the extra stage.
// *
// * Besides, extra stage should probably always be FAIL_ARCADE anyway,
// * unless the extra stage course says otherwise. */
// ft = SongOptions::FAIL_ARCADE;
// }
GAMESTATE->m_SongOptions.m_FailType = max( ft, GAMESTATE->m_SongOptions.m_FailType );
}
2002-05-20 08:59:37 +00:00
void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
{
Screen::HandleScreenMessage( SM );
switch( SM )
{
case SM_AllowOptionsMenuRepeat:
m_bAllowOptionsMenuRepeat = true;
break;
2002-05-27 08:23:27 +00:00
case SM_MenuTimer:
2002-08-20 21:00:56 +00:00
if( m_MusicWheel.IsRouletting() )
{
MenuStart(PLAYER_INVALID);
2003-03-11 21:33:11 +00:00
m_Menu.m_MenuTimer.SetSeconds( 15 );
2002-08-20 21:00:56 +00:00
}
else if( m_MusicWheel.GetSelectedType() != TYPE_SONG )
{
m_MusicWheel.StartRoulette();
2003-03-11 21:33:11 +00:00
m_Menu.m_MenuTimer.SetSeconds( 15 );
2002-08-20 21:00:56 +00:00
}
else
{
MenuStart(PLAYER_INVALID);
}
2002-05-27 08:23:27 +00:00
break;
case SM_GoToPrevScreen:
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
/* We may have stray SM_SongChanged messages from the music wheel. We can't
* handle them anymore, since the title menu (and attract screens) reset
* the game state, so just discard them. */
ClearMessageQueue();
2002-05-20 08:59:37 +00:00
break;
case SM_GoToNextScreen:
if( m_bGoToOptions )
2002-05-20 08:59:37 +00:00
{
SCREENMAN->SetNewScreen( "ScreenPlayerOptions" );
2002-05-20 08:59:37 +00:00
}
else
{
2003-01-21 02:16:40 +00:00
SOUNDMAN->StopMusic();
SCREENMAN->SetNewScreen( "ScreenStage" );
2002-05-20 08:59:37 +00:00
}
break;
2002-06-30 23:19:33 +00:00
case SM_SongChanged:
AfterMusicChange();
break;
2002-08-20 21:00:56 +00:00
case SM_SortOrderChanged:
SortOrderChanged();
break;
2002-05-20 08:59:37 +00:00
}
}
void ScreenSelectMusic::MenuStart( PlayerNumber pn )
2002-05-20 08:59:37 +00:00
{
if( pn != PLAYER_INVALID &&
INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_LEFT) ) &&
INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_RIGHT) ) )
2002-07-23 01:41:40 +00:00
{
2003-02-11 21:25:59 +00:00
// if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
// m_soundLocked.Play();
// else
{
2002-08-20 21:00:56 +00:00
if( m_MusicWheel.NextSort() )
{
2003-01-21 02:16:40 +00:00
SOUNDMAN->StopMusic();
2002-10-07 07:16:40 +00:00
// m_MusicSortDisplay.FadeOff( 0, "fade", TWEEN_TIME );
2002-08-28 22:42:40 +00:00
TweenScoreOnAndOffAfterChangeSort();
2002-08-20 21:00:56 +00:00
}
}
2002-07-23 01:41:40 +00:00
return;
}
2002-05-20 08:59:37 +00:00
// this needs to check whether valid Notes are selected!
2002-06-24 22:04:31 +00:00
bool bResult = m_MusicWheel.Select();
2002-05-20 08:59:37 +00:00
2003-01-02 23:20:18 +00:00
/* If false, we don't have a selection just yet. */
2002-08-20 21:00:56 +00:00
if( !bResult )
2002-09-07 09:37:27 +00:00
return;
// a song was selected
switch( m_MusicWheel.GetSelectedType() )
2002-05-20 08:59:37 +00:00
{
2002-09-07 09:37:27 +00:00
case TYPE_SONG: {
if( !m_MusicWheel.GetSelectedSong()->HasMusic() )
2002-05-20 08:59:37 +00:00
{
2002-09-07 09:37:27 +00:00
/* TODO: gray these out.
*
* XXX: also, make sure they're not selected by roulette */
SCREENMAN->Prompt( SM_None, "ERROR:\n \nThis song does not have a music file\n and cannot be played." );
return;
}
2002-06-23 11:43:53 +00:00
2002-09-07 09:37:27 +00:00
bool bIsNew = m_MusicWheel.GetSelectedSong()->IsNew();
bool bIsHard = false;
for( int p=0; p<NUM_PLAYERS; p++ )
{
2003-04-07 21:24:14 +00:00
if( !GAMESTATE->IsHumanPlayer( (PlayerNumber)p ) )
2002-09-07 09:37:27 +00:00
continue; // skip
2003-01-02 22:10:51 +00:00
if( GAMESTATE->m_pCurNotes[p] && GAMESTATE->m_pCurNotes[p]->GetMeter() >= 10 )
2002-09-07 09:37:27 +00:00
bIsHard = true;
2002-05-20 08:59:37 +00:00
}
2002-06-24 22:04:31 +00:00
2002-09-07 09:37:27 +00:00
if( bIsNew )
2003-01-02 08:13:34 +00:00
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select music comment new") );
2002-09-07 09:37:27 +00:00
else if( bIsHard )
2003-01-02 08:13:34 +00:00
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select music comment hard") );
2002-09-07 09:37:27 +00:00
else
2003-01-02 08:13:34 +00:00
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select music comment general") );
2002-09-07 09:37:27 +00:00
TweenOffScreen();
m_bMadeChoice = true;
m_soundSelect.Play();
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
{
2003-03-25 01:39:01 +00:00
// float fShowSeconds = m_Menu.m_Out.GetLengthSeconds();
2002-09-07 09:37:27 +00:00
// show "hold START for options"
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,1) ); // visible
2003-04-13 21:17:14 +00:00
SET_XY_AND_ON_COMMAND( m_sprOptionsMessage );
/* m_sprOptionsMessage.BeginTweening( 0.15f ); // fade in
2003-04-12 06:16:12 +00:00
m_sprOptionsMessage.SetZoomY( 1 );
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,1) );
2003-03-11 08:52:45 +00:00
m_sprOptionsMessage.BeginTweening( fShowSeconds-0.35f ); // sleep
m_sprOptionsMessage.BeginTweening( 0.15f ); // fade out
2003-04-12 06:16:12 +00:00
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
m_sprOptionsMessage.SetZoomY( 0 );
*/
m_bAllowOptionsMenu = true;
/* Don't accept a held START for a little while, so it's not
* hit accidentally. Accept an initial START right away, though,
* so we don't ignore deliberate fast presses (which would be
* annoying). */
2003-03-25 21:17:29 +00:00
this->PostScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f );
2002-09-07 09:37:27 +00:00
}
2003-03-09 00:55:49 +00:00
m_Menu.StartTransitioning( SM_GoToNextScreen );
AdjustOptions();
2002-09-07 09:37:27 +00:00
break;
}
case TYPE_SECTION:
break;
case TYPE_ROULETTE:
break;
}
2003-02-05 16:53:21 +00:00
if( GAMESTATE->IsExtraStage() && PREFSMAN->m_bPickExtraStage )
{
/* Check if user selected the real extra stage. */
Song* pSong;
Notes* pNotes;
PlayerOptions po;
SongOptions so;
SONGMAN->GetExtraStageInfo( false, GAMESTATE->m_pCurSong->m_sGroupName, GAMESTATE->GetCurrentStyleDef(), pSong, pNotes, po, so );
ASSERT(pSong);
/* Enable 2nd extra stage if user chose the correct song */
if( m_MusicWheel.GetSelectedSong() == pSong )
GAMESTATE->m_bAllow2ndExtraStage = true;
else
GAMESTATE->m_bAllow2ndExtraStage = false;
}
2002-05-20 08:59:37 +00:00
}
void ScreenSelectMusic::MenuBack( PlayerNumber pn )
2002-05-20 08:59:37 +00:00
{
2003-01-21 02:16:40 +00:00
SOUNDMAN->StopMusic();
2002-05-20 08:59:37 +00:00
2003-03-09 00:55:49 +00:00
m_Menu.Back( SM_GoToPrevScreen );
2002-05-20 08:59:37 +00:00
}
void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn )
2002-05-20 08:59:37 +00:00
{
2003-04-07 21:24:14 +00:00
if( !GAMESTATE->IsHumanPlayer(pn) )
2002-05-20 08:59:37 +00:00
return;
m_iSelection[pn] = clamp( m_iSelection[pn], 0, int(m_arrayNotes[pn].size()-1) ); // bounds clamping
2002-05-20 08:59:37 +00:00
Notes* pNotes = m_arrayNotes[pn].empty()? NULL: m_arrayNotes[pn][m_iSelection[pn]];
2002-05-20 08:59:37 +00:00
GAMESTATE->m_pCurNotes[pn] = pNotes;
2002-05-20 08:59:37 +00:00
// m_BPMDisplay.SetZoomY( 0 );
// m_BPMDisplay.BeginTweening( 0.2f );
2003-04-12 06:16:12 +00:00
// m_BPMDisplay.SetZoomY( 1.2f );
Notes* m_pNotes = GAMESTATE->m_pCurNotes[pn];
2003-01-22 05:29:27 +00:00
if( m_pNotes && SONGMAN->IsUsingMemoryCard(pn) )
m_textHighScore[pn].SetText( ssprintf("%*.0f", NUM_SCORE_DIGITS, m_pNotes->m_MemCardScores[pn].fScore) );
2002-10-06 16:56:58 +00:00
m_DifficultyIcon[pn].SetFromNotes( pn, pNotes );
if( pNotes && pNotes->IsAutogen() )
{
2003-02-18 23:15:38 +00:00
m_AutoGenIcon[pn].SetEffectDiffuseShift();
}
else
{
m_AutoGenIcon[pn].SetEffectNone();
m_AutoGenIcon[pn].SetDiffuse( RageColor(1,1,1,0) );
}
2003-03-09 00:55:49 +00:00
m_DifficultyMeter[pn].SetFromNotes( pNotes );
m_GrooveRadar.SetFromNotes( pn, pNotes );
m_MusicWheel.NotesChanged( pn );
2002-05-20 08:59:37 +00:00
}
void ScreenSelectMusic::AfterMusicChange()
{
2003-03-11 21:33:11 +00:00
m_Menu.m_MenuTimer.Stall();
2002-08-20 21:00:56 +00:00
2002-05-20 08:59:37 +00:00
Song* pSong = m_MusicWheel.GetSelectedSong();
2002-07-23 01:41:40 +00:00
GAMESTATE->m_pCurSong = pSong;
2002-05-20 08:59:37 +00:00
m_sprStage.Load( THEME->GetPathToG("ScreenSelectMusic stage "+GAMESTATE->GetStageText()) );
2003-04-22 08:43:12 +00:00
m_GrooveGraph.SetFromSong( pSong );
int pn;
for( pn = 0; pn < NUM_PLAYERS; ++pn)
2002-10-24 20:15:24 +00:00
m_arrayNotes[pn].clear();
2002-05-20 08:59:37 +00:00
2003-01-02 03:00:53 +00:00
bool no_banner_change = false;
if(PREFSMAN->m_BannerCacheType == PREFSMAN->preload_none && m_MusicWheel.IsMoving())
{
/* If we're moving fast and we didn't preload banners, don't touch it. */
no_banner_change = true;
}
2003-01-02 03:00:53 +00:00
2002-05-20 08:59:37 +00:00
switch( m_MusicWheel.GetSelectedType() )
{
case TYPE_SECTION:
{
CString sGroup = m_MusicWheel.GetSelectedSection();
for( int p=0; p<NUM_PLAYERS; p++ )
m_iSelection[p] = -1;
2003-01-02 03:00:53 +00:00
if(!no_banner_change)
m_Banner.LoadFromGroup( sGroup ); // if this isn't a group, it'll default to the fallback banner
2003-03-30 19:30:54 +00:00
m_BPMDisplay.NoBPM();
m_sprCDTitleFront.UnloadTexture();
m_sprCDTitleBack.UnloadTexture();
2003-04-21 22:26:07 +00:00
m_sprBalloon.StopTweening();
OFF_COMMAND( m_sprBalloon );
2002-05-20 08:59:37 +00:00
}
break;
case TYPE_SONG:
{
2003-01-21 02:16:40 +00:00
SOUNDMAN->StopMusic();
2002-10-06 16:56:58 +00:00
m_fPlaySampleCountdown = SAMPLE_MUSIC_DELAY;
m_sSampleMusicToPlay = pSong->GetMusicPath();
m_fSampleStartSeconds = pSong->m_fMusicSampleStartSeconds;
m_fSampleLengthSeconds = pSong->m_fMusicSampleLengthSeconds;
for( int pn = 0; pn < NUM_PLAYERS; ++pn)
{
pSong->GetNotes( m_arrayNotes[pn], GAMESTATE->GetCurrentStyleDef()->m_NotesType );
SortNotesArrayByDifficulty( m_arrayNotes[pn] );
}
2003-01-02 03:00:53 +00:00
if(!no_banner_change)
m_Banner.LoadFromSong( pSong );
2003-03-30 19:30:54 +00:00
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
{
m_BPMDisplay.CycleRandomly();
}
else
{
float fMinBPM, fMaxBPM;
pSong->GetMinMaxBPM( fMinBPM, fMaxBPM );
m_BPMDisplay.SetBPMRange( fMinBPM, fMaxBPM );
}
const CString CDTitlePath = pSong->HasCDTitle()? pSong->GetCDTitlePath():THEME->GetPathToG("ScreenSelectMusic fallback cdtitle");
m_sprCDTitleFront.Load( CDTitlePath );
m_sprCDTitleBack.Load( CDTitlePath );
FlipSpriteHorizontally(m_sprCDTitleBack);
2002-05-20 08:59:37 +00:00
for( int p=0; p<NUM_PLAYERS; p++ )
{
2003-04-07 21:24:14 +00:00
if( !GAMESTATE->IsHumanPlayer( PlayerNumber(p) ) )
2002-05-20 08:59:37 +00:00
continue;
2003-02-24 19:56:25 +00:00
/* Find the closest match to the user's preferred difficulty. */
int CurDifference = -1;
for( unsigned i=0; i<m_arrayNotes[p].size(); i++ )
2002-10-06 16:56:58 +00:00
{
2003-02-24 19:56:25 +00:00
int Diff = abs(m_arrayNotes[p][i]->GetDifficulty() - GAMESTATE->m_PreferredDifficulty[p]);
if( CurDifference == -1 || Diff < CurDifference )
2002-10-06 16:56:58 +00:00
{
2002-06-30 23:19:33 +00:00
m_iSelection[p] = i;
2003-02-24 19:56:25 +00:00
CurDifference = Diff;
2002-10-06 16:56:58 +00:00
}
}
2002-06-30 23:19:33 +00:00
m_iSelection[p] = clamp( m_iSelection[p], 0, int(m_arrayNotes[p].size()) ) ;
2002-05-20 08:59:37 +00:00
}
2003-02-28 09:25:25 +00:00
/* Short delay before actually showing these, so they don't show
* up when scrolling fast. It'll still show up in "slow" scrolling,
* but it doesn't look at weird as it does in "fast", and I don't
* like the effect with a lot of delay. */
if( pSong->m_fMusicLengthSeconds > PREFSMAN->m_fMarathonVerSongSeconds )
{
2003-04-21 22:26:07 +00:00
m_sprBalloon.StopTweening();
m_sprBalloon.Load( THEME->GetPathToG("ScreenSelectMusic balloon marathon") );
SET_XY_AND_ON_COMMAND( m_sprBalloon );
}
else if( pSong->m_fMusicLengthSeconds > PREFSMAN->m_fLongVerSongSeconds )
{
2003-04-21 22:26:07 +00:00
m_sprBalloon.StopTweening();
m_sprBalloon.Load( THEME->GetPathToG("ScreenSelectMusic balloon long") );
SET_XY_AND_ON_COMMAND( m_sprBalloon );
}
else
{
m_sprBalloon.StopTweening();
OFF_COMMAND( m_sprBalloon );
}
2002-05-20 08:59:37 +00:00
}
break;
case TYPE_ROULETTE:
2003-01-02 03:00:53 +00:00
if(!no_banner_change)
m_Banner.LoadRoulette();
2003-03-30 19:30:54 +00:00
m_BPMDisplay.NoBPM();
m_sprCDTitleFront.UnloadTexture();
m_sprCDTitleBack.UnloadTexture();
SOUNDMAN->StopMusic();
m_fPlaySampleCountdown = SAMPLE_MUSIC_DELAY;
m_sSampleMusicToPlay = THEME->GetPathToS("ScreenSelectMusic roulette music");
m_fSampleStartSeconds = -1;
m_fSampleLengthSeconds = -1;
2003-04-21 22:26:07 +00:00
m_sprBalloon.StopTweening();
OFF_COMMAND( m_sprBalloon );
2002-05-20 08:59:37 +00:00
break;
case TYPE_RANDOM:
if(!no_banner_change)
m_Banner.LoadRandom();
2003-03-30 19:30:54 +00:00
m_BPMDisplay.NoBPM();
m_sprCDTitleFront.UnloadTexture();
m_sprCDTitleBack.UnloadTexture();
SOUNDMAN->StopMusic();
m_fPlaySampleCountdown = SAMPLE_MUSIC_DELAY;
m_sSampleMusicToPlay = THEME->GetPathToS("ScreenSelectMusic random music");
m_fSampleStartSeconds = -1;
m_fSampleLengthSeconds = -1;
2003-04-21 22:26:07 +00:00
m_sprBalloon.StopTweening();
OFF_COMMAND( m_sprBalloon );
break;
default:
ASSERT(0);
2002-05-20 08:59:37 +00:00
}
for( int p=0; p<NUM_PLAYERS; p++ )
{
AfterNotesChange( (PlayerNumber)p );
}
2003-01-02 03:00:53 +00:00
/* Make sure we never start the sample when moving fast. */
if(m_MusicWheel.IsMoving())
m_fPlaySampleCountdown = 0;
2002-05-20 08:59:37 +00:00
}
void ScreenSelectMusic::UpdateOptionsDisplays()
{
// m_OptionIcons.Load( GAMESTATE->m_PlayerOptions, &GAMESTATE->m_SongOptions );
2002-09-03 06:33:08 +00:00
// m_PlayerOptionIcons.Refresh();
for( int p=0; p<NUM_PLAYERS; p++ )
{
2002-09-03 06:33:08 +00:00
m_OptionIconRow[p].Refresh( (PlayerNumber)p );
2003-04-07 21:24:14 +00:00
if( GAMESTATE->IsHumanPlayer(p) )
{
CString s = GAMESTATE->m_PlayerOptions[p].GetString();
s.Replace( ", ", "\n" );
2002-09-03 06:33:08 +00:00
// m_textPlayerOptions[p].SetText( s );
}
}
CString s = GAMESTATE->m_SongOptions.GetString();
s.Replace( ", ", "\n" );
m_textSongOptions.SetText( s );
}
2002-08-20 21:00:56 +00:00
void ScreenSelectMusic::SortOrderChanged()
{
2003-01-03 03:40:39 +00:00
m_MusicSortDisplay.Set( GAMESTATE->m_SongSortOrder );
2002-08-20 21:00:56 +00:00
// tween music sort on screen
2002-10-07 07:16:40 +00:00
// m_MusicSortDisplay.FadeOn( 0, "fade", TWEEN_TIME );
2002-08-20 21:00:56 +00:00
}
2002-05-20 08:59:37 +00:00