Moved more constants into theme metrics
This commit is contained in:
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
------------------------CVS after 3.00 beta 6----------------
|
------------------------CVS after 3.00 beta 6----------------
|
||||||
NEW FEATURE: Delayed escape/back key is now optional.
|
NEW FEATURE: Delayed escape/back key is now optional.
|
||||||
CHANGE: Slow-motion is now on ~ instead of shift, since we use shift
|
CHANGE: Slow-motion is now on ~ instead of shift, since we use shift
|
||||||
elsewhere now.
|
elsewhere now.
|
||||||
@@ -79,6 +79,7 @@ BUG FIX: Timer expiration while in Roulette spinning now resets the timer to
|
|||||||
force a selection.
|
force a selection.
|
||||||
BUG FIX: OnlyDedicatedMenuButtons option now correctly saves on exit.
|
BUG FIX: OnlyDedicatedMenuButtons option now correctly saves on exit.
|
||||||
BUG FIX: Announcer now says "danger comments" at the appropriate time.
|
BUG FIX: Announcer now says "danger comments" at the appropriate time.
|
||||||
|
BUG FIX: Song titles on the Select Group screen are now cropped.
|
||||||
|
|
||||||
------------------------CVS after 3.00 beta 5----------------
|
------------------------CVS after 3.00 beta 5----------------
|
||||||
OPTIMIZATION: Much faster song loading.
|
OPTIMIZATION: Much faster song loading.
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ Table of Contents
|
|||||||
21. Building StepMania from CVS Source
|
21. Building StepMania from CVS Source
|
||||||
22. Thanks
|
22. Thanks
|
||||||
|
|
||||||
|
See the file "NEWS" for version history.
|
||||||
|
|
||||||
************************************************************
|
************************************************************
|
||||||
1. About StepMania
|
1. About StepMania
|
||||||
************************************************************
|
************************************************************
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[General]
|
[General]
|
||||||
UseCautionOrSelectPlayer=0
|
CautionType=1 // 0 for skip, 1 for DDR caution, 2 for Ez2's SelectPlayer
|
||||||
UseNormalOrEZ2SelectStyle=0
|
SelectStyleType=0 // 0 for MAX type, 1 for 5th type, 2 for EZ2 type
|
||||||
SkipSelectDifficulty=0
|
SelectDifficultyType=1 // 0 for skip, 1 for MAX type
|
||||||
StageScreenType=0
|
StageType=0 // 0 for MAX, 1 for Pump, 2 for EZ2
|
||||||
|
|
||||||
[TitleMenu]
|
[TitleMenu]
|
||||||
ChoicesX=320
|
ChoicesX=320
|
||||||
@@ -83,7 +83,7 @@ ButtonSpacingY=26
|
|||||||
ContentsX=320
|
ContentsX=320
|
||||||
ContentsY=260
|
ContentsY=260
|
||||||
TitlesStartX=20
|
TitlesStartX=20
|
||||||
TitlesStartY=280
|
TitlesStartY=276
|
||||||
TitlesSpacingX=200
|
TitlesSpacingX=200
|
||||||
TitlesColumns=3
|
TitlesColumns=3
|
||||||
TitlesRows=10
|
TitlesRows=10
|
||||||
@@ -134,6 +134,28 @@ SongOptionsY=298
|
|||||||
HelpText=! or " change music Hold ! and " then press START to change sort::## easier difficulty $$ harder difficulty::#$#$ to change sort
|
HelpText=! or " change music Hold ! and " then press START to change sort::## easier difficulty $$ harder difficulty::#$#$ to change sort
|
||||||
TimerSeconds=60
|
TimerSeconds=60
|
||||||
|
|
||||||
|
[SelectCourse]
|
||||||
|
BannerFrameX=160
|
||||||
|
BannerFrameY=118
|
||||||
|
BannerX=150
|
||||||
|
BannerY=132
|
||||||
|
BannerWidth=286
|
||||||
|
BannerHeight=92
|
||||||
|
StagesX=58
|
||||||
|
StagesY=74
|
||||||
|
TimeX=192
|
||||||
|
TimeY=74
|
||||||
|
ContentsX=160
|
||||||
|
ContentsY=320
|
||||||
|
WheelX=480
|
||||||
|
WheelY=248
|
||||||
|
ScoreP1X=520
|
||||||
|
ScoreP1Y=210
|
||||||
|
ScoreP2X=520
|
||||||
|
ScoreP2Y=286
|
||||||
|
HelpText=Use ! " to select, then press START
|
||||||
|
TimerSeconds=60
|
||||||
|
|
||||||
[Gameplay]
|
[Gameplay]
|
||||||
TopFrameX=320
|
TopFrameX=320
|
||||||
TopFrameY=36
|
TopFrameY=36
|
||||||
@@ -152,11 +174,11 @@ LifeP2ExtraY=450
|
|||||||
StageX=320
|
StageX=320
|
||||||
StageY=54
|
StageY=54
|
||||||
StageExtraY=422
|
StageExtraY=422
|
||||||
SongNumberP1X=288
|
SongNumberP1X=290
|
||||||
SongNumberP1Y=40
|
SongNumberP1Y=54
|
||||||
SongNumberP1ExtraY=440
|
SongNumberP1ExtraY=440
|
||||||
SongNumberP2X=352
|
SongNumberP2X=350
|
||||||
SongNumberP2Y=40
|
SongNumberP2Y=54
|
||||||
SongNumberP2ExtraY=440
|
SongNumberP2ExtraY=440
|
||||||
ScoreP1X=100
|
ScoreP1X=100
|
||||||
ScoreP1Y=442
|
ScoreP1Y=442
|
||||||
@@ -198,25 +220,57 @@ StageY=64
|
|||||||
GradeP1X=94
|
GradeP1X=94
|
||||||
GradeP2X=546
|
GradeP2X=546
|
||||||
GradeY=100
|
GradeY=100
|
||||||
|
PercentBaseP1X=130
|
||||||
|
PercentBaseP2X=582
|
||||||
|
PercentBaseY=134
|
||||||
JudgeLabelsX=320
|
JudgeLabelsX=320
|
||||||
JudgeNumbersP1X=232
|
PerfectP1X=230
|
||||||
JudgeNumbersP2X=408
|
PerfectP2X=410
|
||||||
JudgeStartY=170
|
PerfectY=176
|
||||||
JudgeSpacingY=32
|
GreatP1X=230
|
||||||
|
GreatP2X=410
|
||||||
|
GreatY=208
|
||||||
|
GoodP1X=230
|
||||||
|
GoodP2X=410
|
||||||
|
GoodY=240
|
||||||
|
BooP1X=230
|
||||||
|
BooP2X=410
|
||||||
|
BooY=272
|
||||||
|
MissP1X=230
|
||||||
|
MissP2X=410
|
||||||
|
MissY=304
|
||||||
|
OKP1X=230
|
||||||
|
OKP2X=410
|
||||||
|
OKY=336
|
||||||
|
MaxComboP1X=134
|
||||||
|
MaxComboP2X=578
|
||||||
|
MaxComboY=334
|
||||||
ScoreLabelsX=320
|
ScoreLabelsX=320
|
||||||
ScoreNumbersP1X=150
|
ScoreNumbersP1X=150
|
||||||
ScoreNumbersP2X=490
|
ScoreNumbersP2X=490
|
||||||
ScoreY=378
|
ScoreY=378
|
||||||
BonusP1X=100
|
BonusP1X=96
|
||||||
BonusP2X=540
|
BonusP2X=544
|
||||||
BonusY=250
|
BonusY=256
|
||||||
|
BarP1BaseX=176
|
||||||
|
BarP2BaseX=466
|
||||||
|
BarP1Rotation=3.1415
|
||||||
|
BarP2Rotation=0
|
||||||
|
BarStartY=194
|
||||||
|
BarSpacingY=27
|
||||||
|
BarWidth=106
|
||||||
|
BarHeight=16
|
||||||
|
SongsSurvivedP1X=96
|
||||||
|
SongsSurvivedP2X=544
|
||||||
|
SongsSurvivedY=240
|
||||||
NewRecordP1X=150
|
NewRecordP1X=150
|
||||||
NewRecordP2X=490
|
NewRecordP2X=490
|
||||||
NewRecordY=120
|
NewRecordY=404
|
||||||
TryExtraStageX=320
|
TryExtraStageX=320
|
||||||
TryExtraStageY=420
|
TryExtraStageY=420
|
||||||
HelpText=Press START to continue
|
HelpText=Press START to continue
|
||||||
TimerSeconds=40
|
TimerSeconds=40
|
||||||
|
SpinGrades=1
|
||||||
|
|
||||||
[Other]
|
[Other]
|
||||||
StatsX=632
|
StatsX=632
|
||||||
@@ -233,10 +287,10 @@ SectionNameX=-30
|
|||||||
SectionZoom=1.0
|
SectionZoom=1.0
|
||||||
RouletteX=-30
|
RouletteX=-30
|
||||||
RouletteZoom=1.3
|
RouletteZoom=1.3
|
||||||
CourseX=-30
|
CourseX=-130
|
||||||
CourseZoom=1.3
|
CourseZoom=1.3
|
||||||
GradeP1X=86
|
GradeP1X=82
|
||||||
GradeP2Y=112
|
GradeP2Y=118
|
||||||
|
|
||||||
[MusicWheel]
|
[MusicWheel]
|
||||||
FadeSeconds=1
|
FadeSeconds=1
|
||||||
|
|||||||
@@ -97,12 +97,12 @@ void Background::Unload()
|
|||||||
m_BackgroundAnimations.RemoveAll();
|
m_BackgroundAnimations.RemoveAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Background::LoadFromSong( Song* pSong, bool bDisableVisualizations )
|
void Background::LoadFromSong( Song* pSong )
|
||||||
{
|
{
|
||||||
/* Endless was crashing due to this; is there any reason not to
|
/* Endless was crashing due to this; is there any reason not to
|
||||||
* fix it this way? -glenn */
|
* fix it this way? -glenn */
|
||||||
|
/* Correct. I added the same chage. -Chris */
|
||||||
Unload();
|
Unload();
|
||||||
// ASSERT( m_BackgroundAnimations.GetSize() == 0 ); // forgot to call Unload() after song end
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// figure out what BackgroundMode to use
|
// figure out what BackgroundMode to use
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public:
|
|||||||
Background();
|
Background();
|
||||||
~Background();
|
~Background();
|
||||||
|
|
||||||
virtual void LoadFromSong( Song *pSong, bool bDisableVisualizations = false );
|
virtual void LoadFromSong( Song *pSong );
|
||||||
virtual void Unload(); // call this on before calling load
|
virtual void Unload(); // call this on before calling load
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -131,6 +131,20 @@ void BitmapText::SetText( CString sText )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BitmapText::CropToWidth( int iMaxWidthInSourcePixels )
|
||||||
|
{
|
||||||
|
iMaxWidthInSourcePixels = max( 0, iMaxWidthInSourcePixels );
|
||||||
|
|
||||||
|
for( int l=0; l<m_iNumLines; l++ ) // for each line
|
||||||
|
{
|
||||||
|
while( m_iLineWidths[l] > iMaxWidthInSourcePixels )
|
||||||
|
{
|
||||||
|
m_iLineLengths[l]--;
|
||||||
|
m_iLineWidths[l] = m_pFont->GetLineWidthInSourcePixels( m_szTextLines[l], m_iLineLengths[l] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// draw text at x, y using colorTop blended down to colorBottom, with size multiplied by scale
|
// draw text at x, y using colorTop blended down to colorBottom, with size multiplied by scale
|
||||||
void BitmapText::DrawPrimitives()
|
void BitmapText::DrawPrimitives()
|
||||||
@@ -158,9 +172,9 @@ void BitmapText::DrawPrimitives()
|
|||||||
int iY; // the center position of the first row of characters
|
int iY; // the center position of the first row of characters
|
||||||
switch( m_VertAlign )
|
switch( m_VertAlign )
|
||||||
{
|
{
|
||||||
case align_bottom: iY = -(m_iNumLines-1) * iHeight; break;
|
case align_bottom: iY = -(m_iNumLines) * iHeight + iHeight/2; break;
|
||||||
case align_middle: iY = -(m_iNumLines-1) * iHeight/2; break;
|
case align_middle: iY = -(m_iNumLines-1) * iHeight/2; break;
|
||||||
case align_top: iY = 0; break;
|
case align_top: iY = + iHeight/2; break;
|
||||||
default: ASSERT( false );
|
default: ASSERT( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public:
|
|||||||
void SetText( CString sText );
|
void SetText( CString sText );
|
||||||
|
|
||||||
int GetWidestLineWidthInSourcePixels() { return m_iWidestLineWidth; };
|
int GetWidestLineWidthInSourcePixels() { return m_iWidestLineWidth; };
|
||||||
|
void CropToWidth( int iWidthInSourcePixels );
|
||||||
|
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Combo::Combo()
|
|||||||
m_textComboNumber.LoadFromFont( THEME->GetPathTo("Fonts","combo numbers") );
|
m_textComboNumber.LoadFromFont( THEME->GetPathTo("Fonts","combo numbers") );
|
||||||
m_textComboNumber.TurnShadowOn();
|
m_textComboNumber.TurnShadowOn();
|
||||||
m_textComboNumber.SetHorizAlign( Actor::align_right );
|
m_textComboNumber.SetHorizAlign( Actor::align_right );
|
||||||
m_textComboNumber.SetX( -0 );
|
m_textComboNumber.SetX( 0 );
|
||||||
|
|
||||||
m_textComboNumber.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
|
m_textComboNumber.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
|
||||||
m_sprCombo.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
|
m_sprCombo.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
|
||||||
@@ -77,7 +77,7 @@ void Combo::ContinueCombo()
|
|||||||
m_sprCombo.SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // visible
|
m_sprCombo.SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // visible
|
||||||
|
|
||||||
m_textComboNumber.SetText( ssprintf("%d", m_iCurCombo) );
|
m_textComboNumber.SetText( ssprintf("%d", m_iCurCombo) );
|
||||||
float fNewZoom = min( 0.5f + m_iCurCombo/800.0f, 1.1f );
|
float fNewZoom = min( 0.5f + m_iCurCombo/800.0f, 1.0f );
|
||||||
m_textComboNumber.SetZoom( fNewZoom );
|
m_textComboNumber.SetZoom( fNewZoom );
|
||||||
|
|
||||||
//this->SetZoom( 1.2f );
|
//this->SetZoom( 1.2f );
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ void FadingBanner::SetRoulette()
|
|||||||
m_Banner[0].LoadRoulette();
|
m_Banner[0].LoadRoulette();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FadingBanner::SetFromCourse( Course *pCourse )
|
void FadingBanner::SetFromCourse( Course* pCourse )
|
||||||
{
|
{
|
||||||
BeforeChange();
|
BeforeChange();
|
||||||
m_Banner[0].LoadFromCourse( pCourse );
|
m_Banner[0].LoadFromCourse( pCourse );
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
|
|
||||||
#include "Banner.h"
|
#include "Banner.h"
|
||||||
#include "ActorFrame.h"
|
#include "ActorFrame.h"
|
||||||
|
class Song;
|
||||||
|
class Course;
|
||||||
|
|
||||||
class FadingBanner : public ActorFrame
|
class FadingBanner : public ActorFrame
|
||||||
{
|
{
|
||||||
@@ -26,8 +27,7 @@ public:
|
|||||||
void SetFromSong( Song* pSong );
|
void SetFromSong( Song* pSong );
|
||||||
void SetFromGroup( const CString &sGroupName );
|
void SetFromGroup( const CString &sGroupName );
|
||||||
void SetRoulette();
|
void SetRoulette();
|
||||||
void SetFromCourse( Course *pCourse );
|
void SetFromCourse( Course* pCourse );
|
||||||
//void SetFromTexture( const CString &sTexturePath );
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void BeforeChange();
|
void BeforeChange();
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ Font::Font( const CString &sFontFilePath )
|
|||||||
// sanity check
|
// sanity check
|
||||||
if( sCharacters.GetLength() != m_pTexture->GetNumFrames() )
|
if( sCharacters.GetLength() != m_pTexture->GetNumFrames() )
|
||||||
throw RageException( "The characters in '%s' does not match the number of frames in the texture."
|
throw RageException( "The characters in '%s' does not match the number of frames in the texture."
|
||||||
"The font has %d frames, and the texture has %d frames.",
|
"The font has %d characters, and the texture has %d frames.",
|
||||||
m_sFontFilePath, sCharacters.GetLength(), m_pTexture->GetNumFrames() );
|
m_sFontFilePath, sCharacters.GetLength(), m_pTexture->GetNumFrames() );
|
||||||
|
|
||||||
// set the char to frame number map
|
// set the char to frame number map
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ GradeDisplay::GradeDisplay()
|
|||||||
m_fTimeLeftInScroll = 0;
|
m_fTimeLeftInScroll = 0;
|
||||||
m_bDoScrolling = false;
|
m_bDoScrolling = false;
|
||||||
|
|
||||||
SetGrade( GRADE_NO_DATA );
|
SetGrade( PLAYER_1, GRADE_NO_DATA );
|
||||||
}
|
}
|
||||||
|
|
||||||
void GradeDisplay::Update( float fDeltaTime )
|
void GradeDisplay::Update( float fDeltaTime )
|
||||||
@@ -65,7 +65,7 @@ void GradeDisplay::DrawPrimitives()
|
|||||||
Sprite::DrawPrimitives();
|
Sprite::DrawPrimitives();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GradeDisplay::SetGrade( Grade g )
|
void GradeDisplay::SetGrade( PlayerNumber p, Grade g )
|
||||||
{
|
{
|
||||||
m_Grade = g;
|
m_Grade = g;
|
||||||
|
|
||||||
@@ -74,18 +74,20 @@ void GradeDisplay::SetGrade( Grade g )
|
|||||||
|
|
||||||
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
|
|
||||||
|
// Ugly... This has to handle cases where the sprite has 7, 8, 14, or 16 states
|
||||||
|
int iNumCols = (this->GetNumStates()>8) ? 2 : 1;
|
||||||
switch( g )
|
switch( g )
|
||||||
{
|
{
|
||||||
case GRADE_AAA: SetState(0); break;
|
case GRADE_AAA: SetState( 0*iNumCols+p ); break;
|
||||||
case GRADE_AA: SetState(1); break;
|
case GRADE_AA: SetState( 1*iNumCols+p ); break;
|
||||||
case GRADE_A: SetState(2); break;
|
case GRADE_A: SetState( 2*iNumCols+p ); break;
|
||||||
case GRADE_B: SetState(3); break;
|
case GRADE_B: SetState( 3*iNumCols+p ); break;
|
||||||
case GRADE_C: SetState(4); break;
|
case GRADE_C: SetState( 4*iNumCols+p ); break;
|
||||||
case GRADE_D: SetState(5); break;
|
case GRADE_D: SetState( 5*iNumCols+p ); break;
|
||||||
case GRADE_E: SetState(6); break;
|
case GRADE_E: SetState( 6*iNumCols+p ); break;
|
||||||
case GRADE_NO_DATA:
|
case GRADE_NO_DATA:
|
||||||
if( this->GetNumStates() == 8 )
|
if( this->GetNumStates()%8 == 0 )
|
||||||
SetState(7);
|
SetState( 7*iNumCols+p );
|
||||||
else
|
else
|
||||||
SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // don't show anything
|
SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // don't show anything
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public:
|
|||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
void SetGrade( Grade g );
|
void SetGrade( PlayerNumber p, Grade g );
|
||||||
void SpinAndSettleOn( Grade g );
|
void SpinAndSettleOn( Grade g );
|
||||||
void SettleImmediately();
|
void SettleImmediately();
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ WheelItemDisplay::WheelItemDisplay()
|
|||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
m_GradeDisplay[p].Load( THEME->GetPathTo("Graphics","select music small grades 1x8") );
|
m_GradeDisplay[p].Load( THEME->GetPathTo("Graphics","select music small grades 2x8") );
|
||||||
m_GradeDisplay[p].SetZoom( 1.0f );
|
m_GradeDisplay[p].SetZoom( 1.0f );
|
||||||
m_GradeDisplay[p].SetXY( p==PLAYER_1 ? GRADE_P1_X : GRADE_P2_X, 0 );
|
m_GradeDisplay[p].SetXY( p==PLAYER_1 ? GRADE_P1_X : GRADE_P2_X, 0 );
|
||||||
}
|
}
|
||||||
@@ -205,12 +205,12 @@ void WheelItemDisplay::RefreshGrades()
|
|||||||
{
|
{
|
||||||
const DifficultyClass dc = GAMESTATE->m_PreferredDifficultyClass[p];
|
const DifficultyClass dc = GAMESTATE->m_PreferredDifficultyClass[p];
|
||||||
const Grade grade = m_pSong->GetGradeForDifficultyClass( GAMESTATE->GetCurrentStyleDef()->m_NotesType, dc );
|
const Grade grade = m_pSong->GetGradeForDifficultyClass( GAMESTATE->GetCurrentStyleDef()->m_NotesType, dc );
|
||||||
m_GradeDisplay[p].SetGrade( grade );
|
m_GradeDisplay[p].SetGrade( (PlayerNumber)p, grade );
|
||||||
m_GradeDisplay[p].SetDiffuseColor( PlayerToColor((PlayerNumber)p) );
|
//m_GradeDisplay[p].SetDiffuseColor( PlayerToColor((PlayerNumber)p) );
|
||||||
}
|
}
|
||||||
else // this is a section display
|
else // this is a section display
|
||||||
{
|
{
|
||||||
m_GradeDisplay[p].SetGrade( GRADE_NO_DATA );
|
m_GradeDisplay[p].SetGrade( (PlayerNumber)p, GRADE_NO_DATA );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ RageDisplay::RageDisplay( HWND hWnd )
|
|||||||
|
|
||||||
int RageDisplay::MaxRefresh(int iWidth, int iHeight) const
|
int RageDisplay::MaxRefresh(int iWidth, int iHeight) const
|
||||||
{
|
{
|
||||||
int mx = D3DPRESENT_RATE_DEFAULT;
|
UINT mx = D3DPRESENT_RATE_DEFAULT;
|
||||||
for( UINT u=0; u<m_pd3d->GetAdapterModeCount(D3DADAPTER_DEFAULT); u++ )
|
for( UINT u=0; u<m_pd3d->GetAdapterModeCount(D3DADAPTER_DEFAULT); u++ )
|
||||||
{
|
{
|
||||||
D3DDISPLAYMODE mode;
|
D3DDISPLAYMODE mode;
|
||||||
|
|||||||
@@ -877,7 +877,7 @@ RageInput::pump_t::~pump_t()
|
|||||||
CloseHandle(h);
|
CloseHandle(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
RageInput::pump_t::init(int devno)
|
void RageInput::pump_t::init(int devno)
|
||||||
{
|
{
|
||||||
const int pump_usb_vid = 0x0d2f, pump_usb_pid = 0x0001;
|
const int pump_usb_vid = 0x0d2f, pump_usb_pid = 0x0001;
|
||||||
h = USB::OpenUSB (pump_usb_vid, pump_usb_pid, devno);
|
h = USB::OpenUSB (pump_usb_vid, pump_usb_pid, devno);
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ private:
|
|||||||
|
|
||||||
pump_t();
|
pump_t();
|
||||||
~pump_t();
|
~pump_t();
|
||||||
init(int devno);
|
void init(int devno); /* added a return type because it generates a warning in VC7 -Chris */
|
||||||
int GetPadEvent();
|
int GetPadEvent();
|
||||||
} *m_Pumps;
|
} *m_Pumps;
|
||||||
|
|
||||||
|
|||||||
@@ -16,13 +16,20 @@
|
|||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "ScreenSelectStyle.h"
|
#include "ScreenSelectStyle.h"
|
||||||
#include "ScreenEZ2SelectStyle.h"
|
#include "ScreenEZ2SelectStyle.h"
|
||||||
|
#include "ScreenSelectStyle5th.h"
|
||||||
#include "RageTextureManager.h"
|
#include "RageTextureManager.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
#include "AnnouncerManager.h"
|
#include "AnnouncerManager.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
|
|
||||||
|
|
||||||
#define USE_NORMAL_OR_EZ2_SELECT_STYLE THEME->GetMetricB("General","UseNormalOrEZ2SelectStyle")
|
#define SELECT_STYLE_TYPE THEME->GetMetricI("General","SelectStyleType")
|
||||||
|
enum SelectStyleType // for use with the metric above
|
||||||
|
{
|
||||||
|
SELECT_STYLE_TYPE_MAX = 0,
|
||||||
|
SELECT_STYLE_TYPE_5TH,
|
||||||
|
SELECT_STYLE_TYPE_EZ2,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User-6);
|
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User-6);
|
||||||
@@ -73,10 +80,21 @@ void ScreenCaution::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
||||||
break;
|
break;
|
||||||
case SM_GoToSelectMusic:
|
case SM_GoToSelectMusic:
|
||||||
if( USE_NORMAL_OR_EZ2_SELECT_STYLE )
|
switch( SELECT_STYLE_TYPE )
|
||||||
SCREENMAN->SetNewScreen( new ScreenEz2SelectStyle );
|
{
|
||||||
else
|
case SELECT_STYLE_TYPE_MAX:
|
||||||
SCREENMAN->SetNewScreen( new ScreenSelectStyle );
|
SCREENMAN->SetNewScreen( new ScreenSelectStyle );
|
||||||
|
break;
|
||||||
|
case SELECT_STYLE_TYPE_5TH:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenSelectStyle5th );
|
||||||
|
break;
|
||||||
|
case SELECT_STYLE_TYPE_EZ2:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenEz2SelectStyle );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+365
-322
@@ -33,11 +33,31 @@
|
|||||||
#define GRADE_P1_X THEME->GetMetricF("Evaluation","GradeP1X")
|
#define GRADE_P1_X THEME->GetMetricF("Evaluation","GradeP1X")
|
||||||
#define GRADE_P2_X THEME->GetMetricF("Evaluation","GradeP2X")
|
#define GRADE_P2_X THEME->GetMetricF("Evaluation","GradeP2X")
|
||||||
#define GRADE_Y THEME->GetMetricF("Evaluation","GradeY")
|
#define GRADE_Y THEME->GetMetricF("Evaluation","GradeY")
|
||||||
|
#define PERCENT_BASE_P1_X THEME->GetMetricF("Evaluation","PercentBaseP1X")
|
||||||
|
#define PERCENT_BASE_P2_X THEME->GetMetricF("Evaluation","PercentBaseP2X")
|
||||||
|
#define PERCENT_BASE_Y THEME->GetMetricF("Evaluation","PercentBaseY")
|
||||||
#define JUDGE_LABELS_X THEME->GetMetricF("Evaluation","JudgeLabelsX")
|
#define JUDGE_LABELS_X THEME->GetMetricF("Evaluation","JudgeLabelsX")
|
||||||
#define JUDGE_NUMBERS_P1_X THEME->GetMetricF("Evaluation","JudgeNumbersP1X")
|
#define PERFECT_P1_X THEME->GetMetricF("Evaluation","PerfectP1X")
|
||||||
#define JUDGE_NUMBERS_P2_X THEME->GetMetricF("Evaluation","JudgeNumbersP2X")
|
#define PERFECT_P2_X THEME->GetMetricF("Evaluation","PerfectP2X")
|
||||||
#define JUDGE_START_Y THEME->GetMetricF("Evaluation","JudgeStartY")
|
#define PERFECT_Y THEME->GetMetricF("Evaluation","PerfectY")
|
||||||
#define JUDGE_SPACING_Y THEME->GetMetricF("Evaluation","JudgeSpacingY")
|
#define GREAT_P1_X THEME->GetMetricF("Evaluation","GreatP1X")
|
||||||
|
#define GREAT_P2_X THEME->GetMetricF("Evaluation","GreatP2X")
|
||||||
|
#define GREAT_Y THEME->GetMetricF("Evaluation","GreatY")
|
||||||
|
#define GOOD_P1_X THEME->GetMetricF("Evaluation","GoodP1X")
|
||||||
|
#define GOOD_P2_X THEME->GetMetricF("Evaluation","GoodP2X")
|
||||||
|
#define GOOD_Y THEME->GetMetricF("Evaluation","GoodY")
|
||||||
|
#define BOO_P1_X THEME->GetMetricF("Evaluation","BooP1X")
|
||||||
|
#define BOO_P2_X THEME->GetMetricF("Evaluation","BooP2X")
|
||||||
|
#define BOO_Y THEME->GetMetricF("Evaluation","BooY")
|
||||||
|
#define MISS_P1_X THEME->GetMetricF("Evaluation","MissP1X")
|
||||||
|
#define MISS_P2_X THEME->GetMetricF("Evaluation","MissP2X")
|
||||||
|
#define MISS_Y THEME->GetMetricF("Evaluation","MissY")
|
||||||
|
#define OK_P1_X THEME->GetMetricF("Evaluation","OKP1X")
|
||||||
|
#define OK_P2_X THEME->GetMetricF("Evaluation","OKP2X")
|
||||||
|
#define OK_Y THEME->GetMetricF("Evaluation","OKY")
|
||||||
|
#define MAX_COMBO_P1_X THEME->GetMetricF("Evaluation","MaxComboP1X")
|
||||||
|
#define MAX_COMBO_P2_X THEME->GetMetricF("Evaluation","MaxComboP2X")
|
||||||
|
#define MAX_COMBO_Y THEME->GetMetricF("Evaluation","MaxComboY")
|
||||||
#define SCORE_LABELS_X THEME->GetMetricF("Evaluation","ScoreLabelsX")
|
#define SCORE_LABELS_X THEME->GetMetricF("Evaluation","ScoreLabelsX")
|
||||||
#define SCORE_NUMBERS_P1_X THEME->GetMetricF("Evaluation","ScoreNumbersP1X")
|
#define SCORE_NUMBERS_P1_X THEME->GetMetricF("Evaluation","ScoreNumbersP1X")
|
||||||
#define SCORE_NUMBERS_P2_X THEME->GetMetricF("Evaluation","ScoreNumbersP2X")
|
#define SCORE_NUMBERS_P2_X THEME->GetMetricF("Evaluation","ScoreNumbersP2X")
|
||||||
@@ -45,6 +65,17 @@
|
|||||||
#define BONUS_P1_X THEME->GetMetricF("Evaluation","BonusP1X")
|
#define BONUS_P1_X THEME->GetMetricF("Evaluation","BonusP1X")
|
||||||
#define BONUS_P2_X THEME->GetMetricF("Evaluation","BonusP2X")
|
#define BONUS_P2_X THEME->GetMetricF("Evaluation","BonusP2X")
|
||||||
#define BONUS_Y THEME->GetMetricF("Evaluation","BonusY")
|
#define BONUS_Y THEME->GetMetricF("Evaluation","BonusY")
|
||||||
|
#define BAR_P1_BASE_X THEME->GetMetricF("Evaluation","BarP1BaseX")
|
||||||
|
#define BAR_P2_BASE_X THEME->GetMetricF("Evaluation","BarP2BaseX")
|
||||||
|
#define BAR_P1_ROTATION THEME->GetMetricF("Evaluation","BarP1Rotation")
|
||||||
|
#define BAR_P2_ROTATION THEME->GetMetricF("Evaluation","BarP2Rotation")
|
||||||
|
#define BAR_START_Y THEME->GetMetricF("Evaluation","BarStartY")
|
||||||
|
#define BAR_SPACING_Y THEME->GetMetricF("Evaluation","BarSpacingY")
|
||||||
|
#define BAR_WIDTH THEME->GetMetricF("Evaluation","BarWidth")
|
||||||
|
#define BAR_HEIGHT THEME->GetMetricF("Evaluation","BarHeight")
|
||||||
|
#define SONGS_SURVIVED_P1_X THEME->GetMetricF("Evaluation","SongsSurvivedP1X")
|
||||||
|
#define SONGS_SURVIVED_P2_X THEME->GetMetricF("Evaluation","SongsSurvivedP2X")
|
||||||
|
#define SONGS_SURVIVED_Y THEME->GetMetricF("Evaluation","SongsSurvivedY")
|
||||||
#define NEW_RECORD_P1_X THEME->GetMetricF("Evaluation","NewRecordP1X")
|
#define NEW_RECORD_P1_X THEME->GetMetricF("Evaluation","NewRecordP1X")
|
||||||
#define NEW_RECORD_P2_X THEME->GetMetricF("Evaluation","NewRecordP2X")
|
#define NEW_RECORD_P2_X THEME->GetMetricF("Evaluation","NewRecordP2X")
|
||||||
#define NEW_RECORD_Y THEME->GetMetricF("Evaluation","NewRecordY")
|
#define NEW_RECORD_Y THEME->GetMetricF("Evaluation","NewRecordY")
|
||||||
@@ -52,6 +83,7 @@
|
|||||||
#define TRY_EXTRA_STAGE_Y THEME->GetMetricF("Evaluation","TryExtraStageY")
|
#define TRY_EXTRA_STAGE_Y THEME->GetMetricF("Evaluation","TryExtraStageY")
|
||||||
#define HELP_TEXT THEME->GetMetric("Evaluation","HelpText")
|
#define HELP_TEXT THEME->GetMetric("Evaluation","HelpText")
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("Evaluation","TimerSeconds")
|
#define TIMER_SECONDS THEME->GetMetricI("Evaluation","TimerSeconds")
|
||||||
|
#define SPIN_GRADES THEME->GetMetricB("Evaluation","SpinGrades")
|
||||||
|
|
||||||
float GRADE_X( int p ) {
|
float GRADE_X( int p ) {
|
||||||
switch( p ) {
|
switch( p ) {
|
||||||
@@ -60,13 +92,37 @@ float GRADE_X( int p ) {
|
|||||||
default: ASSERT(0); return 0;
|
default: ASSERT(0); return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
float JUDGE_NUMBERS_X( int p ) {
|
float PERCENT_BASE_X( int p ) {
|
||||||
switch( p ) {
|
switch( p ) {
|
||||||
case PLAYER_1: return JUDGE_NUMBERS_P1_X;
|
case PLAYER_1: return PERCENT_BASE_P1_X;
|
||||||
case PLAYER_2: return JUDGE_NUMBERS_P2_X;
|
case PLAYER_2: return PERCENT_BASE_P2_X;
|
||||||
default: ASSERT(0); return 0;
|
default: ASSERT(0); return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
float JUDGE_X( int p, int l ) {
|
||||||
|
switch( l ) {
|
||||||
|
case 0: return p==PLAYER_1 ? PERFECT_P1_X : PERFECT_P2_X;
|
||||||
|
case 1: return p==PLAYER_1 ? GREAT_P1_X : GREAT_P2_X;
|
||||||
|
case 2: return p==PLAYER_1 ? GOOD_P1_X : GOOD_P2_X;
|
||||||
|
case 3: return p==PLAYER_1 ? BOO_P1_X : BOO_P2_X;
|
||||||
|
case 4: return p==PLAYER_1 ? MISS_P1_X : MISS_P2_X;
|
||||||
|
case 5: return p==PLAYER_1 ? OK_P1_X : OK_P2_X;
|
||||||
|
case 6: return p==PLAYER_1 ? MAX_COMBO_P1_X : MAX_COMBO_P2_X;
|
||||||
|
default: ASSERT(0); return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float JUDGE_Y( int l ) {
|
||||||
|
switch( l ) {
|
||||||
|
case 0: return PERFECT_Y;
|
||||||
|
case 1: return GREAT_Y;
|
||||||
|
case 2: return GOOD_Y;
|
||||||
|
case 3: return BOO_Y;
|
||||||
|
case 4: return MISS_Y;
|
||||||
|
case 5: return OK_Y;
|
||||||
|
case 6: return MAX_COMBO_Y;
|
||||||
|
default: ASSERT(0); return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
float SCORE_NUMBERS_X( int p ) {
|
float SCORE_NUMBERS_X( int p ) {
|
||||||
switch( p ) {
|
switch( p ) {
|
||||||
case PLAYER_1: return SCORE_NUMBERS_P1_X;
|
case PLAYER_1: return SCORE_NUMBERS_P1_X;
|
||||||
@@ -81,6 +137,27 @@ float BONUS_X( int p ) {
|
|||||||
default: ASSERT(0); return 0;
|
default: ASSERT(0); return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
float BAR_BASE_X( int p ) {
|
||||||
|
switch( p ) {
|
||||||
|
case PLAYER_1: return BAR_P1_BASE_X;
|
||||||
|
case PLAYER_2: return BAR_P2_BASE_X;
|
||||||
|
default: ASSERT(0); return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float BAR_ROTATION( int p ) {
|
||||||
|
switch( p ) {
|
||||||
|
case PLAYER_1: return BAR_P1_ROTATION;
|
||||||
|
case PLAYER_2: return BAR_P2_ROTATION;
|
||||||
|
default: ASSERT(0); return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float SONGS_SURVIVED_X( int p ) {
|
||||||
|
switch( p ) {
|
||||||
|
case PLAYER_1: return SONGS_SURVIVED_P1_X;
|
||||||
|
case PLAYER_2: return SONGS_SURVIVED_P2_X;
|
||||||
|
default: ASSERT(0); return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
float NEW_RECORD_X( int p ) {
|
float NEW_RECORD_X( int p ) {
|
||||||
switch( p ) {
|
switch( p ) {
|
||||||
case PLAYER_1: return NEW_RECORD_P1_X;
|
case PLAYER_1: return NEW_RECORD_P1_X;
|
||||||
@@ -118,7 +195,6 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Figure out which statistics we're going to display
|
// Figure out which statistics we're going to display
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
@@ -177,57 +253,50 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Init the song banners depending on m_ResultMode
|
// Init the song banners depending on m_ResultMode
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
/* EZ2 should hide these things by placing them off screen with theme metrics
|
// EZ2 should hide these things by placing them off screen with theme metrics
|
||||||
if( GAMESTATE->m_CurGame != GAME_EZ2 )
|
switch( m_ResultMode )
|
||||||
{
|
{
|
||||||
*/
|
case RM_ARCADE_STAGE:
|
||||||
switch( m_ResultMode )
|
m_BannerWithFrame[0].LoadFromSongAndNotes( GAMESTATE->m_pCurSong, GAMESTATE->m_pCurNotes );
|
||||||
|
m_BannerWithFrame[0].SetXY( BANNER_X, BANNER_Y );
|
||||||
|
this->AddSubActor( &m_BannerWithFrame[0] );
|
||||||
|
|
||||||
|
m_textStage.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||||
|
m_textStage.TurnShadowOff();
|
||||||
|
m_textStage.SetXY( STAGE_X, STAGE_Y );
|
||||||
|
m_textStage.SetZoom( 0.5f );
|
||||||
|
m_textStage.SetText( GAMESTATE->GetStageText() + " Stage" );
|
||||||
|
this->AddSubActor( &m_textStage );
|
||||||
|
|
||||||
|
break;
|
||||||
|
case RM_ARCADE_SUMMARY:
|
||||||
{
|
{
|
||||||
case RM_ARCADE_STAGE:
|
// crop down to 3
|
||||||
m_BannerWithFrame[0].LoadFromSongAndNotes( GAMESTATE->m_pCurSong, GAMESTATE->m_pCurNotes );
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
m_BannerWithFrame[0].SetXY( BANNER_X, BANNER_Y );
|
|
||||||
this->AddSubActor( &m_BannerWithFrame[0] );
|
|
||||||
|
|
||||||
m_textStage.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
|
||||||
m_textStage.TurnShadowOff();
|
|
||||||
m_textStage.SetXY( STAGE_X, STAGE_Y );
|
|
||||||
m_textStage.SetZoom( 0.5f );
|
|
||||||
m_textStage.SetText( GAMESTATE->GetStageText() + " Stage" );
|
|
||||||
this->AddSubActor( &m_textStage );
|
|
||||||
|
|
||||||
break;
|
|
||||||
case RM_ARCADE_SUMMARY:
|
|
||||||
{
|
{
|
||||||
// crop down to 3
|
if( GAMESTATE->m_apSongsPlayed.GetSize() > STAGES_TO_SHOW_IN_SUMMARY )
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
GAMESTATE->m_apSongsPlayed.RemoveAt( 0, GAMESTATE->m_apSongsPlayed.GetSize() - STAGES_TO_SHOW_IN_SUMMARY );
|
||||||
{
|
|
||||||
if( GAMESTATE->m_apSongsPlayed.GetSize() > STAGES_TO_SHOW_IN_SUMMARY )
|
|
||||||
GAMESTATE->m_apSongsPlayed.RemoveAt( 0, GAMESTATE->m_apSongsPlayed.GetSize() - STAGES_TO_SHOW_IN_SUMMARY );
|
|
||||||
}
|
|
||||||
|
|
||||||
const int iSongsToShow = GAMESTATE->m_apSongsPlayed.GetSize();
|
|
||||||
ASSERT( iSongsToShow > 0 );
|
|
||||||
|
|
||||||
for( int i=0; i<iSongsToShow; i++ )
|
|
||||||
{
|
|
||||||
m_BannerWithFrame[i].LoadFromSong( GAMESTATE->m_apSongsPlayed[i] );
|
|
||||||
float fBannerOffset = i - (iSongsToShow-1)/2.0f;
|
|
||||||
m_BannerWithFrame[i].SetXY( BANNER_X + fBannerOffset*32, BANNER_Y + fBannerOffset*16 );
|
|
||||||
m_BannerWithFrame[i].SetZoom( 0.70f );
|
|
||||||
this->AddSubActor( &m_BannerWithFrame[i] );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case RM_ONI:
|
|
||||||
m_BannerWithFrame[0].LoadFromCourse( GAMESTATE->m_pCurCourse );
|
|
||||||
m_BannerWithFrame[0].SetXY( BANNER_X, BANNER_Y );
|
|
||||||
this->AddSubActor( &m_BannerWithFrame[0] );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
const int iSongsToShow = GAMESTATE->m_apSongsPlayed.GetSize();
|
||||||
|
ASSERT( iSongsToShow > 0 );
|
||||||
|
|
||||||
|
for( int i=0; i<iSongsToShow; i++ )
|
||||||
|
{
|
||||||
|
m_BannerWithFrame[i].LoadFromSong( GAMESTATE->m_apSongsPlayed[i] );
|
||||||
|
float fBannerOffset = i - (iSongsToShow-1)/2.0f;
|
||||||
|
m_BannerWithFrame[i].SetXY( BANNER_X + fBannerOffset*32, BANNER_Y + fBannerOffset*16 );
|
||||||
|
m_BannerWithFrame[i].SetZoom( 0.70f );
|
||||||
|
this->AddSubActor( &m_BannerWithFrame[i] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RM_ONI:
|
||||||
|
m_BannerWithFrame[0].LoadFromCourse( GAMESTATE->m_pCurCourse );
|
||||||
|
m_BannerWithFrame[0].SetXY( BANNER_X, BANNER_Y );
|
||||||
|
this->AddSubActor( &m_BannerWithFrame[0] );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
@@ -242,82 +311,9 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
this->AddSubActor( &m_Menu );
|
this->AddSubActor( &m_Menu );
|
||||||
|
|
||||||
|
|
||||||
for( l=0; l<NUM_JUDGE_LINES; l++ )
|
|
||||||
{
|
|
||||||
/* EZ2 should hide these things by placing them off screen with theme metrics
|
|
||||||
if (GAMESTATE->m_CurGame != GAME_EZ2)
|
|
||||||
{
|
|
||||||
*/
|
|
||||||
m_sprJudgeLabels[l].Load( THEME->GetPathTo("Graphics","evaluation judge labels") );
|
|
||||||
m_sprJudgeLabels[l].StopAnimating();
|
|
||||||
m_sprJudgeLabels[l].SetState( l );
|
|
||||||
m_sprJudgeLabels[l].SetXY( JUDGE_LABELS_X, JUDGE_START_Y + l*JUDGE_SPACING_Y );
|
|
||||||
m_sprJudgeLabels[l].SetZoom( 1.0f );
|
|
||||||
this->AddSubActor( &m_sprJudgeLabels[l] );
|
|
||||||
/*
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
|
||||||
{
|
|
||||||
m_textJudgeNumbers[l][p].LoadFromFont( THEME->GetPathTo("Fonts","score numbers") );
|
|
||||||
m_textJudgeNumbers[l][p].TurnShadowOff();
|
|
||||||
m_textJudgeNumbers[l][p].SetXY( JUDGE_NUMBERS_X(p), JUDGE_START_Y + l*JUDGE_SPACING_Y );
|
|
||||||
m_textJudgeNumbers[l][p].SetZoom( 0.7f );
|
|
||||||
m_textJudgeNumbers[l][p].SetDiffuseColor( PlayerToColor(p) );
|
|
||||||
|
|
||||||
/*
|
|
||||||
TODO: This should somehow be accomodated with a switch in the theme metric file.
|
|
||||||
|
|
||||||
// RE-ARRANGE the scoreboard for EZ2Dancer Scoring
|
|
||||||
|
|
||||||
if (l == 0 && GAMESTATE->m_CurGame == GAME_EZ2) // Change Position For Ez2dancer
|
|
||||||
{
|
|
||||||
m_textJudgeNumbers[l][p].SetXY( JUDGE_NUMBERS_X_EZ2[p], JUDGE_EZ2_COOL_Y);
|
|
||||||
}
|
|
||||||
else if (l == 2 && GAMESTATE->m_CurGame == GAME_EZ2)
|
|
||||||
{
|
|
||||||
m_textJudgeNumbers[l][p].SetXY( JUDGE_NUMBERS_X_EZ2[p], JUDGE_EZ2_COOL_Y + 55);
|
|
||||||
}
|
|
||||||
else if (l == 4 && GAMESTATE->m_CurGame == GAME_EZ2)
|
|
||||||
{
|
|
||||||
m_textJudgeNumbers[l][p].SetXY( JUDGE_NUMBERS_X_EZ2[p], JUDGE_EZ2_COOL_Y + 120);
|
|
||||||
}
|
|
||||||
else if ((l == 1 || l == 3 ) && GAMESTATE->m_CurGame == GAME_EZ2)
|
|
||||||
{
|
|
||||||
m_textJudgeNumbers[l][p].SetZoomX(0); // Hide These Ones
|
|
||||||
}
|
|
||||||
else if (l == 5 && GAMESTATE->m_CurGame == GAME_EZ2 ) // sneakily use this one for the max combo.
|
|
||||||
{
|
|
||||||
if (p == PLAYER_1 )
|
|
||||||
{
|
|
||||||
m_textJudgeNumbers[l][p].SetXY( JUDGE_NUMBERS_X_EZ2[p]-40, JUDGE_EZ2_COOL_Y + 180);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_textJudgeNumbers[l][p].SetXY( JUDGE_NUMBERS_X_EZ2[p]+40, JUDGE_EZ2_COOL_Y + 180);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
this->AddSubActor( &m_textJudgeNumbers[l][p] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if (GAMESTATE->m_CurGame != GAME_EZ2)
|
|
||||||
{
|
|
||||||
*/
|
|
||||||
m_sprScoreLabel.Load( THEME->GetPathTo("Graphics","evaluation score labels") );
|
|
||||||
m_sprScoreLabel.SetState( m_ResultMode==RM_ONI ? 1 : 0 );
|
|
||||||
m_sprScoreLabel.StopAnimating();
|
|
||||||
m_sprScoreLabel.SetXY( SCORE_LABELS_X, SCORE_Y );
|
|
||||||
m_sprScoreLabel.SetZoom( 1.0f );
|
|
||||||
this->AddSubActor( &m_sprScoreLabel );
|
|
||||||
/* }
|
|
||||||
*/
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) ) // || GAMESTATE->m_CurGame == GAME_EZ2 ) // If EZ2 wants to hide this graphic, place it somewhere off screen using theme metrics
|
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) ) // If EZ2 wants to hide this graphic, place it somewhere off screen using theme metrics
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
m_ScoreDisplay[p].SetXY( SCORE_NUMBERS_X(p), SCORE_Y );
|
m_ScoreDisplay[p].SetXY( SCORE_NUMBERS_X(p), SCORE_Y );
|
||||||
@@ -366,50 +362,6 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
max_grade = max( max_grade, grade[p] );
|
max_grade = max( max_grade, grade[p] );
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////
|
|
||||||
// Set Numbers
|
|
||||||
//////////////////////////
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
|
||||||
{
|
|
||||||
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
|
|
||||||
continue; // skip
|
|
||||||
|
|
||||||
m_textJudgeNumbers[0][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_PERFECT]) );
|
|
||||||
m_textJudgeNumbers[1][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_GREAT]) );
|
|
||||||
m_textJudgeNumbers[2][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_GOOD]) );
|
|
||||||
m_textJudgeNumbers[3][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_BOO]) );
|
|
||||||
m_textJudgeNumbers[4][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_MISS]) );
|
|
||||||
m_textJudgeNumbers[5][p].SetText( ssprintf("%4d", iHoldNoteScores[p][HNS_OK]) );
|
|
||||||
|
|
||||||
if( m_ResultMode==RM_ONI )
|
|
||||||
{
|
|
||||||
const float fSurviveSeconds = GAMESTATE->GetPlayerSurviveTime( (PlayerNumber)p );
|
|
||||||
int iMinsDisplay = (int)fSurviveSeconds/60;
|
|
||||||
int iSecsDisplay = (int)fSurviveSeconds - iMinsDisplay*60;
|
|
||||||
int iLeftoverDisplay = int( (fSurviveSeconds - iMinsDisplay*60 - iSecsDisplay) * 100 );
|
|
||||||
m_ScoreDisplay[p].SetText( ssprintf( "%02d:%02d:%02d", iMinsDisplay, iSecsDisplay, iLeftoverDisplay ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_ScoreDisplay[p].SetScore( fScore[p] );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
TODO: Accomodate this with a theme metric
|
|
||||||
|
|
||||||
// SNEAKY! We take the max combo, and put it into element 5, because Ez2dancer
|
|
||||||
// doesn't care for OK's and plus this text element is already nicely aligned =)
|
|
||||||
if (GAMESTATE->m_CurGame == GAME_EZ2)
|
|
||||||
{
|
|
||||||
m_textJudgeNumbers[5][p].SetText( ssprintf("%4d", iMaxCombo[p]) );
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
m_BonusInfoFrame[p].SetBonusInfo( (PlayerNumber)p, fPossibleRadarValues[p], fActualRadarValues[p], iMaxCombo[p] );
|
|
||||||
m_StageBox[p].SetStageInfo( (PlayerNumber)p, GAMESTATE->m_iSongsBeforeFail[p] );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////
|
////////////////////////
|
||||||
// update persistent statistics
|
// update persistent statistics
|
||||||
////////////////////////
|
////////////////////////
|
||||||
@@ -462,91 +414,182 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
m_bTryExtraStage = false;
|
m_bTryExtraStage = false;
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////
|
||||||
|
// Init non-ResultMode specific displays
|
||||||
|
//////////////////////////
|
||||||
|
for( l=0; l<NUM_JUDGE_LINES; l++ )
|
||||||
|
{
|
||||||
|
// EZ2 should hide these things by placing them off screen with theme metrics
|
||||||
|
m_sprJudgeLabels[l].Load( THEME->GetPathTo("Graphics","evaluation judge labels") );
|
||||||
|
m_sprJudgeLabels[l].StopAnimating();
|
||||||
|
m_sprJudgeLabels[l].SetState( l );
|
||||||
|
m_sprJudgeLabels[l].SetXY( JUDGE_LABELS_X, JUDGE_Y(l) );
|
||||||
|
m_sprJudgeLabels[l].SetZoom( 1.0f );
|
||||||
|
this->AddSubActor( &m_sprJudgeLabels[l] );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_sprScoreLabel.Load( THEME->GetPathTo("Graphics","evaluation score labels") );
|
||||||
|
m_sprScoreLabel.SetState( m_ResultMode==RM_ONI ? 1 : 0 );
|
||||||
|
m_sprScoreLabel.StopAnimating();
|
||||||
|
m_sprScoreLabel.SetXY( SCORE_LABELS_X, SCORE_Y );
|
||||||
|
m_sprScoreLabel.SetZoom( 1.0f );
|
||||||
|
this->AddSubActor( &m_sprScoreLabel );
|
||||||
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
|
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
/* Chris: If you don't want EZ2 to have a grade frame, then make a theme that has a 1x1 transparent graphic for the grade frame.
|
for( l=0; l<NUM_JUDGE_LINES; l++ )
|
||||||
|
|
||||||
if ( GAMESTATE->m_CurGame != GAME_EZ2)
|
|
||||||
{
|
{
|
||||||
*/
|
m_textJudgeNumbers[l][p].LoadFromFont( THEME->GetPathTo("Fonts","score numbers") );
|
||||||
m_sprGradeFrame[p].Load( THEME->GetPathTo("Graphics","evaluation grade frame") );
|
m_textJudgeNumbers[l][p].TurnShadowOff();
|
||||||
m_sprGradeFrame[p].StopAnimating();
|
m_textJudgeNumbers[l][p].SetXY( JUDGE_X(p,l), JUDGE_Y(l) );
|
||||||
m_sprGradeFrame[p].SetState( p );
|
m_textJudgeNumbers[l][p].SetZoom( 0.7f );
|
||||||
m_sprGradeFrame[p].SetXY( GRADE_X(p), GRADE_Y );
|
m_textJudgeNumbers[l][p].SetDiffuseColor( PlayerToColor(p) );
|
||||||
this->AddSubActor( &m_sprGradeFrame[p] );
|
this->AddSubActor( &m_textJudgeNumbers[l][p] );
|
||||||
/* }
|
}
|
||||||
*/
|
|
||||||
|
m_textJudgeNumbers[0][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_PERFECT]) );
|
||||||
|
m_textJudgeNumbers[1][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_GREAT]) );
|
||||||
|
m_textJudgeNumbers[2][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_GOOD]) );
|
||||||
|
m_textJudgeNumbers[3][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_BOO]) );
|
||||||
|
m_textJudgeNumbers[4][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_MISS]) );
|
||||||
|
m_textJudgeNumbers[5][p].SetText( ssprintf("%4d", iHoldNoteScores[p][HNS_OK]) );
|
||||||
|
m_textJudgeNumbers[6][p].SetText( ssprintf("%4d", iMaxCombo[p]) );
|
||||||
|
|
||||||
|
|
||||||
|
if( m_ResultMode==RM_ONI )
|
||||||
|
m_ScoreDisplay[p].SetText( SecondsToTime(GAMESTATE->GetPlayerSurviveTime( (PlayerNumber)p )) );
|
||||||
|
else
|
||||||
|
m_ScoreDisplay[p].SetScore( fScore[p] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////
|
||||||
|
// Init ResultMode-specific displays
|
||||||
|
/////////////////////////////////
|
||||||
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
{
|
||||||
|
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
|
||||||
|
continue; // skip
|
||||||
|
|
||||||
|
// If EZ2 shouldn't have a grade frame, then make a theme that has a 1x1 transparent graphic for the grade frame.
|
||||||
|
|
||||||
switch( m_ResultMode )
|
switch( m_ResultMode )
|
||||||
{
|
{
|
||||||
case RM_ONI:
|
case RM_ONI:
|
||||||
{
|
{
|
||||||
m_textOniPercent[p].LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
m_sprPercentFrame[p].Load( THEME->GetPathTo("Graphics","evaluation percent frame") );
|
||||||
m_textOniPercent[p].SetXY( GRADE_X(p), GRADE_Y );
|
m_sprPercentFrame[p].StopAnimating();
|
||||||
m_textOniPercent[p].SetShadowLength( 2 );
|
m_sprPercentFrame[p].SetState( p );
|
||||||
m_textOniPercent[p].SetZoomX( 1.3f );
|
m_sprPercentFrame[p].SetXY( GRADE_X(p), GRADE_Y );
|
||||||
m_textOniPercent[p].SetZoomY( 2.5f );
|
this->AddSubActor( &m_sprPercentFrame[p] );
|
||||||
m_textOniPercent[p].SetEffectGlowing( 1.0f );
|
|
||||||
|
|
||||||
|
m_textOniPercentLarge[p].LoadFromFont( THEME->GetPathTo("Fonts","oni percent numbers") );
|
||||||
|
m_textOniPercentLarge[p].TurnShadowOff();
|
||||||
|
m_textOniPercentLarge[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y );
|
||||||
|
m_textOniPercentLarge[p].SetHorizAlign( Actor::align_right );
|
||||||
|
m_textOniPercentLarge[p].SetVertAlign( Actor::align_bottom );
|
||||||
|
m_textOniPercentLarge[p].SetEffectGlowing( 1.0f );
|
||||||
|
this->AddSubActor( &m_textOniPercentLarge[p] );
|
||||||
|
|
||||||
|
m_textOniPercentSmall[p].LoadFromFont( THEME->GetPathTo("Fonts","oni percent numbers") );
|
||||||
|
m_textOniPercentSmall[p].TurnShadowOff();
|
||||||
|
m_textOniPercentSmall[p].SetZoom( 0.5f );
|
||||||
|
m_textOniPercentSmall[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y );
|
||||||
|
m_textOniPercentSmall[p].SetHorizAlign( Actor::align_left );
|
||||||
|
m_textOniPercentSmall[p].SetVertAlign( Actor::align_bottom );
|
||||||
|
m_textOniPercentSmall[p].SetEffectGlowing( 1.0f );
|
||||||
|
this->AddSubActor( &m_textOniPercentSmall[p] );
|
||||||
|
|
||||||
|
iPossibleDancePoints[p] = max( 1, iPossibleDancePoints[p] );
|
||||||
float fPercentDancePoints = iActualDancePoints[p] / (float)iPossibleDancePoints[p] + 0.0001f; // correct for rounding errors
|
float fPercentDancePoints = iActualDancePoints[p] / (float)iPossibleDancePoints[p] + 0.0001f; // correct for rounding errors
|
||||||
fPercentDancePoints = max( 0, fPercentDancePoints );
|
int iPercentDancePointsLarge = int(fPercentDancePoints*100);
|
||||||
m_textOniPercent[p].SetText( ssprintf("%.1f%%", fPercentDancePoints*100) );
|
int iPercentDancePointsSmall = int( (fPercentDancePoints*100 - int(fPercentDancePoints*100)) * 10 );
|
||||||
this->AddSubActor( &m_textOniPercent[p] );
|
m_textOniPercentLarge[p].SetText( ssprintf("%02d%", iPercentDancePointsLarge) );
|
||||||
|
m_textOniPercentSmall[p].SetText( ssprintf(".%01d%%", iPercentDancePointsSmall) );
|
||||||
|
|
||||||
m_StageBox[p].SetXY( BONUS_X(p), BONUS_Y );
|
// StageInfo stuff
|
||||||
this->AddSubActor( &m_StageBox[p] );
|
m_sprCourseFrame[p].Load( THEME->GetPathTo("Graphics","evaluation stage frame 2x1") );
|
||||||
|
m_sprCourseFrame[p].StopAnimating();
|
||||||
|
m_sprCourseFrame[p].SetState( p );
|
||||||
|
m_sprCourseFrame[p].SetXY( BONUS_X(p), BONUS_Y );
|
||||||
|
this->AddSubActor( &m_sprCourseFrame[p] );
|
||||||
|
|
||||||
|
m_textSongsSurvived[p].LoadFromFont( THEME->GetPathTo("Fonts","oni stage numbers") );
|
||||||
|
m_textSongsSurvived[p].TurnShadowOff();
|
||||||
|
m_textSongsSurvived[p].SetXY( SONGS_SURVIVED_X(p), SONGS_SURVIVED_Y );
|
||||||
|
m_textSongsSurvived[p].SetText( ssprintf("%02d", GAMESTATE->m_iSongsBeforeFail[p]) );
|
||||||
|
this->AddSubActor( &m_textSongsSurvived[p] );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RM_ARCADE_STAGE:
|
case RM_ARCADE_STAGE:
|
||||||
case RM_ARCADE_SUMMARY:
|
case RM_ARCADE_SUMMARY:
|
||||||
/*
|
|
||||||
Todo: Accomodate this in theme metrics
|
|
||||||
|
|
||||||
if (GAMESTATE->m_CurGame != GAME_EZ2 )
|
|
||||||
{
|
{
|
||||||
*/
|
m_sprGradeFrame[p].Load( THEME->GetPathTo("Graphics","evaluation grade frame") );
|
||||||
|
m_sprGradeFrame[p].StopAnimating();
|
||||||
|
m_sprGradeFrame[p].SetState( p );
|
||||||
|
m_sprGradeFrame[p].SetXY( GRADE_X(p), GRADE_Y );
|
||||||
|
this->AddSubActor( &m_sprGradeFrame[p] );
|
||||||
|
|
||||||
|
// Ez2dancer should control the grade tween using theme metrics
|
||||||
m_Grades[p].SetXY( GRADE_X(p), GRADE_Y );
|
m_Grades[p].SetXY( GRADE_X(p), GRADE_Y );
|
||||||
m_Grades[p].SetZ( -2 );
|
m_Grades[p].SetZ( -2 );
|
||||||
m_Grades[p].SetZoom( 1.0f );
|
m_Grades[p].SetZoom( 1.0f );
|
||||||
m_Grades[p].SetEffectGlowing( 1.0f );
|
m_Grades[p].SetEffectGlowing( 1.0f );
|
||||||
m_Grades[p].SpinAndSettleOn( grade[p] );
|
if( SPIN_GRADES )
|
||||||
|
m_Grades[p].SpinAndSettleOn( grade[p] );
|
||||||
|
else
|
||||||
|
m_Grades[p].SetGrade( (PlayerNumber)p, grade[p] );
|
||||||
|
this->AddSubActor( &m_Grades[p] );
|
||||||
|
|
||||||
m_BonusInfoFrame[p].SetXY( BONUS_X(p), BONUS_Y );
|
// Bonus info frame
|
||||||
this->AddSubActor( &m_BonusInfoFrame[p] );
|
m_sprBonusFrame[p].Load( THEME->GetPathTo("Graphics","evaluation bonus frame 2x1") );
|
||||||
/*
|
m_sprBonusFrame[p].StopAnimating();
|
||||||
}
|
m_sprBonusFrame[p].SetState( p );
|
||||||
else // Ez2dancer Style Grade Display.
|
m_sprBonusFrame[p].SetXY( BONUS_X(p), BONUS_Y );
|
||||||
{
|
this->AddSubActor( &m_sprBonusFrame[p] );
|
||||||
m_Grades[p].SetXY( GRADE_X[p], GRADE_Y + 150);
|
|
||||||
m_Grades[p].SetZ( -2 );
|
for( int l=0; l<NUM_RADAR_VALUES; l++ ) // foreach line
|
||||||
if (p == PLAYER_1 )
|
|
||||||
{
|
{
|
||||||
m_Grades[p].SetXY( GRADE_X[p]-10, GRADE_Y + 150);
|
m_sprPossibleBar[p][l].Load( THEME->GetPathTo("Graphics","evaluation bars possible 1x2") );
|
||||||
|
m_sprPossibleBar[p][l].SetState( p );
|
||||||
|
m_sprPossibleBar[p][l].SetWidth( 1 );
|
||||||
|
m_sprPossibleBar[p][l].SetHeight( 1 );
|
||||||
|
m_sprPossibleBar[p][l].SetHorizAlign( Actor::align_left );
|
||||||
|
m_sprPossibleBar[p][l].SetX( BAR_BASE_X(p) );
|
||||||
|
m_sprPossibleBar[p][l].SetY( BAR_START_Y + BAR_SPACING_Y*l );
|
||||||
|
m_sprPossibleBar[p][l].SetRotation( BAR_ROTATION(p) );
|
||||||
|
m_sprPossibleBar[p][l].SetZoomX( 0 );
|
||||||
|
m_sprPossibleBar[p][l].SetZoomY( BAR_HEIGHT );
|
||||||
|
m_sprPossibleBar[p][l].BeginTweening( 0.5f );
|
||||||
|
m_sprPossibleBar[p][l].SetTweenZoomX( BAR_WIDTH*fPossibleRadarValues[p][l] );
|
||||||
|
this->AddSubActor( &m_sprPossibleBar[p][l] );
|
||||||
|
|
||||||
|
m_sprActualBar[p][l].Load( THEME->GetPathTo("Graphics","evaluation bars actual 1x2") );
|
||||||
|
m_sprActualBar[p][l].SetState( p );
|
||||||
|
m_sprActualBar[p][l].StopAnimating();
|
||||||
|
m_sprActualBar[p][l].SetWidth( 1 );
|
||||||
|
m_sprActualBar[p][l].SetHeight( 1 );
|
||||||
|
m_sprActualBar[p][l].SetHorizAlign( Actor::align_left );
|
||||||
|
m_sprActualBar[p][l].SetX( BAR_BASE_X(p) );
|
||||||
|
m_sprActualBar[p][l].SetY( BAR_START_Y + BAR_SPACING_Y*l );
|
||||||
|
m_sprActualBar[p][l].SetRotation( BAR_ROTATION(p) );
|
||||||
|
m_sprActualBar[p][l].SetZoomX( 0 );
|
||||||
|
m_sprActualBar[p][l].SetZoomY( BAR_HEIGHT );
|
||||||
|
m_sprActualBar[p][l].BeginTweening( 0.5f );
|
||||||
|
m_sprActualBar[p][l].SetTweenZoomX( BAR_WIDTH*fActualRadarValues[p][l] );
|
||||||
|
if( fActualRadarValues[p][l] == fPossibleRadarValues[p][l] )
|
||||||
|
m_sprActualBar[p][l].SetEffectGlowing();
|
||||||
|
this->AddSubActor( &m_sprActualBar[p][l] );
|
||||||
}
|
}
|
||||||
m_Grades[p].SetGrade( grade[p] );
|
break;
|
||||||
m_Grades[p].SetRotation( D3DX_PI );
|
|
||||||
m_Grades[p].SetZoom( 8 );
|
|
||||||
m_Grades[p].BeginTweening( 0.6f );
|
|
||||||
|
|
||||||
m_Grades[p].SetTweenRotationZ( 0 );
|
|
||||||
m_Grades[p].SetTweenZoom( 2 );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
this->AddSubActor( &m_Grades[p] );
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chris: If EZ2 wants to hide these things, place them off screen using theme metrics
|
// Chris: If EZ2 wants to hide these things, place them off screen using theme metrics
|
||||||
|
|
||||||
if ( GAMESTATE->m_CurGame == GAME_EZ2)
|
|
||||||
continue;
|
|
||||||
*/
|
|
||||||
m_bNewRecord[p] = false;
|
|
||||||
|
|
||||||
if( m_bNewRecord[p] )
|
if( m_bNewRecord[p] )
|
||||||
{
|
{
|
||||||
m_textNewRecord[p].LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
m_textNewRecord[p].LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||||
@@ -565,9 +608,9 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
m_textTryExtraStage.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
m_textTryExtraStage.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||||
m_textTryExtraStage.SetXY( TRY_EXTRA_STAGE_X, TRY_EXTRA_STAGE_Y );
|
m_textTryExtraStage.SetXY( TRY_EXTRA_STAGE_X, TRY_EXTRA_STAGE_Y );
|
||||||
if( GAMESTATE->IsExtraStage() )
|
if( GAMESTATE->IsExtraStage() )
|
||||||
m_textTryExtraStage.SetText( "Try Another Extra Stage!" );
|
m_textTryExtraStage.SetText( "One More ExtraStage!!!" );
|
||||||
else
|
else
|
||||||
m_textTryExtraStage.SetText( "Try Extra Stage!" );
|
m_textTryExtraStage.SetText( "Try ExtraStage!!!" );
|
||||||
m_textTryExtraStage.SetZoom( 1 );
|
m_textTryExtraStage.SetZoom( 1 );
|
||||||
m_textTryExtraStage.SetEffectGlowing( 1.0f );
|
m_textTryExtraStage.SetEffectGlowing( 1.0f );
|
||||||
this->AddSubActor( &m_textTryExtraStage );
|
this->AddSubActor( &m_textTryExtraStage );
|
||||||
@@ -642,19 +685,11 @@ void ScreenEvaluation::TweenOnScreen()
|
|||||||
|
|
||||||
for( i=0; i<NUM_JUDGE_LINES; i++ )
|
for( i=0; i<NUM_JUDGE_LINES; i++ )
|
||||||
{
|
{
|
||||||
/* TODO: Accomodate this using theme metrics
|
fOriginalY = m_sprJudgeLabels[i].GetY();
|
||||||
|
m_sprJudgeLabels[i].SetY( fOriginalY + SCREEN_HEIGHT );
|
||||||
if (GAMESTATE->m_CurGame != GAME_EZ2)
|
m_sprJudgeLabels[i].BeginTweeningQueued( 0.2f + 0.1f*i );
|
||||||
{
|
m_sprJudgeLabels[i].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
|
||||||
*/
|
m_sprJudgeLabels[i].SetTweenY( fOriginalY );
|
||||||
fOriginalY = m_sprJudgeLabels[i].GetY();
|
|
||||||
m_sprJudgeLabels[i].SetY( fOriginalY + SCREEN_HEIGHT );
|
|
||||||
m_sprJudgeLabels[i].BeginTweeningQueued( 0.2f + 0.1f*i );
|
|
||||||
m_sprJudgeLabels[i].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
|
|
||||||
m_sprJudgeLabels[i].SetTweenY( fOriginalY );
|
|
||||||
/*
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
@@ -666,58 +701,64 @@ void ScreenEvaluation::TweenOnScreen()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chris: If EZ2 wants to hide these things, position them off screen using theme metrics
|
// Chris: If EZ2 wants to hide these things, position them off screen using theme metrics
|
||||||
|
|
||||||
if (GAMESTATE->m_CurGame != GAME_EZ2)
|
fOriginalY = m_sprScoreLabel.GetY();
|
||||||
|
m_sprScoreLabel.SetY( fOriginalY + SCREEN_HEIGHT );
|
||||||
|
m_sprScoreLabel.BeginTweeningQueued( 0.8f + 0.1f*i );
|
||||||
|
m_sprScoreLabel.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprScoreLabel.SetTweenY( fOriginalY );
|
||||||
|
|
||||||
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
*/
|
fOriginalX = m_ScoreDisplay[p].GetX();
|
||||||
fOriginalY = m_sprScoreLabel.GetY();
|
m_ScoreDisplay[p].SetX( fOriginalX + SCREEN_WIDTH/2*(p==PLAYER_1 ? 1 : -1) );
|
||||||
m_sprScoreLabel.SetY( fOriginalY + SCREEN_HEIGHT );
|
m_ScoreDisplay[p].BeginTweeningQueued( 0.8f + 0.1f*i );
|
||||||
m_sprScoreLabel.BeginTweeningQueued( 0.8f + 0.1f*i );
|
m_ScoreDisplay[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
|
||||||
m_sprScoreLabel.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
|
m_ScoreDisplay[p].SetTweenX( fOriginalX );
|
||||||
m_sprScoreLabel.SetTweenY( fOriginalY );
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
|
||||||
{
|
|
||||||
fOriginalX = m_ScoreDisplay[p].GetX();
|
|
||||||
m_ScoreDisplay[p].SetX( fOriginalX + SCREEN_WIDTH/2*(p==PLAYER_1 ? 1 : -1) );
|
|
||||||
m_ScoreDisplay[p].BeginTweeningQueued( 0.8f + 0.1f*i );
|
|
||||||
m_ScoreDisplay[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
|
|
||||||
m_ScoreDisplay[p].SetTweenX( fOriginalX );
|
|
||||||
}
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
|
||||||
{
|
|
||||||
fOriginalX = m_BonusInfoFrame[p].GetX();
|
|
||||||
m_BonusInfoFrame[p].SetX( fOriginalX + SCREEN_WIDTH/2*(p==PLAYER_1 ? 1 : -1) );
|
|
||||||
m_BonusInfoFrame[p].BeginTweeningQueued( 0.2f + 0.1f*i );
|
|
||||||
m_BonusInfoFrame[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
|
|
||||||
m_BonusInfoFrame[p].SetTweenX( fOriginalX );
|
|
||||||
|
|
||||||
fOriginalX = m_StageBox[p].GetX();
|
|
||||||
m_StageBox[p].SetX( fOriginalX + SCREEN_WIDTH/2*(p==PLAYER_1 ? 1 : -1) );
|
|
||||||
m_StageBox[p].BeginTweeningQueued( 0.2f + 0.1f*i );
|
|
||||||
m_StageBox[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
|
|
||||||
m_StageBox[p].SetTweenX( fOriginalX );
|
|
||||||
|
|
||||||
m_sprGradeFrame[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
|
||||||
m_sprGradeFrame[p].SetTweenZoomY( 0 );
|
|
||||||
|
|
||||||
m_Grades[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
|
||||||
m_Grades[p].SetTweenZoomY( 0 );
|
|
||||||
|
|
||||||
m_textOniPercent[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
|
||||||
m_textOniPercent[p].SetTweenZoomY( 0 );
|
|
||||||
|
|
||||||
m_textNewRecord[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
|
||||||
m_textNewRecord[p].SetTweenZoomY( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_textTryExtraStage.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
|
||||||
m_textTryExtraStage.SetTweenZoomY( 0 );
|
|
||||||
/*
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
CArray<Actor*,Actor*> apActorsInBonusOrStageInfo;
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_sprBonusFrame[p] );
|
||||||
|
for( i=0; i<NUM_RADAR_VALUES; i++ )
|
||||||
|
{
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_sprPossibleBar[p][i] );
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_sprActualBar[p][i] );
|
||||||
|
}
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_sprCourseFrame[p] );
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_textTime[p] );
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_textSongsSurvived[p] );
|
||||||
|
for( i=0; i<apActorsInBonusOrStageInfo.GetSize(); i++ )
|
||||||
|
{
|
||||||
|
fOriginalX = apActorsInBonusOrStageInfo[i]->GetX();
|
||||||
|
apActorsInBonusOrStageInfo[i]->SetX( fOriginalX + SCREEN_WIDTH/2*(p==PLAYER_1 ? 1 : -1) );
|
||||||
|
apActorsInBonusOrStageInfo[i]->BeginTweeningQueued( 0.2f );
|
||||||
|
apActorsInBonusOrStageInfo[i]->BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
|
||||||
|
apActorsInBonusOrStageInfo[i]->SetTweenX( fOriginalX );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_sprGradeFrame[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprGradeFrame[p].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
|
m_Grades[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_Grades[p].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
|
m_textOniPercentLarge[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_textOniPercentLarge[p].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
|
m_textOniPercentSmall[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_textOniPercentSmall[p].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
|
m_textNewRecord[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_textNewRecord[p].SetTweenZoomY( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_textTryExtraStage.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_textTryExtraStage.SetTweenZoomY( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenEvaluation::TweenOffScreen()
|
void ScreenEvaluation::TweenOffScreen()
|
||||||
@@ -735,15 +776,8 @@ void ScreenEvaluation::TweenOffScreen()
|
|||||||
|
|
||||||
for( i=0; i<NUM_JUDGE_LINES; i++ )
|
for( i=0; i<NUM_JUDGE_LINES; i++ )
|
||||||
{
|
{
|
||||||
/* Chris: If EZ2 wants to hide these things, position them off screen using theme metrics
|
m_sprJudgeLabels[i].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
||||||
if (GAMESTATE->m_CurGame != GAME_EZ2)
|
m_sprJudgeLabels[i].SetTweenZoomY( 0 );
|
||||||
{
|
|
||||||
*/
|
|
||||||
m_sprJudgeLabels[i].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
|
||||||
m_sprJudgeLabels[i].SetTweenZoomY( 0 );
|
|
||||||
/*
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
@@ -752,31 +786,37 @@ void ScreenEvaluation::TweenOffScreen()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chris: If EZ2 wants to hide these things, position them off screen using theme metrics
|
m_sprScoreLabel.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
||||||
if (GAMESTATE->m_CurGame != GAME_EZ2)
|
m_sprScoreLabel.SetTweenZoomY( 0 );
|
||||||
{
|
|
||||||
*/
|
|
||||||
m_sprScoreLabel.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
|
||||||
m_sprScoreLabel.SetTweenZoomY( 0 );
|
|
||||||
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
|
||||||
{
|
|
||||||
m_ScoreDisplay[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
|
||||||
m_ScoreDisplay[p].SetTweenZoomY( 0 );
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
|
m_ScoreDisplay[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
||||||
|
m_ScoreDisplay[p].SetTweenZoomY( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
m_Grades[p].SettleImmediately();
|
m_Grades[p].SettleImmediately();
|
||||||
|
|
||||||
m_BonusInfoFrame[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
CArray<Actor*,Actor*> apActorsInBonusOrStageInfo;
|
||||||
m_BonusInfoFrame[p].SetTweenZoomY( 0 );
|
apActorsInBonusOrStageInfo.Add( &m_sprBonusFrame[p] );
|
||||||
|
for( i=0; i<NUM_RADAR_VALUES; i++ )
|
||||||
m_StageBox[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
{
|
||||||
m_StageBox[p].SetTweenZoomY( 0 );
|
apActorsInBonusOrStageInfo.Add( &m_sprPossibleBar[p][i] );
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_sprActualBar[p][i] );
|
||||||
|
}
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_sprCourseFrame[p] );
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_textTime[p] );
|
||||||
|
apActorsInBonusOrStageInfo.Add( &m_textSongsSurvived[p] );
|
||||||
|
for( i=0; i<apActorsInBonusOrStageInfo.GetSize(); i++ )
|
||||||
|
{
|
||||||
|
apActorsInBonusOrStageInfo[i]->BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
||||||
|
apActorsInBonusOrStageInfo[i]->SetTweenZoomY( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
m_sprGradeFrame[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
m_sprGradeFrame[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
m_sprGradeFrame[p].SetTweenZoomY( 0 );
|
m_sprGradeFrame[p].SetTweenZoomY( 0 );
|
||||||
@@ -784,8 +824,11 @@ void ScreenEvaluation::TweenOffScreen()
|
|||||||
m_Grades[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
m_Grades[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
m_Grades[p].SetTweenZoomY( 0 );
|
m_Grades[p].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
m_textOniPercent[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
m_textOniPercentLarge[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
m_textOniPercent[p].SetTweenZoomY( 0 );
|
m_textOniPercentLarge[p].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
|
m_textOniPercentSmall[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_textOniPercentSmall[p].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
m_textNewRecord[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
m_textNewRecord[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
m_textNewRecord[p].SetTweenZoomY( 0 );
|
m_textNewRecord[p].SetTweenZoomY( 0 );
|
||||||
|
|||||||
@@ -18,12 +18,11 @@
|
|||||||
#include "MenuElements.h"
|
#include "MenuElements.h"
|
||||||
#include "Banner.h"
|
#include "Banner.h"
|
||||||
#include "ScoreDisplayNormal.h"
|
#include "ScoreDisplayNormal.h"
|
||||||
#include "BonusInfoFrame.h"
|
|
||||||
#include "StageBox.h"
|
#include "StageBox.h"
|
||||||
#include "BannerWithFrame.h"
|
#include "BannerWithFrame.h"
|
||||||
|
|
||||||
|
|
||||||
const int NUM_JUDGE_LINES = 6; // perfect, great, good, boo, miss, ok
|
const int NUM_JUDGE_LINES = 7; // perfect, great, good, boo, miss, ok, max_combo
|
||||||
const int STAGES_TO_SHOW_IN_SUMMARY = 3; // only show the latest three stages in a summary
|
const int STAGES_TO_SHOW_IN_SUMMARY = 3; // only show the latest three stages in a summary
|
||||||
|
|
||||||
class ScreenEvaluation : public Screen
|
class ScreenEvaluation : public Screen
|
||||||
@@ -49,12 +48,24 @@ protected:
|
|||||||
BannerWithFrame m_BannerWithFrame[STAGES_TO_SHOW_IN_SUMMARY];
|
BannerWithFrame m_BannerWithFrame[STAGES_TO_SHOW_IN_SUMMARY];
|
||||||
BitmapText m_textStage;
|
BitmapText m_textStage;
|
||||||
|
|
||||||
|
// used in arcade
|
||||||
Sprite m_sprGradeFrame[NUM_PLAYERS];
|
Sprite m_sprGradeFrame[NUM_PLAYERS];
|
||||||
GradeDisplay m_Grades[NUM_PLAYERS];
|
GradeDisplay m_Grades[NUM_PLAYERS];
|
||||||
BitmapText m_textOniPercent[NUM_PLAYERS];
|
|
||||||
|
|
||||||
BonusInfoFrame m_BonusInfoFrame[NUM_PLAYERS]; // used in arcade
|
// used in Oni/Endless
|
||||||
StageBox m_StageBox[NUM_PLAYERS]; // used in Oni
|
Sprite m_sprPercentFrame[NUM_PLAYERS];
|
||||||
|
BitmapText m_textOniPercentLarge[NUM_PLAYERS];
|
||||||
|
BitmapText m_textOniPercentSmall[NUM_PLAYERS];
|
||||||
|
|
||||||
|
// used in arcade
|
||||||
|
Sprite m_sprBonusFrame[NUM_PLAYERS];
|
||||||
|
Sprite m_sprPossibleBar[NUM_PLAYERS][NUM_RADAR_VALUES];
|
||||||
|
Sprite m_sprActualBar[NUM_PLAYERS][NUM_RADAR_VALUES];
|
||||||
|
|
||||||
|
// used in Oni/Endless
|
||||||
|
Sprite m_sprCourseFrame[NUM_PLAYERS];
|
||||||
|
BitmapText m_textTime[NUM_PLAYERS];
|
||||||
|
BitmapText m_textSongsSurvived[NUM_PLAYERS];
|
||||||
|
|
||||||
Sprite m_sprJudgeLabels[NUM_JUDGE_LINES];
|
Sprite m_sprJudgeLabels[NUM_JUDGE_LINES];
|
||||||
BitmapText m_textJudgeNumbers[NUM_JUDGE_LINES][NUM_PLAYERS];
|
BitmapText m_textJudgeNumbers[NUM_JUDGE_LINES][NUM_PLAYERS];
|
||||||
|
|||||||
@@ -26,13 +26,20 @@ Andrew Livy
|
|||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "RageException.h"
|
#include "RageException.h"
|
||||||
#include "RageTimer.h"
|
#include "RageTimer.h"
|
||||||
|
#include "ScreenSelectStyle5th.h"
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
|
|
||||||
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
||||||
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 2);
|
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 2);
|
||||||
|
|
||||||
#define USE_NORMAL_OR_EZ2_SELECT_STYLE THEME->GetMetricB("General","UseNormalOrEZ2SelectStyle")
|
#define SELECT_STYLE_TYPE THEME->GetMetricI("General","SelectStyleType")
|
||||||
|
enum SelectStyleType // for use with the metric above
|
||||||
|
{
|
||||||
|
SELECT_STYLE_TYPE_MAX = 0,
|
||||||
|
SELECT_STYLE_TYPE_5TH,
|
||||||
|
SELECT_STYLE_TYPE_EZ2,
|
||||||
|
};
|
||||||
|
|
||||||
const float TWEEN_TIME = 0.35f;
|
const float TWEEN_TIME = 0.35f;
|
||||||
const D3DXCOLOR OPT_NOT_SELECTED = D3DXCOLOR(0.3f,0.3f,0.3f,1);
|
const D3DXCOLOR OPT_NOT_SELECTED = D3DXCOLOR(0.3f,0.3f,0.3f,1);
|
||||||
@@ -240,10 +247,21 @@ void ScreenEz2SelectPlayer::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
||||||
break;
|
break;
|
||||||
case SM_GoToNextState:
|
case SM_GoToNextState:
|
||||||
if( USE_NORMAL_OR_EZ2_SELECT_STYLE )
|
switch( SELECT_STYLE_TYPE )
|
||||||
SCREENMAN->SetNewScreen( new ScreenEz2SelectStyle );
|
{
|
||||||
else
|
case SELECT_STYLE_TYPE_MAX:
|
||||||
SCREENMAN->SetNewScreen( new ScreenSelectStyle );
|
SCREENMAN->SetNewScreen( new ScreenSelectStyle );
|
||||||
|
break;
|
||||||
|
case SELECT_STYLE_TYPE_5TH:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenSelectStyle5th );
|
||||||
|
break;
|
||||||
|
case SELECT_STYLE_TYPE_EZ2:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenEz2SelectStyle );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,12 @@ const float OPT_YP[NUM_EZ2P_GRAPHICS] = {
|
|||||||
}; // tells us the default Y position
|
}; // tells us the default Y position
|
||||||
|
|
||||||
|
|
||||||
#define SKIP_SELECT_DIFFICULTY THEME->GetMetricB("General","SkipSelectDifficulty")
|
#define SELECT_DIFFICULTY_TYPE THEME->GetMetricI("General","SelectDifficultyType")
|
||||||
|
enum SelectDifficultyType // for use with the metric above
|
||||||
|
{
|
||||||
|
SELECT_DIFFICULTY_TYPE_SKIP = 0,
|
||||||
|
SELECT_DIFFICULTY_TYPE_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
float ez2p_lasttimercheck[2];
|
float ez2p_lasttimercheck[2];
|
||||||
@@ -343,10 +348,17 @@ void ScreenEz2SelectStyle::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
||||||
break;
|
break;
|
||||||
case SM_GoToNextState:
|
case SM_GoToNextState:
|
||||||
if( SKIP_SELECT_DIFFICULTY )
|
switch( SELECT_DIFFICULTY_TYPE )
|
||||||
|
{
|
||||||
|
case SELECT_DIFFICULTY_TYPE_SKIP:
|
||||||
SCREENMAN->SetNewScreen( new ScreenSelectGroup );
|
SCREENMAN->SetNewScreen( new ScreenSelectGroup );
|
||||||
else
|
break;
|
||||||
|
case SELECT_DIFFICULTY_TYPE_MAX:
|
||||||
SCREENMAN->SetNewScreen( new ScreenSelectDifficulty );
|
SCREENMAN->SetNewScreen( new ScreenSelectDifficulty );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -692,6 +692,7 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad )
|
|||||||
m_Player[p].Load( (PlayerNumber)p, &newNoteData, m_pLifeMeter[p], m_pScoreDisplay[p] );
|
m_Player[p].Load( (PlayerNumber)p, &newNoteData, m_pLifeMeter[p], m_pScoreDisplay[p] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_Background.LoadFromSong( GAMESTATE->m_pCurSong );
|
||||||
m_Background.LoadFromSong( GAMESTATE->m_pCurSong );
|
m_Background.LoadFromSong( GAMESTATE->m_pCurSong );
|
||||||
m_Background.SetDiffuseColor( D3DXCOLOR(0.5f,0.5f,0.5f,1) );
|
m_Background.SetDiffuseColor( D3DXCOLOR(0.5f,0.5f,0.5f,1) );
|
||||||
m_Background.BeginTweeningQueued( 2 );
|
m_Background.BeginTweeningQueued( 2 );
|
||||||
@@ -922,7 +923,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
|
|
||||||
if( GAMESTATE->m_bDemonstration )
|
if( GAMESTATE->m_bDemonstration )
|
||||||
{
|
{
|
||||||
if( MenuI.button == MENU_BUTTON_START && !m_Fade.IsClosing() )
|
if( MenuI.button==MENU_BUTTON_START && !m_Fade.IsClosing() )
|
||||||
{
|
{
|
||||||
m_soundMusic.Stop();
|
m_soundMusic.Stop();
|
||||||
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","insert coin") );
|
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","insert coin") );
|
||||||
@@ -930,6 +931,10 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
this->SendScreenMessage( SM_GoToTitleMenu, 0 );
|
this->SendScreenMessage( SM_GoToTitleMenu, 0 );
|
||||||
// m_Fade.CloseWipingRight( SM_GoToTitleMenu );
|
// m_Fade.CloseWipingRight( SM_GoToTitleMenu );
|
||||||
}
|
}
|
||||||
|
else if( DeviceI.device==DEVICE_KEYBOARD && DeviceI.button==DIK_ESCAPE && !m_Fade.IsClosing() )
|
||||||
|
{
|
||||||
|
this->SendScreenMessage( SM_BeginFadingToTitleMenu, 0 );
|
||||||
|
}
|
||||||
return; // don't fall through below
|
return; // don't fall through below
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1410,12 +1415,12 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
ShowSavePrompt( SM_GoToScreenAfterFail );
|
ShowSavePrompt( SM_GoToScreenAfterFail );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( PREFSMAN->m_bEventMode )
|
if( GAMESTATE->m_PlayMode == PLAY_MODE_ONI || GAMESTATE->m_PlayMode == PLAY_MODE_ENDLESS )
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenEvaluation(false) );
|
||||||
|
else if( PREFSMAN->m_bEventMode )
|
||||||
this->SendScreenMessage( SM_GoToScreenAfterBack, 0 );
|
this->SendScreenMessage( SM_GoToScreenAfterBack, 0 );
|
||||||
else if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
else if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||||
SCREENMAN->SetNewScreen( new ScreenEvaluation(true) );
|
SCREENMAN->SetNewScreen( new ScreenEvaluation(true) );
|
||||||
else if( GAMESTATE->m_PlayMode == PLAY_MODE_ONI || GAMESTATE->m_PlayMode == PLAY_MODE_ENDLESS )
|
|
||||||
SCREENMAN->SetNewScreen( new ScreenEvaluation(false) );
|
|
||||||
else
|
else
|
||||||
SCREENMAN->SetNewScreen( new ScreenGameOver );
|
SCREENMAN->SetNewScreen( new ScreenGameOver );
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -32,22 +32,46 @@
|
|||||||
#include "RageMusic.h"
|
#include "RageMusic.h"
|
||||||
|
|
||||||
|
|
||||||
const float COURSE_INFO_FRAME_X = 160;
|
#define BANNER_FRAME_X THEME->GetMetricF("SelectCourse","BannerFrameX")
|
||||||
const float COURSE_INFO_FRAME_Y = SCREEN_TOP+118;
|
#define BANNER_FRAME_Y THEME->GetMetricF("SelectCourse","BannerFrameY")
|
||||||
|
#define BANNER_X THEME->GetMetricF("SelectCourse","BannerX")
|
||||||
|
#define BANNER_Y THEME->GetMetricF("SelectCourse","BannerY")
|
||||||
|
#define BANNER_WIDTH THEME->GetMetricF("SelectCourse","BannerWidth")
|
||||||
|
#define BANNER_HEIGHT THEME->GetMetricF("SelectCourse","BannerHeight")
|
||||||
|
#define STAGES_X THEME->GetMetricF("SelectCourse","StagesX")
|
||||||
|
#define STAGES_Y THEME->GetMetricF("SelectCourse","StagesY")
|
||||||
|
#define TIME_X THEME->GetMetricF("SelectCourse","TimeX")
|
||||||
|
#define TIME_Y THEME->GetMetricF("SelectCourse","TimeY")
|
||||||
|
#define CONTENTS_X THEME->GetMetricF("SelectCourse","ContentsX")
|
||||||
|
#define CONTENTS_Y THEME->GetMetricF("SelectCourse","ContentsY")
|
||||||
|
#define WHEEL_X THEME->GetMetricF("SelectCourse","WheelX")
|
||||||
|
#define WHEEL_Y THEME->GetMetricF("SelectCourse","WheelY")
|
||||||
|
#define SCORE_P1_X THEME->GetMetricF("SelectCourse","ScoreP1X")
|
||||||
|
#define SCORE_P1_Y THEME->GetMetricF("SelectCourse","ScoreP1Y")
|
||||||
|
#define SCORE_P2_X THEME->GetMetricF("SelectCourse","ScoreP2X")
|
||||||
|
#define SCORE_P2_Y THEME->GetMetricF("SelectCourse","ScoreP2Y")
|
||||||
|
#define HELP_TEXT THEME->GetMetric("SelectCourse","HelpText")
|
||||||
|
#define TIMER_SECONDS THEME->GetMetricI("SelectCourse","TimerSeconds")
|
||||||
|
|
||||||
const float COURSE_CONTENTS_FRAME_X = 160;
|
float BEST_TIME_X( int p ) {
|
||||||
const float COURSE_CONTENTS_FRAME_Y = CENTER_Y+70;
|
switch( p ) {
|
||||||
|
case PLAYER_1: return SCORE_P1_X;
|
||||||
const float WHEEL_X = CENTER_X+160;
|
case PLAYER_2: return SCORE_P2_X;
|
||||||
const float WHEEL_Y = CENTER_Y+8;
|
default: ASSERT(0); return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float BEST_TIME_Y( int p ) {
|
||||||
|
switch( p ) {
|
||||||
|
case PLAYER_1: return SCORE_P1_Y;
|
||||||
|
case PLAYER_2: return SCORE_P2_Y;
|
||||||
|
default: ASSERT(0); return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const float TWEEN_TIME = 0.5f;
|
const float TWEEN_TIME = 0.5f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User+1);
|
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User+1);
|
||||||
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User+2);
|
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User+2);
|
||||||
const ScreenMessage SM_ConfirmChange = ScreenMessage(SM_User+3);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -67,20 +91,49 @@ ScreenSelectCourse::ScreenSelectCourse()
|
|||||||
m_Menu.Load(
|
m_Menu.Load(
|
||||||
THEME->GetPathTo("Graphics","select course background"),
|
THEME->GetPathTo("Graphics","select course background"),
|
||||||
THEME->GetPathTo("Graphics","select course top edge"),
|
THEME->GetPathTo("Graphics","select course top edge"),
|
||||||
ssprintf("%c or %c change course then press START", char(1), char(2)),
|
HELP_TEXT, false, true, TIMER_SECONDS
|
||||||
false, true, 60
|
|
||||||
);
|
);
|
||||||
this->AddSubActor( &m_Menu );
|
this->AddSubActor( &m_Menu );
|
||||||
|
|
||||||
m_CourseInfoFrame.SetXY( COURSE_INFO_FRAME_X, COURSE_INFO_FRAME_Y );
|
m_Banner.SetXY( BANNER_X, BANNER_Y );
|
||||||
this->AddSubActor( &m_CourseInfoFrame );
|
m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
|
||||||
|
this->AddSubActor( &m_Banner );
|
||||||
|
|
||||||
m_CourseContentsFrame.SetXY( COURSE_CONTENTS_FRAME_X, COURSE_CONTENTS_FRAME_Y );
|
m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","select course info frame") );
|
||||||
|
m_sprBannerFrame.SetXY( BANNER_FRAME_X, BANNER_FRAME_Y );
|
||||||
|
this->AddSubActor( &m_sprBannerFrame );
|
||||||
|
|
||||||
|
m_textNumStages.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||||
|
m_textNumStages.SetXY( STAGES_X, STAGES_Y );
|
||||||
|
this->AddSubActor( &m_textNumStages );
|
||||||
|
|
||||||
|
m_textTime.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||||
|
m_textTime.SetXY( TIME_X, TIME_Y );
|
||||||
|
this->AddSubActor( &m_textTime );
|
||||||
|
|
||||||
|
m_CourseContentsFrame.SetXY( CONTENTS_X, CONTENTS_Y );
|
||||||
this->AddSubActor( &m_CourseContentsFrame );
|
this->AddSubActor( &m_CourseContentsFrame );
|
||||||
|
|
||||||
m_MusicWheel.SetXY( WHEEL_X, WHEEL_Y );
|
m_MusicWheel.SetXY( WHEEL_X, WHEEL_Y );
|
||||||
this->AddSubActor( &m_MusicWheel );
|
this->AddSubActor( &m_MusicWheel );
|
||||||
|
|
||||||
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
{
|
||||||
|
if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
|
||||||
|
continue; // skip
|
||||||
|
|
||||||
|
m_sprHighScoreFrame[p].Load( THEME->GetPathTo("Graphics","select music score frame") );
|
||||||
|
m_sprHighScoreFrame[p].StopAnimating();
|
||||||
|
m_sprHighScoreFrame[p].SetState( p );
|
||||||
|
m_sprHighScoreFrame[p].SetXY( BEST_TIME_X(p), BEST_TIME_Y(p) );
|
||||||
|
this->AddSubActor( &m_sprHighScoreFrame[p] );
|
||||||
|
|
||||||
|
m_HighScore[p].SetXY( BEST_TIME_X(p), BEST_TIME_Y(p) );
|
||||||
|
m_HighScore[p].SetZoom( 0.6f );
|
||||||
|
m_HighScore[p].SetDiffuseColor( PlayerToColor(p) );
|
||||||
|
this->AddSubActor( &m_HighScore[p] );
|
||||||
|
}
|
||||||
|
|
||||||
m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","Stage") );
|
m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","Stage") );
|
||||||
m_textHoldForOptions.SetXY( CENTER_X, CENTER_Y );
|
m_textHoldForOptions.SetXY( CENTER_X, CENTER_Y );
|
||||||
m_textHoldForOptions.SetText( "press START again for options" );
|
m_textHoldForOptions.SetText( "press START again for options" );
|
||||||
@@ -117,24 +170,55 @@ void ScreenSelectCourse::DrawPrimitives()
|
|||||||
|
|
||||||
void ScreenSelectCourse::TweenOnScreen()
|
void ScreenSelectCourse::TweenOnScreen()
|
||||||
{
|
{
|
||||||
m_CourseInfoFrame.SetXY( COURSE_INFO_FRAME_X - 400, COURSE_INFO_FRAME_Y );
|
Actor* pActorsInCourseInfoFrame[] = { &m_sprBannerFrame, &m_Banner, &m_textNumStages, &m_textTime };
|
||||||
m_CourseInfoFrame.BeginTweening( TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
const int iNumActorsInGroupInfoFrame = sizeof(pActorsInCourseInfoFrame) / sizeof(Actor*);
|
||||||
m_CourseInfoFrame.SetTweenXY( COURSE_INFO_FRAME_X, COURSE_INFO_FRAME_Y );
|
int i;
|
||||||
|
for( i=0; i<iNumActorsInGroupInfoFrame; i++ )
|
||||||
|
{
|
||||||
|
float fOriginalX = pActorsInCourseInfoFrame[i]->GetX();
|
||||||
|
pActorsInCourseInfoFrame[i]->SetX( fOriginalX-400 );
|
||||||
|
pActorsInCourseInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_END );
|
||||||
|
pActorsInCourseInfoFrame[i]->SetTweenX( fOriginalX );
|
||||||
|
}
|
||||||
|
|
||||||
m_CourseContentsFrame.SetXY( COURSE_CONTENTS_FRAME_X - 400, COURSE_CONTENTS_FRAME_Y );
|
m_CourseContentsFrame.SetXY( CONTENTS_X - 400, CONTENTS_Y );
|
||||||
m_CourseContentsFrame.BeginTweeningQueued( TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
m_CourseContentsFrame.BeginTweeningQueued( TWEEN_TIME, Actor::TWEEN_BIAS_END );
|
||||||
m_CourseContentsFrame.SetTweenXY( COURSE_CONTENTS_FRAME_X, COURSE_CONTENTS_FRAME_Y );
|
m_CourseContentsFrame.SetTweenXY( CONTENTS_X, CONTENTS_Y );
|
||||||
|
|
||||||
|
Actor* pActorsInScore[] = { &m_sprHighScoreFrame[0], &m_sprHighScoreFrame[1], &m_HighScore[0], &m_HighScore[1] };
|
||||||
|
const int iNumActorsInScore = sizeof(pActorsInScore) / sizeof(Actor*);
|
||||||
|
for( i=0; i<iNumActorsInScore; i++ )
|
||||||
|
{
|
||||||
|
float fOriginalX = pActorsInScore[i]->GetX();
|
||||||
|
pActorsInScore[i]->SetX( fOriginalX+400 );
|
||||||
|
pActorsInScore[i]->BeginTweening( TWEEN_TIME, TWEEN_BIAS_END );
|
||||||
|
pActorsInScore[i]->SetTweenX( fOriginalX );
|
||||||
|
}
|
||||||
|
|
||||||
m_MusicWheel.TweenOnScreen();
|
m_MusicWheel.TweenOnScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSelectCourse::TweenOffScreen()
|
void ScreenSelectCourse::TweenOffScreen()
|
||||||
{
|
{
|
||||||
m_CourseInfoFrame.BeginTweeningQueued( TWEEN_TIME*1.5f, Actor::TWEEN_BOUNCE_BEGIN );
|
Actor* pActorsInCourseInfoFrame[] = { &m_sprBannerFrame, &m_Banner, &m_textNumStages, &m_textTime };
|
||||||
m_CourseInfoFrame.SetTweenXY( COURSE_INFO_FRAME_X - 400, COURSE_INFO_FRAME_Y );
|
const int iNumActorsInGroupInfoFrame = sizeof(pActorsInCourseInfoFrame) / sizeof(Actor*);
|
||||||
|
int i;
|
||||||
|
for( i=0; i<iNumActorsInGroupInfoFrame; i++ )
|
||||||
|
{
|
||||||
|
pActorsInCourseInfoFrame[i]->BeginTweeningQueued( TWEEN_TIME, TWEEN_BOUNCE_BEGIN );
|
||||||
|
pActorsInCourseInfoFrame[i]->SetTweenX( pActorsInCourseInfoFrame[i]->GetX()-400 );
|
||||||
|
}
|
||||||
|
|
||||||
m_CourseContentsFrame.BeginTweeningQueued( TWEEN_TIME, Actor::TWEEN_BOUNCE_BEGIN );
|
m_CourseContentsFrame.BeginTweeningQueued( TWEEN_TIME, Actor::TWEEN_BOUNCE_BEGIN );
|
||||||
m_CourseContentsFrame.SetTweenXY( COURSE_CONTENTS_FRAME_X - 400, COURSE_CONTENTS_FRAME_Y );
|
m_CourseContentsFrame.SetTweenXY( CONTENTS_X - 400, CONTENTS_Y );
|
||||||
|
|
||||||
|
Actor* pActorsInScore[] = { &m_sprHighScoreFrame[0], &m_sprHighScoreFrame[1], &m_HighScore[0], &m_HighScore[1] };
|
||||||
|
const int iNumActorsInScore = sizeof(pActorsInScore) / sizeof(Actor*);
|
||||||
|
for( i=0; i<iNumActorsInScore; i++ )
|
||||||
|
{
|
||||||
|
pActorsInScore[i]->BeginTweening( TWEEN_TIME, TWEEN_BIAS_BEGIN );
|
||||||
|
pActorsInScore[i]->SetTweenX( pActorsInScore[i]->GetX()+400 );
|
||||||
|
}
|
||||||
|
|
||||||
m_MusicWheel.TweenOffScreen();
|
m_MusicWheel.TweenOffScreen();
|
||||||
}
|
}
|
||||||
@@ -252,6 +336,8 @@ void ScreenSelectCourse::MenuStart( const PlayerNumber p )
|
|||||||
pCourse->GetPlayerOptions( &GAMESTATE->m_PlayerOptions[p] );
|
pCourse->GetPlayerOptions( &GAMESTATE->m_PlayerOptions[p] );
|
||||||
pCourse->GetSongOptions( &GAMESTATE->m_SongOptions );
|
pCourse->GetSongOptions( &GAMESTATE->m_SongOptions );
|
||||||
|
|
||||||
|
m_Menu.StopTimer();
|
||||||
|
|
||||||
this->SendScreenMessage( SM_GoToNextState, 2.5f );
|
this->SendScreenMessage( SM_GoToNextState, 2.5f );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -274,11 +360,19 @@ void ScreenSelectCourse::AfterCourseChange()
|
|||||||
case TYPE_COURSE:
|
case TYPE_COURSE:
|
||||||
{
|
{
|
||||||
Course* pCourse = m_MusicWheel.GetSelectedCourse();
|
Course* pCourse = m_MusicWheel.GetSelectedCourse();
|
||||||
m_CourseInfoFrame.SetFromCourse( pCourse );
|
|
||||||
|
m_textNumStages.SetText( ssprintf("%d", pCourse->m_iStages) );
|
||||||
|
float fTotalSeconds = 0;
|
||||||
|
for( int i=0; i<pCourse->m_iStages; i++ )
|
||||||
|
fTotalSeconds += pCourse->m_apSongs[i]->m_fMusicLengthSeconds;
|
||||||
|
m_textTime.SetText( SecondsToTime(fTotalSeconds) );
|
||||||
|
|
||||||
|
m_Banner.SetFromCourse( pCourse );
|
||||||
|
|
||||||
m_CourseContentsFrame.SetFromCourse( pCourse );
|
m_CourseContentsFrame.SetFromCourse( pCourse );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_SECTION: // this probably means "no courses"
|
case TYPE_SECTION: // if we get here, there are no courses
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
#include "RandomStream.h"
|
#include "RandomStream.h"
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "MusicWheel.h"
|
#include "MusicWheel.h"
|
||||||
#include "CourseInfoFrame.h"
|
|
||||||
#include "CourseContentsFrame.h"
|
#include "CourseContentsFrame.h"
|
||||||
#include "MenuElements.h"
|
#include "MenuElements.h"
|
||||||
|
#include "FadingBanner.h"
|
||||||
|
|
||||||
|
|
||||||
class ScreenSelectCourse : public Screen
|
class ScreenSelectCourse : public Screen
|
||||||
@@ -44,8 +44,13 @@ protected:
|
|||||||
|
|
||||||
MenuElements m_Menu;
|
MenuElements m_Menu;
|
||||||
|
|
||||||
CourseInfoFrame m_CourseInfoFrame;
|
Sprite m_sprBannerFrame;
|
||||||
|
FadingBanner m_Banner;
|
||||||
|
BitmapText m_textNumStages;
|
||||||
|
BitmapText m_textTime;
|
||||||
CourseContentsFrame m_CourseContentsFrame;
|
CourseContentsFrame m_CourseContentsFrame;
|
||||||
|
Sprite m_sprHighScoreFrame[NUM_PLAYERS];
|
||||||
|
ScoreDisplayNormal m_HighScore[NUM_PLAYERS];
|
||||||
MusicWheel m_MusicWheel;
|
MusicWheel m_MusicWheel;
|
||||||
|
|
||||||
bool m_bMadeChoice;
|
bool m_bMadeChoice;
|
||||||
|
|||||||
@@ -484,6 +484,9 @@ void ScreenSelectDifficulty::TweenOffScreen()
|
|||||||
|
|
||||||
for( p=0; p<NUM_PAGES; p++ )
|
for( p=0; p<NUM_PAGES; p++ )
|
||||||
{
|
{
|
||||||
|
if( p == 0 && SelectedSomethingOnPage2() )
|
||||||
|
continue; // skip
|
||||||
|
|
||||||
m_sprExplanation[p].SetXY( EXPLANATION_X(p), EXPLANATION_Y(p) );
|
m_sprExplanation[p].SetXY( EXPLANATION_X(p), EXPLANATION_Y(p) );
|
||||||
m_sprExplanation[p].BeginTweening( 0.5, Actor::TWEEN_BOUNCE_BEGIN );
|
m_sprExplanation[p].BeginTweening( 0.5, Actor::TWEEN_BOUNCE_BEGIN );
|
||||||
m_sprExplanation[p].SetTweenXY( EXPLANATION_X(p)+700, EXPLANATION_Y(p) );
|
m_sprExplanation[p].SetTweenXY( EXPLANATION_X(p)+700, EXPLANATION_Y(p) );
|
||||||
|
|||||||
@@ -319,7 +319,10 @@ void ScreenSelectGroup::AfterChange()
|
|||||||
m_textLabel[iSel].SetEffectGlowing();
|
m_textLabel[iSel].SetEffectGlowing();
|
||||||
|
|
||||||
for( int c=0; c<TITLES_COLUMNS; c++ )
|
for( int c=0; c<TITLES_COLUMNS; c++ )
|
||||||
|
{
|
||||||
m_textTitles[c].SetText( m_sContentsText[m_iSelection][c] );
|
m_textTitles[c].SetText( m_sContentsText[m_iSelection][c] );
|
||||||
|
m_textTitles[c].CropToWidth( int(TITLES_SPACING_X/m_textTitles[c].GetZoom()) );
|
||||||
|
}
|
||||||
|
|
||||||
CString sSelectedGroupName = m_asGroupNames[m_iSelection];
|
CString sSelectedGroupName = m_asGroupNames[m_iSelection];
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,6 @@ float PLAYER_OPTIONS_Y( int p ) {
|
|||||||
|
|
||||||
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User+1);
|
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User+1);
|
||||||
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User+2);
|
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User+2);
|
||||||
const ScreenMessage SM_ConfirmChange = ScreenMessage(SM_User+3);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,12 @@
|
|||||||
#define HELP_TEXT THEME->GetMetric("SelectStyle","HelpText")
|
#define HELP_TEXT THEME->GetMetric("SelectStyle","HelpText")
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("SelectStyle","TimerSeconds")
|
#define TIMER_SECONDS THEME->GetMetricI("SelectStyle","TimerSeconds")
|
||||||
|
|
||||||
#define SKIP_SELECT_DIFFICULTY THEME->GetMetricB("General","SkipSelectDifficulty")
|
#define SELECT_DIFFICULTY_TYPE THEME->GetMetricI("General","SelectDifficultyType")
|
||||||
|
enum SelectDifficultyType // for use with the metric above
|
||||||
|
{
|
||||||
|
SELECT_DIFFICULTY_TYPE_SKIP = 0,
|
||||||
|
SELECT_DIFFICULTY_TYPE_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
||||||
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 2);
|
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 2);
|
||||||
@@ -152,10 +157,17 @@ void ScreenSelectStyle::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
||||||
break;
|
break;
|
||||||
case SM_GoToNextState:
|
case SM_GoToNextState:
|
||||||
if( SKIP_SELECT_DIFFICULTY )
|
switch( SELECT_DIFFICULTY_TYPE )
|
||||||
|
{
|
||||||
|
case SELECT_DIFFICULTY_TYPE_SKIP:
|
||||||
SCREENMAN->SetNewScreen( new ScreenSelectGroup );
|
SCREENMAN->SetNewScreen( new ScreenSelectGroup );
|
||||||
else
|
break;
|
||||||
|
case SELECT_DIFFICULTY_TYPE_MAX:
|
||||||
SCREENMAN->SetNewScreen( new ScreenSelectDifficulty );
|
SCREENMAN->SetNewScreen( new ScreenSelectDifficulty );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,475 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Class: ScreenSelectStyle5th
|
||||||
|
|
||||||
|
Desc: See header.
|
||||||
|
|
||||||
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "ScreenSelectStyle5th.h"
|
||||||
|
#include "ScreenManager.h"
|
||||||
|
#include "PrefsManager.h"
|
||||||
|
#include "RageMusic.h"
|
||||||
|
#include "ScreenTitleMenu.h"
|
||||||
|
#include "ScreenCaution.h"
|
||||||
|
#include "GameConstantsAndTypes.h"
|
||||||
|
#include "PrefsManager.h"
|
||||||
|
#include "ScreenSelectDifficulty.h"
|
||||||
|
#include "ScreenSandbox.h"
|
||||||
|
#include "GameManager.h"
|
||||||
|
#include "RageLog.h"
|
||||||
|
#include "GameState.h"
|
||||||
|
#include "PrefsManager.h"
|
||||||
|
|
||||||
|
|
||||||
|
const CString DANCE_STYLES[] = {
|
||||||
|
"single",
|
||||||
|
"versus",
|
||||||
|
"double",
|
||||||
|
"couple",
|
||||||
|
"solo",
|
||||||
|
};
|
||||||
|
const int NUM_DANCE_STYLES = sizeof(DANCE_STYLES)/sizeof(CString);
|
||||||
|
|
||||||
|
const float PAD_X[NUM_STYLE_PADS] = {
|
||||||
|
CENTER_X-250,
|
||||||
|
CENTER_X-125,
|
||||||
|
CENTER_X-20,
|
||||||
|
CENTER_X+125,
|
||||||
|
CENTER_X+250,
|
||||||
|
};
|
||||||
|
const float PAD_Y[NUM_STYLE_PADS] = {
|
||||||
|
CENTER_Y+60,
|
||||||
|
CENTER_Y-30,
|
||||||
|
CENTER_Y+70,
|
||||||
|
CENTER_Y-30,
|
||||||
|
CENTER_Y+60,
|
||||||
|
};
|
||||||
|
const float DANCER_X[NUM_STYLE_DANCERS] = {
|
||||||
|
PAD_X[0],
|
||||||
|
PAD_X[1]-35,
|
||||||
|
PAD_X[1]+35,
|
||||||
|
PAD_X[2],
|
||||||
|
PAD_X[3]-35,
|
||||||
|
PAD_X[3]+35,
|
||||||
|
PAD_X[4],
|
||||||
|
};
|
||||||
|
const float DANCER_Y[NUM_STYLE_DANCERS] = {
|
||||||
|
PAD_Y[0],
|
||||||
|
PAD_Y[1]+20,
|
||||||
|
PAD_Y[1]-20,
|
||||||
|
PAD_Y[2],
|
||||||
|
PAD_Y[3]+20,
|
||||||
|
PAD_Y[3]-20,
|
||||||
|
PAD_Y[4],
|
||||||
|
};
|
||||||
|
|
||||||
|
CString TEXT_EXPLANATION1[NUM_DANCE_STYLES] = {
|
||||||
|
"1 Player",
|
||||||
|
"2 Players",
|
||||||
|
"1 Player",
|
||||||
|
"2 Players",
|
||||||
|
"1 Player"
|
||||||
|
};
|
||||||
|
CString TEXT_EXPLANATION2[NUM_DANCE_STYLES] = {
|
||||||
|
"Dance using 4 panels on one pad",
|
||||||
|
"Each uses 4 panels on one pad",
|
||||||
|
"Dance using 8 panels on two pads",
|
||||||
|
"Each uses 4 panels on one pad",
|
||||||
|
"Dance using 6 panels on one pad"
|
||||||
|
};
|
||||||
|
|
||||||
|
const float EXPLANATION1_ZOOM_X = 0.8f;
|
||||||
|
const float EXPLANATION1_ZOOM_Y = 1;
|
||||||
|
const float EXPLANATION2_ZOOM_X = 0.5f;
|
||||||
|
const float EXPLANATION2_ZOOM_Y = 0.7f;
|
||||||
|
|
||||||
|
const float ICON_X = 120;
|
||||||
|
const float ICON_Y = SCREEN_HEIGHT - 70;
|
||||||
|
|
||||||
|
const float EXPLANATION1_X = ICON_X+110;
|
||||||
|
const float EXPLANATION1_Y = ICON_Y-16;
|
||||||
|
const float EXPLANATION2_X = EXPLANATION1_X;
|
||||||
|
const float EXPLANATION2_Y = ICON_Y+16;
|
||||||
|
|
||||||
|
const float HELP_X = CENTER_X;
|
||||||
|
const float HELP_Y = SCREEN_HEIGHT-20;
|
||||||
|
|
||||||
|
const float TWEEN_TIME = 0.35f;
|
||||||
|
|
||||||
|
const D3DXCOLOR COLOR_P1_SELECTED = D3DXCOLOR(0.4f,1.0f,0.8f,1);
|
||||||
|
const D3DXCOLOR COLOR_P2_SELECTED = D3DXCOLOR(1.0f,0.5f,0.2f,1);
|
||||||
|
const D3DXCOLOR COLOR_P1_NOT_SELECTED = COLOR_P1_SELECTED*0.5f + D3DXCOLOR(0,0,0,0.5f);
|
||||||
|
const D3DXCOLOR COLOR_P2_NOT_SELECTED = COLOR_P2_SELECTED*0.5f + D3DXCOLOR(0,0,0,0.5f);
|
||||||
|
|
||||||
|
|
||||||
|
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
||||||
|
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 2);
|
||||||
|
const ScreenMessage SM_UpdateAnimations = ScreenMessage(SM_User + 3);
|
||||||
|
const ScreenMessage SM_TweenExplanation2 = ScreenMessage(SM_User + 4);
|
||||||
|
|
||||||
|
|
||||||
|
ScreenSelectStyle5th::ScreenSelectStyle5th()
|
||||||
|
{
|
||||||
|
LOG->Trace( "ScreenSelectStyle5th::ScreenSelectStyle5th()" );
|
||||||
|
|
||||||
|
m_iSelection = 0; // single
|
||||||
|
|
||||||
|
|
||||||
|
for( int i=0; i<NUM_STYLE_PADS; i++ )
|
||||||
|
{
|
||||||
|
m_sprPad[i].Load( THEME->GetPathTo("Graphics",ssprintf("select style pad game %d style %d",GAMESTATE->m_CurGame,i)) );
|
||||||
|
// m_sprPad[i].SetXY( PAD_X[i], PAD_Y[i] );
|
||||||
|
// m_sprPad[i].SetZoom( 1 );
|
||||||
|
this->AddSubActor( &m_sprPad[i] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for( i=0; i<NUM_STYLE_DANCERS; i++ )
|
||||||
|
{
|
||||||
|
m_sprDancer[i].Load( THEME->GetPathTo("Graphics",ssprintf("select style player game %d style %d",GAMESTATE->m_CurGame,i)) );
|
||||||
|
m_sprDancer[i].SetVertAlign( Actor::align_top );
|
||||||
|
// m_sprDancer[i].SetXY( DANCER_X[i], DANCER_Y[i] );
|
||||||
|
// m_sprDancer[i].SetZoom( 2 );
|
||||||
|
m_sprDancer[i].StopAnimating();
|
||||||
|
this->AddSubActor( &m_sprDancer[i] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
m_sprStyleIcon.Load( THEME->GetPathTo("Graphics",ssprintf("select style icons game %d",GAMESTATE->m_CurGame)) );
|
||||||
|
m_sprStyleIcon.TurnShadowOff();
|
||||||
|
m_sprStyleIcon.StopAnimating();
|
||||||
|
m_sprStyleIcon.SetXY( ICON_X, ICON_Y );
|
||||||
|
this->AddSubActor( &m_sprStyleIcon );
|
||||||
|
|
||||||
|
|
||||||
|
m_textExplanation1.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||||
|
m_textExplanation1.SetDiffuseColor( D3DXCOLOR(0,0.7f,0,1) );
|
||||||
|
m_textExplanation1.SetXY( EXPLANATION1_X, EXPLANATION1_Y );
|
||||||
|
m_textExplanation1.SetZ( -1 );
|
||||||
|
m_textExplanation1.SetZoomX( EXPLANATION1_ZOOM_X );
|
||||||
|
m_textExplanation1.SetZoomY( EXPLANATION1_ZOOM_Y );
|
||||||
|
m_textExplanation1.SetHorizAlign( BitmapText::align_left );
|
||||||
|
this->AddSubActor( &m_textExplanation1 );
|
||||||
|
|
||||||
|
m_textExplanation2.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||||
|
m_textExplanation2.SetDiffuseColor( D3DXCOLOR(0,0.7f,0,1) );
|
||||||
|
m_textExplanation2.SetXY( EXPLANATION2_X, EXPLANATION2_Y );
|
||||||
|
m_textExplanation2.SetZ( -1 );
|
||||||
|
m_textExplanation2.SetZoomX( EXPLANATION2_ZOOM_X );
|
||||||
|
m_textExplanation2.SetZoomY( EXPLANATION2_ZOOM_Y );
|
||||||
|
m_textExplanation2.SetHorizAlign( BitmapText::align_left );
|
||||||
|
this->AddSubActor( &m_textExplanation2 );
|
||||||
|
|
||||||
|
m_Menu.Load(
|
||||||
|
THEME->GetPathTo("Graphics","select style background"),
|
||||||
|
THEME->GetPathTo("Graphics","select style top edge"),
|
||||||
|
ssprintf("Use %c %c to select, then press START", char(1), char(2)),
|
||||||
|
false, true, 40
|
||||||
|
);
|
||||||
|
this->AddSubActor( &m_Menu );
|
||||||
|
|
||||||
|
m_soundChange.Load( THEME->GetPathTo("Graphics","select style change") );
|
||||||
|
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
|
||||||
|
|
||||||
|
|
||||||
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_SELECT_STYLE_INTRO) );
|
||||||
|
|
||||||
|
|
||||||
|
if( !MUSIC->IsPlaying() )
|
||||||
|
{
|
||||||
|
MUSIC->Load( THEME->GetPathTo("Sounds","select style music") );
|
||||||
|
MUSIC->Play( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_soundChange.PlayRandom();
|
||||||
|
TweenOnScreen();
|
||||||
|
m_Menu.TweenOnScreenFromBlack( SM_None );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ScreenSelectStyle5th::~ScreenSelectStyle5th()
|
||||||
|
{
|
||||||
|
LOG->Trace( "ScreenSelectStyle5th::~ScreenSelectStyle5th()" );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::DrawPrimitives()
|
||||||
|
{
|
||||||
|
m_Menu.DrawBottomLayer();
|
||||||
|
Screen::DrawPrimitives();
|
||||||
|
m_Menu.DrawTopLayer();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
|
{
|
||||||
|
LOG->Trace( "ScreenSelectStyle5th::Input()" );
|
||||||
|
|
||||||
|
if( m_Menu.IsClosing() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::HandleScreenMessage( const ScreenMessage SM )
|
||||||
|
{
|
||||||
|
Screen::HandleScreenMessage( SM );
|
||||||
|
|
||||||
|
switch( SM )
|
||||||
|
{
|
||||||
|
case SM_MenuTimer:
|
||||||
|
MenuStart(PLAYER_1);
|
||||||
|
break;
|
||||||
|
case SM_GoToPrevState:
|
||||||
|
MUSIC->Stop();
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
||||||
|
break;
|
||||||
|
case SM_GoToNextState:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenSelectDifficulty );
|
||||||
|
break;
|
||||||
|
case SM_TweenExplanation2:
|
||||||
|
m_textExplanation2.BeginTweening( 0.7f );
|
||||||
|
m_textExplanation2.SetTweenZoomX( EXPLANATION2_ZOOM_X );
|
||||||
|
break;
|
||||||
|
case SM_UpdateAnimations:
|
||||||
|
for( int i=0; i<NUM_STYLE_DANCERS; i++ )
|
||||||
|
m_sprDancer[i].StopAnimating();
|
||||||
|
switch( m_iSelection )
|
||||||
|
{
|
||||||
|
case 0: m_sprDancer[0].StartAnimating(); break;
|
||||||
|
case 1: m_sprDancer[1].StartAnimating(); m_sprDancer[2].StartAnimating(); break;
|
||||||
|
case 2: m_sprDancer[3].StartAnimating(); break;
|
||||||
|
case 3: m_sprDancer[4].StartAnimating(); m_sprDancer[5].StartAnimating(); break;
|
||||||
|
case 4: m_sprDancer[6].StartAnimating(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::MenuLeft( const PlayerNumber p )
|
||||||
|
{
|
||||||
|
if( m_iSelection == 0 ) // can't go left any further
|
||||||
|
return;
|
||||||
|
|
||||||
|
BeforeChange();
|
||||||
|
m_iSelection = m_iSelection - 1;
|
||||||
|
m_soundChange.Stop();
|
||||||
|
m_soundChange.PlayRandom();
|
||||||
|
AfterChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::MenuRight( const PlayerNumber p )
|
||||||
|
{
|
||||||
|
if( m_iSelection == NUM_DANCE_STYLES-1 ) // can't go right any further
|
||||||
|
return;
|
||||||
|
|
||||||
|
BeforeChange();
|
||||||
|
m_iSelection = m_iSelection + 1;
|
||||||
|
m_soundChange.Stop();
|
||||||
|
m_soundChange.PlayRandom();
|
||||||
|
AfterChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::MenuStart( const PlayerNumber p )
|
||||||
|
{
|
||||||
|
GAMESTATE->m_CurStyle = Style( m_iSelection );
|
||||||
|
GAMESTATE->m_MasterPlayerNumber = p;
|
||||||
|
|
||||||
|
AnnouncerElement ae;
|
||||||
|
switch( GAMESTATE->m_CurStyle )
|
||||||
|
{
|
||||||
|
case STYLE_DANCE_SINGLE: ae = ANNOUNCER_SELECT_STYLE_COMMENT_SINGLE; break;
|
||||||
|
case STYLE_DANCE_VERSUS: ae = ANNOUNCER_SELECT_STYLE_COMMENT_VERSUS; break;
|
||||||
|
case STYLE_DANCE_DOUBLE: ae = ANNOUNCER_SELECT_STYLE_COMMENT_DOUBLE; break;
|
||||||
|
case STYLE_DANCE_COUPLE: ae = ANNOUNCER_SELECT_STYLE_COMMENT_COUPLE; break;
|
||||||
|
case STYLE_DANCE_SOLO: ae = ANNOUNCER_SELECT_STYLE_COMMENT_SOLO; break;
|
||||||
|
case STYLE_PUMP_SINGLE: ae = ANNOUNCER_SELECT_STYLE_COMMENT_SINGLE; break;
|
||||||
|
case STYLE_PUMP_VERSUS: ae = ANNOUNCER_SELECT_STYLE_COMMENT_VERSUS; break;
|
||||||
|
default: ASSERT(0); break; // invalid Style
|
||||||
|
}
|
||||||
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ae) );
|
||||||
|
|
||||||
|
this->ClearMessageQueue();
|
||||||
|
|
||||||
|
TweenOffScreen();
|
||||||
|
m_Menu.TweenOffScreenToMenu( SM_GoToNextState );
|
||||||
|
m_soundSelect.PlayRandom();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::MenuBack( const PlayerNumber p )
|
||||||
|
{
|
||||||
|
MUSIC->Stop();
|
||||||
|
|
||||||
|
m_Menu.TweenOffScreenToBlack( SM_GoToPrevState, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::BeforeChange()
|
||||||
|
{
|
||||||
|
switch( m_iSelection )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
m_sprDancer[0].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[0].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
m_sprDancer[1].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[1].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
|
||||||
|
m_sprDancer[2].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[2].SetTweenDiffuseColor( COLOR_P2_NOT_SELECTED );
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
m_sprDancer[3].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[3].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
m_sprDancer[4].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[4].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
|
||||||
|
m_sprDancer[5].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[5].SetTweenDiffuseColor( COLOR_P2_NOT_SELECTED );
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
m_sprDancer[6].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[6].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::AfterChange()
|
||||||
|
{
|
||||||
|
this->ClearMessageQueue();
|
||||||
|
|
||||||
|
m_textExplanation1.SetText( TEXT_EXPLANATION1[m_iSelection] );
|
||||||
|
m_textExplanation1.SetZoomX( 0 );
|
||||||
|
m_textExplanation1.BeginTweening( 0.6f );
|
||||||
|
m_textExplanation1.SetTweenZoomX( EXPLANATION1_ZOOM_X );
|
||||||
|
|
||||||
|
m_textExplanation2.SetText( TEXT_EXPLANATION2[m_iSelection] );
|
||||||
|
m_textExplanation2.StopTweening();
|
||||||
|
m_textExplanation2.SetZoomX( 0 );
|
||||||
|
|
||||||
|
switch( m_iSelection )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
m_sprPad[0].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprPad[0].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
|
m_sprDancer[0].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[0].SetTweenDiffuseColor( COLOR_P1_SELECTED );
|
||||||
|
m_sprDancer[0].StartAnimating();
|
||||||
|
m_sprStyleIcon.SetState( 0 );
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
m_sprPad[1].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprPad[1].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
|
m_sprDancer[1].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[1].SetTweenDiffuseColor( COLOR_P1_SELECTED );
|
||||||
|
m_sprDancer[1].StartAnimating();
|
||||||
|
m_sprDancer[2].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[2].SetTweenDiffuseColor( COLOR_P2_SELECTED );
|
||||||
|
m_sprDancer[2].StartAnimating();
|
||||||
|
m_sprStyleIcon.SetState( 1 );
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
m_sprPad[2].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprPad[2].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
|
m_sprDancer[3].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[3].SetTweenDiffuseColor( COLOR_P1_SELECTED );
|
||||||
|
m_sprDancer[3].StartAnimating();
|
||||||
|
m_sprStyleIcon.SetState( 2 );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
m_sprPad[3].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprPad[3].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
|
m_sprDancer[4].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[4].SetTweenDiffuseColor( COLOR_P1_SELECTED );
|
||||||
|
m_sprDancer[4].StartAnimating();
|
||||||
|
m_sprDancer[5].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[5].SetTweenDiffuseColor( COLOR_P2_SELECTED );
|
||||||
|
m_sprDancer[5].StartAnimating();
|
||||||
|
m_sprStyleIcon.SetState( 3 );
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
m_sprPad[4].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprPad[4].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
|
m_sprDancer[6].BeginTweening( TWEEN_TIME );
|
||||||
|
m_sprDancer[6].SetTweenDiffuseColor( COLOR_P1_SELECTED );
|
||||||
|
m_sprDancer[6].StartAnimating();
|
||||||
|
m_sprStyleIcon.SetState( 4 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
this->SendScreenMessage( SM_TweenExplanation2, 1 );
|
||||||
|
this->SendScreenMessage( SM_UpdateAnimations, TWEEN_TIME );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::TweenOffScreen()
|
||||||
|
{
|
||||||
|
for( int i=0; i<NUM_STYLE_DANCERS; i++ )
|
||||||
|
{
|
||||||
|
m_sprDancer[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprDancer[i].SetTweenZoomY( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
for( i=0; i<NUM_STYLE_PADS; i++ )
|
||||||
|
{
|
||||||
|
m_sprPad[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprPad[i].SetTweenZoomY( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_sprStyleIcon.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprStyleIcon.SetTweenZoomY( 0 );
|
||||||
|
|
||||||
|
m_textExplanation1.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_textExplanation1.SetTweenZoomX( 0 );
|
||||||
|
|
||||||
|
m_textExplanation2.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_textExplanation2.SetTweenZoomX( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScreenSelectStyle5th::TweenOnScreen()
|
||||||
|
{
|
||||||
|
for(int i=0; i<NUM_STYLE_DANCERS; i++ )
|
||||||
|
{
|
||||||
|
float fOrigDancerZoomY = m_sprDancer[i].GetZoomY();
|
||||||
|
m_sprDancer[i].SetZoomY( 0 );
|
||||||
|
m_sprDancer[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprDancer[i].SetTweenZoomY( fOrigDancerZoomY );
|
||||||
|
}
|
||||||
|
|
||||||
|
for( i=0; i<NUM_STYLE_PADS; i++ )
|
||||||
|
{
|
||||||
|
float fOrigPadZoomY = m_sprPad[i].GetZoomY();
|
||||||
|
m_sprPad[i].SetZoomY( 0 );
|
||||||
|
m_sprPad[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprPad[i].SetTweenZoomY( fOrigPadZoomY );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_sprStyleIcon.SetZoomY( 0 );
|
||||||
|
m_sprStyleIcon.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprStyleIcon.SetTweenZoomY( 1 );
|
||||||
|
|
||||||
|
float fOrigExplanation1ZoomX = m_textExplanation1.GetZoomX();
|
||||||
|
m_textExplanation1.SetZoomX( 0 );
|
||||||
|
m_textExplanation1.BeginTweening( 0.6f );
|
||||||
|
m_textExplanation1.SetTweenZoomX( EXPLANATION1_ZOOM_X );
|
||||||
|
|
||||||
|
float fOrigExplanation2ZoomX = m_textExplanation2.GetZoomX();
|
||||||
|
m_textExplanation2.SetZoomX( 0 );
|
||||||
|
m_textExplanation2.SetZoomX( 0 );
|
||||||
|
|
||||||
|
m_sprStyleIcon.SetState( 0 );
|
||||||
|
m_textExplanation1.SetText( TEXT_EXPLANATION1[m_iSelection] );
|
||||||
|
m_textExplanation2.SetText( TEXT_EXPLANATION2[m_iSelection] );
|
||||||
|
|
||||||
|
this->SendScreenMessage( SM_TweenExplanation2, 1 );
|
||||||
|
this->SendScreenMessage( SM_UpdateAnimations, TWEEN_TIME );
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Class: ScreenSelectStyle5th
|
||||||
|
|
||||||
|
Desc: DDR 5th Mix-style screen selection.
|
||||||
|
|
||||||
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Screen.h"
|
||||||
|
#include "Sprite.h"
|
||||||
|
#include "BitmapText.h"
|
||||||
|
#include "TransitionFade.h"
|
||||||
|
#include "Quad.h"
|
||||||
|
#include "RandomSample.h"
|
||||||
|
#include "Quad.h"
|
||||||
|
#include "TransitionKeepAlive.h"
|
||||||
|
#include "MenuElements.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// TODO: Remove dance hard coded portions
|
||||||
|
//
|
||||||
|
|
||||||
|
const int NUM_STYLE_DANCERS = 7; // single, versus dancers, double, couple dancers, solo
|
||||||
|
const int NUM_STYLE_PADS = 5;
|
||||||
|
|
||||||
|
|
||||||
|
class ScreenSelectStyle5th : public Screen
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ScreenSelectStyle5th();
|
||||||
|
virtual ~ScreenSelectStyle5th();
|
||||||
|
|
||||||
|
virtual void DrawPrimitives();
|
||||||
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|
||||||
|
void MenuLeft( const PlayerNumber p );
|
||||||
|
void MenuRight( const PlayerNumber p );
|
||||||
|
void MenuStart( const PlayerNumber p );
|
||||||
|
void MenuBack( const PlayerNumber p );
|
||||||
|
void TweenOffScreen();
|
||||||
|
void TweenOnScreen();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void BeforeChange();
|
||||||
|
void AfterChange();
|
||||||
|
|
||||||
|
MenuElements m_Menu;
|
||||||
|
|
||||||
|
Sprite m_sprDancer[NUM_STYLE_DANCERS];
|
||||||
|
Sprite m_sprPad[NUM_STYLE_PADS];
|
||||||
|
|
||||||
|
Sprite m_sprStyleIcon;
|
||||||
|
|
||||||
|
BitmapText m_textExplanation1;
|
||||||
|
BitmapText m_textExplanation2;
|
||||||
|
Quad m_rectCursor;
|
||||||
|
|
||||||
|
RandomSample m_soundChange;
|
||||||
|
RandomSample m_soundSelect;
|
||||||
|
|
||||||
|
int m_iSelection;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -26,13 +26,12 @@
|
|||||||
#include "AnnouncerManager.h"
|
#include "AnnouncerManager.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
|
|
||||||
#define STAGE_SCREEN_TYPE THEME->GetMetricI("General","StageScreenType")
|
#define STAGE_TYPE THEME->GetMetricI("General","StageType")
|
||||||
|
enum StageType // for use with the metric above
|
||||||
enum StageScreenTypes // magic number nuker! for use with the metrics
|
|
||||||
{
|
{
|
||||||
SCREENTYPE_DANCE,
|
STAGE_TYPE_MAX = 0,
|
||||||
SCREENTYPE_PUMP,
|
STAGE_TYPE_PUMP,
|
||||||
SCREENTYPE_EZ2
|
STAGE_TYPE_EZ2
|
||||||
};
|
};
|
||||||
|
|
||||||
const ScreenMessage SM_StartFadingOut = ScreenMessage(SM_User + 1);
|
const ScreenMessage SM_StartFadingOut = ScreenMessage(SM_User + 1);
|
||||||
@@ -40,14 +39,14 @@ const ScreenMessage SM_DoneFadingIn = ScreenMessage(SM_User + 2);
|
|||||||
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 3);
|
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 3);
|
||||||
|
|
||||||
|
|
||||||
enum StageType
|
enum StageMode
|
||||||
{
|
{
|
||||||
TYPE_NORMAL,
|
MODE_NORMAL,
|
||||||
TYPE_FINAL,
|
MODE_FINAL,
|
||||||
TYPE_EXTRA1,
|
MODE_EXTRA1,
|
||||||
TYPE_EXTRA2,
|
MODE_EXTRA2,
|
||||||
TYPE_ONI,
|
MODE_ONI,
|
||||||
TYPE_ENDLESS
|
MODE_ENDLESS
|
||||||
};
|
};
|
||||||
|
|
||||||
ScreenStage::ScreenStage()
|
ScreenStage::ScreenStage()
|
||||||
@@ -76,18 +75,18 @@ ScreenStage::ScreenStage()
|
|||||||
m_frameStage.SetTweenY( CENTER_Y );
|
m_frameStage.SetTweenY( CENTER_Y );
|
||||||
|
|
||||||
|
|
||||||
StageType stage_type;
|
StageMode stage_mode;
|
||||||
if( GAMESTATE->m_PlayMode == PLAY_MODE_ONI ) stage_type = TYPE_ONI;
|
if( GAMESTATE->m_PlayMode == PLAY_MODE_ONI ) stage_mode = MODE_ONI;
|
||||||
else if( GAMESTATE->m_PlayMode == PLAY_MODE_ENDLESS ) stage_type = TYPE_ENDLESS;
|
else if( GAMESTATE->m_PlayMode == PLAY_MODE_ENDLESS ) stage_mode = MODE_ENDLESS;
|
||||||
else if( GAMESTATE->IsExtraStage() ) stage_type = TYPE_EXTRA1;
|
else if( GAMESTATE->IsExtraStage() ) stage_mode = MODE_EXTRA1;
|
||||||
else if( GAMESTATE->IsExtraStage2() ) stage_type = TYPE_EXTRA2;
|
else if( GAMESTATE->IsExtraStage2() ) stage_mode = MODE_EXTRA2;
|
||||||
else if( GAMESTATE->IsFinalStage() ) stage_type = TYPE_FINAL;
|
else if( GAMESTATE->IsFinalStage() ) stage_mode = MODE_FINAL;
|
||||||
else stage_type = TYPE_NORMAL;
|
else stage_mode = MODE_NORMAL;
|
||||||
|
|
||||||
|
|
||||||
switch( stage_type )
|
switch( stage_mode )
|
||||||
{
|
{
|
||||||
case TYPE_NORMAL:
|
case MODE_NORMAL:
|
||||||
{
|
{
|
||||||
const int iStageNo = GAMESTATE->GetStageIndex()+1;
|
const int iStageNo = GAMESTATE->GetStageIndex()+1;
|
||||||
switch( iStageNo )
|
switch( iStageNo )
|
||||||
@@ -101,19 +100,19 @@ ScreenStage::ScreenStage()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_FINAL:
|
case MODE_FINAL:
|
||||||
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_FINAL) );
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_FINAL) );
|
||||||
break;
|
break;
|
||||||
case TYPE_EXTRA1:
|
case MODE_EXTRA1:
|
||||||
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_EXTRA1) );
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_EXTRA1) );
|
||||||
break;
|
break;
|
||||||
case TYPE_EXTRA2:
|
case MODE_EXTRA2:
|
||||||
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_EXTRA2) );
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_EXTRA2) );
|
||||||
break;
|
break;
|
||||||
case TYPE_ONI:
|
case MODE_ONI:
|
||||||
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_ONI) );
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_ONI) );
|
||||||
break;
|
break;
|
||||||
case TYPE_ENDLESS:
|
case MODE_ENDLESS:
|
||||||
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_ENDLESS) );
|
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_STAGE_ENDLESS) );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -126,7 +125,7 @@ ScreenStage::ScreenStage()
|
|||||||
// the ez2Final is so that when we're in normal we can go and see if we're really
|
// the ez2Final is so that when we're in normal we can go and see if we're really
|
||||||
// FINAL or not. at the end of normal, if we WERE FINAL, we set it back to final
|
// FINAL or not. at the end of normal, if we WERE FINAL, we set it back to final
|
||||||
// hacky or what? =)
|
// hacky or what? =)
|
||||||
if ( STAGE_SCREEN_TYPE == SCREENTYPE_EZ2 && stage_type == TYPE_FINAL )
|
if( STAGE_TYPE == STAGE_TYPE_EZ2 && stage_mode == MODE_FINAL )
|
||||||
{
|
{
|
||||||
for( int i=0; i<4; i++ )
|
for( int i=0; i<4; i++ )
|
||||||
{
|
{
|
||||||
@@ -134,12 +133,12 @@ ScreenStage::ScreenStage()
|
|||||||
m_sprNumbers[i].StopAnimating();
|
m_sprNumbers[i].StopAnimating();
|
||||||
}
|
}
|
||||||
ez2Final=1;
|
ez2Final=1;
|
||||||
stage_type = TYPE_NORMAL;
|
stage_mode = MODE_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( stage_type )
|
switch( stage_mode )
|
||||||
{
|
{
|
||||||
case TYPE_NORMAL:
|
case MODE_NORMAL:
|
||||||
{
|
{
|
||||||
const int iStageNo = GAMESTATE->GetStageIndex()+1;
|
const int iStageNo = GAMESTATE->GetStageIndex()+1;
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ ScreenStage::ScreenStage()
|
|||||||
// EZ2 TYPE DEFINITION //
|
// EZ2 TYPE DEFINITION //
|
||||||
/////////////////////////
|
/////////////////////////
|
||||||
|
|
||||||
if ( STAGE_SCREEN_TYPE == SCREENTYPE_EZ2) // Initialize and manipulate existing graphics for Ez2dancer Screen Type
|
if ( STAGE_TYPE == STAGE_TYPE_EZ2) // Initialize and manipulate existing graphics for Ez2dancer Screen Type
|
||||||
{
|
{
|
||||||
for( i=0; i<iNumChars; i++ )
|
for( i=0; i<iNumChars; i++ )
|
||||||
{
|
{
|
||||||
@@ -410,7 +409,7 @@ ScreenStage::ScreenStage()
|
|||||||
{
|
{
|
||||||
m_stagename.SetDiffuseColor( D3DXCOLOR(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) );
|
m_stagename.SetDiffuseColor( D3DXCOLOR(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) );
|
||||||
m_stagename.SetText( "THE FINAL STAGE" );
|
m_stagename.SetText( "THE FINAL STAGE" );
|
||||||
stage_type = TYPE_FINAL; // set back to final again.
|
stage_mode = MODE_FINAL; // set back to final again.
|
||||||
ez2Final = 0;
|
ez2Final = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,23 +436,23 @@ ScreenStage::ScreenStage()
|
|||||||
m_frameStage.AddSubActor( &m_sprStage );
|
m_frameStage.AddSubActor( &m_sprStage );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_FINAL:
|
case MODE_FINAL:
|
||||||
m_sprStage.Load( THEME->GetPathTo("Graphics","stage final") );
|
m_sprStage.Load( THEME->GetPathTo("Graphics","stage final") );
|
||||||
m_frameStage.AddSubActor( &m_sprStage );
|
m_frameStage.AddSubActor( &m_sprStage );
|
||||||
break;
|
break;
|
||||||
case TYPE_EXTRA1:
|
case MODE_EXTRA1:
|
||||||
m_sprStage.Load( THEME->GetPathTo("Graphics","stage extra1") );
|
m_sprStage.Load( THEME->GetPathTo("Graphics","stage extra1") );
|
||||||
m_frameStage.AddSubActor( &m_sprStage );
|
m_frameStage.AddSubActor( &m_sprStage );
|
||||||
break;
|
break;
|
||||||
case TYPE_EXTRA2:
|
case MODE_EXTRA2:
|
||||||
m_sprStage.Load( THEME->GetPathTo("Graphics","stage extra2") );
|
m_sprStage.Load( THEME->GetPathTo("Graphics","stage extra2") );
|
||||||
m_frameStage.AddSubActor( &m_sprStage );
|
m_frameStage.AddSubActor( &m_sprStage );
|
||||||
break;
|
break;
|
||||||
case TYPE_ONI:
|
case MODE_ONI:
|
||||||
m_sprStage.Load( THEME->GetPathTo("Graphics","stage oni") );
|
m_sprStage.Load( THEME->GetPathTo("Graphics","stage oni") );
|
||||||
m_frameStage.AddSubActor( &m_sprStage );
|
m_frameStage.AddSubActor( &m_sprStage );
|
||||||
break;
|
break;
|
||||||
case TYPE_ENDLESS:
|
case MODE_ENDLESS:
|
||||||
m_sprStage.Load( THEME->GetPathTo("Graphics","stage endless") );
|
m_sprStage.Load( THEME->GetPathTo("Graphics","stage endless") );
|
||||||
m_frameStage.AddSubActor( &m_sprStage );
|
m_frameStage.AddSubActor( &m_sprStage );
|
||||||
break;
|
break;
|
||||||
@@ -482,7 +481,7 @@ void ScreenStage::DrawPrimitives()
|
|||||||
{
|
{
|
||||||
DISPLAY->EnableZBuffer();
|
DISPLAY->EnableZBuffer();
|
||||||
|
|
||||||
if ( STAGE_SCREEN_TYPE == SCREENTYPE_DANCE) // only DANCE uses the quadmask
|
if ( STAGE_TYPE == STAGE_TYPE_MAX) // only DANCE uses the quadmask
|
||||||
m_quadMask.Draw();
|
m_quadMask.Draw();
|
||||||
m_frameStage.Draw();
|
m_frameStage.Draw();
|
||||||
|
|
||||||
@@ -490,7 +489,7 @@ void ScreenStage::DrawPrimitives()
|
|||||||
|
|
||||||
m_Fade.Draw();
|
m_Fade.Draw();
|
||||||
|
|
||||||
if ( STAGE_SCREEN_TYPE == SCREENTYPE_PUMP) // only PUMP uses the song background on the stage screen
|
if ( STAGE_TYPE == STAGE_TYPE_PUMP) // only PUMP uses the song background on the stage screen
|
||||||
m_sprSongBackground.Draw();
|
m_sprSongBackground.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
#include "ScreenGameplay.h"
|
#include "ScreenGameplay.h"
|
||||||
|
#include "ScreenSelectStyle5th.h"
|
||||||
|
#include "ScreenEz2SelectStyle.h"
|
||||||
|
|
||||||
const CString CHOICE_TEXT[ScreenTitleMenu::NUM_TITLE_MENU_CHOICES] = {
|
const CString CHOICE_TEXT[ScreenTitleMenu::NUM_TITLE_MENU_CHOICES] = {
|
||||||
"GAME START",
|
"GAME START",
|
||||||
@@ -61,7 +62,20 @@ const CString CHOICE_TEXT[ScreenTitleMenu::NUM_TITLE_MENU_CHOICES] = {
|
|||||||
#define SECONDS_BETWEEN_ATTRACT THEME->GetMetricF("TitleMenu","SecondsBetweenAttract")
|
#define SECONDS_BETWEEN_ATTRACT THEME->GetMetricF("TitleMenu","SecondsBetweenAttract")
|
||||||
#define HELP_TEXT THEME->GetMetric("TitleMenu","HelpText")
|
#define HELP_TEXT THEME->GetMetric("TitleMenu","HelpText")
|
||||||
|
|
||||||
#define USE_CAUTION_OR_SELECT_PLAYER THEME->GetMetricB("General","UseCautionOrSelectPlayer")
|
#define CAUTION_TYPE THEME->GetMetricI("General","CautionType")
|
||||||
|
enum CautionType // for use with the metric above
|
||||||
|
{
|
||||||
|
CAUTION_TYPE_SKIP = 0,
|
||||||
|
CAUTION_TYPE_DDR,
|
||||||
|
CAUTION_TYPE_EZ2_SELECT_PLAYER,
|
||||||
|
};
|
||||||
|
#define SELECT_STYLE_TYPE THEME->GetMetricI("General","SelectStyleType")
|
||||||
|
enum SelectStyleType // for use with the metric above
|
||||||
|
{
|
||||||
|
SELECT_STYLE_TYPE_MAX = 0,
|
||||||
|
SELECT_STYLE_TYPE_5TH,
|
||||||
|
SELECT_STYLE_TYPE_EZ2,
|
||||||
|
};
|
||||||
|
|
||||||
const ScreenMessage SM_PlayAttract = ScreenMessage(SM_User+1);
|
const ScreenMessage SM_PlayAttract = ScreenMessage(SM_User+1);
|
||||||
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User+12);
|
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User+12);
|
||||||
@@ -210,10 +224,33 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
switch( m_TitleMenuChoice )
|
switch( m_TitleMenuChoice )
|
||||||
{
|
{
|
||||||
case CHOICE_GAME_START:
|
case CHOICE_GAME_START:
|
||||||
if( USE_CAUTION_OR_SELECT_PLAYER )
|
switch( CAUTION_TYPE )
|
||||||
SCREENMAN->SetNewScreen( new ScreenEz2SelectPlayer );
|
{
|
||||||
else
|
case CAUTION_TYPE_SKIP:
|
||||||
|
switch( SELECT_STYLE_TYPE )
|
||||||
|
{
|
||||||
|
case SELECT_STYLE_TYPE_MAX:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenSelectStyle );
|
||||||
|
break;
|
||||||
|
case SELECT_STYLE_TYPE_5TH:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenSelectStyle5th );
|
||||||
|
break;
|
||||||
|
case SELECT_STYLE_TYPE_EZ2:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenEz2SelectStyle );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CAUTION_TYPE_DDR:
|
||||||
SCREENMAN->SetNewScreen( new ScreenCaution );
|
SCREENMAN->SetNewScreen( new ScreenCaution );
|
||||||
|
break;
|
||||||
|
case CAUTION_TYPE_EZ2_SELECT_PLAYER:
|
||||||
|
SCREENMAN->SetNewScreen( new ScreenEz2SelectPlayer );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case CHOICE_SELECT_GAME:
|
case CHOICE_SELECT_GAME:
|
||||||
SCREENMAN->SetNewScreen( new ScreenSelectGame );
|
SCREENMAN->SetNewScreen( new ScreenSelectGame );
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ void Song::GetBeatAndBPSFromElapsedTime( float fElapsedTime, float &fBeatOut, fl
|
|||||||
|
|
||||||
for( int i=0; i<m_BPMSegments.GetSize(); i++ ) // foreach BPMSegment
|
for( int i=0; i<m_BPMSegments.GetSize(); i++ ) // foreach BPMSegment
|
||||||
{
|
{
|
||||||
BPMSegment &this_seg = m_BPMSegments[i];
|
const BPMSegment &this_seg = m_BPMSegments[i];
|
||||||
|
|
||||||
float fStartBeatThisSegment = m_BPMSegments[i].m_fStartBeat;
|
float fStartBeatThisSegment = m_BPMSegments[i].m_fStartBeat;
|
||||||
bool bIsLastBPMSegment = i==m_BPMSegments.GetSize()-1;
|
bool bIsLastBPMSegment = i==m_BPMSegments.GetSize()-1;
|
||||||
|
|||||||
@@ -564,14 +564,6 @@ SOURCE=.\BannerWithFrame.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\BonusInfoFrame.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\BonusInfoFrame.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\BPMDisplay.cpp
|
SOURCE=.\BPMDisplay.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -588,14 +580,6 @@ SOURCE=.\CourseContentsFrame.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\CourseInfoFrame.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\CourseInfoFrame.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\CroppedSprite.cpp
|
SOURCE=.\CroppedSprite.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -716,14 +700,6 @@ SOURCE=.\SnapDisplay.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\SongInfoFrame.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\SongInfoFrame.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\SongSelector.cpp
|
SOURCE=.\SongSelector.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -732,14 +708,6 @@ SOURCE=.\SongSelector.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\StageBox.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\StageBox.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\TextBanner.cpp
|
SOURCE=.\TextBanner.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -302,6 +302,12 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="ScreenSelectStyle.h">
|
RelativePath="ScreenSelectStyle.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ScreenSelectStyle5th.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ScreenSelectStyle5th.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="ScreenSongOptions.cpp">
|
RelativePath="ScreenSongOptions.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -423,6 +429,12 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="Song.h">
|
RelativePath="Song.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SongCacheIndex.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SongCacheIndex.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="SongOptions.cpp">
|
RelativePath="SongOptions.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -441,12 +453,6 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="StyleInput.h">
|
RelativePath="StyleInput.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="SongCacheIndex.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="SongCacheIndex.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="File Types"
|
Name="File Types"
|
||||||
@@ -574,24 +580,12 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="BannerWithFrame.h">
|
RelativePath="BannerWithFrame.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="BonusInfoFrame.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="BonusInfoFrame.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="CourseContentsFrame.cpp">
|
RelativePath="CourseContentsFrame.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="CourseContentsFrame.h">
|
RelativePath="CourseContentsFrame.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="CourseInfoFrame.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="CourseInfoFrame.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="CroppedSprite.cpp">
|
RelativePath="CroppedSprite.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -683,16 +677,10 @@
|
|||||||
RelativePath="SnapDisplay.h">
|
RelativePath="SnapDisplay.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="SongInfoFrame.cpp">
|
RelativePath="SongSelector.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="SongInfoFrame.h">
|
RelativePath="SongSelector.h">
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="StageBox.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="StageBox.h">
|
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\TextBanner.cpp">
|
RelativePath=".\TextBanner.cpp">
|
||||||
@@ -706,12 +694,6 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\TipDisplay.h">
|
RelativePath=".\TipDisplay.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="SongSelector.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="SongSelector.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Actors used in Gameplay"
|
Name="Actors used in Gameplay"
|
||||||
|
|||||||
@@ -390,6 +390,8 @@ CString ThemeManager::GetPathTo( ThemeElement te, CString sThemeName )
|
|||||||
|
|
||||||
CString ThemeManager::GetPathTo( CString sAssetCategory, CString sFileName )
|
CString ThemeManager::GetPathTo( CString sAssetCategory, CString sFileName )
|
||||||
{
|
{
|
||||||
|
try_element_again:
|
||||||
|
|
||||||
sAssetCategory.MakeLower();
|
sAssetCategory.MakeLower();
|
||||||
sFileName.MakeLower();
|
sFileName.MakeLower();
|
||||||
|
|
||||||
@@ -458,9 +460,13 @@ CString ThemeManager::GetPathTo( CString sAssetCategory, CString sFileName )
|
|||||||
|
|
||||||
if( asPossibleElementFilePaths.GetSize() == 0 )
|
if( asPossibleElementFilePaths.GetSize() == 0 )
|
||||||
{
|
{
|
||||||
ASSERT(0);
|
#ifdef _DEBUG
|
||||||
throw RageException( "Theme element '%s' could not be found in '%s' or '%s'.",
|
if( IDRETRY == AfxMessageBox( ssprintf("The theme element %s/%s is missing. Correct this and click Retry, or Cancel to break.",sAssetCategory,sFileName), MB_RETRYCANCEL ) )
|
||||||
sAssetCategory+"\\"+sFileName,
|
goto try_element_again;
|
||||||
|
#endif
|
||||||
|
throw RageException( "Theme element '%s/%s' could not be found in '%s' or '%s'.",
|
||||||
|
sAssetCategory,
|
||||||
|
sFileName,
|
||||||
GetThemeDirFromName(m_sCurThemeName),
|
GetThemeDirFromName(m_sCurThemeName),
|
||||||
GetThemeDirFromName(BASE_THEME_NAME) );
|
GetThemeDirFromName(BASE_THEME_NAME) );
|
||||||
}
|
}
|
||||||
@@ -504,6 +510,7 @@ CString ThemeManager::GetMetricsPathFromName( CString sThemeName )
|
|||||||
|
|
||||||
CString ThemeManager::GetMetric( CString sScreenName, CString sValueName )
|
CString ThemeManager::GetMetric( CString sScreenName, CString sValueName )
|
||||||
{
|
{
|
||||||
|
try_metric_again:
|
||||||
CString sCurMetricPath = GetMetricsPathFromName(m_sCurThemeName);
|
CString sCurMetricPath = GetMetricsPathFromName(m_sCurThemeName);
|
||||||
CString sDefaultMetricPath = GetMetricsPathFromName(BASE_THEME_NAME);
|
CString sDefaultMetricPath = GetMetricsPathFromName(BASE_THEME_NAME);
|
||||||
|
|
||||||
@@ -518,7 +525,11 @@ CString ThemeManager::GetMetric( CString sScreenName, CString sValueName )
|
|||||||
if( m_pIniMetrics->GetValue(sScreenName,sValueName,sValue) )
|
if( m_pIniMetrics->GetValue(sScreenName,sValueName,sValue) )
|
||||||
return sValue;
|
return sValue;
|
||||||
|
|
||||||
ASSERT(0);
|
#ifdef _DEBUG
|
||||||
|
if( IDRETRY == AfxMessageBox( ssprintf("The theme metric %s-%s is missing. Correct this and click Retry, or Cancel to break.",sScreenName,sValueName), MB_RETRYCANCEL ) )
|
||||||
|
goto try_metric_again;
|
||||||
|
#endif
|
||||||
|
|
||||||
throw RageException( "Theme metric '%s : %s' could not be found in '%s' or '%s'.",
|
throw RageException( "Theme metric '%s : %s' could not be found in '%s' or '%s'.",
|
||||||
sScreenName,
|
sScreenName,
|
||||||
sValueName,
|
sValueName,
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ public:
|
|||||||
fMinBPM = 100000; // inf
|
fMinBPM = 100000; // inf
|
||||||
for( int i=0; i<m_BPMSegments.GetSize(); i++ )
|
for( int i=0; i<m_BPMSegments.GetSize(); i++ )
|
||||||
{
|
{
|
||||||
BPMSegment &seg = m_BPMSegments[i];
|
const BPMSegment &seg = m_BPMSegments[i];
|
||||||
fMaxBPM = max( seg.m_fBPM, fMaxBPM );
|
fMaxBPM = max( seg.m_fBPM, fMaxBPM );
|
||||||
fMinBPM = min( seg.m_fBPM, fMinBPM );
|
fMinBPM = min( seg.m_fBPM, fMinBPM );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user