added MAX-style options navigation and moved more constants into theme metrics

This commit is contained in:
Chris Danford
2002-09-04 03:49:08 +00:00
parent 1e6faf12a6
commit 1c90b8236f
68 changed files with 545 additions and 415 deletions
+35 -17
View File
@@ -14,7 +14,7 @@
ColorP1=0.4,1.0,0.8,1 // sea green ColorP1=0.4,1.0,0.8,1 // sea green
ColorP2=1.0,0.5,0.2,1 // orange ColorP2=1.0,0.5,0.2,1 // orange
ColorEasy=0.9,0.9,0,1 // yellow ColorEasy=0.9,0.9,0,1 // yellow
ColorMedium=1,0.2,0.2,1 // light red ColorMedium=1,0.1,0.1,1 // light red
ColorHard=0.2,1,0.2,1 // light green ColorHard=0.2,1,0.2,1 // light green
[ScreenTitleMenu] [ScreenTitleMenu]
@@ -140,6 +140,7 @@ TitlesWidth=146
TitlesSpacingX=150 TitlesSpacingX=150
TitlesColumns=4 TitlesColumns=4
TitlesRows=10 TitlesRows=10
TitlesZoom=0.5
HelpText=Use ! " to select, then press START HelpText=Use ! " to select, then press START
TimerSeconds=40 TimerSeconds=40
NextScreen=ScreenHowToPlay NextScreen=ScreenHowToPlay
@@ -153,14 +154,16 @@ TimerSeconds=15
[ScreenSelectMusic] [ScreenSelectMusic]
BannerFrameX=160 BannerFrameX=160
BannerFrameY=162 BannerFrameY=162
BannerX=148 BannerX=150
BannerY=170 BannerY=170
BannerWidth=280 BannerWidth=282
BannerHeight=92 BannerHeight=92
BPMX=192 BPMX=180
BPMY=112 BPMY=116
StageX=48 BPMZoom=0.7
StageY=112 StageX=52
StageY=114
StageZoom=0.7
CDTitleX=252 CDTitleX=252
CDTitleY=148 CDTitleY=148
DifficultyFrameP1X=60 DifficultyFrameP1X=60
@@ -198,7 +201,7 @@ PlayerOptionsP1Y=330
PlayerOptionsP2X=304 PlayerOptionsP2X=304
PlayerOptionsP2Y=330 PlayerOptionsP2Y=330
SongOptionsX=160 SongOptionsX=160
SongOptionsY=298 SongOptionsY=334
OptionIconsP1X=30 OptionIconsP1X=30
OptionIconsP1Y=58 OptionIconsP1Y=58
OptionIconsP2X=30 OptionIconsP2X=30
@@ -264,10 +267,10 @@ ScoreP2Y=442
ScoreP2ExtraY=38 ScoreP2ExtraY=38
PlayerOptionsP1X=320 PlayerOptionsP1X=320
PlayerOptionsP1Y=434 PlayerOptionsP1Y=434
PlayerOptionsP1ExtraY=30 PlayerOptionsP1ExtraY=46
PlayerOptionsP2X=320 PlayerOptionsP2X=320
PlayerOptionsP2Y=450 PlayerOptionsP2Y=450
PlayerOptionsP2ExtraY=46 PlayerOptionsP2ExtraY=30
SongOptionsX=320 SongOptionsX=320
SongOptionsY=470 SongOptionsY=470
SongOptionsExtraY=10 SongOptionsExtraY=10
@@ -327,7 +330,7 @@ MaxComboY=334
ScoreLabelsX=320 ScoreLabelsX=320
ScoreNumbersP1X=150 ScoreNumbersP1X=150
ScoreNumbersP2X=490 ScoreNumbersP2X=490
ScoreY=378 ScoreY=374
BonusP1X=96 BonusP1X=96
BonusP2X=544 BonusP2X=544
BonusY=256 BonusY=256
@@ -344,15 +347,20 @@ SongsSurvivedP2X=544
SongsSurvivedY=240 SongsSurvivedY=240
NewRecordP1X=150 NewRecordP1X=150
NewRecordP2X=490 NewRecordP2X=490
NewRecordY=404 NewRecordY=398
TryExtraStageX=320 TryExtraStageX=320
TryExtraStageY=424 TryExtraStageY=428
HelpText=Press START to continue HelpText=Press START to continue
TimerSeconds=40 TimerSeconds=40
SpinGrades=1 SpinGrades=1
GradesGlowColor1=1,1,1,0.2 GradesGlowColor1=1,1,1,0.2
GradesGlowColor2=1,1,1,0.8 GradesGlowColor2=1,1,1,0.8
[ScreenMusicScroll]
ScrollDelay=0.2
ScrollSpeed=1.0
TextZoom=0.8
[ScreenEditMenu] [ScreenEditMenu]
ExplanationX=320 ExplanationX=320
ExplanationY=410 ExplanationY=410
@@ -425,11 +433,17 @@ DisplayTime=0.6
[ScreenOptions] [ScreenOptions]
IconsP1X=40 IconsP1X=40
IconsP2X=600 IconsP2X=600
LabelsX=100 ArrowsX=88
LabelsX=140
LabelsZoom=0.7
LabelsHAlign=2 // 0,1,2 = left,center,right
ItemsZoom=0.5
ItemsStartX=160 ItemsStartX=160
ItemsGapX=14 ItemsGapX=14
ItemsStartY=88 ItemsStartY=88
ItemsSpacingY=34 ItemsSpacingY=34
ColorSelected=1,1,1,1 // normal
ColorNotSelected=0.5,0.5,0.5,1 // grayed
HelpText=# $ to change line ! " to select between options then press START HelpText=# $ to change line ! " to select between options then press START
TimerSeconds=40 TimerSeconds=40
@@ -502,11 +516,15 @@ BrightGhostThreshold=100
[GameState] [GameState]
StageColorDemo=0.3,1.0,0.3,1 // green StageColorDemo=0.3,1.0,0.3,1 // green
StageColorNormal=0.3,1.0,0.3,1 // green StageColor1=0.3,1.0,0.3,1 // green
StageColor2=0.4,0.4,0.9,1 // light blue
StageColor3=0.8,0.2,0.8,1 // light purple
StageColor4=0.3,1.0,0.3,1 // green
StageColor5=0.4,0.4,0.9,1 // light blue
StageColorFinal=1.0,0.1,0.1,1 // red StageColorFinal=1.0,0.1,0.1,1 // red
StageColorExtra1=1.0,1,0.3,1 // yellow StageColorExtra1=1.0,1,0.3,1 // yellow
StageColorExtra2=1.0,1,0.3,1 // yellow StageColorExtra2=1.0,1,0.3,1 // yellow
StageColorOni=0.3,1.0,0.3,1 // green StageColorOni=1.0,0.1,0.1,1 // red
StageTextDemo=Demo StageTextDemo=Demo
StageTextFinal=Final StageTextFinal=Final
StageTextExtra1=Extra StageTextExtra1=Extra
@@ -565,7 +583,7 @@ TextOffsetX=0
TextOffsetY=0 TextOffsetY=0
TextHAlign=1 // 0,1,2 = left,center,right TextHAlign=1 // 0,1,2 = left,center,right
TextVAlign=1 // 0,1,2 = top,middle,bottom TextVAlign=1 // 0,1,2 = top,middle,bottom
TextWidth=64 TextWidth=72
TextZoom=0.5 TextZoom=0.5
Uppercase=1 Uppercase=1
+8 -1
View File
@@ -75,8 +75,15 @@ Font::Font( const CString &sASCIITexturePath )
m_iFrameNoToWidth[i] += iAddToAllWidths; m_iFrameNoToWidth[i] += iAddToAllWidths;
} }
float fScaleAllWidthsBy = 0;
if( ini.GetValueF( "Char Widths", "ScaleAllWidthsBy", fScaleAllWidthsBy ) )
{
for( int i=0; i<256; i++ )
m_iFrameNoToWidth[i] = roundf( m_iFrameNoToWidth[i] * fScaleAllWidthsBy );
}
m_iLineSpacing = m_pTexture->GetSourceFrameHeight(); m_iLineSpacing = m_pTexture->GetSourceFrameHeight();
ini.GetValueI( "Char Widths", "LineHeight", m_iLineSpacing ); ini.GetValueI( "Char Widths", "LineSpacing", m_iLineSpacing );
// force widths to even number // force widths to even number
for( i=0; i<256; i++ ) for( i=0; i<256; i++ )
+2 -2
View File
@@ -54,9 +54,9 @@ DifficultyClass StringToDifficultyClass( CString sDC )
return CLASS_INVALID; return CLASS_INVALID;
} }
D3DXCOLOR PlayerToColor( PlayerNumber p ) D3DXCOLOR PlayerToColor( PlayerNumber pn )
{ {
switch( p ) switch( pn )
{ {
case PLAYER_1: return COLOR_P1; case PLAYER_1: return COLOR_P1;
case PLAYER_2: return COLOR_P2; case PLAYER_2: return COLOR_P2;
+1 -1
View File
@@ -98,7 +98,7 @@ enum PlayerNumber {
PLAYER_INVALID PLAYER_INVALID
}; };
D3DXCOLOR PlayerToColor( PlayerNumber p ); D3DXCOLOR PlayerToColor( PlayerNumber pn );
D3DXCOLOR PlayerToColor( int p ); D3DXCOLOR PlayerToColor( int p );
+5 -5
View File
@@ -22,7 +22,7 @@ GameState* GAMESTATE = NULL; // global and accessable from anywhere in our progr
#define STAGE_COLOR_DEMO THEME->GetMetricC("GameState","StageColorDemo") #define STAGE_COLOR_DEMO THEME->GetMetricC("GameState","StageColorDemo")
#define STAGE_COLOR_NORMAL THEME->GetMetricC("GameState","StageColorNormal") #define STAGE_COLOR( i ) THEME->GetMetricC("GameState",ssprintf("StageColor%d",i+1))
#define STAGE_COLOR_FINAL THEME->GetMetricC("GameState","StageColorFinal") #define STAGE_COLOR_FINAL THEME->GetMetricC("GameState","StageColorFinal")
#define STAGE_COLOR_EXTRA1 THEME->GetMetricC("GameState","StageColorExtra1") #define STAGE_COLOR_EXTRA1 THEME->GetMetricC("GameState","StageColorExtra1")
#define STAGE_COLOR_EXTRA2 THEME->GetMetricC("GameState","StageColorExtra2") #define STAGE_COLOR_EXTRA2 THEME->GetMetricC("GameState","StageColorExtra2")
@@ -256,7 +256,7 @@ D3DXCOLOR GameState::GetStageColor()
else if( IsFinalStage() ) return STAGE_COLOR_FINAL; else if( IsFinalStage() ) return STAGE_COLOR_FINAL;
else if( IsExtraStage() ) return STAGE_COLOR_EXTRA1; else if( IsExtraStage() ) return STAGE_COLOR_EXTRA1;
else if( IsExtraStage2() ) return STAGE_COLOR_EXTRA2; else if( IsExtraStage2() ) return STAGE_COLOR_EXTRA2;
else return STAGE_COLOR_NORMAL; else return STAGE_COLOR( min(m_iCurrentStageIndex,4) );
} }
GameDef* GameState::GetCurrentGameDef() GameDef* GameState::GetCurrentGameDef()
@@ -308,10 +308,10 @@ float GameState::GetElapsedSeconds()
} }
} }
float GameState::GetPlayerSurviveTime( PlayerNumber p ) float GameState::GetPlayerSurviveTime( PlayerNumber pn )
{ {
if( m_fSecondsBeforeFail[p] == -1 ) // haven't failed yet if( m_fSecondsBeforeFail[pn] == -1 ) // haven't failed yet
return GetElapsedSeconds(); return GetElapsedSeconds();
else else
return m_fSecondsBeforeFail[p]; return m_fSecondsBeforeFail[pn];
} }
+1 -1
View File
@@ -104,7 +104,7 @@ public:
// In Arcade, is the time into the current stage before failing. // In Arcade, is the time into the current stage before failing.
// In Oni and Endless this is the time into the current course before failing // In Oni and Endless this is the time into the current course before failing
float GetPlayerSurviveTime( PlayerNumber p ); // Returns time player has survived float GetPlayerSurviveTime( PlayerNumber pn ); // Returns time player has survived
void AccumulateStageStatistics(); // Call this before clearing values. Accumulate values above into the Session values below. void AccumulateStageStatistics(); // Call this before clearing values. Accumulate values above into the Session values below.
void ResetStageStatistics(); // Clears the values above void ResetStageStatistics(); // Clears the values above
+8 -8
View File
@@ -65,7 +65,7 @@ void GradeDisplay::DrawPrimitives()
Sprite::DrawPrimitives(); Sprite::DrawPrimitives();
} }
void GradeDisplay::SetGrade( PlayerNumber p, Grade g ) void GradeDisplay::SetGrade( PlayerNumber pn, Grade g )
{ {
m_Grade = g; m_Grade = g;
@@ -78,13 +78,13 @@ void GradeDisplay::SetGrade( PlayerNumber p, Grade g )
int iNumCols = (this->GetNumStates()>8) ? 2 : 1; int iNumCols = (this->GetNumStates()>8) ? 2 : 1;
switch( g ) switch( g )
{ {
case GRADE_AAA: SetState( 0*iNumCols+p ); break; case GRADE_AAA: SetState( 0*iNumCols+pn ); break;
case GRADE_AA: SetState( 1*iNumCols+p ); break; case GRADE_AA: SetState( 1*iNumCols+pn ); break;
case GRADE_A: SetState( 2*iNumCols+p ); break; case GRADE_A: SetState( 2*iNumCols+pn ); break;
case GRADE_B: SetState( 3*iNumCols+p ); break; case GRADE_B: SetState( 3*iNumCols+pn ); break;
case GRADE_C: SetState( 4*iNumCols+p ); break; case GRADE_C: SetState( 4*iNumCols+pn ); break;
case GRADE_D: SetState( 5*iNumCols+p ); break; case GRADE_D: SetState( 5*iNumCols+pn ); break;
case GRADE_E: SetState( 6*iNumCols+p ); break; case GRADE_E: SetState( 6*iNumCols+pn ); break;
case GRADE_NO_DATA: SetDiffuse( D3DXCOLOR(1,1,1,0) ); break; case GRADE_NO_DATA: SetDiffuse( D3DXCOLOR(1,1,1,0) ); break;
default: ASSERT(0); default: ASSERT(0);
} }
+1 -1
View File
@@ -25,7 +25,7 @@ public:
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
virtual void DrawPrimitives(); virtual void DrawPrimitives();
void SetGrade( PlayerNumber p, Grade g ); void SetGrade( PlayerNumber pn, Grade g );
void SpinAndSettleOn( Grade g ); void SpinAndSettleOn( Grade g );
void SettleImmediately(); void SettleImmediately();
+9 -9
View File
@@ -98,27 +98,27 @@ GrooveRadar::GrooveRadarValueMap::GrooveRadarValueMap()
} }
} }
void GrooveRadar::GrooveRadarValueMap::SetFromNotes( PlayerNumber p, Notes* pNotes ) // NULL means no song void GrooveRadar::GrooveRadarValueMap::SetFromNotes( PlayerNumber pn, Notes* pNotes ) // NULL means no song
{ {
if( pNotes != NULL ) if( pNotes != NULL )
{ {
for( int c=0; c<NUM_RADAR_CATEGORIES; c++ ) for( int c=0; c<NUM_RADAR_CATEGORIES; c++ )
{ {
const float fValueCurrent = m_fValuesOld[p][c] * (1-m_PercentTowardNew[p]) + m_fValuesNew[p][c] * m_PercentTowardNew[p]; const float fValueCurrent = m_fValuesOld[pn][c] * (1-m_PercentTowardNew[pn]) + m_fValuesNew[pn][c] * m_PercentTowardNew[pn];
m_fValuesOld[p][c] = fValueCurrent; m_fValuesOld[pn][c] = fValueCurrent;
m_fValuesNew[p][c] = pNotes->m_fRadarValues[c]; m_fValuesNew[pn][c] = pNotes->m_fRadarValues[c];
} }
if( m_bValuesVisible[p] == false ) // the values WERE invisible if( m_bValuesVisible[pn] == false ) // the values WERE invisible
m_PercentTowardNew[p] = 1; m_PercentTowardNew[pn] = 1;
else else
m_PercentTowardNew[p] = 0; m_PercentTowardNew[pn] = 0;
m_bValuesVisible[p] = true; m_bValuesVisible[pn] = true;
} }
else // pNotes == NULL else // pNotes == NULL
{ {
m_bValuesVisible[p] = false; m_bValuesVisible[pn] = false;
} }
} }
+3 -3
View File
@@ -22,9 +22,9 @@ class GrooveRadar : public ActorFrame
public: public:
GrooveRadar(); GrooveRadar();
void SetFromNotes( PlayerNumber p, Notes* pNotes ) // NULL means no Song void SetFromNotes( PlayerNumber pn, Notes* pNotes ) // NULL means no Song
{ {
m_GrooveRadarValueMap.SetFromNotes( p, pNotes ); m_GrooveRadarValueMap.SetFromNotes( pn, pNotes );
} }
void TweenOnScreen(); void TweenOnScreen();
@@ -41,7 +41,7 @@ protected:
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
virtual void DrawPrimitives(); virtual void DrawPrimitives();
void SetFromNotes( PlayerNumber p, Notes* pNotes ); // NULL means no Song void SetFromNotes( PlayerNumber pn, Notes* pNotes ); // NULL means no Song
void TweenOnScreen(); void TweenOnScreen();
void TweenOffScreen(); void TweenOffScreen();
+1 -1
View File
@@ -24,7 +24,7 @@ public:
LifeMeter() {}; LifeMeter() {};
virtual ~LifeMeter() {}; virtual ~LifeMeter() {};
virtual void Load( PlayerNumber p ) { m_PlayerNumber = p; } virtual void Load( PlayerNumber pn ) { m_PlayerNumber = pn; }
virtual void Update( float fDeltaTime ) { ActorFrame::Update(fDeltaTime); }; virtual void Update( float fDeltaTime ) { ActorFrame::Update(fDeltaTime); };
virtual void SongEnded() {}; virtual void SongEnded() {};
+1 -1
View File
@@ -29,7 +29,7 @@ enum MenuButton
struct MenuInput struct MenuInput
{ {
MenuInput() { MakeInvalid(); }; MenuInput() { MakeInvalid(); };
MenuInput( PlayerNumber p, MenuButton b ) { player = p; button = b; }; MenuInput( PlayerNumber pn, MenuButton b ) { player = pn; button = b; };
PlayerNumber player; PlayerNumber player;
MenuButton button; MenuButton button;
+2 -2
View File
@@ -25,12 +25,12 @@ MenuTimer::MenuTimer()
m_fStallSeconds = 0; m_fStallSeconds = 0;
m_bTimerStopped = false; m_bTimerStopped = false;
m_textDigit1.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","menu timer numbers 5x2"), "0123456789" ); m_textDigit1.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","menu timer numbers 5x2"), "1234567890" );
m_textDigit1.TurnShadowOff(); m_textDigit1.TurnShadowOff();
m_textDigit1.SetXY( -18, 0 ); m_textDigit1.SetXY( -18, 0 );
this->AddChild( &m_textDigit1 ); this->AddChild( &m_textDigit1 );
m_textDigit2.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","menu timer numbers 5x2"), "0123456789" ); m_textDigit2.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","menu timer numbers 5x2"), "1234567890" );
m_textDigit2.TurnShadowOff(); m_textDigit2.TurnShadowOff();
m_textDigit2.SetXY( +18, 0 ); m_textDigit2.SetXY( +18, 0 );
this->AddChild( &m_textDigit2 ); this->AddChild( &m_textDigit2 );
+2 -1
View File
@@ -11,6 +11,7 @@
#define TITLES_START_Y THEME->GetMetricF("ScreenSelectGroup","TitlesStartY") #define TITLES_START_Y THEME->GetMetricF("ScreenSelectGroup","TitlesStartY")
#define TITLES_COLUMNS THEME->GetMetricI("ScreenSelectGroup","TitlesColumns") #define TITLES_COLUMNS THEME->GetMetricI("ScreenSelectGroup","TitlesColumns")
#define TITLES_ROWS THEME->GetMetricI("ScreenSelectGroup","TitlesRows") #define TITLES_ROWS THEME->GetMetricI("ScreenSelectGroup","TitlesRows")
#define TITLES_ZOOM THEME->GetMetricF("ScreenSelectGroup","TitlesZoom")
MusicList::MusicList() MusicList::MusicList()
{ {
@@ -22,8 +23,8 @@ MusicList::MusicList()
m_textTitles[i].SetXY( TITLES_START_X + i*TITLES_SPACING_X, TITLES_START_Y ); m_textTitles[i].SetXY( TITLES_START_X + i*TITLES_SPACING_X, TITLES_START_Y );
m_textTitles[i].SetHorizAlign( Actor::align_left ); m_textTitles[i].SetHorizAlign( Actor::align_left );
m_textTitles[i].SetVertAlign( Actor::align_top ); m_textTitles[i].SetVertAlign( Actor::align_top );
m_textTitles[i].SetZoom( 0.5f );
m_textTitles[i].SetShadowLength( 2 ); m_textTitles[i].SetShadowLength( 2 );
m_textTitles[i].SetZoom( TITLES_ZOOM );
this->AddChild( &m_textTitles[i] ); this->AddChild( &m_textTitles[i] );
} }
} }
+4 -2
View File
@@ -40,16 +40,18 @@ OptionIcon::OptionIcon()
void OptionIcon::Load( PlayerNumber pn, CString sText, bool bHeader ) void OptionIcon::Load( PlayerNumber pn, CString sText, bool bHeader )
{ {
static CString sStopWords[] = { "OFF", "VISIBLE", "VIVID", "STANDARD" }; static CString sStopWords[] = { "OFF", "VISIBLE", "VIVID", "STANDARD", "X1" };
const int iNumStopWords = sizeof(sStopWords)/sizeof(sStopWords[0]); const int iNumStopWords = sizeof(sStopWords)/sizeof(sStopWords[0]);
for( int i=0; i<iNumStopWords; i++ ) for( int i=0; i<iNumStopWords; i++ )
if( sText == sStopWords[i] ) if( 0==stricmp(sText,sStopWords[i]) )
sText = ""; sText = "";
if( UPPERCASE ) if( UPPERCASE )
sText.MakeUpper(); sText.MakeUpper();
sText.Replace( " ", "\n" );
bool bVacant = (sText==""); bool bVacant = (sText=="");
m_spr.SetState( pn*3 + (bHeader?0:(bVacant?1:2)) ); m_spr.SetState( pn*3 + (bHeader?0:(bVacant?1:2)) );
+2 -2
View File
@@ -301,7 +301,7 @@ char DeviceInput::ToChar() const
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Name: EnumJoysticksCallMenuBack( PlayerNumber p ) // Name: EnumJoysticksCallMenuBack( PlayerNumber pn )
// Desc: Called once for each enumerated joystick. If we find one, create a // Desc: Called once for each enumerated joystick. If we find one, create a
// device interface on it so we can play with it. // device interface on it so we can play with it.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -331,7 +331,7 @@ BOOL CALLBACK RageInput::EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInst
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Name: EnumAxesCallMenuBack( PlayerNumber p ) // Name: EnumAxesCallMenuBack( PlayerNumber pn )
// Desc: Callback function for enumerating the axes on a joystick // Desc: Callback function for enumerating the axes on a joystick
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
BOOL CALLBACK RageInput::EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, BOOL CALLBACK RageInput::EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi,
+2 -2
View File
@@ -56,10 +56,10 @@ void Screen::Update( float fDeltaTime )
} }
} }
void Screen::MenuBack( PlayerNumber p, const InputEventType type ) void Screen::MenuBack( PlayerNumber pn, const InputEventType type )
{ {
if(!PREFSMAN->m_bDelayedEscape || type==IET_SLOW_REPEAT || type==IET_FAST_REPEAT) if(!PREFSMAN->m_bDelayedEscape || type==IET_SLOW_REPEAT || type==IET_FAST_REPEAT)
MenuBack(p); MenuBack(pn);
} }
void Screen::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) void Screen::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
+12 -12
View File
@@ -55,19 +55,19 @@ protected:
public: public:
// let subclass override if they want // let subclass override if they want
virtual void MenuUp( PlayerNumber p, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuUp(p); } virtual void MenuUp( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuUp(pn); }
virtual void MenuDown( PlayerNumber p, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuDown(p); } virtual void MenuDown( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuDown(pn); }
virtual void MenuLeft( PlayerNumber p, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuLeft(p); } virtual void MenuLeft( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuLeft(pn); }
virtual void MenuRight( PlayerNumber p, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuRight(p); } virtual void MenuRight( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuRight(pn); }
virtual void MenuStart( PlayerNumber p, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuStart(p); } virtual void MenuStart( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuStart(pn); }
virtual void MenuBack( PlayerNumber p, const InputEventType type ); virtual void MenuBack( PlayerNumber pn, const InputEventType type );
virtual void MenuUp( PlayerNumber p ) {}; virtual void MenuUp( PlayerNumber pn ) {};
virtual void MenuDown( PlayerNumber p ) {}; virtual void MenuDown( PlayerNumber pn ) {};
virtual void MenuLeft( PlayerNumber p ) {}; virtual void MenuLeft( PlayerNumber pn ) {};
virtual void MenuRight( PlayerNumber p ) {}; virtual void MenuRight( PlayerNumber pn ) {};
virtual void MenuStart( PlayerNumber p ) {}; virtual void MenuStart( PlayerNumber pn ) {};
virtual void MenuBack( PlayerNumber p ) {}; virtual void MenuBack( PlayerNumber pn ) {};
private: private:
bool m_FirstUpdate; bool m_FirstUpdate;
+16 -16
View File
@@ -33,7 +33,7 @@ enum {
NUM_APPEARANCE_OPTIONS_LINES NUM_APPEARANCE_OPTIONS_LINES
}; };
OptionLineData g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = { OptionRowData g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = {
{ "Announcer", 1, {"OFF"} }, // fill this in on ImportOptions() { "Announcer", 1, {"OFF"} }, // fill this in on ImportOptions()
{ "Theme", 0, {""} }, // fill this in on ImportOptions() { "Theme", 0, {""} }, // fill this in on ImportOptions()
{ "Note Skin", 0, {""} }, // fill this in on ImportOptions() { "Note Skin", 0, {""} }, // fill this in on ImportOptions()
@@ -66,17 +66,17 @@ void ScreenAppearanceOptions::ImportOptions()
CStringArray arrayAnnouncerNames; CStringArray arrayAnnouncerNames;
ANNOUNCER->GetAnnouncerNames( arrayAnnouncerNames ); ANNOUNCER->GetAnnouncerNames( arrayAnnouncerNames );
m_OptionLineData[AO_ANNOUNCER].iNumOptions = arrayAnnouncerNames.GetSize() + 1; m_OptionRowData[AO_ANNOUNCER].iNumOptions = arrayAnnouncerNames.GetSize() + 1;
for( int i=0; i<arrayAnnouncerNames.GetSize(); i++ ) for( int i=0; i<arrayAnnouncerNames.GetSize(); i++ )
strcpy( m_OptionLineData[AO_ANNOUNCER].szOptionsText[i+1], arrayAnnouncerNames[i] ); strcpy( m_OptionRowData[AO_ANNOUNCER].szOptionsText[i+1], arrayAnnouncerNames[i] );
// highlight currently selected announcer // highlight currently selected announcer
m_iSelectedOption[0][AO_ANNOUNCER] = -1; m_iSelectedOption[0][AO_ANNOUNCER] = -1;
for( i=1; i<m_OptionLineData[AO_ANNOUNCER].iNumOptions; i++ ) for( i=1; i<m_OptionRowData[AO_ANNOUNCER].iNumOptions; i++ )
{ {
if( 0==stricmp(m_OptionLineData[AO_ANNOUNCER].szOptionsText[i], ANNOUNCER->GetCurAnnouncerName()) ) if( 0==stricmp(m_OptionRowData[AO_ANNOUNCER].szOptionsText[i], ANNOUNCER->GetCurAnnouncerName()) )
{ {
m_iSelectedOption[0][AO_ANNOUNCER] = i; m_iSelectedOption[0][AO_ANNOUNCER] = i;
break; break;
@@ -92,17 +92,17 @@ void ScreenAppearanceOptions::ImportOptions()
CStringArray arrayThemeNames; CStringArray arrayThemeNames;
THEME->GetThemeNamesForCurGame( arrayThemeNames ); THEME->GetThemeNamesForCurGame( arrayThemeNames );
m_OptionLineData[AO_THEME].iNumOptions = arrayThemeNames.GetSize(); m_OptionRowData[AO_THEME].iNumOptions = arrayThemeNames.GetSize();
for( i=0; i<arrayThemeNames.GetSize(); i++ ) for( i=0; i<arrayThemeNames.GetSize(); i++ )
strcpy( m_OptionLineData[AO_THEME].szOptionsText[i], arrayThemeNames[i] ); strcpy( m_OptionRowData[AO_THEME].szOptionsText[i], arrayThemeNames[i] );
// highlight currently selected theme // highlight currently selected theme
m_iSelectedOption[0][AO_THEME] = -1; m_iSelectedOption[0][AO_THEME] = -1;
for( i=0; i<m_OptionLineData[AO_THEME].iNumOptions; i++ ) for( i=0; i<m_OptionRowData[AO_THEME].iNumOptions; i++ )
{ {
if( 0==stricmp(m_OptionLineData[AO_THEME].szOptionsText[i], THEME->GetCurThemeName()) ) if( 0==stricmp(m_OptionRowData[AO_THEME].szOptionsText[i], THEME->GetCurThemeName()) )
{ {
m_iSelectedOption[0][AO_THEME] = i; m_iSelectedOption[0][AO_THEME] = i;
break; break;
@@ -118,16 +118,16 @@ void ScreenAppearanceOptions::ImportOptions()
CStringArray arraySkinNames; CStringArray arraySkinNames;
GAMEMAN->GetNoteSkinNames( arraySkinNames ); GAMEMAN->GetNoteSkinNames( arraySkinNames );
m_OptionLineData[AO_SKIN].iNumOptions = arraySkinNames.GetSize(); m_OptionRowData[AO_SKIN].iNumOptions = arraySkinNames.GetSize();
for( i=0; i<arraySkinNames.GetSize(); i++ ) for( i=0; i<arraySkinNames.GetSize(); i++ )
strcpy( m_OptionLineData[AO_SKIN].szOptionsText[i], arraySkinNames[i] ); strcpy( m_OptionRowData[AO_SKIN].szOptionsText[i], arraySkinNames[i] );
// highlight currently selected skin // highlight currently selected skin
m_iSelectedOption[0][AO_SKIN] = -1; m_iSelectedOption[0][AO_SKIN] = -1;
for( i=0; i<m_OptionLineData[AO_SKIN].iNumOptions; i++ ) for( i=0; i<m_OptionRowData[AO_SKIN].iNumOptions; i++ )
{ {
if( 0==stricmp(m_OptionLineData[AO_SKIN].szOptionsText[i], GAMEMAN->GetCurNoteSkin()) ) if( 0==stricmp(m_OptionRowData[AO_SKIN].szOptionsText[i], GAMEMAN->GetCurNoteSkin()) )
{ {
m_iSelectedOption[0][AO_SKIN] = i; m_iSelectedOption[0][AO_SKIN] = i;
break; break;
@@ -140,17 +140,17 @@ void ScreenAppearanceOptions::ImportOptions()
void ScreenAppearanceOptions::ExportOptions() void ScreenAppearanceOptions::ExportOptions()
{ {
int iSelectedAnnouncer = m_iSelectedOption[0][AO_ANNOUNCER]; int iSelectedAnnouncer = m_iSelectedOption[0][AO_ANNOUNCER];
CString sNewAnnouncer = m_OptionLineData[AO_ANNOUNCER].szOptionsText[iSelectedAnnouncer]; CString sNewAnnouncer = m_OptionRowData[AO_ANNOUNCER].szOptionsText[iSelectedAnnouncer];
if( iSelectedAnnouncer == 0 ) if( iSelectedAnnouncer == 0 )
sNewAnnouncer = ""; sNewAnnouncer = "";
ANNOUNCER->SwitchAnnouncer( sNewAnnouncer ); ANNOUNCER->SwitchAnnouncer( sNewAnnouncer );
int iSelectedTheme = m_iSelectedOption[0][AO_THEME]; int iSelectedTheme = m_iSelectedOption[0][AO_THEME];
CString sNewTheme = m_OptionLineData[AO_THEME].szOptionsText[iSelectedTheme]; CString sNewTheme = m_OptionRowData[AO_THEME].szOptionsText[iSelectedTheme];
THEME->SwitchTheme( sNewTheme ); THEME->SwitchTheme( sNewTheme );
int iSelectedSkin = m_iSelectedOption[0][AO_SKIN]; int iSelectedSkin = m_iSelectedOption[0][AO_SKIN];
CString sNewSkin = m_OptionLineData[AO_SKIN].szOptionsText[iSelectedSkin]; CString sNewSkin = m_OptionRowData[AO_SKIN].szOptionsText[iSelectedSkin];
GAMEMAN->SwitchNoteSkin( sNewSkin ); GAMEMAN->SwitchNoteSkin( sNewSkin );
PREFSMAN->SaveGamePrefsToDisk(); PREFSMAN->SaveGamePrefsToDisk();
+4 -4
View File
@@ -76,11 +76,11 @@ void ScreenCaution::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenCaution::MenuStart( PlayerNumber p ) void ScreenCaution::MenuStart( PlayerNumber pn )
{ {
if( p != PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[p] ) if( pn != PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[pn] )
{ {
GAMESTATE->m_bSideIsJoined[p] = true; GAMESTATE->m_bSideIsJoined[pn] = true;
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") ); SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
SCREENMAN->RefreshCreditsMessages(); SCREENMAN->RefreshCreditsMessages();
return; // don't fall though return; // don't fall though
@@ -90,7 +90,7 @@ void ScreenCaution::MenuStart( PlayerNumber p )
m_Wipe.CloseWipingRight( SM_GoToNextScreen ); m_Wipe.CloseWipingRight( SM_GoToNextScreen );
} }
void ScreenCaution::MenuBack( PlayerNumber p ) void ScreenCaution::MenuBack( PlayerNumber pn )
{ {
if(m_FadeWipe.IsClosing()) if(m_FadeWipe.IsClosing())
return; return;
+2 -2
View File
@@ -28,8 +28,8 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
protected: protected:
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
Sprite m_sprCaution; Sprite m_sprCaution;
TransitionFade m_Wipe; TransitionFade m_Wipe;
TransitionFadeWipe m_FadeWipe; TransitionFadeWipe m_FadeWipe;
+6 -6
View File
@@ -116,27 +116,27 @@ void ScreenEditMenu::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenEditMenu::MenuUp( PlayerNumber p ) void ScreenEditMenu::MenuUp( PlayerNumber pn )
{ {
Selector.Up(); Selector.Up();
} }
void ScreenEditMenu::MenuDown( PlayerNumber p ) void ScreenEditMenu::MenuDown( PlayerNumber pn )
{ {
Selector.Down(); Selector.Down();
} }
void ScreenEditMenu::MenuLeft( PlayerNumber p, const InputEventType type ) void ScreenEditMenu::MenuLeft( PlayerNumber pn, const InputEventType type )
{ {
Selector.Left(); Selector.Left();
} }
void ScreenEditMenu::MenuRight( PlayerNumber p, const InputEventType type ) void ScreenEditMenu::MenuRight( PlayerNumber pn, const InputEventType type )
{ {
Selector.Right(); Selector.Right();
} }
void ScreenEditMenu::MenuStart( PlayerNumber p ) void ScreenEditMenu::MenuStart( PlayerNumber pn )
{ {
MUSIC->Stop(); MUSIC->Stop();
@@ -154,7 +154,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber p )
m_Fade.CloseWipingRight( SM_None ); m_Fade.CloseWipingRight( SM_None );
} }
void ScreenEditMenu::MenuBack( PlayerNumber p ) void ScreenEditMenu::MenuBack( PlayerNumber pn )
{ {
m_Menu.TweenOffScreenToBlack( SM_None, true ); m_Menu.TweenOffScreenToBlack( SM_None, true );
+6 -6
View File
@@ -27,12 +27,12 @@ public:
private: private:
void MenuUp( PlayerNumber p ); void MenuUp( PlayerNumber pn );
void MenuDown( PlayerNumber p ); void MenuDown( PlayerNumber pn );
void MenuLeft( PlayerNumber p, const InputEventType type ); void MenuLeft( PlayerNumber pn, const InputEventType type );
void MenuRight( PlayerNumber p, const InputEventType type ); void MenuRight( PlayerNumber pn, const InputEventType type );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
SongSelector Selector; SongSelector Selector;
+4 -4
View File
@@ -530,7 +530,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
if( m_bTryExtraStage ) if( m_bTryExtraStage )
{ {
m_sprTryExtraStage.Load( THEME->GetPathTo("Graphics",GAMESTATE->IsExtraStage()?"evaluation try extra stage1":"evaluation try extra stage2") ); m_sprTryExtraStage.Load( THEME->GetPathTo("Graphics",GAMESTATE->IsExtraStage()?"evaluation try extra stage2":"evaluation try extra stage1") );
m_sprTryExtraStage.SetXY( TRY_EXTRA_STAGE_X, TRY_EXTRA_STAGE_Y ); m_sprTryExtraStage.SetXY( TRY_EXTRA_STAGE_X, TRY_EXTRA_STAGE_Y );
m_sprTryExtraStage.SetEffectGlowing( 1.0f ); m_sprTryExtraStage.SetEffectGlowing( 1.0f );
this->AddChild( &m_sprTryExtraStage ); this->AddChild( &m_sprTryExtraStage );
@@ -807,12 +807,12 @@ void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenEvaluation::MenuBack( PlayerNumber p ) void ScreenEvaluation::MenuBack( PlayerNumber pn )
{ {
MenuStart( p ); MenuStart( pn );
} }
void ScreenEvaluation::MenuStart( PlayerNumber p ) void ScreenEvaluation::MenuStart( PlayerNumber pn )
{ {
TweenOffScreen(); TweenOffScreen();
+2 -2
View File
@@ -37,8 +37,8 @@ public:
virtual void TweenOnScreen(); virtual void TweenOnScreen();
virtual void TweenOffScreen(); virtual void TweenOffScreen();
virtual void MenuBack( PlayerNumber p ); virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( PlayerNumber p ); virtual void MenuStart( PlayerNumber pn );
protected: protected:
enum ResultMode { RM_ARCADE_STAGE, RM_ARCADE_SUMMARY, RM_ONI }; enum ResultMode { RM_ARCADE_STAGE, RM_ARCADE_SUMMARY, RM_ONI };
+10 -10
View File
@@ -173,7 +173,7 @@ Desc: Actions performed when a player
presses the button bound to back presses the button bound to back
************************************/ ************************************/
void ScreenEz2SelectPlayer::MenuBack( PlayerNumber p ) void ScreenEz2SelectPlayer::MenuBack( PlayerNumber pn )
{ {
MUSIC->Stop(); MUSIC->Stop();
@@ -186,9 +186,9 @@ MenuDown
Desc: Actions performed when a player Desc: Actions performed when a player
presses the button bound to down presses the button bound to down
************************************/ ************************************/
void ScreenEz2SelectPlayer::MenuDown( PlayerNumber p ) void ScreenEz2SelectPlayer::MenuDown( PlayerNumber pn )
{ {
MenuStart( p ); MenuStart( pn );
} }
/************************************ /************************************
@@ -196,18 +196,18 @@ MenuStart
Desc: Actions performed when a player Desc: Actions performed when a player
presses the button bound to start presses the button bound to start
************************************/ ************************************/
void ScreenEz2SelectPlayer::MenuStart( PlayerNumber p ) void ScreenEz2SelectPlayer::MenuStart( PlayerNumber pn )
{ {
if( GAMESTATE->m_bSideIsJoined[p] ) // already joined if( GAMESTATE->m_bSideIsJoined[pn] ) // already joined
return; // ignore return; // ignore
GAMESTATE->m_bSideIsJoined[p] = true; GAMESTATE->m_bSideIsJoined[pn] = true;
SCREENMAN->RefreshCreditsMessages(); SCREENMAN->RefreshCreditsMessages();
m_soundSelect.Play(); m_soundSelect.Play();
m_sprCursors[p].BeginTweening( 0.25f ); m_sprCursors[pn].BeginTweening( 0.25f );
m_sprCursors[p].SetTweenZoomY( 0 ); m_sprCursors[pn].SetTweenZoomY( 0 );
m_sprControllers[p].BeginTweening( 0.25f ); m_sprControllers[pn].BeginTweening( 0.25f );
m_sprControllers[p].SetTweenZoomY( 0 ); m_sprControllers[pn].SetTweenZoomY( 0 );
bool bBothSidesJoined = true; bool bBothSidesJoined = true;
for( int pn=0; pn<NUM_PLAYERS; pn++ ) for( int pn=0; pn<NUM_PLAYERS; pn++ )
+3 -3
View File
@@ -25,9 +25,9 @@ public:
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuDown( PlayerNumber p ); virtual void MenuDown( PlayerNumber pn );
virtual void MenuStart( PlayerNumber p ); virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber p ); virtual void MenuBack( PlayerNumber pn );
private: private:
void TweenOffScreen(); void TweenOffScreen();
void TweenOnScreen(); void TweenOnScreen();
+13 -13
View File
@@ -224,7 +224,7 @@ MenuBack
Desc: Actions performed when a player Desc: Actions performed when a player
presses the button bound to back presses the button bound to back
************************************/ ************************************/
void ScreenEz2SelectStyle::MenuBack( PlayerNumber p ) void ScreenEz2SelectStyle::MenuBack( PlayerNumber pn )
{ {
MUSIC->Stop(); MUSIC->Stop();
@@ -233,13 +233,13 @@ void ScreenEz2SelectStyle::MenuBack( PlayerNumber p )
void ScreenEz2SelectStyle::MenuLeft( PlayerNumber p ) void ScreenEz2SelectStyle::MenuLeft( PlayerNumber pn )
{ {
m_ScrollingList.Left(); m_ScrollingList.Left();
m_soundChange.Play(); m_soundChange.Play();
} }
void ScreenEz2SelectStyle::MenuRight( PlayerNumber p ) void ScreenEz2SelectStyle::MenuRight( PlayerNumber pn )
{ {
m_ScrollingList.Right(); m_ScrollingList.Right();
m_soundChange.Play(); m_soundChange.Play();
@@ -250,12 +250,12 @@ MenuDown
Desc: Actions performed when a player Desc: Actions performed when a player
presses the button bound to down presses the button bound to down
************************************/ ************************************/
void ScreenEz2SelectStyle::MenuDown( PlayerNumber p ) void ScreenEz2SelectStyle::MenuDown( PlayerNumber pn )
{ {
if( GAMESTATE->m_bSideIsJoined[p] ) // already joined if( GAMESTATE->m_bSideIsJoined[pn] ) // already joined
return; // ignore return; // ignore
MenuStart( p ); MenuStart( pn );
} }
/************************************ /************************************
@@ -263,18 +263,18 @@ MenuStart
Desc: Actions performed when a player Desc: Actions performed when a player
presses the button bound to start presses the button bound to start
************************************/ ************************************/
void ScreenEz2SelectStyle::MenuStart( PlayerNumber p ) void ScreenEz2SelectStyle::MenuStart( PlayerNumber pn )
{ {
if( !GAMESTATE->m_bSideIsJoined[p] ) if( !GAMESTATE->m_bSideIsJoined[pn] )
{ {
// join them // join them
GAMESTATE->m_bSideIsJoined[p] = true; GAMESTATE->m_bSideIsJoined[pn] = true;
SCREENMAN->RefreshCreditsMessages(); SCREENMAN->RefreshCreditsMessages();
m_soundSelect.Play(); m_soundSelect.Play();
m_sprCursors[p].BeginTweening( 0.25f ); m_sprCursors[pn].BeginTweening( 0.25f );
m_sprCursors[p].SetTweenZoomY( 0 ); m_sprCursors[pn].SetTweenZoomY( 0 );
m_sprControllers[p].BeginTweening( 0.25f ); m_sprControllers[pn].BeginTweening( 0.25f );
m_sprControllers[p].SetTweenZoomY( 0 ); m_sprControllers[pn].SetTweenZoomY( 0 );
RefreshStylesAndList(); RefreshStylesAndList();
m_ScrollingList.SetSelection( 0 ); m_ScrollingList.SetSelection( 0 );
+5 -5
View File
@@ -33,11 +33,11 @@ public:
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
void MenuLeft( PlayerNumber p ); void MenuLeft( PlayerNumber pn );
void MenuRight( PlayerNumber p ); void MenuRight( PlayerNumber pn );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
void MenuDown( PlayerNumber p ); void MenuDown( PlayerNumber pn );
protected: protected:
void TweenOffScreen(); void TweenOffScreen();
+1 -1
View File
@@ -74,7 +74,7 @@ void ScreenGameOver::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenGameOver::MenuStart( PlayerNumber p ) void ScreenGameOver::MenuStart( PlayerNumber pn )
{ {
if( m_bClosing ) if( m_bClosing )
return; return;
+1 -1
View File
@@ -20,7 +20,7 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber p ); virtual void MenuStart( PlayerNumber pn );
private: private:
+5 -5
View File
@@ -1364,10 +1364,10 @@ void ScreenGameplay::TweenOffScreen()
} }
void ScreenGameplay::ShowOniGameOver( PlayerNumber p ) void ScreenGameplay::ShowOniGameOver( PlayerNumber pn )
{ {
m_sprOniGameOver[p].SetDiffuse( D3DXCOLOR(1,1,1,1) ); m_sprOniGameOver[pn].SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprOniGameOver[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END ); m_sprOniGameOver[pn].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
m_sprOniGameOver[p].SetTweenY( CENTER_Y ); m_sprOniGameOver[pn].SetTweenY( CENTER_Y );
m_sprOniGameOver[p].SetEffectBobbing( D3DXVECTOR3(0,6,0), 4 ); m_sprOniGameOver[pn].SetEffectBobbing( D3DXVECTOR3(0,6,0), 4 );
} }
+1 -1
View File
@@ -115,7 +115,7 @@ private:
DifficultyBanner m_DifficultyBanner[NUM_PLAYERS]; DifficultyBanner m_DifficultyBanner[NUM_PLAYERS];
Sprite m_sprOniGameOver[NUM_PLAYERS]; Sprite m_sprOniGameOver[NUM_PLAYERS];
void ShowOniGameOver( PlayerNumber p ); void ShowOniGameOver( PlayerNumber pn );
Sprite m_sprToasty; // easter egg Sprite m_sprToasty; // easter egg
+1 -1
View File
@@ -36,7 +36,7 @@ enum {
GO_VSYNC, GO_VSYNC,
NUM_GRAPHIC_OPTIONS_LINES NUM_GRAPHIC_OPTIONS_LINES
}; };
OptionLineData g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = { OptionRowData g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = {
{ "Display", 2, {"FULLSCREEN", "WINDOWED"} }, { "Display", 2, {"FULLSCREEN", "WINDOWED"} },
{ "Display Res", 7, {"320","400","512","640","800","1024","1280"} }, { "Display Res", 7, {"320","400","512","640","800","1024","1280"} },
{ "Texture Res", 3, {"256","512","1024"} }, { "Texture Res", 3, {"256","512","1024"} },
+2 -2
View File
@@ -123,12 +123,12 @@ void ScreenHowToPlay::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenHowToPlay::MenuBack( PlayerNumber p ) void ScreenHowToPlay::MenuBack( PlayerNumber pn )
{ {
m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true );
} }
void ScreenHowToPlay::MenuStart( PlayerNumber p ) void ScreenHowToPlay::MenuStart( PlayerNumber pn )
{ {
m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen );
+2 -2
View File
@@ -29,8 +29,8 @@ public:
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuBack( PlayerNumber p ); virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( PlayerNumber p ); virtual void MenuStart( PlayerNumber pn );
protected: protected:
Sprite m_sprHowToPlay; Sprite m_sprHowToPlay;
+1 -1
View File
@@ -326,7 +326,7 @@ void ScreenManager::SystemMessage( CString sMessage )
} }
/* /*
void ScreenManager::OverrideCreditsMessage( PlayerNumber p, CString sNewString ) void ScreenManager::OverrideCreditsMessage( PlayerNumber pn, CString sNewString )
{ {
m_textCreditInfo[p].SetText( sNewString ); m_textCreditInfo[p].SetText( sNewString );
} }
+13 -10
View File
@@ -21,10 +21,13 @@
#include "GameState.h" #include "GameState.h"
#define SCROLL_DELAY THEME->GetMetricF("ScreenMusicScroll","ScrollDelay")
#define SCROLL_SPEED THEME->GetMetricF("ScreenMusicScroll","ScrollSpeed")
#define TEXT_ZOOM THEME->GetMetricF("ScreenMusicScroll","TextZoom")
const ScreenMessage SM_StartFadingOut = ScreenMessage(SM_User + 1); const ScreenMessage SM_StartFadingOut = ScreenMessage(SM_User + 1);
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2); const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2);
const int LINE_GAP = 40;
const CString CREDIT_LINES[] = const CString CREDIT_LINES[] =
{ {
@@ -144,28 +147,28 @@ ScreenMusicScroll::ScreenMusicScroll()
for( i=0; i<min(arraySongs.GetSize(), MAX_TOTAL_LINES); i++ ) for( i=0; i<min(arraySongs.GetSize(), MAX_TOTAL_LINES); i++ )
{ {
Song* pSong = arraySongs[i]; Song* pSong = arraySongs[i];
m_textLines[m_iNumLines].LoadFromFont( THEME->GetPathTo("Fonts","normal") ); m_textLines[m_iNumLines].LoadFromFont( THEME->GetPathTo("Fonts","music scroll") );
m_textLines[m_iNumLines].SetText( pSong->GetFullTitle() ); m_textLines[m_iNumLines].SetText( pSong->GetFullTitle() );
m_textLines[m_iNumLines].SetDiffuse( SONGMAN->GetSongColor(pSong) ); m_textLines[m_iNumLines].SetDiffuse( SONGMAN->GetSongColor(pSong) );
m_textLines[m_iNumLines].SetZoom( TEXT_ZOOM );
m_iNumLines++; m_iNumLines++;
} }
for( i=0; i<min(NUM_CREDIT_LINES, MAX_CREDIT_LINES); i++ ) for( i=0; i<min(NUM_CREDIT_LINES, MAX_CREDIT_LINES); i++ )
{ {
m_textLines[m_iNumLines].LoadFromFont( THEME->GetPathTo("Fonts","normal") ); m_textLines[m_iNumLines].LoadFromFont( THEME->GetPathTo("Fonts","music scroll") );
m_textLines[m_iNumLines].SetText( CREDIT_LINES[i] ); m_textLines[m_iNumLines].SetText( CREDIT_LINES[i] );
// this->AddChild( &m_textLines[m_iNumLines] ); m_textLines[m_iNumLines].SetZoom( TEXT_ZOOM );
m_iNumLines++; m_iNumLines++;
} }
for( i=0; i<m_iNumLines; i++ ) for( i=0; i<m_iNumLines; i++ )
{ {
m_textLines[i].SetZoom( 0.7f );
m_textLines[i].SetXY( CENTER_X, SCREEN_BOTTOM + 40 ); m_textLines[i].SetXY( CENTER_X, SCREEN_BOTTOM + 40 );
m_textLines[i].BeginTweening( 0.20f * i ); m_textLines[i].BeginTweening( SCROLL_DELAY * i );
m_textLines[i].BeginTweening( 2.0f ); m_textLines[i].BeginTweening( 2.0f*SCROLL_SPEED );
m_textLines[i].SetTweenXY( CENTER_X, SCREEN_TOP - 40 ); m_textLines[i].SetTweenXY( CENTER_X, SCREEN_TOP - 40 );
} }
@@ -231,13 +234,13 @@ void ScreenMusicScroll::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenMusicScroll::MenuStart( PlayerNumber p ) void ScreenMusicScroll::MenuStart( PlayerNumber pn )
{ {
m_Fade.CloseWipingRight( SM_GoToNextScreen ); m_Fade.CloseWipingRight( SM_GoToNextScreen );
} }
void ScreenMusicScroll::MenuBack( PlayerNumber p ) void ScreenMusicScroll::MenuBack( PlayerNumber pn )
{ {
MenuStart( p ); MenuStart( pn );
} }
+2 -2
View File
@@ -33,8 +33,8 @@ public:
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
private: private:
+172 -82
View File
@@ -22,18 +22,25 @@
#define ICONS_X( p ) THEME->GetMetricF("ScreenOptions",ssprintf("IconsP%dX",p+1)) #define ICONS_X( p ) THEME->GetMetricF("ScreenOptions",ssprintf("IconsP%dX",p+1))
#define ARROWS_X THEME->GetMetricF("ScreenOptions","ArrowsX")
#define LABELS_X THEME->GetMetricF("ScreenOptions","LabelsX") #define LABELS_X THEME->GetMetricF("ScreenOptions","LabelsX")
#define LABELS_ZOOM THEME->GetMetricF("ScreenOptions","LabelsZoom")
#define LABELS_H_ALIGN THEME->GetMetricI("ScreenOptions","LabelsHAlign")
#define ITEMS_ZOOM THEME->GetMetricF("ScreenOptions","ItemsZoom")
#define ITEMS_START_X THEME->GetMetricF("ScreenOptions","ItemsStartX") #define ITEMS_START_X THEME->GetMetricF("ScreenOptions","ItemsStartX")
#define ITEMS_GAP_X THEME->GetMetricF("ScreenOptions","ItemsGapX") #define ITEMS_GAP_X THEME->GetMetricF("ScreenOptions","ItemsGapX")
#define ITEMS_START_Y THEME->GetMetricF("ScreenOptions","ItemsStartY") #define ITEMS_START_Y THEME->GetMetricF("ScreenOptions","ItemsStartY")
#define ITEMS_SPACING_Y THEME->GetMetricF("ScreenOptions","ItemsSpacingY") #define ITEMS_SPACING_Y THEME->GetMetricF("ScreenOptions","ItemsSpacingY")
#define HELP_TEXT THEME->GetMetric("ScreenOptions","HelpText") #define HELP_TEXT THEME->GetMetric("ScreenOptions","HelpText")
#define TIMER_SECONDS THEME->GetMetricI("ScreenOptions","TimerSeconds") #define TIMER_SECONDS THEME->GetMetricI("ScreenOptions","TimerSeconds")
#define COLOR_SELECTED THEME->GetMetricC("ScreenOptions","ColorSelected")
#define COLOR_NOT_SELECTED THEME->GetMetricC("ScreenOptions","ColorNotSelected")
const ScreenMessage SM_PlaySample = ScreenMessage(SM_User-4); const ScreenMessage SM_PlaySample = ScreenMessage(SM_User-4);
const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User-5); const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User-5);
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User-6); const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User-6);
const ScreenMessage SM_TweenOffScreen = ScreenMessage(SM_User-7);
ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CString sTopEdgePath ) ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CString sTopEdgePath )
@@ -41,8 +48,9 @@ ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CStrin
LOG->Trace( "ScreenOptions::ScreenOptions()" ); LOG->Trace( "ScreenOptions::ScreenOptions()" );
m_SoundChangeCol.Load( THEME->GetPathTo("Sounds","option change col") ); m_SoundChangeCol.Load( THEME->GetPathTo("Sounds","option change col") );
m_SoundChangeRow.Load( THEME->GetPathTo("Sounds","option change row") ); m_SoundNextRow.Load( THEME->GetPathTo("Sounds","option next row") );
m_SoundNext.Load( THEME->GetPathTo("Sounds","menu start") ); m_SoundPrevRow.Load( THEME->GetPathTo("Sounds","option prev row") );
m_SoundStart.Load( THEME->GetPathTo("Sounds","menu start") );
m_Menu.Load( m_Menu.Load(
sBackgroundPath, sBackgroundPath,
@@ -77,14 +85,14 @@ ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CStrin
ZeroMemory(&m_OptionDim, sizeof(m_OptionDim)); ZeroMemory(&m_OptionDim, sizeof(m_OptionDim));
} }
void ScreenOptions::Init( InputMode im, OptionLineData optionLineData[], int iNumOptionLines, bool bUseIcons ) void ScreenOptions::Init( InputMode im, OptionRowData OptionRowData[], int iNumOptionLines, bool bUseIcons )
{ {
LOG->Trace( "ScreenOptions::Set()" ); LOG->Trace( "ScreenOptions::Set()" );
m_InputMode = im; m_InputMode = im;
m_OptionLineData = optionLineData; m_OptionRowData = OptionRowData;
m_iNumOptionLines = iNumOptionLines; m_iNumOptionRows = iNumOptionLines;
m_bUseIcons = bUseIcons; m_bUseIcons = bUseIcons;
@@ -101,7 +109,7 @@ void ScreenOptions::Init( InputMode im, OptionLineData optionLineData[], int iNu
if( !GAMESTATE->IsPlayerEnabled(p) ) if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip continue; // skip
for( int l=0; l<m_iNumOptionLines; l++ ) for( int l=0; l<m_iNumOptionRows; l++ )
{ {
m_Underline[p][l].Load( (PlayerNumber)p, true ); m_Underline[p][l].Load( (PlayerNumber)p, true );
m_framePage.AddChild( &m_Underline[p][l] ); m_framePage.AddChild( &m_Underline[p][l] );
@@ -116,24 +124,26 @@ void ScreenOptions::Init( InputMode im, OptionLineData optionLineData[], int iNu
} }
// init text // init text
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach line for( int i=0; i<m_iNumOptionRows; i++ ) // foreach line
{ {
m_framePage.AddChild( &m_sprLineArrows[i] );
m_framePage.AddChild( &m_textOptionLineTitles[i] ); m_framePage.AddChild( &m_textOptionLineTitles[i] );
for( int j=0; j<m_OptionLineData[i].iNumOptions; j++ ) for( int j=0; j<m_OptionRowData[i].iNumOptions; j++ )
{
m_textOptions[i][j].SetZ( -1 );
m_framePage.AddChild( &m_textOptions[i][j] ); // this array has to be big enough to hold all of the options m_framePage.AddChild( &m_textOptions[i][j] ); // this array has to be big enough to hold all of the options
} }
}
// TRICKY: Add one more item. This will be "EXIT"
m_framePage.AddChild( &m_textOptions[i][0] );
InitOptionsText(); InitOptionsText();
PositionUnderlines(); PositionUnderlines();
PositionIcons(); PositionIcons();
RefreshIcons(); RefreshIcons();
PositionHighlights(); PositionCursors();
UpdateEnabledDisabled();
} }
ScreenOptions::~ScreenOptions() ScreenOptions::~ScreenOptions()
@@ -143,9 +153,9 @@ ScreenOptions::~ScreenOptions()
} }
void ScreenOptions::GetWidthXY( PlayerNumber p, int iRow, int &iWidthOut, int &iXOut, int &iYOut ) void ScreenOptions::GetWidthXY( PlayerNumber pn, int iRow, int &iWidthOut, int &iXOut, int &iYOut )
{ {
int iOptionInRow = m_iSelectedOption[p][iRow]; int iOptionInRow = m_iSelectedOption[pn][iRow];
BitmapText &option = m_textOptions[iRow][iOptionInRow]; BitmapText &option = m_textOptions[iRow][iOptionInRow];
iWidthOut = roundf( option.GetWidestLineWidthInSourcePixels() * option.GetZoomX() ); iWidthOut = roundf( option.GetWidestLineWidthInSourcePixels() * option.GetZoomX() );
@@ -155,36 +165,42 @@ void ScreenOptions::GetWidthXY( PlayerNumber p, int iRow, int &iWidthOut, int &i
void ScreenOptions::InitOptionsText() void ScreenOptions::InitOptionsText()
{ {
const float fLineGap = ITEMS_SPACING_Y - max(0, (m_iNumOptionLines-10)*2); const float fLineGap = ITEMS_SPACING_Y - max(0, (m_iNumOptionRows-10)*2);
// init m_textOptions from optionLines // init m_textOptions from optionLines
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line
{ {
OptionLineData &optline = m_OptionLineData[i]; OptionRowData &optline = m_OptionRowData[i];
float fY = ITEMS_START_Y + fLineGap*i; float fY = ITEMS_START_Y + fLineGap*i;
BitmapText &title = m_textOptionLineTitles[i]; BitmapText &title = m_textOptionLineTitles[i];
title.LoadFromFont( THEME->GetPathTo("Fonts","Header2") ); title.LoadFromFont( THEME->GetPathTo("Fonts","option title") );
CString sText = optline.szTitle; CString sText = optline.szTitle;
sText.Replace( " ", "\n" ); sText.Replace( " ", "\n" );
title.SetText( sText ); title.SetText( sText );
title.SetXY( LABELS_X, fY ); title.SetXY( LABELS_X, fY );
title.SetZoom( 0.7f ); title.SetZoom( LABELS_ZOOM );
title.SetHorizAlign( (Actor::HorizAlign)LABELS_H_ALIGN );
title.SetVertAlign( Actor::align_middle ); title.SetVertAlign( Actor::align_middle );
title.TurnShadowOff(); title.TurnShadowOff();
Sprite &arrow = m_sprLineArrows[i];
arrow.Load( THEME->GetPathTo("Graphics","options arrow") );
arrow.SetXY( ARROWS_X, fY );
// init all text in this line and count the width of the line // init all text in this line and count the width of the line
float fX = ITEMS_START_X; // indent 70 pixels float fX = ITEMS_START_X; // indent 70 pixels
for( int j=0; j<optline.iNumOptions; j++ ) // for each option on this line for( int j=0; j<optline.iNumOptions; j++ ) // for each option on this line
{ {
BitmapText &option = m_textOptions[i][j]; BitmapText &option = m_textOptions[i][j];
option.LoadFromFont( THEME->GetPathTo("Fonts","normal") ); option.LoadFromFont( THEME->GetPathTo("Fonts","option item") );
option.SetDiffuse( D3DXCOLOR(1,1,1,1) );
option.SetText( optline.szOptionsText[j] ); option.SetText( optline.szOptionsText[j] );
option.SetZoom( 0.5f ); option.SetZoom( ITEMS_ZOOM );
option.SetShadowLength( 2 ); option.SetShadowLength( 2 );
// set the XY position of each item in the line // set the XY position of each item in the line
@@ -194,6 +210,14 @@ void ScreenOptions::InitOptionsText()
fX += fItemWidth/2 + ITEMS_GAP_X; fX += fItemWidth/2 + ITEMS_GAP_X;
} }
} }
BitmapText &option = m_textOptions[i][0];
option.LoadFromFont( THEME->GetPathTo("Fonts","option item") );
option.SetText( "EXIT" );
option.SetZoom( ITEMS_ZOOM );
option.SetShadowLength( 2 );
float fY = ITEMS_START_Y + fLineGap*i;
option.SetXY( CENTER_X, fY );
} }
void ScreenOptions::DimOption(int line, int option, bool dim) void ScreenOptions::DimOption(int line, int option, bool dim)
@@ -221,7 +245,7 @@ void ScreenOptions::DimOption(int line, int option, bool dim)
bool ScreenOptions::RowCompletelyDimmed(int line) const bool ScreenOptions::RowCompletelyDimmed(int line) const
{ {
for(int i = 0; i < m_OptionLineData[line].iNumOptions; ++i) for(int i = 0; i < m_OptionRowData[line].iNumOptions; ++i)
if(!m_OptionDim[line][i]) return false; if(!m_OptionDim[line][i]) return false;
return true; return true;
} }
@@ -231,7 +255,7 @@ void ScreenOptions::PositionUnderlines()
// Set the position of the underscores showing the current choice for each option line. // Set the position of the underscores showing the current choice for each option line.
for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player
{ {
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line
{ {
// Quad &underline = m_OptionUnderline[p][i]; // Quad &underline = m_OptionUnderline[p][i];
OptionsCursor &underline = m_Underline[p][i]; OptionsCursor &underline = m_Underline[p][i];
@@ -250,7 +274,7 @@ void ScreenOptions::PositionIcons()
// Set the position of the underscores showing the current choice for each option line. // Set the position of the underscores showing the current choice for each option line.
for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player
{ {
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line
{ {
OptionIcon &icon = m_OptionIcons[p][i]; OptionIcon &icon = m_OptionIcons[p][i];
@@ -266,19 +290,21 @@ void ScreenOptions::RefreshIcons()
// Set the position of the underscores showing the current choice for each option line. // Set the position of the underscores showing the current choice for each option line.
for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player
{ {
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach options line for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line
{ {
OptionIcon &icon = m_OptionIcons[p][i]; OptionIcon &icon = m_OptionIcons[p][i];
int iSelection = m_iSelectedOption[p][i]; int iSelection = m_iSelectedOption[p][i];
CString sSelection = m_OptionLineData[i].szOptionsText[iSelection]; CString sSelection = m_OptionRowData[i].szOptionsText[iSelection];
if( sSelection == "ON" )
sSelection = m_OptionRowData[i].szTitle;
icon.Load( (PlayerNumber)p, m_bUseIcons ? sSelection : "", false ); icon.Load( (PlayerNumber)p, m_bUseIcons ? sSelection : "", false );
} }
} }
} }
void ScreenOptions::PositionHighlights() void ScreenOptions::PositionCursors()
{ {
// Set the position of the highlight showing the current option the user is changing. // Set the position of the highlight showing the current option the user is changing.
// Set the position of the underscores showing the current choice for each option line. // Set the position of the underscores showing the current choice for each option line.
@@ -295,7 +321,7 @@ void ScreenOptions::PositionHighlights()
} }
} }
void ScreenOptions::TweenHighlight( PlayerNumber player_no ) void ScreenOptions::TweenCursor( PlayerNumber player_no )
{ {
// Set the position of the highlight showing the current option the user is changing. // Set the position of the highlight showing the current option the user is changing.
int iCurRow = m_iCurrentRow[player_no]; int iCurRow = m_iCurrentRow[player_no];
@@ -310,6 +336,38 @@ void ScreenOptions::TweenHighlight( PlayerNumber player_no )
highlight.SetTweenXY( (float)iX, (float)iY ); highlight.SetTweenXY( (float)iX, (float)iY );
} }
void ScreenOptions::UpdateEnabledDisabled()
{
D3DXCOLOR colorSelected = COLOR_SELECTED;
D3DXCOLOR colorNotSelected = COLOR_NOT_SELECTED;
// init text
for( int i=0; i<m_iNumOptionRows; i++ ) // foreach line
{
bool bThisRowIsSelected = false;
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) && m_iCurrentRow[p] == i )
bThisRowIsSelected = true;
m_sprLineArrows[i].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
m_textOptionLineTitles[i].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
for( int j=0; j<m_OptionRowData[i].iNumOptions; j++ )
m_textOptions[i][j].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
}
bool bThisRowIsSelected = false;
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) && m_iCurrentRow[p] == i )
bThisRowIsSelected = true;
m_textOptions[i][0].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
if( bThisRowIsSelected )
m_textOptions[i][0].SetEffectCamelion( 2.5, colorSelected, colorNotSelected );
else
m_textOptions[i][0].SetEffectNone();
}
void ScreenOptions::Update( float fDeltaTime ) void ScreenOptions::Update( float fDeltaTime )
{ {
//LOG->Trace( "ScreenOptions::Update(%f)", fDeltaTime ); //LOG->Trace( "ScreenOptions::Update(%f)", fDeltaTime );
@@ -338,7 +396,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM )
switch( SM ) switch( SM )
{ {
case SM_MenuTimer: case SM_MenuTimer:
this->MenuStart(PLAYER_1); this->SendScreenMessage( SM_TweenOffScreen, 0 );
break; break;
case SM_GoToPrevScreen: case SM_GoToPrevScreen:
this->ExportOptions(); this->ExportOptions();
@@ -348,6 +406,15 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM )
this->ExportOptions(); this->ExportOptions();
this->GoToNextState(); this->GoToNextState();
break; break;
case SM_TweenOffScreen:
m_Menu.TweenOffScreenToBlack( SM_None, false );
m_SoundStart.Play();
m_Wipe.CloseWipingRight( SM_GoToNextScreen );
m_framePage.BeginTweening( 0.3f, Actor::TWEEN_BIAS_END );
m_framePage.SetTweenX( SCREEN_RIGHT );
break;
} }
} }
@@ -356,12 +423,13 @@ void ScreenOptions::OnChange()
{ {
PositionUnderlines(); PositionUnderlines();
RefreshIcons(); RefreshIcons();
UpdateEnabledDisabled();
} }
void ScreenOptions::MenuBack( PlayerNumber p ) void ScreenOptions::MenuBack( PlayerNumber pn )
{ {
Screen::MenuBack( p ); Screen::MenuBack( pn );
m_Menu.TweenOffScreenToBlack( SM_None, true ); m_Menu.TweenOffScreenToBlack( SM_None, true );
@@ -369,17 +437,12 @@ void ScreenOptions::MenuBack( PlayerNumber p )
} }
void ScreenOptions::MenuStart( PlayerNumber p ) void ScreenOptions::MenuStart( PlayerNumber pn )
{ {
Screen::MenuStart( p ); if( m_iCurrentRow[pn] == m_iNumOptionRows ) // not on exit
this->SendScreenMessage( SM_TweenOffScreen, 0 );
m_Menu.TweenOffScreenToBlack( SM_None, false ); else
MenuDown( pn ); // can't go down any more
m_SoundNext.PlayRandom();
m_Wipe.CloseWipingRight( SM_GoToNextScreen );
m_framePage.BeginTweening( 0.3f, Actor::TWEEN_BIAS_END );
m_framePage.SetTweenX( SCREEN_RIGHT );
} }
void ScreenOptions::MenuLeft( PlayerNumber pn ) void ScreenOptions::MenuLeft( PlayerNumber pn )
@@ -391,19 +454,25 @@ void ScreenOptions::MenuLeft( PlayerNumber pn )
int iCurRow = m_iCurrentRow[p]; int iCurRow = m_iCurrentRow[p];
int new_opt = m_iSelectedOption[p][iCurRow]; if( iCurRow == m_iNumOptionRows ) // EXIT is selected
do { return; // don't allow a move
new_opt--;
} while(new_opt >= 0 && m_OptionDim[iCurRow][new_opt]);
if( new_opt < 0 ) // can't go left any more const int iNumOptions = m_OptionRowData[iCurRow].iNumOptions;
return; m_iSelectedOption[p][iCurRow] = (m_iSelectedOption[p][iCurRow]-1+iNumOptions) % iNumOptions;
// Chris: I commented this out because it made wrapping a pain. Is it used anyway? If so, please
// let me know and I'll fix it.
// do {
// new_opt--;
// } while(new_opt >= 0 && m_OptionDim[iCurRow][new_opt]);
//
// if( new_opt < 0 ) // can't go left any more
// return;
//
// m_iSelectedOption[p][iCurRow] = new_opt;
m_iSelectedOption[p][iCurRow] = new_opt; TweenCursor( (PlayerNumber)p );
TweenHighlight( (PlayerNumber)p );
} }
m_SoundChangeCol.PlayRandom(); m_SoundChangeCol.Play();
OnChange(); OnChange();
} }
@@ -415,20 +484,28 @@ void ScreenOptions::MenuRight( PlayerNumber pn )
continue; // skip continue; // skip
int iCurRow = m_iCurrentRow[p]; int iCurRow = m_iCurrentRow[p];
int new_opt = m_iSelectedOption[p][iCurRow];
do {
new_opt++;
} while(new_opt < m_OptionLineData[iCurRow].iNumOptions &&
m_OptionDim[iCurRow][new_opt]);
if( new_opt == m_OptionLineData[iCurRow].iNumOptions ) // can't go right any more if( iCurRow == m_iNumOptionRows ) // EXIT is selected
return; return; // don't allow a move
m_iSelectedOption[p][iCurRow] = new_opt; const int iNumOptions = m_OptionRowData[iCurRow].iNumOptions;
m_iSelectedOption[p][iCurRow] = (m_iSelectedOption[p][iCurRow]+1) % iNumOptions;
// Chris: I commented this out because it made wrapping a pain. Is it used anyway? If so, please
// let me know and I'll fix it.
// int new_opt = m_iSelectedOption[p][iCurRow];
// do {
// new_opt++;
// } while(new_opt < m_OptionRowData[iCurRow].iNumOptions &&
// m_OptionDim[iCurRow][new_opt]);
//
// if( new_opt == m_OptionRowData[iCurRow].iNumOptions ) // can't go right any more
// return;
//
// m_iSelectedOption[p][iCurRow] = new_opt;
TweenHighlight( (PlayerNumber)p ); TweenCursor( (PlayerNumber)p );
} }
m_SoundChangeCol.PlayRandom(); m_SoundChangeCol.Play();
OnChange(); OnChange();
} }
@@ -439,18 +516,25 @@ void ScreenOptions::MenuUp( PlayerNumber pn )
if( m_InputMode == INPUTMODE_PLAYERS && p != pn ) if( m_InputMode == INPUTMODE_PLAYERS && p != pn )
continue; // skip continue; // skip
/* Find the prev row with any un-dimmed entries. */ if( m_iCurrentRow[p] == 0 ) // on first row
int new_row = m_iCurrentRow[p]; return; // can't go up any more
do {
if(--new_row < 0)
new_row = m_iNumOptionLines-1; // wrap around
if(!RowCompletelyDimmed(new_row)) break;
} while(new_row != m_iCurrentRow[p]);
m_iCurrentRow[p] = new_row;
TweenHighlight( (PlayerNumber)p ); m_iCurrentRow[p]--;
// Chris: Will add back in later
// /* Find the prev row with any un-dimmed entries. */
// int new_row = m_iCurrentRow[p];
// do {
/// if(--new_row < 0)
// new_row = m_iNumOptionRows-1; // wrap around
// if(!RowCompletelyDimmed(new_row)) break;
// } while(new_row != m_iCurrentRow[p]);
// m_iCurrentRow[p] = new_row;
TweenCursor( (PlayerNumber)p );
} }
m_SoundChangeRow.PlayRandom(); m_SoundPrevRow.Play();
OnChange(); OnChange();
} }
@@ -462,18 +546,24 @@ void ScreenOptions::MenuDown( PlayerNumber pn )
if( m_InputMode == INPUTMODE_PLAYERS && p != pn ) if( m_InputMode == INPUTMODE_PLAYERS && p != pn )
continue; // skip continue; // skip
/* Find the next row with any un-dimmed entries. */ if( m_iCurrentRow[p] == m_iNumOptionRows ) // on exit
int new_row = m_iCurrentRow[p]; return; // can't go down any more
do {
if( ++new_row == m_iNumOptionLines )
new_row = 0; // wrap around
if(!RowCompletelyDimmed(new_row)) break;
} while(new_row != m_iCurrentRow[p]);
m_iCurrentRow[p] = new_row;
TweenHighlight( (PlayerNumber)p ); m_iCurrentRow[p]++;
// Chris: Commented this out, but will add back in later.
// /* Find the next row with any un-dimmed entries. */
// int new_row = m_iCurrentRow[p];
// do {
// if( ++new_row == m_iNumOptionRows )
// new_row = 0; // wrap around
// if(!RowCompletelyDimmed(new_row)) break;
// } while(new_row != m_iCurrentRow[p]);
// m_iCurrentRow[p] = new_row;
TweenCursor( (PlayerNumber)p );
} }
m_SoundChangeRow.PlayRandom(); m_SoundNextRow.Play();
OnChange(); OnChange();
} }
+19 -16
View File
@@ -27,7 +27,7 @@ const int MAX_OPTIONS_PER_LINE = 20;
// used to pass menu info into this class // used to pass menu info into this class
struct OptionLineData { struct OptionRowData {
char szTitle[30]; char szTitle[30];
int iNumOptions; int iNumOptions;
char szOptionsText[MAX_OPTIONS_PER_LINE][60]; char szOptionsText[MAX_OPTIONS_PER_LINE][60];
@@ -44,7 +44,7 @@ class ScreenOptions : public Screen
{ {
public: public:
ScreenOptions( CString sBackgroundPath, CString sPagePath, CString sTopEdgePath ); ScreenOptions( CString sBackgroundPath, CString sPagePath, CString sTopEdgePath );
void Init( InputMode im, OptionLineData optionLineData[], int iNumOptionLines, bool bUseIcons ); void Init( InputMode im, OptionRowData OptionRowData[], int iNumOptionLines, bool bUseIcons );
virtual ~ScreenOptions(); virtual ~ScreenOptions();
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
virtual void DrawPrimitives(); virtual void DrawPrimitives();
@@ -55,35 +55,37 @@ protected:
virtual void ImportOptions() = 0; virtual void ImportOptions() = 0;
virtual void ExportOptions() = 0; virtual void ExportOptions() = 0;
void InitOptionsText(); void InitOptionsText();
void GetWidthXY( PlayerNumber p, int iRow, int &iWidthOut, int &iXOut, int &iYOut ); void GetWidthXY( PlayerNumber pn, int iRow, int &iWidthOut, int &iXOut, int &iYOut );
void PositionUnderlines(); void PositionUnderlines();
void PositionIcons(); void PositionIcons();
void RefreshIcons(); void RefreshIcons();
void PositionHighlights(); void PositionCursors();
void TweenHighlight( PlayerNumber player_no ); void TweenCursor( PlayerNumber player_no );
void UpdateEnabledDisabled();
virtual void OnChange(); virtual void OnChange();
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
virtual void GoToNextState() = 0; virtual void GoToNextState() = 0;
virtual void GoToPrevState() = 0; virtual void GoToPrevState() = 0;
void MenuLeft( PlayerNumber p ); void MenuLeft( PlayerNumber pn );
void MenuRight( PlayerNumber p ); void MenuRight( PlayerNumber pn );
void MenuUp( PlayerNumber p ); void MenuUp( PlayerNumber pn );
void MenuDown( PlayerNumber p ); void MenuDown( PlayerNumber pn );
InputMode m_InputMode; InputMode m_InputMode;
bool m_bUseIcons; bool m_bUseIcons;
OptionLineData* m_OptionLineData; OptionRowData* m_OptionRowData;
int m_iNumOptionLines; int m_iNumOptionRows;
MenuElements m_Menu; MenuElements m_Menu;
ActorFrame m_framePage; ActorFrame m_framePage;
Sprite m_sprPage; Sprite m_sprPage;
Sprite m_sprLineArrows[MAX_OPTION_LINES];
BitmapText m_textOptionLineTitles[MAX_OPTION_LINES]; BitmapText m_textOptionLineTitles[MAX_OPTION_LINES];
BitmapText m_textOptions[MAX_OPTION_LINES][MAX_OPTIONS_PER_LINE]; // this array has to be big enough to hold all of the options BitmapText m_textOptions[MAX_OPTION_LINES][MAX_OPTIONS_PER_LINE]; // this array has to be big enough to hold all of the options
bool m_OptionDim[MAX_OPTION_LINES][MAX_OPTIONS_PER_LINE]; bool m_OptionDim[MAX_OPTION_LINES][MAX_OPTIONS_PER_LINE];
@@ -100,9 +102,10 @@ protected:
OptionIcon m_OptionIcons[NUM_PLAYERS][MAX_OPTION_LINES]; OptionIcon m_OptionIcons[NUM_PLAYERS][MAX_OPTION_LINES];
OptionsCursor m_Highlight[NUM_PLAYERS]; OptionsCursor m_Highlight[NUM_PLAYERS];
RandomSample m_SoundChangeCol; RageSoundSample m_SoundChangeCol;
RandomSample m_SoundChangeRow; RageSoundSample m_SoundNextRow;
RandomSample m_SoundNext; RageSoundSample m_SoundPrevRow;
RageSoundSample m_SoundStart;
TransitionInvisible m_Wipe; TransitionInvisible m_Wipe;
}; };
+2 -2
View File
@@ -36,11 +36,11 @@ enum {
PO_DARK, PO_DARK,
NUM_PLAYER_OPTIONS_LINES NUM_PLAYER_OPTIONS_LINES
}; };
OptionLineData g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = { OptionRowData g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = {
{ "Speed", 9, {"x0.5","x0.75","x1","x1.5","x2","x3","x4","x5","x8"} }, { "Speed", 9, {"x0.5","x0.75","x1","x1.5","x2","x3","x4","x5","x8"} },
{ "Boost", 2, {"OFF","ON"} }, { "Boost", 2, {"OFF","ON"} },
{ "Effect", 8, {"OFF","WAVE", "DRUNK", "DIZZY","SPACE","MINI","FLIP","TORNADO"} }, { "Effect", 8, {"OFF","WAVE", "DRUNK", "DIZZY","SPACE","MINI","FLIP","TORNADO"} },
{ "Appear", 4, {"VISIBLE","HIDDEN","SUDDEN","STEALTH"} }, { "Appear\nance", 4, {"VISIBLE","HIDDEN","SUDDEN","STEALTH"} },
{ "Turn", 5, {"OFF","MIRROR","LEFT","RIGHT","SHUFFLE"} }, { "Turn", 5, {"OFF","MIRROR","LEFT","RIGHT","SHUFFLE"} },
{ "Little", 2, {"OFF","ON"} }, { "Little", 2, {"OFF","ON"} },
{ "Scroll", 2, {"STANDARD","REVERSE"} }, { "Scroll", 2, {"STANDARD","REVERSE"} },
+5 -5
View File
@@ -113,15 +113,15 @@ void ScreenPrompt::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenPrompt::MenuLeft( PlayerNumber p ) void ScreenPrompt::MenuLeft( PlayerNumber pn )
{ {
if( !m_bYesNoPrompt ) if( !m_bYesNoPrompt )
return; return;
MenuRight( p ); MenuRight( pn );
} }
void ScreenPrompt::MenuRight( PlayerNumber p ) void ScreenPrompt::MenuRight( PlayerNumber pn )
{ {
if( !m_bYesNoPrompt ) if( !m_bYesNoPrompt )
return; return;
@@ -137,7 +137,7 @@ void ScreenPrompt::MenuRight( PlayerNumber p )
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","edit change line") ); SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","edit change line") );
} }
void ScreenPrompt::MenuStart( PlayerNumber p ) void ScreenPrompt::MenuStart( PlayerNumber pn )
{ {
m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight ); m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight );
@@ -162,7 +162,7 @@ void ScreenPrompt::MenuStart( PlayerNumber p )
m_pOnNo(); m_pOnNo();
} }
void ScreenPrompt::MenuBack( PlayerNumber p ) void ScreenPrompt::MenuBack( PlayerNumber pn )
{ {
} }
+4 -4
View File
@@ -29,10 +29,10 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
protected: protected:
void MenuLeft( PlayerNumber p ); void MenuLeft( PlayerNumber pn );
void MenuRight( PlayerNumber p ); void MenuRight( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
TransitionFade m_Fade; TransitionFade m_Fade;
+4 -4
View File
@@ -274,7 +274,7 @@ void ScreenSelectCourse::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenSelectCourse::MenuLeft( PlayerNumber p, const InputEventType type ) void ScreenSelectCourse::MenuLeft( PlayerNumber pn, const InputEventType type )
{ {
m_MusicWheel.PrevMusic(); m_MusicWheel.PrevMusic();
@@ -282,14 +282,14 @@ void ScreenSelectCourse::MenuLeft( PlayerNumber p, const InputEventType type )
} }
void ScreenSelectCourse::MenuRight( PlayerNumber p, const InputEventType type ) void ScreenSelectCourse::MenuRight( PlayerNumber pn, const InputEventType type )
{ {
m_MusicWheel.NextMusic(); m_MusicWheel.NextMusic();
AfterCourseChange(); AfterCourseChange();
} }
void ScreenSelectCourse::MenuStart( PlayerNumber p ) void ScreenSelectCourse::MenuStart( PlayerNumber pn )
{ {
// this needs to check whether valid Notes are selected! // this needs to check whether valid Notes are selected!
m_MusicWheel.Select(); m_MusicWheel.Select();
@@ -332,7 +332,7 @@ void ScreenSelectCourse::MenuStart( PlayerNumber p )
} }
void ScreenSelectCourse::MenuBack( PlayerNumber p ) void ScreenSelectCourse::MenuBack( PlayerNumber pn )
{ {
MUSIC->Stop(); MUSIC->Stop();
+4 -4
View File
@@ -34,10 +34,10 @@ public:
void TweenOnScreen(); void TweenOnScreen();
void TweenOffScreen(); void TweenOffScreen();
void MenuLeft( PlayerNumber p, const InputEventType type ); void MenuLeft( PlayerNumber pn, const InputEventType type );
void MenuRight( PlayerNumber p, const InputEventType type ); void MenuRight( PlayerNumber pn, const InputEventType type );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
protected: protected:
void AfterCourseChange(); void AfterCourseChange();
+9 -9
View File
@@ -277,25 +277,25 @@ void ScreenSelectDifficulty::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenSelectDifficulty::MenuLeft( PlayerNumber p ) void ScreenSelectDifficulty::MenuLeft( PlayerNumber pn )
{ {
if( m_iSelection[p] == 0 ) // can't go left any more if( m_iSelection[pn] == 0 ) // can't go left any more
return; return;
if( m_bChosen[p] ) if( m_bChosen[pn] )
return; return;
ChangeTo( p, m_iSelection[p], m_iSelection[p]-1 ); ChangeTo( pn, m_iSelection[pn], m_iSelection[pn]-1 );
} }
void ScreenSelectDifficulty::MenuRight( PlayerNumber p ) void ScreenSelectDifficulty::MenuRight( PlayerNumber pn )
{ {
if( m_iSelection[p] == NUM_DIFFICULTY_ITEMS-1 ) // can't go right any more if( m_iSelection[pn] == NUM_DIFFICULTY_ITEMS-1 ) // can't go right any more
return; return;
if( m_bChosen[p] ) if( m_bChosen[pn] )
return; return;
ChangeTo( p, m_iSelection[p], m_iSelection[p]+1 ); ChangeTo( pn, m_iSelection[pn], m_iSelection[pn]+1 );
} }
bool ScreenSelectDifficulty::IsItemOnPage2( int iItemIndex ) bool ScreenSelectDifficulty::IsItemOnPage2( int iItemIndex )
@@ -434,7 +434,7 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
this->SendScreenMessage( SM_StartTweeningOffScreen, 0.7f ); this->SendScreenMessage( SM_StartTweeningOffScreen, 0.7f );
} }
void ScreenSelectDifficulty::MenuBack( PlayerNumber p ) void ScreenSelectDifficulty::MenuBack( PlayerNumber pn )
{ {
m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true );
} }
+4 -4
View File
@@ -31,10 +31,10 @@ public:
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
void MenuLeft( PlayerNumber p ); void MenuLeft( PlayerNumber pn );
void MenuRight( PlayerNumber p ); void MenuRight( PlayerNumber pn );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
void TweenOffScreen(); void TweenOffScreen();
void TweenOnScreen(); void TweenOnScreen();
+1 -1
View File
@@ -34,7 +34,7 @@ enum {
}; };
OptionLineData g_SelectGameLines[NUM_SELECT_GAME_LINES] = OptionRowData g_SelectGameLines[NUM_SELECT_GAME_LINES] =
{ {
"Game", 0, { "" } "Game", 0, { "" }
}; };
+8 -8
View File
@@ -238,17 +238,17 @@ void ScreenSelectGroup::AfterChange()
} }
void ScreenSelectGroup::MenuLeft( PlayerNumber p ) void ScreenSelectGroup::MenuLeft( PlayerNumber pn )
{ {
MenuUp( p ); MenuUp( pn );
} }
void ScreenSelectGroup::MenuRight( PlayerNumber p ) void ScreenSelectGroup::MenuRight( PlayerNumber pn )
{ {
MenuDown( p ); MenuDown( pn );
} }
void ScreenSelectGroup::MenuUp( PlayerNumber p ) void ScreenSelectGroup::MenuUp( PlayerNumber pn )
{ {
if( m_bChosen ) if( m_bChosen )
return; return;
@@ -261,7 +261,7 @@ void ScreenSelectGroup::MenuUp( PlayerNumber p )
} }
void ScreenSelectGroup::MenuDown( PlayerNumber p ) void ScreenSelectGroup::MenuDown( PlayerNumber pn )
{ {
if( m_bChosen ) if( m_bChosen )
return; return;
@@ -273,7 +273,7 @@ void ScreenSelectGroup::MenuDown( PlayerNumber p )
m_soundChange.PlayRandom(); m_soundChange.PlayRandom();
} }
void ScreenSelectGroup::MenuStart( PlayerNumber p ) void ScreenSelectGroup::MenuStart( PlayerNumber pn )
{ {
m_soundSelect.PlayRandom(); m_soundSelect.PlayRandom();
m_bChosen = true; m_bChosen = true;
@@ -293,7 +293,7 @@ void ScreenSelectGroup::MenuStart( PlayerNumber p )
this->SendScreenMessage( SM_StartFadingOut, 0.8f ); this->SendScreenMessage( SM_StartFadingOut, 0.8f );
} }
void ScreenSelectGroup::MenuBack( PlayerNumber p ) void ScreenSelectGroup::MenuBack( PlayerNumber pn )
{ {
m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true );
} }
+6 -6
View File
@@ -30,12 +30,12 @@ public:
void AfterChange(); void AfterChange();
void MenuLeft( PlayerNumber p ); void MenuLeft( PlayerNumber pn );
void MenuRight( PlayerNumber p ); void MenuRight( PlayerNumber pn );
void MenuUp( PlayerNumber p ); void MenuUp( PlayerNumber pn );
void MenuDown( PlayerNumber p ); void MenuDown( PlayerNumber pn );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
void TweenOffScreen(); void TweenOffScreen();
void TweenOnScreen(); void TweenOnScreen();
+42 -38
View File
@@ -36,8 +36,10 @@
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectMusic","BannerHeight") #define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectMusic","BannerHeight")
#define BPM_X THEME->GetMetricF("ScreenSelectMusic","BPMX") #define BPM_X THEME->GetMetricF("ScreenSelectMusic","BPMX")
#define BPM_Y THEME->GetMetricF("ScreenSelectMusic","BPMY") #define BPM_Y THEME->GetMetricF("ScreenSelectMusic","BPMY")
#define BPM_ZOOM THEME->GetMetricF("ScreenSelectMusic","BPMZoom")
#define STAGE_X THEME->GetMetricF("ScreenSelectMusic","StageX") #define STAGE_X THEME->GetMetricF("ScreenSelectMusic","StageX")
#define STAGE_Y THEME->GetMetricF("ScreenSelectMusic","StageY") #define STAGE_Y THEME->GetMetricF("ScreenSelectMusic","StageY")
#define STAGE_ZOOM THEME->GetMetricF("ScreenSelectMusic","StageZoom")
#define CD_TITLE_X THEME->GetMetricF("ScreenSelectMusic","CDTitleX") #define CD_TITLE_X THEME->GetMetricF("ScreenSelectMusic","CDTitleX")
#define CD_TITLE_Y THEME->GetMetricF("ScreenSelectMusic","CDTitleY") #define CD_TITLE_Y THEME->GetMetricF("ScreenSelectMusic","CDTitleY")
#define DIFFICULTY_FRAME_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("DifficultyFrameP%dX",p+1)) #define DIFFICULTY_FRAME_X( p ) THEME->GetMetricF("ScreenSelectMusic",ssprintf("DifficultyFrameP%dX",p+1))
@@ -103,11 +105,12 @@ ScreenSelectMusic::ScreenSelectMusic()
this->AddChild( &m_sprBannerFrame ); this->AddChild( &m_sprBannerFrame );
m_BPMDisplay.SetXY( BPM_X, BPM_Y ); m_BPMDisplay.SetXY( BPM_X, BPM_Y );
m_BPMDisplay.SetZoom( BPM_ZOOM );
this->AddChild( &m_BPMDisplay ); this->AddChild( &m_BPMDisplay );
m_textStage.LoadFromFont( THEME->GetPathTo("Fonts","Header2") ); m_textStage.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
m_textStage.TurnShadowOff(); m_textStage.TurnShadowOff();
m_textStage.SetZoomX( 1.0f ); m_textStage.SetZoom( STAGE_ZOOM );
m_textStage.SetXY( STAGE_X, STAGE_Y ); m_textStage.SetXY( STAGE_X, STAGE_Y );
m_textStage.SetText( GAMESTATE->GetStageText() ); m_textStage.SetText( GAMESTATE->GetStageText() );
m_textStage.SetDiffuse( GAMESTATE->GetStageColor() ); m_textStage.SetDiffuse( GAMESTATE->GetStageColor() );
@@ -254,6 +257,7 @@ void ScreenSelectMusic::DrawPrimitives()
void ScreenSelectMusic::TweenOnScreen() void ScreenSelectMusic::TweenOnScreen()
{ {
int p;
m_sprBannerFrame.FadeOn( 0, "bounce left", TWEEN_TIME ); m_sprBannerFrame.FadeOn( 0, "bounce left", TWEEN_TIME );
m_Banner.FadeOn( 0, "bounce left", TWEEN_TIME ); m_Banner.FadeOn( 0, "bounce left", TWEEN_TIME );
@@ -261,7 +265,7 @@ void ScreenSelectMusic::TweenOnScreen()
m_textStage.FadeOn( 0, "bounce left", TWEEN_TIME ); m_textStage.FadeOn( 0, "bounce left", TWEEN_TIME );
m_sprCDTitle.FadeOn( 0, "bounce left", TWEEN_TIME ); m_sprCDTitle.FadeOn( 0, "bounce left", TWEEN_TIME );
for( int p=0; p<NUM_PLAYERS; p++ ) for( p=0; p<NUM_PLAYERS; p++ )
{ {
m_sprDifficultyFrame[p].FadeOn( 0, "fade", TWEEN_TIME ); m_sprDifficultyFrame[p].FadeOn( 0, "fade", TWEEN_TIME );
m_sprMeterFrame[p].FadeOn( 0, "fade", TWEEN_TIME ); m_sprMeterFrame[p].FadeOn( 0, "fade", TWEEN_TIME );
@@ -448,44 +452,44 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType
} }
void ScreenSelectMusic::EasierDifficulty( PlayerNumber p ) void ScreenSelectMusic::EasierDifficulty( PlayerNumber pn )
{ {
LOG->Trace( "ScreenSelectMusic::EasierDifficulty( %d )", p ); LOG->Trace( "ScreenSelectMusic::EasierDifficulty( %d )", pn );
if( !GAMESTATE->IsPlayerEnabled(p) ) if( !GAMESTATE->IsPlayerEnabled(pn) )
return; return;
if( m_arrayNotes.GetSize() == 0 ) if( m_arrayNotes.GetSize() == 0 )
return; return;
if( m_iSelection[p] == 0 ) if( m_iSelection[pn] == 0 )
return; return;
m_iSelection[p]--; m_iSelection[pn]--;
// the user explicity switched difficulties. Update the preferred difficulty // the user explicity switched difficulties. Update the preferred difficulty
GAMESTATE->m_PreferredDifficultyClass[p] = m_arrayNotes[ m_iSelection[p] ]->m_DifficultyClass; GAMESTATE->m_PreferredDifficultyClass[pn] = m_arrayNotes[ m_iSelection[pn] ]->m_DifficultyClass;
m_soundChangeNotes.Play(); m_soundChangeNotes.Play();
AfterNotesChange( p ); AfterNotesChange( pn );
} }
void ScreenSelectMusic::HarderDifficulty( PlayerNumber p ) void ScreenSelectMusic::HarderDifficulty( PlayerNumber pn )
{ {
LOG->Trace( "ScreenSelectMusic::HarderDifficulty( %d )", p ); LOG->Trace( "ScreenSelectMusic::HarderDifficulty( %d )", pn );
if( !GAMESTATE->IsPlayerEnabled(p) ) if( !GAMESTATE->IsPlayerEnabled(pn) )
return; return;
if( m_arrayNotes.GetSize() == 0 ) if( m_arrayNotes.GetSize() == 0 )
return; return;
if( m_iSelection[p] == m_arrayNotes.GetSize()-1 ) if( m_iSelection[pn] == m_arrayNotes.GetSize()-1 )
return; return;
m_iSelection[p]++; m_iSelection[pn]++;
// the user explicity switched difficulties. Update the preferred difficulty // the user explicity switched difficulties. Update the preferred difficulty
GAMESTATE->m_PreferredDifficultyClass[p] = m_arrayNotes[ m_iSelection[p] ]->m_DifficultyClass; GAMESTATE->m_PreferredDifficultyClass[pn] = m_arrayNotes[ m_iSelection[pn] ]->m_DifficultyClass;
m_soundChangeNotes.Play(); m_soundChangeNotes.Play();
AfterNotesChange( p ); AfterNotesChange( pn );
} }
@@ -537,9 +541,9 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenSelectMusic::MenuLeft( PlayerNumber p, const InputEventType type ) void ScreenSelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type )
{ {
if( type >= IET_SLOW_REPEAT && INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_RIGHT) ) ) if( type >= IET_SLOW_REPEAT && INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_RIGHT) ) )
return; // ignore return; // ignore
if( ! m_MusicWheel.WheelIsLocked() ) if( ! m_MusicWheel.WheelIsLocked() )
@@ -549,9 +553,9 @@ void ScreenSelectMusic::MenuLeft( PlayerNumber p, const InputEventType type )
} }
void ScreenSelectMusic::MenuRight( PlayerNumber p, const InputEventType type ) void ScreenSelectMusic::MenuRight( PlayerNumber pn, const InputEventType type )
{ {
if( type >= IET_SLOW_REPEAT && INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_LEFT) ) ) if( type >= IET_SLOW_REPEAT && INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_LEFT) ) )
return; // ignore return; // ignore
if( ! m_MusicWheel.WheelIsLocked() ) if( ! m_MusicWheel.WheelIsLocked() )
@@ -560,11 +564,11 @@ void ScreenSelectMusic::MenuRight( PlayerNumber p, const InputEventType type )
m_MusicWheel.NextMusic(); m_MusicWheel.NextMusic();
} }
void ScreenSelectMusic::MenuStart( PlayerNumber p ) void ScreenSelectMusic::MenuStart( PlayerNumber pn )
{ {
if( p != PLAYER_INVALID && if( pn != PLAYER_INVALID &&
INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_LEFT) ) && INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_LEFT) ) &&
INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_RIGHT) ) ) INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_RIGHT) ) )
{ {
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_soundLocked.Play(); m_soundLocked.Play();
@@ -590,7 +594,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber p )
if( !bResult ) if( !bResult )
{ {
/* why do this? breaks tabs and roulette -glenn */ /* why do this? breaks tabs and roulette -glenn */
// if( p != PLAYER_INVALID ) // if( pn != PLAYER_INVALID )
// this->SendScreenMessage( SM_MenuTimer, 1 ); // re-throw a timer message // this->SendScreenMessage( SM_MenuTimer, 1 ); // re-throw a timer message
} }
else // if !bResult else // if !bResult
@@ -665,39 +669,39 @@ void ScreenSelectMusic::MenuStart( PlayerNumber p )
} }
void ScreenSelectMusic::MenuBack( PlayerNumber p ) void ScreenSelectMusic::MenuBack( PlayerNumber pn )
{ {
MUSIC->Stop(); MUSIC->Stop();
m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true );
} }
void ScreenSelectMusic::AfterNotesChange( PlayerNumber p ) void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn )
{ {
if( !GAMESTATE->IsPlayerEnabled(p) ) if( !GAMESTATE->IsPlayerEnabled(pn) )
return; return;
m_iSelection[p] = clamp( m_iSelection[p], 0, m_arrayNotes.GetSize()-1 ); // bounds clamping m_iSelection[pn] = clamp( m_iSelection[pn], 0, m_arrayNotes.GetSize()-1 ); // bounds clamping
Notes* pNotes = m_arrayNotes.GetSize()>0 ? m_arrayNotes[m_iSelection[p]] : NULL; Notes* pNotes = m_arrayNotes.GetSize()>0 ? m_arrayNotes[m_iSelection[pn]] : NULL;
GAMESTATE->m_pCurNotes[p] = pNotes; GAMESTATE->m_pCurNotes[pn] = pNotes;
// m_BPMDisplay.SetZoomY( 0 ); // m_BPMDisplay.SetZoomY( 0 );
// m_BPMDisplay.BeginTweening( 0.2f ); // m_BPMDisplay.BeginTweening( 0.2f );
// m_BPMDisplay.SetTweenZoomY( 1.2f ); // m_BPMDisplay.SetTweenZoomY( 1.2f );
DifficultyClass dc = GAMESTATE->m_PreferredDifficultyClass[p]; DifficultyClass dc = GAMESTATE->m_PreferredDifficultyClass[pn];
Song* pSong = GAMESTATE->m_pCurSong; Song* pSong = GAMESTATE->m_pCurSong;
Notes* m_pNotes = GAMESTATE->m_pCurNotes[p]; Notes* m_pNotes = GAMESTATE->m_pCurNotes[pn];
if( m_pNotes ) if( m_pNotes )
m_HighScore[p].SetScore( (float)m_pNotes->m_iTopScore ); m_HighScore[pn].SetScore( (float)m_pNotes->m_iTopScore );
m_DifficultyIcon[p].SetFromNotes( pNotes ); m_DifficultyIcon[pn].SetFromNotes( pNotes );
m_FootMeter[p].SetFromNotes( pNotes ); m_FootMeter[pn].SetFromNotes( pNotes );
m_GrooveRadar.SetFromNotes( p, pNotes ); m_GrooveRadar.SetFromNotes( pn, pNotes );
m_MusicWheel.NotesChanged( p ); m_MusicWheel.NotesChanged( pn );
} }
void ScreenSelectMusic::AfterMusicChange() void ScreenSelectMusic::AfterMusicChange()
+7 -7
View File
@@ -37,20 +37,20 @@ public:
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuLeft( PlayerNumber p, const InputEventType type ); virtual void MenuLeft( PlayerNumber pn, const InputEventType type );
virtual void MenuRight( PlayerNumber p, const InputEventType type ); virtual void MenuRight( PlayerNumber pn, const InputEventType type );
virtual void MenuStart( PlayerNumber p ); virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber p ); virtual void MenuBack( PlayerNumber pn );
protected: protected:
void TweenOnScreen(); void TweenOnScreen();
void TweenOffScreen(); void TweenOffScreen();
void TweenScoreOnAndOffAfterChangeSort(); void TweenScoreOnAndOffAfterChangeSort();
void EasierDifficulty( PlayerNumber p ); void EasierDifficulty( PlayerNumber pn );
void HarderDifficulty( PlayerNumber p ); void HarderDifficulty( PlayerNumber pn );
void AfterNotesChange( PlayerNumber p ); void AfterNotesChange( PlayerNumber pn );
void AfterMusicChange(); void AfterMusicChange();
void PlayMusicSample(); void PlayMusicSample();
void SortOrderChanged(); void SortOrderChanged();
+6 -6
View File
@@ -185,7 +185,7 @@ void ScreenSelectStyle::AfterChange()
m_sprInfo.SetTweenZoomY( 1 ); m_sprInfo.SetTweenZoomY( 1 );
} }
void ScreenSelectStyle::MenuLeft( PlayerNumber p ) void ScreenSelectStyle::MenuLeft( PlayerNumber pn )
{ {
// search for a style to the left of the current selection that is enabled // search for a style to the left of the current selection that is enabled
int iSwitchToStyleIndex = -1; // -1 means none found int iSwitchToStyleIndex = -1; // -1 means none found
@@ -208,7 +208,7 @@ void ScreenSelectStyle::MenuLeft( PlayerNumber p )
} }
void ScreenSelectStyle::MenuRight( PlayerNumber p ) void ScreenSelectStyle::MenuRight( PlayerNumber pn )
{ {
// search for a style to the right of the current selection that is enabled // search for a style to the right of the current selection that is enabled
int iSwitchToStyleIndex = -1; // -1 means none found int iSwitchToStyleIndex = -1; // -1 means none found
@@ -230,12 +230,12 @@ void ScreenSelectStyle::MenuRight( PlayerNumber p )
AfterChange(); AfterChange();
} }
void ScreenSelectStyle::MenuStart( PlayerNumber p ) void ScreenSelectStyle::MenuStart( PlayerNumber pn )
{ {
if( p!=PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[p] ) if( pn!=PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[pn] )
{ {
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") ); SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
GAMESTATE->m_bSideIsJoined[p] = true; GAMESTATE->m_bSideIsJoined[pn] = true;
SCREENMAN->RefreshCreditsMessages(); SCREENMAN->RefreshCreditsMessages();
UpdateEnabledDisabled(); UpdateEnabledDisabled();
return; // don't fall through return; // don't fall through
@@ -260,7 +260,7 @@ void ScreenSelectStyle::MenuStart( PlayerNumber p )
TweenOffScreen(); TweenOffScreen();
} }
void ScreenSelectStyle::MenuBack( PlayerNumber p ) void ScreenSelectStyle::MenuBack( PlayerNumber pn )
{ {
MUSIC->Stop(); MUSIC->Stop();
+4 -4
View File
@@ -29,10 +29,10 @@ public:
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
void MenuLeft( PlayerNumber p ); void MenuLeft( PlayerNumber pn );
void MenuRight( PlayerNumber p ); void MenuRight( PlayerNumber pn );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
void TweenOffScreen(); void TweenOffScreen();
void TweenOnScreen(); void TweenOnScreen();
+5 -5
View File
@@ -242,7 +242,7 @@ void ScreenSelectStyle5th::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenSelectStyle5th::MenuLeft( PlayerNumber p ) void ScreenSelectStyle5th::MenuLeft( PlayerNumber pn )
{ {
if( m_iSelection == 0 ) // can't go left any further if( m_iSelection == 0 ) // can't go left any further
return; return;
@@ -255,7 +255,7 @@ void ScreenSelectStyle5th::MenuLeft( PlayerNumber p )
} }
void ScreenSelectStyle5th::MenuRight( PlayerNumber p ) void ScreenSelectStyle5th::MenuRight( PlayerNumber pn )
{ {
if( m_iSelection == NUM_DANCE_STYLES-1 ) // can't go right any further if( m_iSelection == NUM_DANCE_STYLES-1 ) // can't go right any further
return; return;
@@ -267,10 +267,10 @@ void ScreenSelectStyle5th::MenuRight( PlayerNumber p )
AfterChange(); AfterChange();
} }
void ScreenSelectStyle5th::MenuStart( PlayerNumber p ) void ScreenSelectStyle5th::MenuStart( PlayerNumber pn )
{ {
GAMESTATE->m_CurStyle = Style( m_iSelection ); GAMESTATE->m_CurStyle = Style( m_iSelection );
GAMESTATE->m_MasterPlayerNumber = p; GAMESTATE->m_MasterPlayerNumber = pn;
CString sCurStyleName = GAMESTATE->GetCurrentStyleDef()->m_szName; CString sCurStyleName = GAMESTATE->GetCurrentStyleDef()->m_szName;
sCurStyleName.MakeLower(); sCurStyleName.MakeLower();
@@ -287,7 +287,7 @@ void ScreenSelectStyle5th::MenuStart( PlayerNumber p )
m_soundSelect.PlayRandom(); m_soundSelect.PlayRandom();
} }
void ScreenSelectStyle5th::MenuBack( PlayerNumber p ) void ScreenSelectStyle5th::MenuBack( PlayerNumber pn )
{ {
MUSIC->Stop(); MUSIC->Stop();
+4 -4
View File
@@ -37,10 +37,10 @@ public:
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
void MenuLeft( PlayerNumber p ); void MenuLeft( PlayerNumber pn );
void MenuRight( PlayerNumber p ); void MenuRight( PlayerNumber pn );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
void TweenOffScreen(); void TweenOffScreen();
void TweenOnScreen(); void TweenOnScreen();
+2 -2
View File
@@ -29,10 +29,10 @@ enum {
NUM_SONG_OPTIONS_LINES NUM_SONG_OPTIONS_LINES
}; };
OptionLineData g_SongOptionsLines[NUM_SONG_OPTIONS_LINES] = { OptionRowData g_SongOptionsLines[NUM_SONG_OPTIONS_LINES] = {
{ "Life Type", 2, {"BAR","BATTERY"} }, { "Life Type", 2, {"BAR","BATTERY"} },
{ "Bar Drain", 3, {"NORMAL","NO RECOVER","SUDDEN DEATH"} }, { "Bar Drain", 3, {"NORMAL","NO RECOVER","SUDDEN DEATH"} },
{ "Bat.Lives", 10, {"1","2","3","4","5","6","7","8","9","10"} }, { "Bat Lives", 10, {"1","2","3","4","5","6","7","8","9","10"} },
{ "Fail", 3, {"ARCADE","END OF SONG","OFF"} }, { "Fail", 3, {"ARCADE","END OF SONG","OFF"} },
{ "Assist", 2, {"OFF","TICK"} }, { "Assist", 2, {"OFF","TICK"} },
{ "Rate", 9, {"x0.7","x0.8","x0.9","x1.0","x1.1","x1.2","x1.3","x1.4","x1.5"} }, { "Rate", 9, {"x0.7","x0.8","x0.9","x1.0","x1.1","x1.2","x1.3","x1.4","x1.5"} },
+2
View File
@@ -107,9 +107,11 @@ ScreenStage::ScreenStage()
for( int i=0; i<4; i++ ) for( int i=0; i<4; i++ )
{ {
m_sprNumbers[i].Load( THEME->GetPathTo("Graphics","stage numbers") ); m_sprNumbers[i].Load( THEME->GetPathTo("Graphics","stage numbers") );
m_sprNumbers[i].SetDiffuse( GAMESTATE->GetStageColor() );
m_sprNumbers[i].StopAnimating(); m_sprNumbers[i].StopAnimating();
} }
m_sprStage.Load( THEME->GetPathTo("Graphics","stage stage") ); // we may load a different graphic into here later m_sprStage.Load( THEME->GetPathTo("Graphics","stage stage") ); // we may load a different graphic into here later
m_sprStage.SetDiffuse( GAMESTATE->GetStageColor() );
+5 -5
View File
@@ -118,15 +118,15 @@ void ScreenTextEntry::HandleScreenMessage( const ScreenMessage SM )
} }
} }
void ScreenTextEntry::MenuLeft( PlayerNumber p ) void ScreenTextEntry::MenuLeft( PlayerNumber pn )
{ {
} }
void ScreenTextEntry::MenuRight( PlayerNumber p ) void ScreenTextEntry::MenuRight( PlayerNumber pn )
{ {
} }
void ScreenTextEntry::MenuStart( PlayerNumber p ) void ScreenTextEntry::MenuStart( PlayerNumber pn )
{ {
m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight ); m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight );
@@ -151,8 +151,8 @@ void ScreenTextEntry::MenuStart( PlayerNumber p )
m_pOnOK( m_sAnswer ); m_pOnOK( m_sAnswer );
} }
void ScreenTextEntry::MenuBack( PlayerNumber p ) void ScreenTextEntry::MenuBack( PlayerNumber pn )
{ {
m_bCancelled = true; m_bCancelled = true;
MenuStart(p); MenuStart(pn);
} }
+4 -4
View File
@@ -30,10 +30,10 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );
protected: protected:
virtual void MenuLeft( PlayerNumber p ); virtual void MenuLeft( PlayerNumber pn );
virtual void MenuRight( PlayerNumber p ); virtual void MenuRight( PlayerNumber pn );
virtual void MenuStart( PlayerNumber p ); virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber p ); virtual void MenuBack( PlayerNumber pn );
TransitionFade m_Fade; TransitionFade m_Fade;
BitmapText m_textQuestion; BitmapText m_textQuestion;
+6 -6
View File
@@ -317,7 +317,7 @@ void ScreenTitleMenu::GainFocus( int iChoiceIndex )
m_textChoice[iChoiceIndex].SetEffectCamelion( 2.5f, color1, color2 ); m_textChoice[iChoiceIndex].SetEffectCamelion( 2.5f, color1, color2 );
} }
void ScreenTitleMenu::MenuUp( PlayerNumber p ) void ScreenTitleMenu::MenuUp( PlayerNumber pn )
{ {
LoseFocus( m_TitleMenuChoice ); LoseFocus( m_TitleMenuChoice );
@@ -332,7 +332,7 @@ void ScreenTitleMenu::MenuUp( PlayerNumber p )
} }
void ScreenTitleMenu::MenuDown( PlayerNumber p ) void ScreenTitleMenu::MenuDown( PlayerNumber pn )
{ {
LoseFocus( m_TitleMenuChoice ); LoseFocus( m_TitleMenuChoice );
@@ -347,10 +347,10 @@ void ScreenTitleMenu::MenuDown( PlayerNumber p )
} }
void ScreenTitleMenu::MenuStart( PlayerNumber p ) void ScreenTitleMenu::MenuStart( PlayerNumber pn )
{ {
GAMESTATE->m_bSideIsJoined[p] = true; GAMESTATE->m_bSideIsJoined[pn] = true;
GAMESTATE->m_MasterPlayerNumber = p; GAMESTATE->m_MasterPlayerNumber = pn;
GAMESTATE->m_bPlayersCanJoin = false; GAMESTATE->m_bPlayersCanJoin = false;
@@ -399,7 +399,7 @@ void ScreenTitleMenu::MenuStart( PlayerNumber p )
} }
} }
void ScreenTitleMenu::MenuBack( PlayerNumber p ) void ScreenTitleMenu::MenuBack( PlayerNumber pn )
{ {
this->SendScreenMessage( SM_FadeToDemonstration, 0 ); this->SendScreenMessage( SM_FadeToDemonstration, 0 );
} }
+4 -4
View File
@@ -42,10 +42,10 @@ public:
private: private:
void GainFocus( int iChoiceIndex ); void GainFocus( int iChoiceIndex );
void LoseFocus( int iChoiceIndex ); void LoseFocus( int iChoiceIndex );
void MenuUp( PlayerNumber p ); void MenuUp( PlayerNumber pn );
void MenuDown( PlayerNumber p ); void MenuDown( PlayerNumber pn );
void MenuBack( PlayerNumber p ); void MenuBack( PlayerNumber pn );
void MenuStart( PlayerNumber p ); void MenuStart( PlayerNumber pn );
TitleMenuChoice m_TitleMenuChoice; TitleMenuChoice m_TitleMenuChoice;
+9 -9
View File
@@ -40,7 +40,7 @@ void SmallGradeDisplay::DrawPrimitives()
Sprite::DrawPrimitives(); Sprite::DrawPrimitives();
} }
void SmallGradeDisplay::SetGrade( PlayerNumber p, Grade g ) void SmallGradeDisplay::SetGrade( PlayerNumber pn, Grade g )
{ {
m_Grade = g; m_Grade = g;
@@ -49,14 +49,14 @@ void SmallGradeDisplay::SetGrade( PlayerNumber p, Grade g )
int iNumCols = 2; int iNumCols = 2;
switch( g ) switch( g )
{ {
case GRADE_AAA: SetState( 0*iNumCols+p ); break; case GRADE_AAA: SetState( 0*iNumCols+pn ); break;
case GRADE_AA: SetState( 1*iNumCols+p ); break; case GRADE_AA: SetState( 1*iNumCols+pn ); break;
case GRADE_A: SetState( 2*iNumCols+p ); break; case GRADE_A: SetState( 2*iNumCols+pn ); break;
case GRADE_B: SetState( 3*iNumCols+p ); break; case GRADE_B: SetState( 3*iNumCols+pn ); break;
case GRADE_C: SetState( 4*iNumCols+p ); break; case GRADE_C: SetState( 4*iNumCols+pn ); break;
case GRADE_D: SetState( 5*iNumCols+p ); break; case GRADE_D: SetState( 5*iNumCols+pn ); break;
case GRADE_E: SetState( 6*iNumCols+p ); break; case GRADE_E: SetState( 6*iNumCols+pn ); break;
case GRADE_NO_DATA: SetState( 7*iNumCols+p ); break; case GRADE_NO_DATA: SetState( 7*iNumCols+pn ); break;
default: ASSERT(0); default: ASSERT(0);
} }
} }
+1 -1
View File
@@ -25,7 +25,7 @@ public:
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
virtual void DrawPrimitives(); virtual void DrawPrimitives();
void SetGrade( PlayerNumber p, Grade g ); void SetGrade( PlayerNumber pn, Grade g );
protected: protected:
+2 -2
View File
@@ -18,12 +18,12 @@
#include "GameState.h" #include "GameState.h"
void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData* pNoteDataOut ) const void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber pn, NoteData* pOriginal, NoteData* pNoteDataOut ) const
{ {
int iNewToOriginalTrack[MAX_COLS_PER_PLAYER]; int iNewToOriginalTrack[MAX_COLS_PER_PLAYER];
for( int col=0; col<m_iColsPerPlayer; col++ ) for( int col=0; col<m_iColsPerPlayer; col++ )
{ {
ColumnInfo colInfo = m_ColumnInfo[p][col]; ColumnInfo colInfo = m_ColumnInfo[pn][col];
int originalTrack = colInfo.track; int originalTrack = colInfo.track;
iNewToOriginalTrack[col] = originalTrack; iNewToOriginalTrack[col] = originalTrack;
+1 -1
View File
@@ -67,6 +67,6 @@ public:
PlayerNumber ControllerToPlayerNumber( GameController controller ) const; PlayerNumber ControllerToPlayerNumber( GameController controller ) const;
void GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData* pNoteDataOut ) const; void GetTransformedNoteDataForStyle( PlayerNumber pn, NoteData* pOriginal, NoteData* pNoteDataOut ) const;
}; };
+1 -1
View File
@@ -17,7 +17,7 @@ struct StyleInput
int col; int col;
StyleInput() { MakeInvalid(); }; StyleInput() { MakeInvalid(); };
StyleInput( PlayerNumber p, int c ) { player = p; col = c; }; StyleInput( PlayerNumber pn, int c ) { player = pn; col = c; };
bool operator==( const StyleInput &other ) { return player == other.player && col == other.col; }; bool operator==( const StyleInput &other ) { return player == other.player && col == other.col; };
inline bool IsValid() const { return player != PLAYER_INVALID; }; inline bool IsValid() const { return player != PLAYER_INVALID; };