Theme element reencoding, resizing, renaming etc...
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
Fix
|
Fix
|
||||||
/////////////////////////
|
/////////////////////////
|
||||||
|
|
||||||
|
select music score font size
|
||||||
|
|
||||||
more traditional particle system in BGAnimationLayer?
|
more traditional particle system in BGAnimationLayer?
|
||||||
- fog
|
- fog
|
||||||
- particle lifetime
|
- particle lifetime
|
||||||
|
|||||||
@@ -43,18 +43,20 @@ NextScreen=ScreenCaution
|
|||||||
NextScreen=ScreenSelectStyle
|
NextScreen=ScreenSelectStyle
|
||||||
|
|
||||||
[ScreenEz2SelectPlayer]
|
[ScreenEz2SelectPlayer]
|
||||||
CursorP1X=120
|
JoinFrameP1X=120
|
||||||
CursorP1Y=335
|
JoinFrameP1Y=350
|
||||||
CursorP2X=520
|
JoinFrameP2X=520
|
||||||
CursorP2Y=335
|
JoinFrameP2Y=350
|
||||||
ControllerP1X=120
|
JoinMessageP1X=120
|
||||||
ControllerP1Y=350
|
JoinMessageP1Y=336
|
||||||
ControllerP2X=520
|
JoinMessageP2X=520
|
||||||
ControllerP2Y=350
|
JoinMessageP2Y=336
|
||||||
HelpText=Press $ on the pad to join
|
HelpText=Press $ on the pad to join
|
||||||
TimerSeconds=40
|
TimerSeconds=40
|
||||||
NextScreen=ScreenSelectGroup
|
NextScreen=ScreenSelectGroup
|
||||||
SilentWait=1
|
SilentWait=1
|
||||||
|
BounceJoinMessage=1
|
||||||
|
FoldOnJoin=1
|
||||||
|
|
||||||
[ScreenSelectStyle]
|
[ScreenSelectStyle]
|
||||||
IconsStartX=60
|
IconsStartX=60
|
||||||
@@ -77,14 +79,14 @@ TimerSeconds=40
|
|||||||
NextScreen=ScreenSelectDifficulty
|
NextScreen=ScreenSelectDifficulty
|
||||||
|
|
||||||
[ScreenSelectMode]
|
[ScreenSelectMode]
|
||||||
CursorP1X=120
|
JoinFrameP1X=120
|
||||||
CursorP1Y=335
|
JoinFrameP1Y=350
|
||||||
CursorP2X=520
|
JoinFrameP2X=520
|
||||||
CursorP2Y=335
|
JoinFrameP2Y=350
|
||||||
ControllerP1X=120
|
JoinMessageP1X=120
|
||||||
ControllerP1Y=350
|
JoinMessageP1Y=336
|
||||||
ControllerP2X=520
|
JoinMessageP2X=520
|
||||||
ControllerP2Y=350
|
JoinMessageP2Y=336
|
||||||
HelpText=Press $ on the pad to join. Press ! " to change styles, then press START
|
HelpText=Press $ on the pad to join. Press ! " to change styles, then press START
|
||||||
TimerSeconds=40
|
TimerSeconds=40
|
||||||
NextScreen=ScreenSelectGroup
|
NextScreen=ScreenSelectGroup
|
||||||
@@ -92,6 +94,8 @@ ScrollingListX=320
|
|||||||
ScrollingListY=250
|
ScrollingListY=250
|
||||||
UseSelectionBGAnimations=0
|
UseSelectionBGAnimations=0
|
||||||
SelectionSpecificBGAnimations=0
|
SelectionSpecificBGAnimations=0
|
||||||
|
BounceJoinMessage=1
|
||||||
|
FoldOnJoin=1
|
||||||
|
|
||||||
[ScreenSelectDifficulty]
|
[ScreenSelectDifficulty]
|
||||||
MorePage1X=580
|
MorePage1X=580
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User + 1);
|
|||||||
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2);
|
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2);
|
||||||
|
|
||||||
|
|
||||||
#define CURSOR_X( p ) THEME->GetMetricF("ScreenEz2SelectPlayer",ssprintf("CursorP%dX",p+1))
|
#define JOIN_FRAME_X( p ) THEME->GetMetricF("ScreenEz2SelectPlayer",ssprintf("JoinFrameP%dX",p+1))
|
||||||
#define CURSOR_Y( i ) THEME->GetMetricF("ScreenEz2SelectPlayer",ssprintf("CursorP%dY",i+1))
|
#define JOIN_FRAME_Y( i ) THEME->GetMetricF("ScreenEz2SelectPlayer",ssprintf("JoinFrameP%dY",i+1))
|
||||||
#define CONTROLLER_X( p ) THEME->GetMetricF("ScreenEz2SelectPlayer",ssprintf("ControllerP%dX",p+1))
|
#define JOIN_MESSAGE_X( p ) THEME->GetMetricF("ScreenEz2SelectPlayer",ssprintf("JoinMessageP%dX",p+1))
|
||||||
#define CONTROLLER_Y( i ) THEME->GetMetricF("ScreenEz2SelectPlayer",ssprintf("ControllerP%dY",i+1))
|
#define JOIN_MESSAGE_Y( i ) THEME->GetMetricF("ScreenEz2SelectPlayer",ssprintf("JoinMessageP%dY",i+1))
|
||||||
#define HELP_TEXT THEME->GetMetric("ScreenEz2SelectPlayer","HelpText")
|
#define HELP_TEXT THEME->GetMetric("ScreenEz2SelectPlayer","HelpText")
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenEz2SelectPlayer","TimerSeconds")
|
#define TIMER_SECONDS THEME->GetMetricI("ScreenEz2SelectPlayer","TimerSeconds")
|
||||||
#define NEXT_SCREEN THEME->GetMetric("ScreenEz2SelectPlayer","NextScreen")
|
#define NEXT_SCREEN THEME->GetMetric("ScreenEz2SelectPlayer","NextScreen")
|
||||||
#define SILENT_WAIT THEME->GetMetricI("ScreenEz2SelectPlayer","SilentWait")
|
#define SILENT_WAIT THEME->GetMetricI("ScreenEz2SelectPlayer","SilentWait")
|
||||||
|
#define BOUNCE_JOIN_MESSAGE THEME->GetMetricB("ScreenEz2SelectPlayer","BounceJoinMessage")
|
||||||
|
#define FOLD_ON_JOIN THEME->GetMetricB("ScreenEz2SelectPlayer","FoldOnJoin")
|
||||||
|
|
||||||
const float TWEEN_TIME = 0.35f;
|
const float TWEEN_TIME = 0.35f;
|
||||||
|
|
||||||
@@ -55,7 +57,7 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()
|
|||||||
LOG->Trace( "ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()" );
|
LOG->Trace( "ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()" );
|
||||||
|
|
||||||
m_Menu.Load(
|
m_Menu.Load(
|
||||||
THEME->GetPathTo("Graphics","select player background"),
|
THEME->GetPathTo("BGAnimations","ez2 select player"),
|
||||||
THEME->GetPathTo("Graphics","select player top edge"),
|
THEME->GetPathTo("Graphics","select player top edge"),
|
||||||
HELP_TEXT, false, true, TIMER_SECONDS
|
HELP_TEXT, false, true, TIMER_SECONDS
|
||||||
);
|
);
|
||||||
@@ -64,20 +66,35 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()
|
|||||||
m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ez2 select player") );
|
m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ez2 select player") );
|
||||||
this->AddChild( &m_Background ); // animated background =)
|
this->AddChild( &m_Background ); // animated background =)
|
||||||
|
|
||||||
m_logo.Load( THEME->GetPathTo("Graphics","select player logo"));
|
|
||||||
m_logo.SetXY( CENTER_X, CENTER_Y);
|
|
||||||
this->AddChild( &m_logo );
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
m_sprControllers[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player controller p%d", p+1)) ); // two of these for pump support.
|
m_sprJoinFrame[p].Load( THEME->GetPathTo("Graphics","select player join frame 1x2") );
|
||||||
m_sprControllers[p].SetXY( CONTROLLER_X(p), CONTROLLER_Y(p) );
|
m_sprJoinFrame[p].StopAnimating();
|
||||||
this->AddChild( &m_sprControllers[p] );
|
m_sprJoinFrame[p].SetState( p );
|
||||||
|
m_sprJoinFrame[p].SetXY( JOIN_FRAME_X(p), JOIN_FRAME_Y(p) );
|
||||||
|
this->AddChild( &m_sprJoinFrame[p] );
|
||||||
|
|
||||||
m_sprCursors[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player cursor p%d",p+1)) );
|
if( GAMESTATE->m_bSideIsJoined[p] )
|
||||||
m_sprCursors[p].SetXY( CURSOR_X(p), CURSOR_Y(p) );
|
m_sprJoinFrame[p].SetZoomY( 0 );
|
||||||
m_sprCursors[p].SetEffectBouncing( D3DXVECTOR3(0,10,0), 0.5f );
|
|
||||||
this->AddChild( &m_sprCursors[p] );
|
m_sprJoinMessage[p].Load( THEME->GetPathTo("Graphics","select player join message 2x2") );
|
||||||
|
m_sprJoinMessage[p].StopAnimating();
|
||||||
|
m_sprJoinMessage[p].SetState( p );
|
||||||
|
m_sprJoinMessage[p].SetXY( JOIN_MESSAGE_X(p), JOIN_MESSAGE_Y(p) );
|
||||||
|
if( BOUNCE_JOIN_MESSAGE )
|
||||||
|
m_sprJoinMessage[p].SetEffectBouncing( D3DXVECTOR3(0,10,0), 0.5f );
|
||||||
|
this->AddChild( &m_sprJoinMessage[p] );
|
||||||
|
|
||||||
|
if( GAMESTATE->m_bSideIsJoined[p] )
|
||||||
|
{
|
||||||
|
m_sprJoinMessage[p].SetState( p+NUM_PLAYERS );
|
||||||
|
|
||||||
|
if( FOLD_ON_JOIN )
|
||||||
|
{
|
||||||
|
m_sprJoinMessage[p].SetZoomY( 0 );
|
||||||
|
m_sprJoinFrame[p].SetZoomY( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
|
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
|
||||||
@@ -204,10 +221,10 @@ void ScreenEz2SelectPlayer::MenuStart( PlayerNumber pn )
|
|||||||
GAMESTATE->m_bSideIsJoined[pn] = true;
|
GAMESTATE->m_bSideIsJoined[pn] = true;
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
m_soundSelect.Play();
|
m_soundSelect.Play();
|
||||||
m_sprCursors[pn].BeginTweening( 0.25f );
|
m_sprJoinMessage[pn].BeginTweening( 0.25f );
|
||||||
m_sprCursors[pn].SetTweenZoomY( 0 );
|
m_sprJoinMessage[pn].SetTweenZoomY( 0 );
|
||||||
m_sprControllers[pn].BeginTweening( 0.25f );
|
m_sprJoinFrame[pn].BeginTweening( 0.25f );
|
||||||
m_sprControllers[pn].SetTweenZoomY( 0 );
|
m_sprJoinFrame[pn].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
bool bBothSidesJoined = true;
|
bool bBothSidesJoined = true;
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
@@ -236,15 +253,15 @@ void ScreenEz2SelectPlayer::TweenOnScreen()
|
|||||||
|
|
||||||
float fOriginalX;
|
float fOriginalX;
|
||||||
|
|
||||||
fOriginalX = m_sprCursors[p].GetX();
|
fOriginalX = m_sprJoinMessage[p].GetX();
|
||||||
m_sprCursors[p].SetX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
m_sprJoinMessage[p].SetX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
||||||
m_sprCursors[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
m_sprJoinMessage[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
||||||
m_sprCursors[p].SetTweenX( fOriginalX );
|
m_sprJoinMessage[p].SetTweenX( fOriginalX );
|
||||||
|
|
||||||
fOriginalX = m_sprControllers[p].GetX();
|
fOriginalX = m_sprJoinFrame[p].GetX();
|
||||||
m_sprControllers[p].SetX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
m_sprJoinFrame[p].SetX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
||||||
m_sprControllers[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
m_sprJoinFrame[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
||||||
m_sprControllers[p].SetTweenX( fOriginalX );
|
m_sprJoinFrame[p].SetTweenX( fOriginalX );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,9 +271,9 @@ void ScreenEz2SelectPlayer::TweenOffScreen()
|
|||||||
{
|
{
|
||||||
float fOffScreenOffset = float( (p==PLAYER_1) ? -SCREEN_WIDTH : +SCREEN_WIDTH );
|
float fOffScreenOffset = float( (p==PLAYER_1) ? -SCREEN_WIDTH : +SCREEN_WIDTH );
|
||||||
|
|
||||||
m_sprCursors[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
m_sprJoinMessage[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
||||||
m_sprCursors[p].SetTweenX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
m_sprJoinMessage[p].SetTweenX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
||||||
m_sprControllers[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
m_sprJoinFrame[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
||||||
m_sprControllers[p].SetTweenX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
m_sprJoinFrame[p].SetTweenX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,8 @@ private:
|
|||||||
void TweenOffScreen();
|
void TweenOffScreen();
|
||||||
void TweenOnScreen();
|
void TweenOnScreen();
|
||||||
|
|
||||||
|
Sprite m_sprJoinMessage[NUM_PLAYERS];
|
||||||
Sprite m_sprCursors[NUM_PLAYERS];
|
Sprite m_sprJoinFrame[NUM_PLAYERS];
|
||||||
Sprite m_sprControllers[NUM_PLAYERS];
|
|
||||||
Sprite m_logo;
|
|
||||||
|
|
||||||
MenuElements m_Menu;
|
MenuElements m_Menu;
|
||||||
|
|
||||||
|
|||||||
@@ -143,12 +143,12 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
|
|||||||
if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
|
if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
m_sprCursorShadow[p].Load( THEME->GetPathTo("Graphics", "select difficulty cursor 2x1") );
|
m_sprJoinMessagehadow[p].Load( THEME->GetPathTo("Graphics", "select difficulty cursor 2x1") );
|
||||||
m_sprCursorShadow[p].StopAnimating();
|
m_sprJoinMessagehadow[p].StopAnimating();
|
||||||
m_sprCursorShadow[p].SetState( p );
|
m_sprJoinMessagehadow[p].SetState( p );
|
||||||
m_sprCursorShadow[p].TurnShadowOff();
|
m_sprJoinMessagehadow[p].TurnShadowOff();
|
||||||
m_sprCursorShadow[p].SetDiffuse( D3DXCOLOR(0,0,0,0.6f) );
|
m_sprJoinMessagehadow[p].SetDiffuse( D3DXCOLOR(0,0,0,0.6f) );
|
||||||
m_framePages.AddChild( &m_sprCursorShadow[p] );
|
m_framePages.AddChild( &m_sprJoinMessagehadow[p] );
|
||||||
|
|
||||||
m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "select difficulty cursor 2x1") );
|
m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "select difficulty cursor 2x1") );
|
||||||
m_sprCursor[p].StopAnimating();
|
m_sprCursor[p].StopAnimating();
|
||||||
@@ -368,10 +368,10 @@ void ScreenSelectDifficulty::ChangeTo( PlayerNumber pn, int iSelectionWas, int i
|
|||||||
m_sprCursor[p].SetTweenX( CURSOR_X(m_iSelection[p],(PlayerNumber)p) - CURSOR_SHADOW_LENGTH_X );
|
m_sprCursor[p].SetTweenX( CURSOR_X(m_iSelection[p],(PlayerNumber)p) - CURSOR_SHADOW_LENGTH_X );
|
||||||
m_sprCursor[p].SetTweenY( CURSOR_Y(m_iSelection[p],(PlayerNumber)p) - CURSOR_SHADOW_LENGTH_Y );
|
m_sprCursor[p].SetTweenY( CURSOR_Y(m_iSelection[p],(PlayerNumber)p) - CURSOR_SHADOW_LENGTH_Y );
|
||||||
|
|
||||||
m_sprCursorShadow[p].StopTweening();
|
m_sprJoinMessagehadow[p].StopTweening();
|
||||||
m_sprCursorShadow[p].BeginTweening( 0.2f, bChangedPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN );
|
m_sprJoinMessagehadow[p].BeginTweening( 0.2f, bChangedPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN );
|
||||||
m_sprCursorShadow[p].SetTweenX( CURSOR_X(m_iSelection[p],(PlayerNumber)p) );
|
m_sprJoinMessagehadow[p].SetTweenX( CURSOR_X(m_iSelection[p],(PlayerNumber)p) );
|
||||||
m_sprCursorShadow[p].SetTweenY( CURSOR_Y(m_iSelection[p],(PlayerNumber)p) );
|
m_sprJoinMessagehadow[p].SetTweenY( CURSOR_Y(m_iSelection[p],(PlayerNumber)p) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,9 +422,9 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
|
|||||||
m_sprOK[pn].SetTweenZoom( 1 );
|
m_sprOK[pn].SetTweenZoom( 1 );
|
||||||
m_sprOK[pn].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
m_sprOK[pn].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||||
|
|
||||||
m_sprCursorShadow[pn].BeginTweening( 0.2f );
|
m_sprJoinMessagehadow[pn].BeginTweening( 0.2f );
|
||||||
m_sprCursorShadow[pn].BeginTweening( 0.2f );
|
m_sprJoinMessagehadow[pn].BeginTweening( 0.2f );
|
||||||
m_sprCursorShadow[pn].SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
m_sprJoinMessagehadow[pn].SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||||
|
|
||||||
|
|
||||||
// check to see if everyone has chosen
|
// check to see if everyone has chosen
|
||||||
@@ -473,8 +473,8 @@ void ScreenSelectDifficulty::TweenOffScreen()
|
|||||||
m_sprOK[p].BeginTweening( 0.3f );
|
m_sprOK[p].BeginTweening( 0.3f );
|
||||||
m_sprOK[p].SetTweenZoom( 0 );
|
m_sprOK[p].SetTweenZoom( 0 );
|
||||||
|
|
||||||
m_sprCursorShadow[p].BeginTweening( 0.3f );
|
m_sprJoinMessagehadow[p].BeginTweening( 0.3f );
|
||||||
m_sprCursorShadow[p].SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
|
m_sprJoinMessagehadow[p].SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int d=0; d<NUM_DIFFICULTY_ITEMS; d++ )
|
for( int d=0; d<NUM_DIFFICULTY_ITEMS; d++ )
|
||||||
@@ -538,11 +538,11 @@ void ScreenSelectDifficulty::TweenOnScreen()
|
|||||||
*/
|
*/
|
||||||
m_sprCursor[p].FadeOn( 0, "SpinZ ZoomX ZoomY Fade", 0.3f );
|
m_sprCursor[p].FadeOn( 0, "SpinZ ZoomX ZoomY Fade", 0.3f );
|
||||||
|
|
||||||
m_sprCursorShadow[p].SetXY( CURSOR_X(iSelection,(PlayerNumber)p), CURSOR_Y(iSelection,(PlayerNumber)p) );
|
m_sprJoinMessagehadow[p].SetXY( CURSOR_X(iSelection,(PlayerNumber)p), CURSOR_Y(iSelection,(PlayerNumber)p) );
|
||||||
D3DXCOLOR colorOriginal = m_sprCursorShadow[p].GetDiffuse();
|
D3DXCOLOR colorOriginal = m_sprJoinMessagehadow[p].GetDiffuse();
|
||||||
m_sprCursorShadow[p].SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
m_sprJoinMessagehadow[p].SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||||
m_sprCursorShadow[p].BeginTweening( 0.3f );
|
m_sprJoinMessagehadow[p].BeginTweening( 0.3f );
|
||||||
m_sprCursorShadow[p].SetTweenDiffuse( colorOriginal );
|
m_sprJoinMessagehadow[p].SetTweenDiffuse( colorOriginal );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int d=0; d<NUM_DIFFICULTY_ITEMS; d++ )
|
for( int d=0; d<NUM_DIFFICULTY_ITEMS; d++ )
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ private:
|
|||||||
Sprite m_sprMoreArrows[NUM_PAGES];
|
Sprite m_sprMoreArrows[NUM_PAGES];
|
||||||
|
|
||||||
Sprite m_sprCursor[NUM_PLAYERS];
|
Sprite m_sprCursor[NUM_PLAYERS];
|
||||||
Sprite m_sprCursorShadow[NUM_PLAYERS];
|
Sprite m_sprJoinMessagehadow[NUM_PLAYERS];
|
||||||
Sprite m_sprOK[NUM_PLAYERS];
|
Sprite m_sprOK[NUM_PLAYERS];
|
||||||
|
|
||||||
RageSoundSample m_soundChange;
|
RageSoundSample m_soundChange;
|
||||||
|
|||||||
@@ -28,17 +28,19 @@ const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User + 1);
|
|||||||
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2);
|
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2);
|
||||||
|
|
||||||
|
|
||||||
#define CURSOR_X( p ) THEME->GetMetricF("ScreenSelectMode",ssprintf("CursorP%dX",p+1))
|
#define JOIN_FRAME_X( p ) THEME->GetMetricF("ScreenSelectMode",ssprintf("JoinFrameP%dX",p+1))
|
||||||
#define CURSOR_Y( i ) THEME->GetMetricF("ScreenSelectMode",ssprintf("CursorP%dY",i+1))
|
#define JOIN_FRAME_Y( i ) THEME->GetMetricF("ScreenSelectMode",ssprintf("JoinFrameP%dY",i+1))
|
||||||
#define CONTROLLER_X( p ) THEME->GetMetricF("ScreenSelectMode",ssprintf("ControllerP%dX",p+1))
|
#define JOIN_MESSAGE_X( p ) THEME->GetMetricF("ScreenSelectMode",ssprintf("JoinMessageP%dX",p+1))
|
||||||
#define CONTROLLER_Y( i ) THEME->GetMetricF("ScreenSelectMode",ssprintf("ControllerP%dY",i+1))
|
#define JOIN_MESSAGE_Y( i ) THEME->GetMetricF("ScreenSelectMode",ssprintf("JoinMessageP%dY",i+1))
|
||||||
#define HELP_TEXT THEME->GetMetric("ScreenSelectMode","HelpText")
|
#define HELP_TEXT THEME->GetMetric("ScreenSelectMode","HelpText")
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectMode","TimerSeconds")
|
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectMode","TimerSeconds")
|
||||||
#define NEXT_SCREEN THEME->GetMetric("ScreenSelectMode","NextScreen")
|
#define NEXT_SCREEN THEME->GetMetric("ScreenSelectMode","NextScreen")
|
||||||
#define SCROLLING_ELEMENT_SPACING THEME->GetMetricI("ScreenSelectMode","ScrollingElementSpacing")
|
#define SCROLLING_ELEMENT_SPACING THEME->GetMetricI("ScreenSelectMode","ScrollingElementSpacing")
|
||||||
#define SCROLLING_LIST_X THEME->GetMetricF("ScreenSelectMode","ScrollingListX")
|
#define SCROLLING_LIST_X THEME->GetMetricF("ScreenSelectMode","ScrollingListX")
|
||||||
#define SCROLLING_LIST_Y THEME->GetMetricF("ScreenSelectMode","ScrollingListY")
|
#define SCROLLING_LIST_Y THEME->GetMetricF("ScreenSelectMode","ScrollingListY")
|
||||||
#define SELECTION_SPECIFIC_BG_ANIMATIONS THEME->GetMetricB("ScreenSelectMode","SelectionSpecificBGAnimations")
|
#define SELECTION_SPECIFIC_BG_ANIMATIONS THEME->GetMetricB("ScreenSelectMode","SelectionSpecificBGAnimations")
|
||||||
|
#define BOUNCE_JOIN_MESSAGE THEME->GetMetricB("ScreenSelectMode","BounceJoinMessage")
|
||||||
|
#define FOLD_ON_JOIN THEME->GetMetricB("ScreenSelectMode","FoldOnJoin")
|
||||||
|
|
||||||
const float TWEEN_TIME = 0.35f;
|
const float TWEEN_TIME = 0.35f;
|
||||||
|
|
||||||
@@ -57,35 +59,48 @@ ScreenSelectMode::ScreenSelectMode()
|
|||||||
|
|
||||||
|
|
||||||
/*********** TODO: MAKE THIS WORK FOR ALL GAME STYLES! *************/
|
/*********** TODO: MAKE THIS WORK FOR ALL GAME STYLES! *************/
|
||||||
m_StyleListFrame.Load( THEME->GetPathTo("Graphics","StyleListFrame"));
|
m_ChoiceListFrame.Load( THEME->GetPathTo("Graphics","select mode list frame"));
|
||||||
m_StyleListFrame.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y);
|
m_ChoiceListFrame.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y);
|
||||||
this->AddChild( &m_StyleListFrame );
|
this->AddChild( &m_ChoiceListFrame );
|
||||||
|
|
||||||
m_ScrollingList.SetXY( CENTER_X, SCROLLING_LIST_Y );
|
m_ScrollingList.SetXY( CENTER_X, SCROLLING_LIST_Y );
|
||||||
m_ScrollingList.SetSpacing( SCROLLING_ELEMENT_SPACING );
|
m_ScrollingList.SetSpacing( SCROLLING_ELEMENT_SPACING );
|
||||||
m_ScrollingList.SetNumberVisible( 9 );
|
m_ScrollingList.SetNumberVisible( 9 );
|
||||||
this->AddChild( &m_ScrollingList );
|
this->AddChild( &m_ScrollingList );
|
||||||
|
|
||||||
m_SelectedStyleFrame.Load( THEME->GetPathTo("Graphics","SelectedStyleFrame"));
|
m_ChoiceListHighlight.Load( THEME->GetPathTo("Graphics","select mode list highlight"));
|
||||||
m_SelectedStyleFrame.SetXY( CENTER_X, SCROLLING_LIST_Y);
|
m_ChoiceListHighlight.SetXY( CENTER_X, SCROLLING_LIST_Y);
|
||||||
this->AddChild( &m_SelectedStyleFrame );
|
this->AddChild( &m_ChoiceListHighlight );
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
// add the controllers, change their graphic if the player is not selected later
|
m_sprJoinFrame[p].Load( THEME->GetPathTo("Graphics","select player join frame 1x2") );
|
||||||
m_sprControllers[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player controller selected p%d", p+1)) );
|
m_sprJoinFrame[p].StopAnimating();
|
||||||
m_sprControllers[p].SetXY( CONTROLLER_X(p), CONTROLLER_Y(p) );
|
m_sprJoinFrame[p].SetState( p );
|
||||||
this->AddChild( &m_sprControllers[p] );
|
m_sprJoinFrame[p].SetXY( JOIN_FRAME_X(p), JOIN_FRAME_Y(p) );
|
||||||
|
this->AddChild( &m_sprJoinFrame[p] );
|
||||||
|
|
||||||
if( GAMESTATE->m_bSideIsJoined[p] ) // if side is already joined
|
if( GAMESTATE->m_bSideIsJoined[p] )
|
||||||
continue; // don't show bobbing join and blob
|
m_sprJoinFrame[p].SetZoomY( 0 );
|
||||||
|
|
||||||
m_sprControllers[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player controller p%d", p+1)) );
|
m_sprJoinMessage[p].Load( THEME->GetPathTo("Graphics","select player join message 2x2") );
|
||||||
|
m_sprJoinMessage[p].StopAnimating();
|
||||||
|
m_sprJoinMessage[p].SetState( p );
|
||||||
|
m_sprJoinMessage[p].SetXY( JOIN_MESSAGE_X(p), JOIN_MESSAGE_Y(p) );
|
||||||
|
if( BOUNCE_JOIN_MESSAGE )
|
||||||
|
m_sprJoinMessage[p].SetEffectBouncing( D3DXVECTOR3(0,10,0), 0.5f );
|
||||||
|
this->AddChild( &m_sprJoinMessage[p] );
|
||||||
|
|
||||||
m_sprCursors[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player cursor p%d",p+1)) );
|
if( GAMESTATE->m_bSideIsJoined[p] )
|
||||||
m_sprCursors[p].SetXY( CURSOR_X(p), CURSOR_Y(p) );
|
{
|
||||||
m_sprCursors[p].SetEffectBouncing( D3DXVECTOR3(0,10,0), 0.5f );
|
m_sprJoinMessage[p].SetState( p+NUM_PLAYERS );
|
||||||
this->AddChild( &m_sprCursors[p] );
|
|
||||||
|
if( FOLD_ON_JOIN )
|
||||||
|
{
|
||||||
|
m_sprJoinMessage[p].SetZoomY( 0 );
|
||||||
|
m_sprJoinFrame[p].SetZoomY( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -199,7 +214,7 @@ void ScreenSelectMode::RefreshModeChoices()
|
|||||||
const ModeChoice& choice = m_aPossibleModeChoices[i];
|
const ModeChoice& choice = m_aPossibleModeChoices[i];
|
||||||
|
|
||||||
if( choice.numSidesJoinedToPlay == iNumSidesJoined )
|
if( choice.numSidesJoinedToPlay == iNumSidesJoined )
|
||||||
asGraphicPaths.Add( THEME->GetPathTo("Graphics", ssprintf("select mode %s %s", sGameName, choice.name) ) );
|
asGraphicPaths.Add( THEME->GetPathTo("Graphics", ssprintf("select mode choice %s %s", sGameName, choice.name) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ScrollingList.Load( asGraphicPaths );
|
m_ScrollingList.Load( asGraphicPaths );
|
||||||
@@ -276,12 +291,16 @@ void ScreenSelectMode::MenuStart( PlayerNumber pn )
|
|||||||
GAMESTATE->m_bSideIsJoined[pn] = true;
|
GAMESTATE->m_bSideIsJoined[pn] = true;
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
m_soundSelect.Play();
|
m_soundSelect.Play();
|
||||||
m_sprCursors[pn].BeginTweening( 0.25f );
|
|
||||||
m_sprCursors[pn].SetTweenZoomY( 0 );
|
m_sprJoinMessage[pn].SetState( pn + NUM_PLAYERS );
|
||||||
//m_sprControllers[pn].BeginTweening( 0.25f );
|
|
||||||
//m_sprControllers[pn].SetTweenZoomY( 0 );
|
if( FOLD_ON_JOIN )
|
||||||
// NOW replace with the new controller!
|
{
|
||||||
m_sprControllers[pn].Load( THEME->GetPathTo("Graphics",ssprintf("select player controller selected p%d", pn+1)) );
|
m_sprJoinMessage[pn].BeginTweening( 0.25f );
|
||||||
|
m_sprJoinMessage[pn].SetTweenZoomY( 0 );
|
||||||
|
m_sprJoinFrame[pn].BeginTweening( 0.25f );
|
||||||
|
m_sprJoinFrame[pn].SetTweenZoomY( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
RefreshModeChoices();
|
RefreshModeChoices();
|
||||||
|
|
||||||
@@ -315,15 +334,15 @@ void ScreenSelectMode::TweenOnScreen()
|
|||||||
|
|
||||||
float fOriginalX;
|
float fOriginalX;
|
||||||
|
|
||||||
fOriginalX = m_sprCursors[p].GetX();
|
fOriginalX = m_sprJoinMessage[p].GetX();
|
||||||
m_sprCursors[p].SetX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
m_sprJoinMessage[p].SetX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
||||||
m_sprCursors[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
m_sprJoinMessage[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
||||||
m_sprCursors[p].SetTweenX( fOriginalX );
|
m_sprJoinMessage[p].SetTweenX( fOriginalX );
|
||||||
|
|
||||||
fOriginalX = m_sprControllers[p].GetX();
|
fOriginalX = m_sprJoinFrame[p].GetX();
|
||||||
m_sprControllers[p].SetX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
m_sprJoinFrame[p].SetX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
||||||
m_sprControllers[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
m_sprJoinFrame[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
||||||
m_sprControllers[p].SetTweenX( fOriginalX );
|
m_sprJoinFrame[p].SetTweenX( fOriginalX );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,9 +355,9 @@ void ScreenSelectMode::TweenOffScreen()
|
|||||||
{
|
{
|
||||||
float fOffScreenOffset = float( (p==PLAYER_1) ? -SCREEN_WIDTH : +SCREEN_WIDTH );
|
float fOffScreenOffset = float( (p==PLAYER_1) ? -SCREEN_WIDTH : +SCREEN_WIDTH );
|
||||||
|
|
||||||
m_sprCursors[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
m_sprJoinMessage[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
||||||
m_sprCursors[p].SetTweenX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
m_sprJoinMessage[p].SetTweenX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
||||||
m_sprControllers[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
m_sprJoinFrame[p].BeginTweening( 0.5f, Actor::TWEEN_BIAS_END );
|
||||||
m_sprControllers[p].SetTweenX( m_sprCursors[p].GetX()+fOffScreenOffset );
|
m_sprJoinFrame[p].SetTweenX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,10 +48,10 @@ protected:
|
|||||||
void TweenOffScreen();
|
void TweenOffScreen();
|
||||||
void TweenOnScreen();
|
void TweenOnScreen();
|
||||||
|
|
||||||
Sprite m_sprCursors[NUM_PLAYERS];
|
Sprite m_sprJoinMessage[NUM_PLAYERS];
|
||||||
Sprite m_sprControllers[NUM_PLAYERS];
|
Sprite m_sprJoinFrame[NUM_PLAYERS];
|
||||||
Sprite m_StyleListFrame;
|
Sprite m_ChoiceListFrame;
|
||||||
Sprite m_SelectedStyleFrame;
|
Sprite m_ChoiceListHighlight;
|
||||||
|
|
||||||
CArray<ModeChoice,ModeChoice> m_aPossibleModeChoices;
|
CArray<ModeChoice,ModeChoice> m_aPossibleModeChoices;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user