half-finished codes, options icons, and two new modifiers.

This commit is contained in:
Chris Danford
2002-09-02 21:59:58 +00:00
parent d7e6f59b3b
commit 7d4cf73000
87 changed files with 1313 additions and 1109 deletions
+10
View File
@@ -1,4 +1,14 @@
------------------------CVS after 3.00 beta 6----------------
NEW FEATURE: Best sort now shows only top 30 songs.
NEW FEATURE: Option codes on the Select Music and Select Course screens
Codes are defined in the metrics.ini file and thus can be edited and
changed per-theme. The "Dedicated Menu Buttons" option does not
have to be enabled to use codes.
NEW FEATURE: SuperShuffle shuffles each individual note row. This
makes for a completely different note pattern every time.
CHANGE: Boost is now a separate option and can be combined with other
effects.
NEW FEATURE: New Effects: Backwards and Tornado.
NEW FEATURE: More informative crash dialog.
BUG FIX: Fix editor saving files with an extra space at the end
of the filename.
+27
View File
@@ -185,6 +185,8 @@ PlayerOptionsP2X=304
PlayerOptionsP2Y=330
SongOptionsX=160
SongOptionsY=298
OptionIconsX=160
OptionIconsY=80
HelpText=! or " change music Hold ! and " then press START to change sort::## easier difficulty $$ harder difficulty::#$#$ to change sort
TimerSeconds=60
ScoreConnectedToMusicWheel=1
@@ -271,6 +273,7 @@ AutoPlayX=320
AutoPlayY=360
SecondsBetweenComments=10
DemonstrationSeconds=30
TickEarlySeconds=0.018
[ScreenEvaluation]
BannerX=320
@@ -488,3 +491,27 @@ ExtraColorBottom=0.6,0.0,0.0,1 // dark red
[GrayArrow]
StepZoom=0.75
StepSeconds=0.2
[CodeDetector]
Easier1=Up,Up
Easier2=MenuUp,MenuUp
Harder1=Down,Down
Harder2=MenuDown,MenuDown
NextSort1=Up,Down,Up,Down
NextSort2=MenuUp,MenuDown,MenuUp,MenuDown
Mirror=Up,Left,Right,Left,Right
Left=Up,Down,Right,Left
Right=Up,Down,Left,Right
Shuffle=Down,Up,Down,Up
SuperShuffle=Down,Up,Left,Right
Little=
NextScrollSpeed=
Boost=Left,Right,Down,Up
NextEffect=Left,Down,Right
NextAppearance=Left,Up,Right
NextTurn=
Reverse=Down,Left,Right,Left,Right
NextColor=
HoldNotes=Right,Left,Down,Up
Dark=
CancelAll=Left,Right,Left,Right,Left,Right,Left,Right
+155 -138
View File
@@ -20,12 +20,10 @@ Actor::Actor()
{
m_iNumTweenStates = 0;
m_size = D3DXVECTOR2( 1, 1 );
m_pos = m_start_pos = D3DXVECTOR3( 0, 0, 0 );
m_rotation = m_start_rotation = D3DXVECTOR3( 0, 0, 0 );
m_scale = m_start_scale = D3DXVECTOR2( 1, 1 );
for(int i=0; i<4; i++) m_colorDiffuse[i] = m_start_colorDiffuse[i] = D3DXCOLOR( 1, 1, 1, 1 );
m_colorGlow = m_start_colorGlow = D3DXCOLOR( 0, 0, 0, 0 );
m_size = D3DXVECTOR2( 1, 1 );
m_start.Init();
m_current.Init();
m_HorizAlign = align_center;
m_VertAlign = align_middle;
@@ -37,7 +35,7 @@ Actor::Actor()
m_fWagRadians = 0.2f;
m_fWagPeriod = 2.0f;
m_fWagTimer = 0.0f;
m_fSpinSpeed = 2.0f;
m_vSpinVelocity = D3DXVECTOR3(0,0,0);
m_fVibrationDistance = 5.0f;
m_bVisibleThisFrame = FALSE;
@@ -62,14 +60,8 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
DISPLAY->PushMatrix(); // we're actually going to do some drawing in this function
int i;
m_temp_pos = m_pos;
m_temp_rotation = m_rotation;
m_temp_scale = m_scale;
m_temp_colorDiffuse[4];
for(i=0; i<4; i++)
m_temp_colorDiffuse[i] = m_colorDiffuse[i];
m_temp_colorGlow = m_colorGlow;
m_temp = m_current;
//
@@ -81,51 +73,47 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
break;
case blinking:
for(i=0; i<4; i++)
m_temp_colorDiffuse[i] = m_bTweeningTowardEndColor ? m_effect_colorDiffuse1 : m_effect_colorDiffuse2;
m_temp.diffuse[i] = m_bTweeningTowardEndColor ? m_effect_colorDiffuse1 : m_effect_colorDiffuse2;
break;
case camelion:
for(i=0; i<4; i++)
m_temp_colorDiffuse[i] = m_effect_colorDiffuse1*m_fPercentBetweenColors + m_effect_colorDiffuse2*(1.0f-m_fPercentBetweenColors);
m_temp.diffuse[i] = m_effect_colorDiffuse1*m_fPercentBetweenColors + m_effect_colorDiffuse2*(1.0f-m_fPercentBetweenColors);
break;
case glowing:
float fCurvedPercent;
fCurvedPercent = sinf( m_fPercentBetweenColors * D3DX_PI );
m_temp_colorGlow = m_effect_colorGlow1*fCurvedPercent + m_effect_colorGlow2*(1.0f-fCurvedPercent);
m_temp.glow = m_effect_colorGlow1*fCurvedPercent + m_effect_colorGlow2*(1.0f-fCurvedPercent);
break;
case wagging:
m_temp_rotation.z = m_fWagRadians * sinf(
m_temp.rotation.z = m_fWagRadians * sinf(
(m_fWagTimer / m_fWagPeriod) // percent through wag
* 2.0f * D3DX_PI );
break;
case spinning:
//ASSERT( false );
// ugh. What was here before!
// BBF update: This was here before (till revision 1.16):
// nothing special needed
// nothing needs to be here
break;
case vibrating:
m_temp_pos.x += m_fVibrationDistance * randomf(-1.0f, 1.0f) * GetZoom();
m_temp_pos.y += m_fVibrationDistance * randomf(-1.0f, 1.0f) * GetZoom();
m_temp.pos.x += m_fVibrationDistance * randomf(-1.0f, 1.0f) * GetZoom();
m_temp.pos.y += m_fVibrationDistance * randomf(-1.0f, 1.0f) * GetZoom();
break;
case flickering:
m_bVisibleThisFrame = !m_bVisibleThisFrame;
if( !m_bVisibleThisFrame )
for(int i=0; i<4; i++)
m_temp_colorDiffuse[i] = D3DXCOLOR(0,0,0,0); // don't draw the frame
m_temp.diffuse[i] = D3DXCOLOR(0,0,0,0); // don't draw the frame
break;
case bouncing:
{
float fPercentThroughBounce = m_fTimeIntoBounce / m_fBouncePeriod;
float fPercentOffset = sinf( fPercentThroughBounce*D3DX_PI );
m_temp_pos += m_vectBounce * fPercentOffset;
m_temp.pos += m_vectBounce * fPercentOffset;
}
break;
case bobbing:
{
float fPercentThroughBounce = m_fTimeIntoBounce / m_fBouncePeriod;
float fPercentOffset = sinf( fPercentThroughBounce*D3DX_PI*2 );
m_temp_pos += m_vectBounce * fPercentOffset;
m_temp.pos += m_vectBounce * fPercentOffset;
}
break;
default:
@@ -135,20 +123,17 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
DISPLAY->Translate( m_temp_pos.x, m_temp_pos.y, m_temp_pos.z ); // offset so that pixels are aligned to texels
DISPLAY->Scale( m_temp_scale.x, m_temp_scale.y, 1 );
DISPLAY->Translate( m_temp.pos.x, m_temp.pos.y, m_temp.pos.z ); // offset so that pixels are aligned to texels
DISPLAY->Scale( m_temp.scale.x, m_temp.scale.y, 1 );
// super slow!
// super slow, and most Actors don't have any rotation
// D3DXMatrixRotationYawPitchRoll( &matTemp, rotation.y, rotation.x, rotation.z ); // add in the rotation
// matNewWorld = matTemp * matNewWorld;
// replace with...
if( m_temp_rotation.x != 0 )
DISPLAY->RotateX( m_temp_rotation.x );
if( m_temp_rotation.y != 0 )
DISPLAY->RotateY( m_temp_rotation.y );
if( m_temp_rotation.z != 0 )
DISPLAY->RotateZ( m_temp_rotation.z );
if( m_temp.rotation.x != 0 ) DISPLAY->RotateX( m_temp.rotation.x );
if( m_temp.rotation.y != 0 ) DISPLAY->RotateY( m_temp.rotation.y );
if( m_temp.rotation.z != 0 ) DISPLAY->RotateZ( m_temp.rotation.z );
}
void Actor::EndDraw()
@@ -192,14 +177,10 @@ void Actor::Update( float fDeltaTime )
m_fWagTimer -= m_fWagPeriod;
break;
case spinning:
float rotation;
rotation = GetRotation();
rotation += m_fSpinSpeed * fDeltaTime;
if( rotation > 2.0f * D3DX_PI )
rotation -= 2.0f * D3DX_PI;
else if( rotation < 0.0f )
rotation += 2.0f * D3DX_PI;
SetRotation( rotation );
m_current.rotation += m_vSpinVelocity;
if( m_current.rotation.x > 1000*D3DX_PI*2 ) m_current.rotation.x -= 1000*D3DX_PI*2;
if( m_current.rotation.y > 1000*D3DX_PI*2 ) m_current.rotation.y -= 1000*D3DX_PI*2;
if( m_current.rotation.z > 1000*D3DX_PI*2 ) m_current.rotation.z -= 1000*D3DX_PI*2;
break;
case vibrating:
break;
@@ -217,115 +198,81 @@ void Actor::Update( float fDeltaTime )
// update tweening
if( m_iNumTweenStates > 0 ) // we are performing a tween
{
TweenState &TS = m_QueuedTweens[0]; // earliest tween
TweenState &TS = m_TweenStates[0]; // earliest tween
TweenInfo &TI = m_TweenInfo[0]; // earliest tween
if( TS.m_fTimeLeftInTween == TS.m_fTweenTime ) // we are just beginning this tween
if( TI.m_fTimeLeftInTween == TI.m_fTweenTime ) // we are just beginning this tween
{
// set the start position
m_start_pos = m_pos;
m_start_rotation = m_rotation;
m_start_scale = m_scale;
for( int i=0; i<4; i++) m_start_colorDiffuse[i] = m_colorDiffuse[i];
m_start_colorGlow = m_colorGlow;
m_start = m_current;
}
TS.m_fTimeLeftInTween -= fDeltaTime;
TI.m_fTimeLeftInTween -= fDeltaTime;
if( TS.m_fTimeLeftInTween <= 0 ) // The tweening is over. Stop the tweening
if( TI.m_fTimeLeftInTween <= 0 ) // The tweening is over. Stop the tweening
{
int i;
m_pos = TS.m_end_pos;
m_scale = TS.m_end_scale;
m_rotation = TS.m_end_rotation;
for(i=0; i<4; i++) m_colorDiffuse[i] = TS.m_end_colorDiffuse[i];
m_colorGlow = TS.m_end_colorGlow;
m_current = TS;
// delete the head tween
for( i=0; i<m_iNumTweenStates-1; i++ )
m_QueuedTweens[i] = m_QueuedTweens[i+1];
for( int i=0; i<m_iNumTweenStates-1; i++ )
{
m_TweenStates[i] = m_TweenStates[i+1];
m_TweenInfo[i] = m_TweenInfo[i+1];
}
m_iNumTweenStates--;
return;
}
else // in the middle of tweening. Recalcute the curent position.
{
const float fPercentThroughTween = 1-(TS.m_fTimeLeftInTween / TS.m_fTweenTime);
float fPercentAlongPath;
const float fPercentThroughTween = 1-(TI.m_fTimeLeftInTween / TI.m_fTweenTime);
// distort the percentage if appropriate
switch( TS.m_TweenType )
float fPercentAlongPath;
switch( TI.m_TweenType )
{
case TWEEN_LINEAR:
fPercentAlongPath = fPercentThroughTween;
break;
case TWEEN_BIAS_BEGIN:
fPercentAlongPath = 1 - (1-fPercentThroughTween) * (1-fPercentThroughTween);
break;
case TWEEN_BIAS_END:
fPercentAlongPath = fPercentThroughTween * fPercentThroughTween;
break;
case TWEEN_BOUNCE_BEGIN:
fPercentAlongPath = 1 - sinf( 1.1f + fPercentThroughTween*(D3DX_PI-1.1f) ) / 0.89f;
break;
case TWEEN_BOUNCE_END:
fPercentAlongPath = sinf( 1.1f + (1-fPercentThroughTween)*(D3DX_PI-1.1f) ) / 0.89f;
break;
case TWEEN_SPRING:
fPercentAlongPath = 1 - cosf( fPercentThroughTween*D3DX_PI*2.5f )/(1+fPercentThroughTween*3);
break;
default:
ASSERT(0);
break;
case TWEEN_LINEAR: fPercentAlongPath = fPercentThroughTween; break;
case TWEEN_BIAS_BEGIN: fPercentAlongPath = 1 - (1-fPercentThroughTween) * (1-fPercentThroughTween); break;
case TWEEN_BIAS_END: fPercentAlongPath = fPercentThroughTween * fPercentThroughTween; break;
case TWEEN_BOUNCE_BEGIN:fPercentAlongPath = 1 - sinf( 1.1f + fPercentThroughTween*(D3DX_PI-1.1f) ) / 0.89f; break;
case TWEEN_BOUNCE_END: fPercentAlongPath = sinf( 1.1f + (1-fPercentThroughTween)*(D3DX_PI-1.1f) ) / 0.89f; break;
case TWEEN_SPRING: fPercentAlongPath = 1 - cosf( fPercentThroughTween*D3DX_PI*2.5f )/(1+fPercentThroughTween*3); break;
default: ASSERT(0);
}
m_pos = m_start_pos + (TS.m_end_pos - m_start_pos )*fPercentAlongPath;
m_scale = m_start_scale + (TS.m_end_scale - m_start_scale )*fPercentAlongPath;
m_rotation = m_start_rotation+ (TS.m_end_rotation - m_start_rotation)*fPercentAlongPath;
for(int i=0; i<4; i++) m_colorDiffuse[i] = m_start_colorDiffuse[i]*(1.0f-fPercentAlongPath) + TS.m_end_colorDiffuse[i]*(fPercentAlongPath);
m_colorGlow = m_start_colorGlow *(1.0f-fPercentAlongPath) + TS.m_end_colorGlow *(fPercentAlongPath);
m_current.pos = m_start.pos + (TS.pos - m_start.pos )*fPercentAlongPath;
m_current.scale = m_start.scale + (TS.scale - m_start.scale )*fPercentAlongPath;
m_current.rotation = m_start.rotation+ (TS.rotation - m_start.rotation)*fPercentAlongPath;
for(int i=0; i<4; i++)
m_current.diffuse[i]= m_start.diffuse[i]*(1.0f-fPercentAlongPath) + TS.diffuse[i]*(fPercentAlongPath);
m_current.glow = m_start.glow *(1.0f-fPercentAlongPath) + TS.glow *(fPercentAlongPath);
}
} // end if m_TweenType != no_tween
}
void Actor::BeginTweening( float time, TweenType tt )
{
StopTweening(); // cancel current tweens
BeginTweeningQueued( time, tt );
}
void Actor::BeginTweeningQueued( float time, TweenType tt )
{
ASSERT( time >= 0 );
// add a new TweenState to the tail, and initialize it
m_iNumTweenStates++;
TweenState &TS = m_QueuedTweens[m_iNumTweenStates-1]; // latest tween state
TweenState &TS = m_TweenStates[m_iNumTweenStates-1]; // latest
TweenInfo &TI = m_TweenInfo[m_iNumTweenStates-1]; // latest
if( m_iNumTweenStates >= 2 ) // if there was already a TS on the stack
{
// initialize the new TS from the last TS in the list
TS = m_QueuedTweens[m_iNumTweenStates-2];
TS = m_TweenStates[m_iNumTweenStates-2];
}
else
{
// This new TS is the only TS.
// Set our tween starting and ending values to the current position.
TS.m_end_pos = m_pos;
TS.m_end_scale = m_scale;
TS.m_end_rotation = m_rotation;
for(int i=0; i<4; i++) TS.m_end_colorDiffuse[i] = m_colorDiffuse[i];
TS.m_end_colorGlow = m_colorGlow;
TS = m_current;
}
TS.m_TweenType = tt;
TS.m_fTweenTime = time;
TS.m_fTimeLeftInTween = time;
TI.m_TweenType = tt;
TI.m_fTweenTime = time;
TI.m_fTimeLeftInTween = time;
}
void Actor::StopTweening()
@@ -334,26 +281,28 @@ void Actor::StopTweening()
}
void Actor::SetTweenX( float x ) { GetLatestTween().m_end_pos.x = x; }
void Actor::SetTweenY( float y ) { GetLatestTween().m_end_pos.y = y; }
void Actor::SetTweenZ( float z ) { GetLatestTween().m_end_pos.z = z; }
void Actor::SetTweenXY( float x, float y ) { GetLatestTween().m_end_pos.x = x; GetLatestTween().m_end_pos.y = y; }
void Actor::SetTweenZoom( float zoom ) { GetLatestTween().m_end_scale.x = zoom; GetLatestTween().m_end_scale.y = zoom; }
void Actor::SetTweenZoomX( float zoom ) { GetLatestTween().m_end_scale.x = zoom; }
void Actor::SetTweenZoomY( float zoom ) { GetLatestTween().m_end_scale.y = zoom; }
void Actor::SetTweenRotationX( float r ) { GetLatestTween().m_end_rotation.x = r; }
void Actor::SetTweenRotationY( float r ) { GetLatestTween().m_end_rotation.y = r; }
void Actor::SetTweenRotationZ( float r ) { GetLatestTween().m_end_rotation.z = r; }
void Actor::SetTweenDiffuseColor( D3DXCOLOR colorDiffuse ) { for(int i=0; i<4; i++) GetLatestTween().m_end_colorDiffuse[i] = colorDiffuse; };
void Actor::SetTweenDiffuseColorUpperLeft( D3DXCOLOR colorDiffuse ) { GetLatestTween().m_end_colorDiffuse[0] = colorDiffuse; };
void Actor::SetTweenDiffuseColorUpperRight( D3DXCOLOR colorDiffuse ) { GetLatestTween().m_end_colorDiffuse[1] = colorDiffuse; };
void Actor::SetTweenDiffuseColorLowerLeft( D3DXCOLOR colorDiffuse ) { GetLatestTween().m_end_colorDiffuse[2] = colorDiffuse; };
void Actor::SetTweenDiffuseColorLowerRight( D3DXCOLOR colorDiffuse ) { GetLatestTween().m_end_colorDiffuse[3] = colorDiffuse; };
void Actor::SetTweenDiffuseColorTopEdge( D3DXCOLOR colorDiffuse ) { GetLatestTween().m_end_colorDiffuse[0] = GetLatestTween().m_end_colorDiffuse[1] = colorDiffuse; };
void Actor::SetTweenDiffuseColorRightEdge( D3DXCOLOR colorDiffuse ) { GetLatestTween().m_end_colorDiffuse[1] = GetLatestTween().m_end_colorDiffuse[3] = colorDiffuse; };
void Actor::SetTweenDiffuseColorBottomEdge( D3DXCOLOR colorDiffuse ) { GetLatestTween().m_end_colorDiffuse[2] = GetLatestTween().m_end_colorDiffuse[3] = colorDiffuse; };
void Actor::SetTweenDiffuseColorLeftEdge( D3DXCOLOR colorDiffuse ) { GetLatestTween().m_end_colorDiffuse[0] = GetLatestTween().m_end_colorDiffuse[2] = colorDiffuse; };
void Actor::SetTweenAddColor( D3DXCOLOR c ) { GetLatestTween().m_end_colorGlow = c; };
void Actor::SetTweenX( float x ) { LatestTween().pos.x = x; }
void Actor::SetTweenY( float y ) { LatestTween().pos.y = y; }
void Actor::SetTweenZ( float z ) { LatestTween().pos.z = z; }
void Actor::SetTweenXY( float x, float y ) { LatestTween().pos.x = x; LatestTween().pos.y = y; }
void Actor::SetTweenZoom( float zoom ) { LatestTween().scale.x = zoom; LatestTween().scale.y = zoom; }
void Actor::SetTweenZoomX( float zoom ) { LatestTween().scale.x = zoom; }
void Actor::SetTweenZoomY( float zoom ) { LatestTween().scale.y = zoom; }
void Actor::SetTweenZoomToWidth( float zoom ) { SetTweenZoomX( zoom/GetUnzoomedWidth() ); }
void Actor::SetTweenZoomToHeight( float zoom ) { SetTweenZoomX( zoom/GetUnzoomedHeight() ); }
void Actor::SetTweenRotationX( float r ) { LatestTween().rotation.x = r; }
void Actor::SetTweenRotationY( float r ) { LatestTween().rotation.y = r; }
void Actor::SetTweenRotationZ( float r ) { LatestTween().rotation.z = r; }
void Actor::SetTweenDiffuse( D3DXCOLOR c ) { for(int i=0; i<4; i++) LatestTween().diffuse[i] = c; };
void Actor::SetTweenDiffuseUpperLeft( D3DXCOLOR c ) { LatestTween().diffuse[0] = c; };
void Actor::SetTweenDiffuseUpperRight( D3DXCOLOR c ) { LatestTween().diffuse[1] = c; };
void Actor::SetTweenDiffuseLowerLeft( D3DXCOLOR c ) { LatestTween().diffuse[2] = c; };
void Actor::SetTweenDiffuseLowerRight( D3DXCOLOR c ) { LatestTween().diffuse[3] = c; };
void Actor::SetTweenDiffuseTopEdge( D3DXCOLOR c ) { LatestTween().diffuse[0] = LatestTween().diffuse[1] = c; };
void Actor::SetTweenDiffuseRightEdge( D3DXCOLOR c ) { LatestTween().diffuse[1] = LatestTween().diffuse[3] = c; };
void Actor::SetTweenDiffuseBottomEdge( D3DXCOLOR c ) { LatestTween().diffuse[2] = LatestTween().diffuse[3] = c; };
void Actor::SetTweenDiffuseLeftEdge( D3DXCOLOR c ) { LatestTween().diffuse[0] = LatestTween().diffuse[2] = c; };
void Actor::SetTweenGlow( D3DXCOLOR c ) { LatestTween().glow = c; };
void Actor::ScaleTo( LPRECT pRect, StretchType st )
@@ -453,10 +402,10 @@ void Actor::SetEffectWagging( float fWagRadians, float fWagPeriod )
m_fWagPeriod = fWagPeriod;
}
void Actor::SetEffectSpinning( float fSpinSpeed /*radians per second*/ )
void Actor::SetEffectSpinning( D3DXVECTOR3 vectRotationVelocity )
{
m_Effect = spinning;
m_fSpinSpeed = fSpinSpeed;
m_vSpinVelocity = vectRotationVelocity;
}
void Actor::SetEffectVibrating( float fVibrationDistance )
@@ -488,4 +437,72 @@ void Actor::SetEffectBobbing( D3DXVECTOR3 vectBob, float fPeriod )
m_fBouncePeriod = fPeriod;
m_fTimeIntoBounce = 0;
}
}
void GetFadeFlagsFromString( CString sFadeString,
bool& linear, bool& accelerate, bool& bounce, bool& spring,
bool& foldx, bool& foldy, bool& fade, bool& zoombig, bool& zoomsmall, bool& spinx, bool& spiny, bool& spinz, bool& ghost,
bool& left, bool& right, bool& top, bool& bottom )
{
sFadeString.MakeLower();
foldx = -1!=sFadeString.Find("foldx");
foldy = -1!=sFadeString.Find("foldy");
fade = -1!=sFadeString.Find("fade");
zoombig = -1!=sFadeString.Find("zoombig");
zoomsmall = -1!=sFadeString.Find("zoomsmall");
spinx = -1!=sFadeString.Find("spinx");
spiny = -1!=sFadeString.Find("spiny");
spinz = -1!=sFadeString.Find("spinz");
ghost = -1!=sFadeString.Find("ghost");
linear = -1!=sFadeString.Find("linear");
accelerate = -1!=sFadeString.Find("accelerate");
bounce = -1!=sFadeString.Find("bounce");
spring = -1!=sFadeString.Find("spring");
left = -1!=sFadeString.Find("left");
right = -1!=sFadeString.Find("right");
top = -1!=sFadeString.Find("top");
bottom = -1!=sFadeString.Find("bottom");
}
void Actor::Fade( float fSleepSeconds, CString sFadeString, float fFadeSeconds, bool bOnToScreenOrOffOfScreen )
{
sFadeString.MakeLower();
TweenState original = m_current;
TweenState mod = m_current;
#define CONTAINS(needle) (-1!=sFadeString.Find(needle))
TweenType tt;
if( CONTAINS("linear") ) tt = TWEEN_LINEAR;
else if( CONTAINS("accelerate") ) tt = TWEEN_BIAS_BEGIN;
else if( CONTAINS("bounce") ) tt = TWEEN_BOUNCE_END;
else if( CONTAINS("spring") ) tt = TWEEN_SPRING;
else tt = TWEEN_LINEAR;
mod.pos.x += (CONTAINS("left")?-SCREEN_WIDTH:0) + (CONTAINS("right")?+SCREEN_HEIGHT:0);
mod.pos.y += (CONTAINS("top")?-SCREEN_WIDTH:0) + (CONTAINS("bottom")?+SCREEN_HEIGHT:0);
mod.pos.z += 0;
mod.rotation.x += (CONTAINS("spinx")?-D3DX_PI*2:0);
mod.rotation.y += (CONTAINS("spiny")?-D3DX_PI*2:0);
mod.rotation.z += (CONTAINS("spinz")?-D3DX_PI*2:0);
mod.scale.x *= (CONTAINS("foldx")?0:1) * (CONTAINS("zoomx")?3:1);
mod.scale.y *= (CONTAINS("foldy")?0:1) * (CONTAINS("zoomy")?3:1);
for( int i=0; i<4; i++ )
{
mod.diffuse[i] = GetDiffuse();
mod.diffuse[i].a *= CONTAINS("fade")?0:1;
}
mod.glow = GetGlow();
mod.glow.a *= CONTAINS("glow")?1:0;
m_current = bOnToScreenOrOffOfScreen ? original : mod;
BeginTweening( fSleepSeconds );
BeginTweening( fFadeSeconds, tt );
LatestTween() = bOnToScreenOrOffOfScreen ? mod : original;
}
+93 -74
View File
@@ -36,6 +36,7 @@ public:
bouncing, bobbing
};
// let subclasses override
virtual void Restore() {};
virtual void Invalidate() {};
@@ -46,55 +47,60 @@ public:
virtual void EndDraw(); // pops transform from world matrix stack
virtual void Update( float fDeltaTime );
virtual float GetX() { return m_pos.x; };
virtual float GetY() { return m_pos.y; };
virtual float GetZ() { return m_pos.z; };
virtual void SetX( float x ) { m_pos.x = x; };
virtual void SetY( float y ) { m_pos.y = y; };
virtual void SetZ( float z ) { m_pos.z = z; };
virtual void SetXY( float x, float y ) { m_pos.x = x; m_pos.y = y; };
virtual float GetX() { return m_current.pos.x; };
virtual float GetY() { return m_current.pos.y; };
virtual float GetZ() { return m_current.pos.z; };
virtual void SetX( float x ) { m_current.pos.x = x; };
virtual void SetY( float y ) { m_current.pos.y = y; };
virtual void SetZ( float z ) { m_current.pos.z = z; };
virtual void SetXY( float x, float y ) { m_current.pos.x = x; m_current.pos.y = y; };
// height and width vary depending on zoom
virtual float GetUnzoomedWidth() { return m_size.x; }
virtual float GetUnzoomedHeight() { return m_size.y; }
virtual float GetZoomedWidth() { return m_size.x * m_scale.x; }
virtual float GetZoomedHeight() { return m_size.y * m_scale.y; }
virtual void SetWidth( float width ){ m_size.x = width; }
virtual void SetHeight( float height ){ m_size.y = height; }
virtual float GetZoomedWidth() { return m_size.x * m_current.scale.x; }
virtual float GetZoomedHeight() { return m_size.y * m_current.scale.y; }
// virtual void SetWidth( float width ) { m_current.size.x = width; }
// virtual void SetHeight( float height ) { m_current.size.y = height; }
virtual float GetZoom() { return m_scale.x; }
virtual float GetZoomX() { return m_scale.x; }
virtual float GetZoomY() { return m_scale.y; }
virtual void SetZoom( float zoom ) { m_scale.x = zoom; m_scale.y = zoom; }
virtual void SetZoomX( float zoom ){ m_scale.x = zoom; }
virtual void SetZoomY( float zoom ){ m_scale.y = zoom; }
virtual float GetZoom() { return m_current.scale.x; } // not accurate in some cases
virtual float GetZoomX() { return m_current.scale.x; }
virtual float GetZoomY() { return m_current.scale.y; }
virtual void SetZoom( float zoom ) { m_current.scale.x = zoom; m_current.scale.y = zoom; }
virtual void SetZoomX( float zoom ) { m_current.scale.x = zoom; }
virtual void SetZoomY( float zoom ) { m_current.scale.y = zoom; }
virtual void ZoomToWidth( float zoom ) { SetZoomX( zoom / GetUnzoomedWidth() ); }
virtual void ZoomToHeight( float zoom ){ SetZoomY( zoom / GetUnzoomedHeight() ); }
virtual float GetRotation() { return m_rotation.z; }
virtual float GetRotationX() { return m_rotation.x; }
virtual float GetRotationY() { return m_rotation.y; }
virtual void SetRotation( float rot ) { m_rotation.z = rot; }
virtual void SetRotationX( float rot ) { m_rotation.x = rot; }
virtual void SetRotationY( float rot ) { m_rotation.y = rot; }
virtual float GetRotation() { return m_current.rotation.z; }
virtual float GetRotationX() { return m_current.rotation.x; }
virtual float GetRotationY() { return m_current.rotation.y; }
virtual float GetRotationZ() { return m_current.rotation.z; }
virtual void SetRotation( float rot ) { m_current.rotation.z = rot; }
virtual void SetRotationX( float rot ) { m_current.rotation.x = rot; }
virtual void SetRotationY( float rot ) { m_current.rotation.y = rot; }
virtual void SetRotationZ( float rot ) { m_current.rotation.z = rot; }
virtual void SetDiffuseColor( D3DXCOLOR colorDiffuse ) { for(int i=0; i<4; i++) m_colorDiffuse[i] = colorDiffuse; };
virtual void SetDiffuseColors( int i, D3DXCOLOR colorDiffuse ) { m_colorDiffuse[i] = colorDiffuse; };
virtual void SetDiffuseColorUpperLeft( D3DXCOLOR colorDiffuse ) { m_colorDiffuse[0] = colorDiffuse; };
virtual void SetDiffuseColorUpperRight( D3DXCOLOR colorDiffuse ) { m_colorDiffuse[1] = colorDiffuse; };
virtual void SetDiffuseColorLowerLeft( D3DXCOLOR colorDiffuse ) { m_colorDiffuse[2] = colorDiffuse; };
virtual void SetDiffuseColorLowerRight( D3DXCOLOR colorDiffuse ) { m_colorDiffuse[3] = colorDiffuse; };
virtual void SetDiffuseColorTopEdge( D3DXCOLOR colorDiffuse ) { m_colorDiffuse[0] = m_colorDiffuse[1] = colorDiffuse; };
virtual void SetDiffuseColorRightEdge( D3DXCOLOR colorDiffuse ) { m_colorDiffuse[1] = m_colorDiffuse[3] = colorDiffuse; };
virtual void SetDiffuseColorBottomEdge( D3DXCOLOR colorDiffuse ) { m_colorDiffuse[2] = m_colorDiffuse[3] = colorDiffuse; };
virtual void SetDiffuseColorLeftEdge( D3DXCOLOR colorDiffuse ) { m_colorDiffuse[0] = m_colorDiffuse[2] = colorDiffuse; };
virtual D3DXCOLOR GetDiffuseColor() { return m_colorDiffuse[0]; };
virtual D3DXCOLOR GetDiffuseColors( int i ) { return m_colorDiffuse[i]; };
virtual void SetGlowColor( D3DXCOLOR colorGlow ) { m_colorGlow = colorGlow; };
virtual D3DXCOLOR GetGlowColor() { return m_colorGlow; };
virtual void SetDiffuse( D3DXCOLOR c ) { for(int i=0; i<4; i++) m_current.diffuse[i] = c; };
virtual void SetDiffuses( int i, D3DXCOLOR c ) { m_current.diffuse[i] = c; };
virtual void SetDiffuseUpperLeft( D3DXCOLOR c ) { m_current.diffuse[0] = c; };
virtual void SetDiffuseUpperRight( D3DXCOLOR c ) { m_current.diffuse[1] = c; };
virtual void SetDiffuseLowerLeft( D3DXCOLOR c ) { m_current.diffuse[2] = c; };
virtual void SetDiffuseLowerRight( D3DXCOLOR c ) { m_current.diffuse[3] = c; };
virtual void SetDiffuseTopEdge( D3DXCOLOR c ) { m_current.diffuse[0] = m_current.diffuse[1] = c; };
virtual void SetDiffuseRightEdge( D3DXCOLOR c ) { m_current.diffuse[1] = m_current.diffuse[3] = c; };
virtual void SetDiffuseBottomEdge( D3DXCOLOR c ) { m_current.diffuse[2] = m_current.diffuse[3] = c; };
virtual void SetDiffuseLeftEdge( D3DXCOLOR c ) { m_current.diffuse[0] = m_current.diffuse[2] = c; };
virtual D3DXCOLOR GetDiffuse() { return m_current.diffuse[0]; };
virtual D3DXCOLOR GetDiffuses( int i ) { return m_current.diffuse[i]; };
virtual void SetGlow( D3DXCOLOR c ) { m_current.glow = c; };
virtual D3DXCOLOR GetGlow() { return m_current.glow; };
virtual void BeginTweening( float time, TweenType tt = TWEEN_LINEAR );
virtual void BeginTweeningQueued( float time, TweenType tt = TWEEN_LINEAR );
// Tweening is now queued by default
// virtual void BeginTweening( float time, TweenType tt = TWEEN_LINEAR );
virtual void StopTweening();
virtual void SetTweenX( float x );
virtual void SetTweenY( float y );
@@ -103,19 +109,21 @@ public:
virtual void SetTweenZoom( float zoom );
virtual void SetTweenZoomX( float zoom );
virtual void SetTweenZoomY( float zoom );
virtual void SetTweenZoomToWidth( float zoom );
virtual void SetTweenZoomToHeight( float zoom );
virtual void SetTweenRotationX( float r );
virtual void SetTweenRotationY( float r );
virtual void SetTweenRotationZ( float r );
virtual void SetTweenDiffuseColor( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseColorUpperLeft( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseColorUpperRight( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseColorLowerLeft( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseColorLowerRight( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseColorTopEdge( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseColorRightEdge( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseColorBottomEdge( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseColorLeftEdge( D3DXCOLOR colorDiffuse );
virtual void SetTweenAddColor( D3DXCOLOR c );
virtual void SetTweenDiffuse( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseUpperLeft( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseUpperRight( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseLowerLeft( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseLowerRight( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseTopEdge( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseRightEdge( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseBottomEdge( D3DXCOLOR colorDiffuse );
virtual void SetTweenDiffuseLeftEdge( D3DXCOLOR colorDiffuse );
virtual void SetTweenGlow( D3DXCOLOR c );
@@ -151,7 +159,7 @@ public:
D3DXCOLOR Color2 = D3DXCOLOR(1,1,1,0.8f) );
void SetEffectWagging( float fWagRadians = 0.2,
float fWagPeriod = 2.0 );
void SetEffectSpinning( float fRadsPerSpeed = 2.0 );
void SetEffectSpinning( D3DXVECTOR3 vectRotationVelocity );
void SetEffectVibrating( float fVibrationDistance = 5.0 );
void SetEffectFlickering();
void SetEffectBouncing( D3DXVECTOR3 vectBounceDir, float fPeriod );
@@ -168,63 +176,74 @@ public:
void SetBlendModeNormal() { m_bBlendAdd = false; };
void Fade( float fSleepSeconds, CString sFadeString, float fFadeSeconds, bool bOnToScreenOrOffOfScreen );
void FadeOntoScreen( float fSleepSeconds, CString sFadeString, float fFadeSeconds ) { Fade(fSleepSeconds,sFadeString,fFadeSeconds,false); };
void FadeOffScreen( float fSleepSeconds, CString sFadeString, float fFadeSeconds ) { Fade(fSleepSeconds,sFadeString,fFadeSeconds,true); };
protected:
/*
D3DXVECTOR2 m_size; // width, height
D3DXVECTOR3 m_pos; // X-Y coordinate of where the center point will appear on screen
D3DXVECTOR3 m_rotation; // X, Y, and Z m_rotation
D3DXVECTOR2 m_scale; // X and Y zooming
D3DXCOLOR m_colorDiffuse[4]; // 4 corner colors - left to right, top to bottom
D3DXCOLOR m_colorGlow;
*/
//
// Stuff for tweening
//
D3DXVECTOR3 m_start_pos;
D3DXVECTOR3 m_start_rotation;
D3DXVECTOR2 m_start_scale;
D3DXCOLOR m_start_colorDiffuse[4];
D3DXCOLOR m_start_colorGlow;
struct TweenState
{
// start and end position for tweening
D3DXVECTOR3 m_end_pos;
D3DXVECTOR3 m_end_rotation;
D3DXVECTOR2 m_end_scale;
D3DXCOLOR m_end_colorDiffuse[4];
D3DXCOLOR m_end_colorGlow;
D3DXVECTOR3 pos;
D3DXVECTOR3 rotation;
D3DXVECTOR2 scale;
D3DXCOLOR diffuse[4];
D3DXCOLOR glow;
void Init()
{
pos = D3DXVECTOR3( 0, 0, 0 );
rotation = D3DXVECTOR3( 0, 0, 0 );
scale = D3DXVECTOR2( 1, 1 );
for(int i=0; i<4; i++)
diffuse[i] = D3DXCOLOR( 1, 1, 1, 1 );
glow = D3DXCOLOR( 1, 1, 1, 0 );
};
};
struct TweenInfo
{
// counters for tweening
TweenType m_TweenType;
float m_fTimeLeftInTween; // how far into the tween are we?
float m_fTweenTime; // seconds between Start and End positions/zooms
TweenState()
{
m_end_pos = D3DXVECTOR3( 0, 0, 0 );
m_end_rotation = D3DXVECTOR3( 0, 0, 0 );
m_end_scale = D3DXVECTOR2( 1, 1 );
for(int i=0; i<4; i++) m_end_colorDiffuse[i]= D3DXCOLOR( 1, 1, 1, 1 );
m_end_colorGlow = D3DXCOLOR( 0, 0, 0, 0 );
};
};
TweenState m_QueuedTweens[MAX_TWEEN_STATES];
D3DXVECTOR2 m_size;
TweenState m_current;
TweenState m_start;
TweenState m_TweenStates[MAX_TWEEN_STATES];
TweenInfo m_TweenInfo[MAX_TWEEN_STATES];
int m_iNumTweenStates;
TweenState& GetLatestTween() { ASSERT(m_iNumTweenStates>0 && m_iNumTweenStates<MAX_TWEEN_STATES); return m_QueuedTweens[m_iNumTweenStates-1]; };
TweenState& LatestTween() { ASSERT(m_iNumTweenStates>0 && m_iNumTweenStates<MAX_TWEEN_STATES); return m_TweenStates[m_iNumTweenStates-1]; };
//
// Temporary variables that are filled just before drawing
//
D3DXVECTOR2 m_temp_size;
TweenState m_temp;
/* D3DXVECTOR2 m_temp_size;
D3DXVECTOR3 m_temp_pos;
D3DXVECTOR3 m_temp_rotation;
D3DXVECTOR2 m_temp_scale;
D3DXCOLOR m_temp_colorDiffuse[4];
D3DXCOLOR m_temp_colorGlow;
*/
//
// Stuff for alignment
@@ -254,7 +273,7 @@ protected:
float m_fWagTimer; // num of seconds into this wag
// spinning:
float m_fSpinSpeed; // radians per second
D3DXVECTOR3 m_vSpinVelocity; // delta per second
// vibrating:
float m_fVibrationDistance;
+4 -4
View File
@@ -12,7 +12,7 @@
#include "ActorFrame.h"
void ActorFrame::AddSubActor( Actor* pActor)
void ActorFrame::AddChild( Actor* pActor)
{
ASSERT( pActor );
ASSERT( (void*)pActor != (void*)0xC0000005 );
@@ -41,11 +41,11 @@ void ActorFrame::Update( float fDeltaTime )
}
void ActorFrame::SetDiffuseColor( D3DXCOLOR c )
void ActorFrame::SetDiffuse( D3DXCOLOR c )
{
Actor::SetDiffuseColor( c );
Actor::SetDiffuse( c );
// set all sub-Actors
for( int i=0; i<m_SubActors.GetSize(); i++ )
m_SubActors[i]->SetDiffuseColor(c );
m_SubActors[i]->SetDiffuse(c );
}
+4 -5
View File
@@ -19,16 +19,15 @@
class ActorFrame : public Actor
{
protected:
CArray<Actor*,Actor*> m_SubActors;
public:
void AddSubActor( Actor* pActor);
virtual void AddChild( Actor* pActor);
virtual ~ActorFrame() { }
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();
virtual void SetDiffuseColor( D3DXCOLOR c );
virtual void SetDiffuse( D3DXCOLOR c );
protected:
CArray<Actor*,Actor*> m_SubActors;
};
+21 -3
View File
@@ -47,10 +47,28 @@ float ArrowGetYOffset( PlayerNumber pn, float fNoteBeat )
float ArrowGetXPos( PlayerNumber pn, int iColNum, float fYPos )
{
float fSongBeat = GAMESTATE->m_fSongBeat;
float fPixelOffsetFromCenter = GAMESTATE->GetCurrentStyleDef()->m_ColumnInfo[PLAYER_1][iColNum].fXOffset;
float fPixelOffsetFromCenter = GAMESTATE->GetCurrentStyleDef()->m_ColumnInfo[pn][iColNum].fXOffset;
if( GAMESTATE->m_PlayerOptions[pn].m_EffectType & PlayerOptions::EFFECT_DRUNK )
fPixelOffsetFromCenter += cosf( TIMER->GetTimeSinceStart() + iColNum*0.2f + fYPos*6/SCREEN_HEIGHT) * ARROW_SIZE*0.5f;
if( GAMESTATE->m_PlayerOptions[pn].m_EffectType & PlayerOptions::EFFECT_FLIP )
fPixelOffsetFromCenter = -fPixelOffsetFromCenter;
if( GAMESTATE->m_PlayerOptions[pn].m_EffectType & PlayerOptions::EFFECT_TORNADO )
{
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
float fMaxX = -100000, fMinX = +100000;
for( int i=0; i<pStyleDef->m_iColsPerPlayer; i++ )
{
fMaxX = max( fMaxX, pStyleDef->m_ColumnInfo[pn][i].fXOffset );
fMinX = min( fMinX, pStyleDef->m_ColumnInfo[pn][i].fXOffset );
}
float fPositionBetween = SCALE( fPixelOffsetFromCenter, fMinX, fMaxX, -1, 1 );
float fRads = acosf( fPositionBetween );
fRads += fYPos * 6 / SCREEN_HEIGHT;
fPixelOffsetFromCenter = SCALE( cosf(fRads), -1, 1, fMinX, fMaxX );
}
return fPixelOffsetFromCenter;
}
@@ -97,7 +115,7 @@ float ArrowGetPercentVisible( PlayerNumber pn, float fYPos )
fAlpha = 0;
break;
case PlayerOptions::APPEARANCE_BLINK: // this is an Ez2dancer Appearance Mode
fAlpha = sinf( TIMER->GetTimeSinceStart() );
fAlpha = sinf( TIMER->GetTimeSinceStart()*3 );
fAlpha = froundf( fAlpha, 0.3333f );
break;
default:
@@ -119,5 +137,5 @@ float ArrowGetAlpha( PlayerNumber pn, float fYPos )
float ArrowGetGlow( PlayerNumber pn, float fYPos )
{
const float fDistFromHalf = fabsf( ArrowGetPercentVisible(pn,fYPos) - 0.5f );
return SCALE( fDistFromHalf, 0, 0.5f, 1, 0 );
return SCALE( fDistFromHalf, 0, 0.5f, 1.3f, 0 );
}
+22 -20
View File
@@ -31,7 +31,7 @@ BPMDisplay::BPMDisplay()
m_fTimeLeftInState = 0;
m_bExtraStage = GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2();
m_rectFrame.SetDiffuseColor( D3DXCOLOR(0,0,0,0.3f) );
m_rectFrame.SetDiffuse( D3DXCOLOR(0,0,0,0.3f) );
m_rectFrame.SetZoomX( 120 );
m_rectFrame.SetZoomY( 40 );
@@ -41,8 +41,8 @@ BPMDisplay::BPMDisplay()
//m_textBPM.SetSequence( ssprintf("999") );
m_textBPM.SetXY( -23, 0 );
m_textBPM.SetZoom( 1.0f );
m_textBPM.SetDiffuseColorTopEdge( NORMAL_COLOR_TOP ); // yellow
m_textBPM.SetDiffuseColorBottomEdge( NORMAL_COLOR_BOTTOM ); // orange
m_textBPM.SetDiffuseTopEdge( NORMAL_COLOR_TOP ); // yellow
m_textBPM.SetDiffuseBottomEdge( NORMAL_COLOR_BOTTOM ); // orange
m_textLabel.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textLabel.TurnShadowOff();
@@ -50,12 +50,12 @@ BPMDisplay::BPMDisplay()
m_textLabel.SetText( "BPM" );
m_textLabel.SetZoom( 0.7f );
m_textLabel.SetZoomX( 0.5f );
m_textLabel.SetDiffuseColorTopEdge( NORMAL_COLOR_TOP ); // yellow
m_textLabel.SetDiffuseColorBottomEdge( NORMAL_COLOR_BOTTOM ); // orange
m_textLabel.SetDiffuseTopEdge( NORMAL_COLOR_TOP ); // yellow
m_textLabel.SetDiffuseBottomEdge( NORMAL_COLOR_BOTTOM ); // orange
//this->AddSubActor( &m_rectFrame );
this->AddSubActor( &m_textBPM );
this->AddSubActor( &m_textLabel );
//this->AddChild( &m_rectFrame );
this->AddChild( &m_textBPM );
this->AddChild( &m_textLabel );
}
@@ -110,29 +110,31 @@ void BPMDisplay::SetBPMRange( float fLowBPM, float fHighBPM )
m_CountingState = counting_up;
m_fTimeLeftInState = 1;
m_textBPM.StopTweening();
m_textLabel.StopTweening();
m_textBPM.BeginTweening(0.5f);
m_textLabel.BeginTweening(0.5f);
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
{
m_textBPM.SetTweenDiffuseColorTopEdge( EXTRA_COLOR_TOP );
m_textBPM.SetTweenDiffuseColorBottomEdge( EXTRA_COLOR_BOTTOM );
m_textLabel.SetTweenDiffuseColorTopEdge( EXTRA_COLOR_TOP );
m_textLabel.SetTweenDiffuseColorBottomEdge( EXTRA_COLOR_BOTTOM );
m_textBPM.SetTweenDiffuseTopEdge( EXTRA_COLOR_TOP );
m_textBPM.SetTweenDiffuseBottomEdge( EXTRA_COLOR_BOTTOM );
m_textLabel.SetTweenDiffuseTopEdge( EXTRA_COLOR_TOP );
m_textLabel.SetTweenDiffuseBottomEdge( EXTRA_COLOR_BOTTOM );
}
else if( m_fLowBPM != m_fHighBPM )
{
m_textBPM.SetTweenDiffuseColorTopEdge( CHANGE_COLOR_TOP );
m_textBPM.SetTweenDiffuseColorBottomEdge( CHANGE_COLOR_BOTTOM );
m_textLabel.SetTweenDiffuseColorTopEdge( CHANGE_COLOR_TOP );
m_textLabel.SetTweenDiffuseColorBottomEdge( CHANGE_COLOR_BOTTOM );
m_textBPM.SetTweenDiffuseTopEdge( CHANGE_COLOR_TOP );
m_textBPM.SetTweenDiffuseBottomEdge( CHANGE_COLOR_BOTTOM );
m_textLabel.SetTweenDiffuseTopEdge( CHANGE_COLOR_TOP );
m_textLabel.SetTweenDiffuseBottomEdge( CHANGE_COLOR_BOTTOM );
}
else
{
m_textBPM.SetTweenDiffuseColorTopEdge( NORMAL_COLOR_TOP );
m_textBPM.SetTweenDiffuseColorBottomEdge( NORMAL_COLOR_BOTTOM );
m_textLabel.SetTweenDiffuseColorTopEdge( NORMAL_COLOR_TOP );
m_textLabel.SetTweenDiffuseColorBottomEdge( NORMAL_COLOR_BOTTOM );
m_textBPM.SetTweenDiffuseTopEdge( NORMAL_COLOR_TOP );
m_textBPM.SetTweenDiffuseBottomEdge( NORMAL_COLOR_BOTTOM );
m_textLabel.SetTweenDiffuseTopEdge( NORMAL_COLOR_TOP );
m_textLabel.SetTweenDiffuseBottomEdge( NORMAL_COLOR_BOTTOM );
}
}
+7 -7
View File
@@ -73,16 +73,16 @@ Background::Background()
m_sprDangerBackground.StretchTo( RECT_BACKGROUND );
m_quadBGBrightness.StretchTo( RECT_BACKGROUND );
m_quadBGBrightness.SetDiffuseColor( D3DXCOLOR(0,0,0,1-PREFSMAN->m_fBGBrightness) );
m_quadBGBrightness.SetDiffuse( D3DXCOLOR(0,0,0,1-PREFSMAN->m_fBGBrightness) );
m_quadBorder[0].StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,LEFT_EDGE,SCREEN_BOTTOM) );
m_quadBorder[0].SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_quadBorder[0].SetDiffuse( D3DXCOLOR(0,0,0,1) );
m_quadBorder[1].StretchTo( CRect(LEFT_EDGE,SCREEN_TOP,RIGHT_EDGE,TOP_EDGE) );
m_quadBorder[1].SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_quadBorder[1].SetDiffuse( D3DXCOLOR(0,0,0,1) );
m_quadBorder[2].StretchTo( CRect(RIGHT_EDGE,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
m_quadBorder[2].SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_quadBorder[2].SetDiffuse( D3DXCOLOR(0,0,0,1) );
m_quadBorder[3].StretchTo( CRect(LEFT_EDGE,BOTTOM_EDGE,RIGHT_EDGE,SCREEN_BOTTOM) );
m_quadBorder[3].SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_quadBorder[3].SetDiffuse( D3DXCOLOR(0,0,0,1) );
}
Background::~Background()
@@ -410,12 +410,12 @@ bool Background::DangerVisible()
void Background::FadeIn()
{
m_quadBGBrightness.BeginTweening( 0.5f );
m_quadBGBrightness.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,1-PREFSMAN->m_fBGBrightness) );
m_quadBGBrightness.SetTweenDiffuse( D3DXCOLOR(0,0,0,1-PREFSMAN->m_fBGBrightness) );
}
void Background::FadeOut()
{
m_quadBGBrightness.BeginTweening( 0.5f );
m_quadBGBrightness.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,1-0.5f) );
m_quadBGBrightness.SetTweenDiffuse( D3DXCOLOR(0,0,0,1-0.5f) );
}
+3 -3
View File
@@ -23,15 +23,15 @@ BannerWithFrame::BannerWithFrame()
m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","evaluation banner frame") );
m_Banner.SetCroppedSize( m_sprBannerFrame.GetUnzoomedWidth()-6, m_sprBannerFrame.GetUnzoomedHeight()-6 );
this->AddSubActor( &m_Banner );
this->AddSubActor( &m_sprBannerFrame );
this->AddChild( &m_Banner );
this->AddChild( &m_sprBannerFrame );
for( int p=0; p<NUM_PLAYERS; p++ )
{
float fX = (m_sprBannerFrame.GetUnzoomedWidth()/2-26) * (p==PLAYER_1 ? -1 : 1 );
float fY = m_sprBannerFrame.GetUnzoomedHeight()/2-26;
m_Icon[p].SetX( fX );
m_Icon[p].SetY( fY );
this->AddSubActor( &m_Icon[p] );
this->AddChild( &m_Icon[p] );
}
}
+10 -8
View File
@@ -90,6 +90,8 @@ void BitmapText::SetText( CString sText )
{
//LOG->Trace( "BitmapText::SetText()" );
ASSERT( m_pFont );
if( m_pFont->m_bCapitalsOnly )
sText.MakeUpper();
@@ -270,7 +272,7 @@ void BitmapText::DrawPrimitives()
DISPLAY->SetBlendModeNormal();
if( m_temp_colorDiffuse[0].a != 0 )
if( m_temp.diffuse[0].a != 0 )
{
//////////////////////
// render the shadow
@@ -280,7 +282,7 @@ void BitmapText::DrawPrimitives()
DISPLAY->PushMatrix();
DISPLAY->TranslateLocal( m_fShadowLength, m_fShadowLength, 0 ); // shift by 5 units
DWORD dwColor = D3DXCOLOR(0,0,0,0.5f*m_temp_colorDiffuse[0].a); // semi-transparent black
DWORD dwColor = D3DXCOLOR(0,0,0,0.5f*m_temp.diffuse[0].a); // semi-transparent black
int i;
for( i=0; i<iNumV; i++ )
@@ -310,10 +312,10 @@ void BitmapText::DrawPrimitives()
{
for( int i=0; i<iNumV; i+=4 )
{
v[i+0].color = m_temp_colorDiffuse[0]; // top left
v[i+1].color = m_temp_colorDiffuse[1]; // top right
v[i+2].color = m_temp_colorDiffuse[2]; // bottom left
v[i+3].color = m_temp_colorDiffuse[3]; // bottom right
v[i+0].color = m_temp.diffuse[0]; // top left
v[i+1].color = m_temp.diffuse[1]; // top right
v[i+2].color = m_temp.diffuse[2]; // bottom left
v[i+3].color = m_temp.diffuse[3]; // bottom right
}
}
@@ -324,13 +326,13 @@ void BitmapText::DrawPrimitives()
//////////////////////
// render the glow pass
//////////////////////
if( m_temp_colorGlow.a != 0 )
if( m_temp.glow.a != 0 )
{
DISPLAY->SetColorDiffuse();
int i;
for( i=0; i<iNumV; i++ )
v[i].color = m_temp_colorGlow;
v[i].color = m_temp.glow;
for( i=0; i<iNumV; i+=4 )
DISPLAY->AddQuad( &v[i] );
}
+10 -10
View File
@@ -21,8 +21,8 @@ void Combo::Reset()
{
m_iCurCombo = m_iMaxCombo = m_iCurComboOfPerfects = 0;
m_textComboNumber.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
m_sprCombo.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
m_textComboNumber.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
m_sprCombo.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
}
Combo::Combo()
@@ -40,8 +40,8 @@ Combo::Combo()
m_textComboNumber.SetHorizAlign( Actor::align_right );
m_textComboNumber.SetX( 0 );
this->AddSubActor( &m_textComboNumber );
this->AddSubActor( &m_sprCombo );
this->AddChild( &m_textComboNumber );
this->AddChild( &m_sprCombo );
}
@@ -89,13 +89,13 @@ void Combo::UpdateScore( TapNoteScore score )
if( m_iCurCombo <= 4 )
{
m_textComboNumber.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
m_sprCombo.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
m_textComboNumber.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
m_sprCombo.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
}
else
{
m_textComboNumber.SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // visible
m_sprCombo.SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // visible
m_textComboNumber.SetDiffuse( D3DXCOLOR(1,1,1,1) ); // visible
m_sprCombo.SetDiffuse( D3DXCOLOR(1,1,1,1) ); // visible
m_textComboNumber.SetText( ssprintf("%d", m_iCurCombo) );
float fNewZoom = min( 0.5f + m_iCurCombo/800.0f, 1.0f );
@@ -115,8 +115,8 @@ void Combo::UpdateScore( TapNoteScore score )
m_iCurCombo = 0;
m_textComboNumber.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
m_sprCombo.SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // invisible
m_textComboNumber.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
m_sprCombo.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
break;
default:
ASSERT(0);
+9 -9
View File
@@ -39,26 +39,26 @@ const float CONTENTS_BAR_HEIGHT = 44;
CourseContentDisplay::CourseContentDisplay()
{
m_sprFrame.Load( THEME->GetPathTo("Graphics","select course content bar") );
this->AddSubActor( &m_sprFrame );
this->AddChild( &m_sprFrame );
m_textNumber.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
m_textNumber.SetXY( NUMBER_X, NUMBER_Y );
m_textNumber.TurnShadowOff();
this->AddSubActor( &m_textNumber );
this->AddChild( &m_textNumber );
m_TextBanner.SetXY( TEXT_BANNER_X, TEXT_BANNER_Y );
this->AddSubActor( &m_TextBanner );
this->AddChild( &m_TextBanner );
m_textFoot.LoadFromFont( THEME->GetPathTo("Fonts","meter") );
m_textFoot.SetXY( FOOT_X, FOOT_Y );
m_textFoot.TurnShadowOff();
this->AddSubActor( &m_textFoot );
this->AddChild( &m_textFoot );
m_textDifficultyNumber.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textDifficultyNumber.SetXY( DIFFICULTY_X, DIFFICULTY_Y );
m_textDifficultyNumber.SetZoom( 0.8f );
m_textDifficultyNumber.TurnShadowOff();
this->AddSubActor( &m_textDifficultyNumber );
this->AddChild( &m_textDifficultyNumber );
}
void CourseContentDisplay::Load( int iNum, Song* pSong, Notes* pNotes )
@@ -69,13 +69,13 @@ void CourseContentDisplay::Load( int iNum, Song* pSong, Notes* pNotes )
D3DXCOLOR colorDifficulty = DifficultyClassToColor( pNotes->m_DifficultyClass );
m_TextBanner.LoadFromSong( pSong );
m_TextBanner.SetDiffuseColor( colorGroup );
m_TextBanner.SetDiffuse( colorGroup );
m_textFoot.SetText( "1" );
m_textFoot.SetDiffuseColor( colorDifficulty );
m_textFoot.SetDiffuse( colorDifficulty );
m_textDifficultyNumber.SetText( ssprintf("%d", pNotes->m_iMeter) );
m_textDifficultyNumber.SetDiffuseColor( colorDifficulty );
m_textDifficultyNumber.SetDiffuse( colorDifficulty );
}
@@ -83,7 +83,7 @@ void CourseContentDisplay::Load( int iNum, Song* pSong, Notes* pNotes )
CourseContentsFrame::CourseContentsFrame()
{
m_iNumContents = 0;
m_quad.SetDiffuseColor( D3DXCOLOR(0,0,0,0) ); // invisible, since we want to write only to the Zbuffer
m_quad.SetDiffuse( D3DXCOLOR(0,0,0,0) ); // invisible, since we want to write only to the Zbuffer
m_fTimeUntilScroll = 0;
m_fItemAtTopOfList = 0;
+2 -4
View File
@@ -58,8 +58,7 @@ void CroppedSprite::CropToSize( float fWidth, float fHeight )
};
Sprite::SetCustomImageCoords( fCustomImageCoords );
SetWidth( m_fCropWidth );
SetHeight( m_fCropHeight );
m_size = D3DXVECTOR2( m_fCropWidth, m_fCropHeight );
SetZoom( 1 );
}
else // this is probably a background graphic or something not intended to be a CroppedSprite
@@ -102,8 +101,7 @@ void CroppedSprite::CropToSize( float fWidth, float fHeight )
1 - fPercentageToCutOffEachSide );
SetCustomImageRect( fCustomImageCoords );
}
SetWidth( m_fCropWidth );
SetHeight( m_fCropHeight );
m_size = D3DXVECTOR2( m_fCropWidth, m_fCropHeight );
SetZoom( 1 );
}
+2 -2
View File
@@ -31,7 +31,7 @@ public:
{
if( pNotes != NULL )
{
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
SetDiffuse( D3DXCOLOR(1,1,1,1) );
switch( pNotes->m_DifficultyClass )
{
case CLASS_EASY: SetState( 0 ); break;
@@ -41,7 +41,7 @@ public:
}
else
{
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
SetDiffuse( D3DXCOLOR(1,1,1,0) );
SetState( 0 );
}
};
+5 -4
View File
@@ -22,8 +22,8 @@
FadingBanner::FadingBanner()
{
// these guys get loaded on the Set* methods
this->AddSubActor( &m_Banner[0] );
this->AddSubActor( &m_Banner[1] );
this->AddChild( &m_Banner[0] );
this->AddChild( &m_Banner[1] );
}
void FadingBanner::SetCroppedSize( float fWidth, float fHeight )
@@ -47,9 +47,10 @@ void FadingBanner::BeforeChange()
m_Banner[1].SetScrolling( m_Banner[0].IsScrolling() );
}
m_Banner[1].SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_Banner[1].SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_Banner[1].StopTweening();
m_Banner[1].BeginTweening( 0.25f ); // fade out
m_Banner[1].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_Banner[1].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
}
+2 -2
View File
@@ -24,7 +24,7 @@ FocusingSprite::FocusingSprite()
{
for( int i=0; i<3; i++ )
{
this->AddSubActor( &m_sprites[i] );
this->AddChild( &m_sprites[i] );
}
m_fPercentBlurred = 1.0f;
@@ -64,7 +64,7 @@ void FocusingSprite::DrawPrimitives()
{
if( m_BlurState != invisible )
{
SetDiffuseColor( D3DXCOLOR(1,1,1,0.5f-m_fPercentBlurred/2) );
SetDiffuse( D3DXCOLOR(1,1,1,0.5f-m_fPercentBlurred/2) );
m_sprites[0].SetXY( m_fPercentBlurred*BLUR_DISTANCE*2, m_fPercentBlurred*BLUR_DISTANCE );
m_sprites[1].SetXY( -m_fPercentBlurred*BLUR_DISTANCE*2, -m_fPercentBlurred*BLUR_DISTANCE );
+3 -3
View File
@@ -28,14 +28,14 @@ void FootMeter::SetFromNotes( Notes* pNotes )
{
if( pNotes != NULL )
{
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
SetDiffuse( D3DXCOLOR(1,1,1,1) );
SetNumFeet( pNotes->m_iMeter );
if( pNotes->m_iMeter >= 10 )
this->SetEffectGlowing();
else
this->SetEffectNone();
SetDiffuseColor( pNotes->GetColor() );
SetDiffuse( pNotes->GetColor() );
this->StopTweening();
this->SetZoom( 1.1f );
this->BeginTweening( 0.3f, TWEEN_BOUNCE_BEGIN );
@@ -44,7 +44,7 @@ void FootMeter::SetFromNotes( Notes* pNotes )
else
{
this->SetEffectNone();
SetDiffuseColor( D3DXCOLOR(0.8f,0.8f,0.8f,1) );
SetDiffuse( D3DXCOLOR(0.8f,0.8f,0.8f,1) );
SetNumFeet( 0 );
}
}
+6 -6
View File
@@ -50,7 +50,7 @@ GhostArrow::GhostArrow()
g_colorBooEnd = COLOR_BOO_END;
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
SetDiffuse( D3DXCOLOR(1,1,1,0) );
}
void GhostArrow::Update( float fDeltaTime )
@@ -78,14 +78,14 @@ void GhostArrow::Step( TapNoteScore score )
}
StopTweening();
SetDiffuseColor( colorStart );
SetDiffuse( colorStart );
SetState( 0 );
SetZoom( g_fZoomStart );
BeginTweeningQueued( g_fShowSeconds );
BeginTweening( g_fShowSeconds );
SetTweenZoom( g_fZoomEnd );
SetTweenDiffuseColor( colorEnd );
SetTweenDiffuse( colorEnd );
BeginTweeningQueued( 0.0001f ); // snap to invisible
SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
BeginTweening( 0.0001f ); // snap to invisible
SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
}
+6 -6
View File
@@ -52,7 +52,7 @@ GhostArrowBright::GhostArrowBright()
g_colorBooEnd2 = COLOR_BOO_END;
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
SetDiffuse( D3DXCOLOR(1,1,1,0) );
}
void GhostArrowBright::Update( float fDeltaTime )
@@ -80,14 +80,14 @@ void GhostArrowBright::Step( TapNoteScore score )
}
StopTweening();
SetDiffuseColor( colorStart );
SetDiffuse( colorStart );
SetState( 0 );
SetZoom( g_fZoomStart2 );
BeginTweeningQueued( g_fShowSeconds2 );
BeginTweening( g_fShowSeconds2 );
SetTweenZoom( g_fZoomEnd2 );
SetTweenDiffuseColor( colorEnd );
SetTweenDiffuse( colorEnd );
BeginTweeningQueued( 0.0001f ); // snap to invisible
SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
BeginTweening( 0.0001f ); // snap to invisible
SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
}
+3 -3
View File
@@ -72,7 +72,7 @@ void GradeDisplay::SetGrade( PlayerNumber p, Grade g )
m_bDoScrolling = false;
StopUsingCustomCoords();
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
SetDiffuse( 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;
@@ -85,7 +85,7 @@ void GradeDisplay::SetGrade( PlayerNumber p, Grade g )
case GRADE_C: SetState( 4*iNumCols+p ); break;
case GRADE_D: SetState( 5*iNumCols+p ); break;
case GRADE_E: SetState( 6*iNumCols+p ); break;
case GRADE_NO_DATA: SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); break;
case GRADE_NO_DATA: SetDiffuse( D3DXCOLOR(1,1,1,0) ); break;
default: ASSERT(0);
}
};
@@ -98,7 +98,7 @@ void GradeDisplay::SpinAndSettleOn( Grade g )
m_bDoScrolling = true;
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
SetDiffuse( D3DXCOLOR(1,1,1,1) );
int iFrameNo;
switch( g )
+11 -11
View File
@@ -24,7 +24,7 @@ const float RADAR_EDGE_WIDTH = 3;
GrooveRadar::GrooveRadar()
{
this->AddSubActor( &m_GrooveRadarValueMap );
this->AddChild( &m_GrooveRadarValueMap );
for( int c=0; c<NUM_RADAR_CATEGORIES; c++ )
{
@@ -50,7 +50,7 @@ GrooveRadar::GrooveRadar()
m_sprRadarLabels[c].StopAnimating();
m_sprRadarLabels[c].SetState( c );
m_sprRadarLabels[c].SetXY( fX, fY );
this->AddSubActor( &m_sprRadarLabels[c] );
this->AddChild( &m_sprRadarLabels[c] );
}
}
@@ -61,18 +61,18 @@ void GrooveRadar::TweenOnScreen()
float fOriginalX = m_sprRadarLabels[c].GetX();
m_sprRadarLabels[c].SetX( fOriginalX - 100 );
m_sprRadarLabels[c].SetZoom( 1.5f );
m_sprRadarLabels[c].SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprRadarLabels[c].SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprRadarLabels[c].BeginTweeningQueued( 0.6f+0.2f*c ); // sleep
m_sprRadarLabels[c].BeginTweening( 0.6f+0.2f*c ); // sleep
m_sprRadarLabels[c].BeginTweeningQueued( 0.1f ); // begin fading on screen
m_sprRadarLabels[c].SetTweenAddColor( D3DXCOLOR(1,1,1,1) );
m_sprRadarLabels[c].BeginTweening( 0.1f ); // begin fading on screen
m_sprRadarLabels[c].SetTweenGlow( D3DXCOLOR(1,1,1,1) );
m_sprRadarLabels[c].BeginTweeningQueued( 0.3f, Actor::TWEEN_BIAS_BEGIN ); // fly to the right
m_sprRadarLabels[c].BeginTweening( 0.3f, Actor::TWEEN_BIAS_BEGIN ); // fly to the right
m_sprRadarLabels[c].SetTweenX( fOriginalX );
m_sprRadarLabels[c].SetTweenZoom( 1 );
m_sprRadarLabels[c].SetTweenAddColor( D3DXCOLOR(1,1,1,0) );
m_sprRadarLabels[c].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprRadarLabels[c].SetTweenGlow( D3DXCOLOR(1,1,1,0) );
m_sprRadarLabels[c].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
}
m_GrooveRadarValueMap.TweenOnScreen();
}
@@ -83,7 +83,7 @@ void GrooveRadar::TweenOffScreen()
{
m_sprRadarLabels[c].StopTweening();
m_sprRadarLabels[c].BeginTweening( 0.2f );
m_sprRadarLabels[c].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprRadarLabels[c].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
}
m_GrooveRadarValueMap.TweenOffScreen();
}
@@ -91,7 +91,7 @@ void GrooveRadar::TweenOffScreen()
GrooveRadar::GrooveRadarValueMap::GrooveRadarValueMap()
{
m_sprRadarBase.Load( THEME->GetPathTo("Graphics","select music radar base") );
this->AddSubActor( &m_sprRadarBase );
this->AddChild( &m_sprRadarBase );
for( int p=0; p<NUM_PLAYERS; p++ )
{
+15 -13
View File
@@ -24,8 +24,8 @@ void GroupList::DoneAddingGroups()
{
m_sprButton[i].Load( THEME->GetPathTo("Graphics","select group button") );
m_sprButton[i].SetXY( BUTTON_X, BUTTON_START_Y + i*BUTTON_SPACING_Y );
this->AddSubActor( &m_sprButton[i] );
this->AddSubActor( &m_screenLabels[i] );
this->AddChild( &m_sprButton[i] );
this->AddChild( &m_screenLabels[i] );
}
for( i=0; i<min(m_textLabels.GetSize(), MAX_GROUPS_ONSCREEN); i++ )
@@ -52,7 +52,7 @@ void GroupList::SetLabels()
if( m_iTop+i == 0 ) m_screenLabels[i].TurnRainbowOn();
else {
m_screenLabels[i].TurnRainbowOff();
m_screenLabels[i].SetDiffuseColor( SONGMAN->GetGroupColor(label) );
m_screenLabels[i].SetDiffuse( SONGMAN->GetGroupColor(label) );
}
}
}
@@ -75,10 +75,12 @@ void GroupList::AfterChange()
{
int iSel = m_iSelection-m_iTop;
m_sprButton[iSel].StopTweening();
m_sprButton[iSel].BeginTweening( 0.2f );
m_sprButton[iSel].SetTweenX( BUTTON_SELECTED_X );
m_sprButton[iSel].SetEffectGlowing();
m_screenLabels[iSel].StopTweening();
m_screenLabels[iSel].BeginTweening( 0.2f );
m_screenLabels[iSel].SetTweenX( BUTTON_SELECTED_X );
m_screenLabels[iSel].SetEffectGlowing();
@@ -144,13 +146,13 @@ void GroupList::TweenOnScreen()
for( int i=0; i<min(m_textLabels.GetSize(), MAX_GROUPS_ONSCREEN); i++ )
{
m_sprButton[i].SetX( BUTTON_X+400 );
m_sprButton[i].BeginTweeningQueued( 0.1f*i, TWEEN_BOUNCE_END );
m_sprButton[i].BeginTweeningQueued( 0.2f, TWEEN_BOUNCE_END );
m_sprButton[i].BeginTweening( 0.1f*i, TWEEN_BOUNCE_END );
m_sprButton[i].BeginTweening( 0.2f, TWEEN_BOUNCE_END );
m_sprButton[i].SetTweenX( BUTTON_X );
m_screenLabels[i].SetX( BUTTON_X+400 );
m_screenLabels[i].BeginTweeningQueued( 0.1f*i, TWEEN_BOUNCE_END );
m_screenLabels[i].BeginTweeningQueued( 0.2f, TWEEN_BOUNCE_END );
m_screenLabels[i].BeginTweening( 0.1f*i, TWEEN_BOUNCE_END );
m_screenLabels[i].BeginTweening( 0.2f, TWEEN_BOUNCE_END );
m_screenLabels[i].SetTweenX( BUTTON_X );
}
}
@@ -160,17 +162,17 @@ void GroupList::TweenOffScreen()
for( int i=0; i<min(m_textLabels.GetSize(), MAX_GROUPS_ONSCREEN); i++ )
{
if( i == m_iSelection )
m_sprButton[i].BeginTweeningQueued( 1.0f, TWEEN_BOUNCE_BEGIN );
m_sprButton[i].BeginTweening( 1.0f, TWEEN_BOUNCE_BEGIN );
else
m_sprButton[i].BeginTweeningQueued( 0.1f*i, TWEEN_BOUNCE_BEGIN );
m_sprButton[i].BeginTweeningQueued( 0.2f, TWEEN_BOUNCE_BEGIN );
m_sprButton[i].BeginTweening( 0.1f*i, TWEEN_BOUNCE_BEGIN );
m_sprButton[i].BeginTweening( 0.2f, TWEEN_BOUNCE_BEGIN );
m_sprButton[i].SetTweenX( BUTTON_X+400 );
if( i == m_iSelection )
m_screenLabels[i].BeginTweeningQueued( 1.0f, TWEEN_BOUNCE_BEGIN );
m_screenLabels[i].BeginTweening( 1.0f, TWEEN_BOUNCE_BEGIN );
else
m_screenLabels[i].BeginTweeningQueued( 0.1f*i, TWEEN_BOUNCE_BEGIN );
m_screenLabels[i].BeginTweeningQueued( 0.2f, TWEEN_BOUNCE_BEGIN );
m_screenLabels[i].BeginTweening( 0.1f*i, TWEEN_BOUNCE_BEGIN );
m_screenLabels[i].BeginTweening( 0.2f, TWEEN_BOUNCE_BEGIN );
m_screenLabels[i].SetTweenX( BUTTON_X+400 );
}
+2 -2
View File
@@ -25,7 +25,7 @@ HoldGhostArrow::HoldGhostArrow()
m_fHeatLevel = 0;
// LoadFromSpriteFile( THEME->GetPathTo(GRAPHIC_HOLD_GHOST_ARROW) );
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
SetDiffuse( D3DXCOLOR(1,1,1,1) );
// SetZoom( 1.1f );
}
@@ -53,7 +53,7 @@ void HoldGhostArrow::Update( float fDeltaTime )
else
SetZoom( 1 );
SetDiffuseColor( D3DXCOLOR(1,1,1,m_fHeatLevel*3) );
SetDiffuse( D3DXCOLOR(1,1,1,m_fHeatLevel*3) );
m_bWasSteppedOnLastFrame = false; // reset for next frame
}
+1 -1
View File
@@ -29,7 +29,7 @@ HoldJudgement::HoldJudgement()
m_sprJudgement.Load( THEME->GetPathTo("Graphics","gameplay hold judgement") );
m_sprJudgement.StopAnimating();
m_sprJudgement.TurnShadowOn();
this->AddSubActor( &m_sprJudgement );
this->AddChild( &m_sprJudgement );
}
void HoldJudgement::Update( float fDeltaTime )
+1 -1
View File
@@ -25,7 +25,7 @@ Judgement::Judgement()
m_sprJudgement.Load( THEME->GetPathTo("Graphics","gameplay judgement") );
m_sprJudgement.StopAnimating();
m_sprJudgement.TurnShadowOn();
this->AddSubActor( &m_sprJudgement );
this->AddChild( &m_sprJudgement );
}
void Judgement::Update( float fDeltaTime )
+10 -10
View File
@@ -45,21 +45,21 @@ LifeMeterBar::LifeMeterBar()
m_iMeterHeight = METER_HEIGHT;
m_fDangerThreshold = DANGER_THRESHOLD;
m_quadBlackBackground.SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_quadBlackBackground.SetDiffuse( D3DXCOLOR(0,0,0,1) );
m_quadBlackBackground.SetZoomX( (float)m_iMeterWidth );
m_quadBlackBackground.SetZoomY( (float)m_iMeterHeight );
m_frame.AddSubActor( &m_quadBlackBackground );
m_frame.AddChild( &m_quadBlackBackground );
m_sprStreamNormal.Load( THEME->GetPathTo("Graphics",(GAMESTATE->IsExtraStage()||GAMESTATE->IsExtraStage2())?"gameplay extra lifemeter stream normal":"gameplay lifemeter stream normal") );
m_frame.AddSubActor( &m_sprStreamNormal );
m_frame.AddChild( &m_sprStreamNormal );
m_sprStreamHot.Load( THEME->GetPathTo("Graphics",(GAMESTATE->IsExtraStage()||GAMESTATE->IsExtraStage2())?"gameplay extra lifemeter stream hot":"gameplay lifemeter stream hot") );
m_frame.AddSubActor( &m_sprStreamHot );
m_frame.AddChild( &m_sprStreamHot );
m_sprFrame.Load( THEME->GetPathTo("Graphics","gameplay lifemeter bar") );
m_frame.AddSubActor( &m_sprFrame );
m_frame.AddChild( &m_sprFrame );
this->AddSubActor( &m_frame );
this->AddChild( &m_frame );
ResetBarVelocity();
}
@@ -204,18 +204,18 @@ void LifeMeterBar::DrawPrimitives()
m_sprStreamHot.StretchTo( &rectSize );
m_sprStreamHot.SetCustomTextureRect( frectCustomTexCoords );
m_sprStreamHot.SetDiffuseColor( D3DXCOLOR(1,1,1,m_fHotAlpha) );
m_sprStreamHot.SetDiffuse( D3DXCOLOR(1,1,1,m_fHotAlpha) );
float fPercentRed = (m_fTrailingLifePercentage<m_fDangerThreshold) ? sinf( TIMER->GetTimeSinceStart()*D3DX_PI*4 )/2+0.5f : 0;
m_quadBlackBackground.SetDiffuseColor( D3DXCOLOR(fPercentRed*0.8f,0,0,1) );
m_quadBlackBackground.SetDiffuse( D3DXCOLOR(fPercentRed*0.8f,0,0,1) );
if( !GAMESTATE->IsPlayerEnabled(m_PlayerNumber) )
{
m_sprStreamNormal.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprStreamHot.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprStreamNormal.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprStreamHot.SetDiffuse( D3DXCOLOR(1,1,1,0) );
}
ActorFrame::DrawPrimitives();
+6 -6
View File
@@ -46,26 +46,26 @@ void LifeMeterBattery::Load( PlayerNumber pn )
bool bPlayerEnabled = GAMESTATE->IsPlayerEnabled(pn);
m_sprFrame.Load( THEME->GetPathTo("Graphics","gameplay lifemeter oni") );
this->AddSubActor( &m_sprFrame );
this->AddChild( &m_sprFrame );
m_sprBattery.Load( THEME->GetPathTo("Graphics","gameplay lifemeter battery") );
m_sprBattery.StopAnimating();
if( bPlayerEnabled )
this->AddSubActor( &m_sprBattery );
this->AddChild( &m_sprBattery );
m_textNumLives.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textNumLives.SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // pink
m_textNumLives.SetDiffuse( D3DXCOLOR(1,1,1,1) ); // pink
m_textNumLives.SetZoom( 1.1f );
m_textNumLives.TurnShadowOff();
if( bPlayerEnabled )
this->AddSubActor( &m_textNumLives );
this->AddChild( &m_textNumLives );
m_textPercent.LoadFromFont( THEME->GetPathTo("Fonts","score numbers") );
m_textPercent.TurnShadowOff();
m_textPercent.SetZoom( 0.7f );
m_textPercent.SetText( "00.0" );
if( bPlayerEnabled )
this->AddSubActor( &m_textPercent );
this->AddChild( &m_textPercent );
@@ -77,7 +77,7 @@ void LifeMeterBattery::Load( PlayerNumber pn )
m_textPercent.SetX( PERCENT_X[pn] );
m_textPercent.SetY( PERCENT_Y );
m_textPercent.SetDiffuseColor( PlayerToColor(pn) ); // light blue
m_textPercent.SetDiffuse( PlayerToColor(pn) ); // light blue
Refresh();
}
+16 -16
View File
@@ -37,20 +37,20 @@
MenuElements::MenuElements()
{
this->AddSubActor( &m_sprTopEdge );
this->AddSubActor( &m_sprStyleIcon );
this->AddSubActor( &m_MenuTimer );
this->AddSubActor( &m_sprBottomEdge );
this->AddSubActor( &m_sprBG );
this->AddSubActor( &m_textHelp );
this->AddChild( &m_sprTopEdge );
this->AddChild( &m_sprStyleIcon );
this->AddChild( &m_MenuTimer );
this->AddChild( &m_sprBottomEdge );
this->AddChild( &m_sprBG );
this->AddChild( &m_textHelp );
m_KeepAlive.SetOpened();
this->AddSubActor( &m_KeepAlive );
this->AddChild( &m_KeepAlive );
m_Wipe.SetOpened();
this->AddSubActor( &m_Wipe );
this->AddChild( &m_Wipe );
this->AddSubActor( &m_Invisible );
this->AddChild( &m_Invisible );
}
void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString sHelpText, bool bTimerEnabled, int iTimerSeconds )
@@ -69,7 +69,7 @@ void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString
m_sprStyleIcon.StopAnimating();
m_sprStyleIcon.SetXY( STYLE_ICON_X, STYLE_ICON_Y );
if( GAMESTATE->m_CurStyle == STYLE_NONE )
m_sprStyleIcon.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprStyleIcon.SetDiffuse( D3DXCOLOR(1,1,1,0) );
else
{
int iRowNum = GetStyleIndexRelativeToGame( GAMESTATE->m_CurGame, GAMESTATE->m_CurStyle );
@@ -160,9 +160,9 @@ void MenuElements::TweenBottomLayerOnScreen()
m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 );
m_sprBottomEdge.SetTweenY( fOriginalY );
m_sprBG.SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_sprBG.SetDiffuse( D3DXCOLOR(0,0,0,1) );
m_sprBG.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 );
m_sprBG.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprBG.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
}
void MenuElements::TweenBottomLayerOffScreen()
@@ -171,11 +171,11 @@ void MenuElements::TweenBottomLayerOffScreen()
m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 );
m_sprBottomEdge.SetTweenY( fOriginalY + 100 );
m_sprBG.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprBG.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprBG.StopTweening();
m_sprBG.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME*3/2.0f ); // sleep
m_sprBG.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME/2 ); // fade
m_sprBG.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_sprBG.BeginTweening( MENU_ELEMENTS_TWEEN_TIME*3/2.0f ); // sleep
m_sprBG.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); // fade
m_sprBG.SetTweenDiffuse( D3DXCOLOR(0,0,0,1) );
}
void MenuElements::TweenOnScreenFromBlack( ScreenMessage smSendWhenDone )
+2 -2
View File
@@ -28,12 +28,12 @@ MenuTimer::MenuTimer()
m_textDigit1.LoadFromFont( THEME->GetPathTo("Fonts","timer numbers") );
m_textDigit1.TurnShadowOff();
m_textDigit1.SetXY( -18, 0 );
this->AddSubActor( &m_textDigit1 );
this->AddChild( &m_textDigit1 );
m_textDigit2.LoadFromFont( THEME->GetPathTo("Fonts","timer numbers") );
m_textDigit2.TurnShadowOff();
m_textDigit2.SetXY( +18, 0 );
this->AddSubActor( &m_textDigit2 );
this->AddChild( &m_textDigit2 );
m_soundBeep.Load( THEME->GetPathTo("Sounds","menu timer") );
}
+12 -19
View File
@@ -39,8 +39,8 @@ public:
virtual float GetUnzoomedHeight() { return m_sprites[0].GetUnzoomedHeight(); }
virtual float GetZoomedWidth() { return m_sprites[0].GetZoomedWidth(); }
virtual float GetZoomedHeight() { return m_sprites[0].GetZoomedHeight(); }
virtual void SetWidth( float width ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetWidth(width); }
virtual void SetHeight( float height ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetHeight(height); }
virtual void ZoomToWidth( float width ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].ZoomToWidth(width); }
virtual void ZoomToHeight( float height ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].ZoomToHeight(height); }
virtual float GetZoom() { return m_sprites[0].GetZoom(); }
virtual float GetZoomX() { return m_sprites[0].GetZoomX(); }
@@ -56,33 +56,26 @@ public:
virtual void SetRotationX( float rot ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetRotationX(rot); }
virtual void SetRotationY( float rot ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetRotationY(rot); }
virtual void SetDiffuseColor( D3DXCOLOR c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetDiffuseColor(c); };
virtual D3DXCOLOR GetDiffuseColor() { return m_sprites[0].GetDiffuseColor(); };
virtual void SetGlowColor( D3DXCOLOR c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetGlowColor(c); };
virtual D3DXCOLOR GetGlowColor() { return m_sprites[0].GetGlowColor(); };
virtual void SetDiffuse( D3DXCOLOR c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetDiffuse(c); };
virtual D3DXCOLOR GetDiffuse() { return m_sprites[0].GetDiffuse(); };
virtual void SetGlow( D3DXCOLOR c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetGlow(c); };
virtual D3DXCOLOR GetGlow() { return m_sprites[0].GetGlow(); };
// THE BLUR IS MADE BY DELAYING THE TWEENS
// The blur is made by delaying the tweens
virtual void BeginBlurredTweening( float time, TweenType tt = TWEEN_LINEAR )
{
for(int i=0; i<NUM_BLUR_GHOSTS; i++)
{
m_sprites[i].BeginTweeningQueued( i*0.1f+0.01f, tt ); // sleep
m_sprites[i].BeginTweeningQueued( time, tt ); // original tween
m_sprites[i].BeginTweening( i*0.1f+0.01f, tt ); // sleep
m_sprites[i].BeginTweening( time, tt ); // original tween
}
};
virtual void BeginTweening( float time, TweenType tt = TWEEN_LINEAR )
{
for(int i=0; i<NUM_BLUR_GHOSTS; i++)
{
m_sprites[i].BeginTweeningQueued( time, tt ); // original tween
}
};
virtual void BeginTweeningQueued( float time, TweenType tt = TWEEN_LINEAR )
{
for(int i=0; i<NUM_BLUR_GHOSTS; i++)
{
m_sprites[i].BeginTweeningQueued( time, tt ); // original tween
m_sprites[i].BeginTweening( time, tt ); // original tween
}
};
virtual void StopTweening() { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].StopTweening(); };
@@ -96,8 +89,8 @@ public:
virtual void SetTweenRotationX( float r ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenRotationX(r); };
virtual void SetTweenRotationY( float r ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenRotationY(r); };
virtual void SetTweenRotationZ( float r ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenRotationZ(r); };
virtual void SetTweenDiffuseColor( D3DXCOLOR c ){ for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenDiffuseColor(c); };
virtual void SetTweenAddColor( D3DXCOLOR c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenAddColor(c); };
virtual void SetTweenDiffuse( D3DXCOLOR c ){ for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenDiffuse(c); };
virtual void SetTweenGlow( D3DXCOLOR c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenGlow(c); };
void ScaleToCover( LPRECT rect ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].ScaleToCover(rect); };
+8 -8
View File
@@ -23,7 +23,7 @@ MusicList::MusicList()
m_textTitles[i].SetVertAlign( Actor::align_top );
m_textTitles[i].SetZoom( 0.5f );
m_textTitles[i].SetShadowLength( 2 );
this->AddSubActor( &m_textTitles[i] );
this->AddChild( &m_textTitles[i] );
}
}
@@ -84,10 +84,10 @@ void MusicList::TweenOnScreen()
{
for( int i=0; i<TITLES_COLUMNS; i++ )
{
m_textTitles[i].SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textTitles[i].BeginTweeningQueued( 0.5f );
m_textTitles[i].BeginTweeningQueued( 0.5f );
m_textTitles[i].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textTitles[i].SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_textTitles[i].BeginTweening( 0.5f );
m_textTitles[i].BeginTweening( 0.5f );
m_textTitles[i].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
}
}
@@ -95,8 +95,8 @@ void MusicList::TweenOffScreen()
{
for( int i=0; i<TITLES_COLUMNS; i++ )
{
m_textTitles[i].BeginTweeningQueued( 0.7f );
m_textTitles[i].BeginTweeningQueued( 0.5f );
m_textTitles[i].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textTitles[i].BeginTweening( 0.7f );
m_textTitles[i].BeginTweening( 0.5f );
m_textTitles[i].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
}
}
+2 -2
View File
@@ -31,13 +31,13 @@ void MusicStatusDisplay::SetType( IconType type )
{
m_type = type;
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
SetDiffuse( D3DXCOLOR(1,1,1,1) );
switch( type )
{
case none:
SetEffectNone();
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
SetDiffuse( D3DXCOLOR(1,1,1,0) );
break;
case easy:
SetEffectNone();
+26 -29
View File
@@ -148,7 +148,7 @@ void WheelItemDisplay::LoadFromWheelItemData( WheelItemData* pWID )
CString sDisplayName = SONGMAN->ShortenGroupName(m_sSectionName);
m_textSectionName.SetZoom( 1 );
m_textSectionName.SetText( sDisplayName );
m_textSectionName.SetDiffuseColor( m_color );
m_textSectionName.SetDiffuse( m_color );
m_textSectionName.TurnRainbowOff();
float fSourcePixelWidth = (float)m_textSectionName.GetWidestLineWidthInSourcePixels();
@@ -161,7 +161,7 @@ void WheelItemDisplay::LoadFromWheelItemData( WheelItemData* pWID )
{
m_TextBanner.LoadFromSong( m_pSong );
D3DXCOLOR color = m_color;
m_TextBanner.SetDiffuseColor( color );
m_TextBanner.SetDiffuse( color );
m_MusicStatusDisplay.SetType( m_IconType );
RefreshGrades();
}
@@ -174,7 +174,7 @@ void WheelItemDisplay::LoadFromWheelItemData( WheelItemData* pWID )
{
m_textCourse.SetZoom( 1 );
m_textCourse.SetText( m_pCourse->m_sName );
m_textCourse.SetDiffuseColor( m_color );
m_textCourse.SetDiffuse( m_color );
m_textCourse.TurnRainbowOff();
float fSourcePixelWidth = (float)m_textCourse.GetWidestLineWidthInSourcePixels();
@@ -195,7 +195,7 @@ void WheelItemDisplay::RefreshGrades()
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
{
m_GradeDisplay[p].SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_GradeDisplay[p].SetDiffuse( D3DXCOLOR(1,1,1,0) );
continue;
}
@@ -204,7 +204,7 @@ void WheelItemDisplay::RefreshGrades()
const DifficultyClass dc = GAMESTATE->m_PreferredDifficultyClass[p];
const Grade grade = m_pSong->GetGradeForDifficultyClass( GAMESTATE->GetCurrentStyleDef()->m_NotesType, dc );
m_GradeDisplay[p].SetGrade( (PlayerNumber)p, grade );
//m_GradeDisplay[p].SetDiffuseColor( PlayerToColor((PlayerNumber)p) );
//m_GradeDisplay[p].SetDiffuse( PlayerToColor((PlayerNumber)p) );
}
else // this is a section display
{
@@ -268,11 +268,11 @@ void WheelItemDisplay::DrawPrimitives()
m_GradeDisplay[p].Draw();
if( m_fPercentGray > 0 )
{
m_sprSongBar.SetGlowColor( D3DXCOLOR(0,0,0,m_fPercentGray) );
m_sprSongBar.SetDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_sprSongBar.SetGlow( D3DXCOLOR(0,0,0,m_fPercentGray) );
m_sprSongBar.SetDiffuse( D3DXCOLOR(0,0,0,0) );
m_sprSongBar.Draw();
m_sprSongBar.SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_sprSongBar.SetGlowColor( D3DXCOLOR(0,0,0,0) );
m_sprSongBar.SetDiffuse( D3DXCOLOR(0,0,0,1) );
m_sprSongBar.SetGlow( D3DXCOLOR(0,0,0,0) );
}
break;
case TYPE_COURSE:
@@ -294,13 +294,13 @@ MusicWheel::MusicWheel()
m_sprSelectionOverlay.Load( THEME->GetPathTo("Graphics","select music song highlight") );
m_sprSelectionOverlay.SetXY( 0, 0 );
m_sprSelectionOverlay.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprSelectionOverlay.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprSelectionOverlay.SetEffectGlowing( 1.0f, D3DXCOLOR(1,1,1,0.4f), D3DXCOLOR(1,1,1,1) );
AddSubActor( &m_sprSelectionOverlay );
AddChild( &m_sprSelectionOverlay );
m_ScrollBar.SetX( SCROLL_BAR_X );
m_ScrollBar.SetBarHeight( SCROLL_BAR_HEIGHT );
this->AddSubActor( &m_ScrollBar );
this->AddChild( &m_ScrollBar );
m_soundChangeMusic.Load( THEME->GetPathTo("Sounds","select music change music"), 16 );
m_soundChangeSort.Load( THEME->GetPathTo("Sounds","select music change sort") );
@@ -477,6 +477,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
// break;
case SORT_MOST_PLAYED:
SortSongPointerArrayByMostPlayed( arraySongs );
arraySongs.SetSize( 30 );
break;
default:
ASSERT(0); // unhandled SortOrder
@@ -862,7 +863,7 @@ void MusicWheel::Update( float fDeltaTime )
// m_soundExpand.Play();
// m_WheelState = STATE_ROULETTE_SPINNING;
// m_SortOrder = SORT_GROUP;
// m_MusicSortDisplay.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
// m_MusicSortDisplay.SetDiffuse( D3DXCOLOR(1,1,1,0) );
// m_MusicSortDisplay.SetEffectNone();
// BuildWheelItemDatas( m_WheelItemDatas[SORT_GROUP], SORT_GROUP, true );
// }
@@ -1172,17 +1173,15 @@ void MusicWheel::TweenOnScreen()
fX = GetBannerX(0);
fY = GetBannerY(0);
m_sprSelectionOverlay.SetXY( fX+320, fY );
m_sprSelectionOverlay.BeginTweeningQueued( 0.5f ); // sleep
m_sprSelectionOverlay.BeginTweeningQueued( 0.4f, Actor::TWEEN_BIAS_BEGIN );
m_sprSelectionOverlay.BeginTweening( 0.5f ); // sleep
m_sprSelectionOverlay.BeginTweening( 0.4f, Actor::TWEEN_BIAS_BEGIN );
m_sprSelectionOverlay.SetTweenX( fX );
m_ScrollBar.SetX( SCROLL_BAR_X+30 );
m_ScrollBar.BeginTweeningQueued( 0.7f ); // sleep
m_ScrollBar.BeginTweeningQueued( 0.2f, Actor::TWEEN_BIAS_BEGIN );
m_ScrollBar.BeginTweening( 0.7f ); // sleep
m_ScrollBar.BeginTweening( 0.2f, Actor::TWEEN_BIAS_BEGIN );
m_ScrollBar.SetTweenX( SCROLL_BAR_X );
for( int i=0; i<NUM_WHEEL_ITEMS_TO_DRAW; i++ )
{
WheelItemDisplay& display = m_WheelItemDisplays[i];
@@ -1191,8 +1190,8 @@ void MusicWheel::TweenOnScreen()
float fX = GetBannerX(fThisBannerPositionOffsetFromSelection);
float fY = GetBannerY(fThisBannerPositionOffsetFromSelection);
display.SetXY( fX+320, fY );
display.BeginTweeningQueued( 0.04f*i ); // sleep
display.BeginTweeningQueued( 0.2f, Actor::TWEEN_BIAS_BEGIN );
display.BeginTweening( 0.04f*i ); // sleep
display.BeginTweening( 0.2f, Actor::TWEEN_BIAS_BEGIN );
display.SetTweenX( fX );
}
}
@@ -1207,16 +1206,14 @@ void MusicWheel::TweenOffScreen()
fX = GetBannerX(0);
fY = GetBannerY(0);
m_sprSelectionOverlay.SetXY( fX, fY );
m_sprSelectionOverlay.BeginTweeningQueued( 0 ); // sleep
m_sprSelectionOverlay.BeginTweeningQueued( 0.2f, Actor::TWEEN_BIAS_END );
m_sprSelectionOverlay.BeginTweening( 0 ); // sleep
m_sprSelectionOverlay.BeginTweening( 0.2f, Actor::TWEEN_BIAS_END );
m_sprSelectionOverlay.SetTweenX( fX+320 );
m_ScrollBar.BeginTweeningQueued( 0 );
m_ScrollBar.BeginTweeningQueued( 0.2f, Actor::TWEEN_BIAS_BEGIN );
m_ScrollBar.BeginTweening( 0 );
m_ScrollBar.BeginTweening( 0.2f, Actor::TWEEN_BIAS_BEGIN );
m_ScrollBar.SetTweenX( SCROLL_BAR_X+30 );
for( int i=0; i<NUM_WHEEL_ITEMS_TO_DRAW; i++ )
{
WheelItemDisplay& display = m_WheelItemDisplays[i];
@@ -1225,8 +1222,8 @@ void MusicWheel::TweenOffScreen()
float fX = GetBannerX(fThisBannerPositionOffsetFromSelection);
float fY = GetBannerY(fThisBannerPositionOffsetFromSelection);
display.SetXY( fX, fY );
display.BeginTweeningQueued( 0.04f*i ); // sleep
display.BeginTweeningQueued( 0.2f, Actor::TWEEN_BIAS_END );
display.BeginTweening( 0.04f*i ); // sleep
display.BeginTweening( 0.2f, Actor::TWEEN_BIAS_END );
display.SetTweenX( fX+320 );
}
+50 -9
View File
@@ -531,18 +531,25 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
}
break;
case PlayerOptions::TURN_SHUFFLE:
CArray<int,int> aiTracksLeftToMap;
for( t=0; t<m_iNumTracks; t++ )
aiTracksLeftToMap.Add( t );
for( t=0; t<m_iNumTracks; t++ )
{
int iRandTrackIndex = rand()%aiTracksLeftToMap.GetSize();
int iRandTrack = aiTracksLeftToMap[iRandTrackIndex];
aiTracksLeftToMap.RemoveAt( iRandTrackIndex );
iTakeFromTrack[t] = iRandTrack;
CArray<int,int> aiTracksLeftToMap;
for( t=0; t<m_iNumTracks; t++ )
aiTracksLeftToMap.Add( t );
for( t=0; t<m_iNumTracks; t++ )
{
int iRandTrackIndex = rand()%aiTracksLeftToMap.GetSize();
int iRandTrack = aiTracksLeftToMap[iRandTrackIndex];
aiTracksLeftToMap.RemoveAt( iRandTrackIndex );
iTakeFromTrack[t] = iRandTrack;
}
}
break;
case PlayerOptions::TURN_SUPER_SHUFFLE:
// handle this below
break;
default:
ASSERT(0);
}
NoteData tempNoteData; // write into here as we tranform
@@ -555,6 +562,40 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
for( int r=0; r<MAX_TAP_NOTE_ROWS; r++ )
tempNoteData.m_TapNotes[t][r] = m_TapNotes[iTakeFromTrack[t]][r];
if( tt == PlayerOptions::TURN_SUPER_SHUFFLE )
{
this->Convert2sAnd3sToHoldNotes(); // so we don't super-shuffle HoldNotes
for( int r=0; r<this->GetLastRow(); r++ ) // foreach row
{
if( !this->IsRowEmpty(r) )
{
// shuffle this row
CArray<int,int> aiTracksLeftToMap;
for( t=0; t<m_iNumTracks; t++ )
aiTracksLeftToMap.Add( t );
for( t=0; t<m_iNumTracks; t++ )
{
int iRandTrackIndex = rand()%aiTracksLeftToMap.GetSize();
int iRandTrack = aiTracksLeftToMap[iRandTrackIndex];
aiTracksLeftToMap.RemoveAt( iRandTrackIndex );
iTakeFromTrack[t] = iRandTrack;
}
for( t=0; t<m_iNumTracks; t++ )
tempNoteData.m_TapNotes[t][r] = m_TapNotes[iTakeFromTrack[t]][r];
}
}
for( int i=0; i<this->m_iNumHoldNotes; i++ )
{
HoldNote& hn = this->m_HoldNotes[i];
HoldNote newHN = hn;
hn.m_iTrack = rand() % m_iNumTracks;
tempNoteData.AddHoldNote( newHN );
}
}
this->CopyAll( &tempNoteData ); // copy note data from newData back into this
this->Convert2sAnd3sToHoldNotes();
}
+9 -29
View File
@@ -309,39 +309,19 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
m_sprHoldParts.SetXY( fX, fY );
if( bDrawGlowOnly )
{
m_sprHoldParts.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprHoldParts.SetGlowColor( colorGlow );
m_sprHoldParts.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprHoldParts.SetGlow( colorGlow );
}
else
{
m_sprHoldParts.SetDiffuseColor( colorDiffuse );
m_sprHoldParts.SetGlowColor( D3DXCOLOR(0,0,0,0) );
m_sprHoldParts.SetDiffuse( colorDiffuse );
m_sprHoldParts.SetGlow( D3DXCOLOR(0,0,0,0) );
}
m_sprHoldParts.Draw();
}
//
// We've drawn the diffuse pass, now draw the glow pass if necessary
//
bool bDrawGlow = false;
if( fPercentFadeToFail > 0 )
bDrawGlow = true;
// now, draw the glow pass
if( !bDrawGlowOnly )
{
switch( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_AppearanceType )
{
case PlayerOptions::APPEARANCE_VISIBLE:
case PlayerOptions::APPEARANCE_STEALTH:
break; // don't need to draw glow
case PlayerOptions::APPEARANCE_HIDDEN:
case PlayerOptions::APPEARANCE_SUDDEN:
bDrawGlow = true;
break;
default:
ASSERT(0);
}
}
if( bDrawGlow )
DrawHold( hn, bActive, fLife, fPercentFadeToFail, true );
}
@@ -369,20 +349,20 @@ void NoteDisplay::DrawTap( const int iCol, const float fBeat, const bool bUseHol
m_sprTapParts.SetXY( fXPos, fYPos );
m_sprTapParts.SetRotation( fRotation );
m_sprTapParts.SetGlowColor( D3DXCOLOR(1,1,1,fGlow) );
m_sprTapParts.SetGlow( D3DXCOLOR(1,1,1,fGlow) );
//
// draw gray part
//
m_sprTapParts.SetState( iGrayPartFrameNo );
m_sprTapParts.SetDiffuseColor( colorGrayPart );
m_sprTapParts.SetDiffuse( colorGrayPart );
m_sprTapParts.Draw();
//
// draw color part
//
m_sprTapParts.SetState( iColorPartFrameNo );
m_sprTapParts.SetDiffuseColorTopEdge( colorLeadingEdge );
m_sprTapParts.SetDiffuseColorBottomEdge( colorTrailingEdge );
m_sprTapParts.SetDiffuseTopEdge( colorLeadingEdge );
m_sprTapParts.SetDiffuseBottomEdge( colorTrailingEdge );
m_sprTapParts.Draw();
}
+14 -14
View File
@@ -124,13 +124,13 @@ void NoteField::DrawMeasureBar( int iMeasureIndex )
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
m_rectMeasureBar.SetXY( 0, fYPos );
m_rectMeasureBar.SetWidth( (float)(m_iNumTracks+1) * ARROW_SIZE );
m_rectMeasureBar.SetHeight( 20 );
m_rectMeasureBar.SetDiffuseColor( D3DXCOLOR(0,0,0,0.5f) );
m_rectMeasureBar.SetZoomX( (float)(m_iNumTracks+1) * ARROW_SIZE );
m_rectMeasureBar.SetZoomY( 20 );
m_rectMeasureBar.SetDiffuse( D3DXCOLOR(0,0,0,0.5f) );
m_rectMeasureBar.Draw();
m_textMeasureNumber.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textMeasureNumber.SetGlowColor( D3DXCOLOR(1,1,1,0) );
m_textMeasureNumber.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_textMeasureNumber.SetGlow( D3DXCOLOR(1,1,1,0) );
m_textMeasureNumber.SetText( ssprintf("%d", iMeasureNoDisplay) );
m_textMeasureNumber.SetXY( -m_rectMeasureBar.GetZoomedWidth()/2 + 10, fYPos );
m_textMeasureNumber.Draw();
@@ -142,9 +142,9 @@ void NoteField::DrawMarkerBar( const float fBeat )
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
m_rectMarkerBar.SetXY( 0, fYPos );
m_rectMarkerBar.SetWidth( (float)(m_iNumTracks+1) * ARROW_SIZE );
m_rectMarkerBar.SetHeight( 20 );
m_rectMarkerBar.SetDiffuseColor( D3DXCOLOR(0,0,0,0.5f) );
m_rectMarkerBar.SetZoomX( (float)(m_iNumTracks+1) * ARROW_SIZE );
m_rectMarkerBar.SetZoomY( 20 );
m_rectMarkerBar.SetDiffuse( D3DXCOLOR(0,0,0,0.5f) );
m_rectMarkerBar.Draw();
}
@@ -153,8 +153,8 @@ void NoteField::DrawBPMText( const float fBeat, const float fBPM )
const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat );
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
m_textMeasureNumber.SetDiffuseColor( D3DXCOLOR(1,0,0,1) );
m_textMeasureNumber.SetGlowColor( D3DXCOLOR(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
m_textMeasureNumber.SetDiffuse( D3DXCOLOR(1,0,0,1) );
m_textMeasureNumber.SetGlow( D3DXCOLOR(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
m_textMeasureNumber.SetText( ssprintf("%.2f", fBPM) );
m_textMeasureNumber.SetXY( -m_rectMeasureBar.GetZoomedWidth()/2 - 60, fYPos );
m_textMeasureNumber.Draw();
@@ -165,8 +165,8 @@ void NoteField::DrawFreezeText( const float fBeat, const float fSecs )
const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat );
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
m_textMeasureNumber.SetDiffuseColor( D3DXCOLOR(0.8f,0.8f,0,1) );
m_textMeasureNumber.SetGlowColor( D3DXCOLOR(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
m_textMeasureNumber.SetDiffuse( D3DXCOLOR(0.8f,0.8f,0,1) );
m_textMeasureNumber.SetGlow( D3DXCOLOR(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
m_textMeasureNumber.SetText( ssprintf("%.2f", fSecs) );
m_textMeasureNumber.SetXY( -m_rectMeasureBar.GetZoomedWidth()/2 - 10, fYPos );
m_textMeasureNumber.Draw();
@@ -177,8 +177,8 @@ void NoteField::DrawBGChangeText( const float fBeat, const CString sNewBGName )
const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat );
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
m_textMeasureNumber.SetDiffuseColor( D3DXCOLOR(0,1,0,1) );
m_textMeasureNumber.SetGlowColor( D3DXCOLOR(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
m_textMeasureNumber.SetDiffuse( D3DXCOLOR(0,1,0,1) );
m_textMeasureNumber.SetGlow( D3DXCOLOR(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
m_textMeasureNumber.SetText( sNewBGName );
m_textMeasureNumber.SetXY( +m_rectMeasureBar.GetZoomedWidth()/2 + 10, fYPos );
m_textMeasureNumber.Draw();
+7 -3
View File
@@ -19,9 +19,9 @@
OptionsCursor::OptionsCursor()
{
this->AddSubActor( &m_sprMiddle );
this->AddSubActor( &m_sprLeft );
this->AddSubActor( &m_sprRight );
this->AddChild( &m_sprMiddle );
this->AddChild( &m_sprLeft );
this->AddChild( &m_sprRight );
}
void OptionsCursor::Load( PlayerNumber pn, bool bUnderline )
@@ -65,6 +65,10 @@ void OptionsCursor::TweenBarWidth( int iNewWidth, float fTweenTime )
iNewWidth++; // round up to nearest even number
float fFrameWidth = m_sprLeft.GetUnzoomedWidth();
m_sprLeft.StopTweening();
m_sprMiddle.StopTweening();
m_sprRight.StopTweening();
m_sprLeft.BeginTweening( fTweenTime );
m_sprMiddle.BeginTweening( fTweenTime );
m_sprRight.BeginTweening( fTweenTime );
+8 -8
View File
@@ -81,18 +81,18 @@ Player::Player()
m_pLifeMeter = NULL;
m_pScore = NULL;
this->AddSubActor( &m_GrayArrowRow );
this->AddSubActor( &m_NoteField );
this->AddSubActor( &m_GhostArrowRow );
this->AddChild( &m_GrayArrowRow );
this->AddChild( &m_NoteField );
this->AddChild( &m_GhostArrowRow );
m_frameJudgement.AddSubActor( &m_Judgement );
this->AddSubActor( &m_frameJudgement );
m_frameJudgement.AddChild( &m_Judgement );
this->AddChild( &m_frameJudgement );
m_frameCombo.AddSubActor( &m_Combo );
this->AddSubActor( &m_frameCombo );
m_frameCombo.AddChild( &m_Combo );
this->AddChild( &m_frameCombo );
for( int c=0; c<MAX_NOTE_TRACKS; c++ )
this->AddSubActor( &m_HoldJudgement[c] );
this->AddChild( &m_HoldJudgement[c] );
}
+14 -6
View File
@@ -32,6 +32,8 @@ CString PlayerOptions::GetString()
if( m_EffectType & EFFECT_DIZZY ) sReturn += "Dizzy, ";
if( m_EffectType & EFFECT_SPACE ) sReturn += "Space, ";
if( m_EffectType & EFFECT_MINI ) sReturn += "Mini, ";
if( m_EffectType & EFFECT_FLIP ) sReturn += "Flip, ";
if( m_EffectType & EFFECT_TORNADO ) sReturn += "Tornado, ";
switch( m_AppearanceType )
{
@@ -45,11 +47,12 @@ CString PlayerOptions::GetString()
switch( m_TurnType )
{
case TURN_NONE: break;
case TURN_MIRROR: sReturn += "Mirror, "; break;
case TURN_LEFT: sReturn += "Left, "; break;
case TURN_RIGHT: sReturn += "Right, "; break;
case TURN_SHUFFLE: sReturn += "Shuffle, "; break;
case TURN_NONE: break;
case TURN_MIRROR: sReturn += "Mirror, "; break;
case TURN_LEFT: sReturn += "Left, "; break;
case TURN_RIGHT: sReturn += "Right, "; break;
case TURN_SHUFFLE: sReturn += "Shuffle, "; break;
case TURN_SUPER_SHUFFLE:sReturn += "SuperShuffle, ";break;
default: ASSERT(0); // invalid EFFECT
}
@@ -65,6 +68,7 @@ CString PlayerOptions::GetString()
case COLOR_NOTE: sReturn += "Note, "; break;
case COLOR_FLAT: sReturn += "Flat, "; break;
case COLOR_PLAIN: sReturn += "Plain, "; break;
default: ASSERT(0); // invalid COLOR
};
if( !m_bHoldNotes )
@@ -92,7 +96,7 @@ void PlayerOptions::FromString( CString sOptions )
sBit.TrimRight();
if( sBit == "0.5x" ) m_fArrowScrollSpeed = 0.5f;
else if( sBit == "0.75x" ) m_fArrowScrollSpeed = 0.15f;
else if( sBit == "0.75x" ) m_fArrowScrollSpeed = 0.75f;
else if( sBit == "1.5x" ) m_fArrowScrollSpeed = 1.5f;
else if( sBit == "2.0x" ) m_fArrowScrollSpeed = 2.0f;
else if( sBit == "3.0x" ) m_fArrowScrollSpeed = 3.0f;
@@ -105,13 +109,17 @@ void PlayerOptions::FromString( CString sOptions )
else if( sBit == "dizzy" ) m_EffectType |= EFFECT_DIZZY;
else if( sBit == "space" ) m_EffectType |= EFFECT_SPACE;
else if( sBit == "mini" ) m_EffectType |= EFFECT_MINI;
else if( sBit == "flip" ) m_EffectType |= EFFECT_FLIP;
else if( sBit == "tornado" ) m_EffectType |= EFFECT_TORNADO;
else if( sBit == "hidden" ) m_AppearanceType = APPEARANCE_HIDDEN;
else if( sBit == "sudden" ) m_AppearanceType = APPEARANCE_SUDDEN;
else if( sBit == "stealth" ) m_AppearanceType = APPEARANCE_STEALTH;
else if( sBit == "blink" ) m_AppearanceType = APPEARANCE_BLINK;
else if( sBit == "mirror" ) m_TurnType = TURN_MIRROR;
else if( sBit == "left" ) m_TurnType = TURN_LEFT;
else if( sBit == "right" ) m_TurnType = TURN_RIGHT;
else if( sBit == "shuffle" ) m_TurnType = TURN_SHUFFLE;
else if( sBit == "supershuffle" )m_TurnType = TURN_SUPER_SHUFFLE;
else if( sBit == "little" ) m_bLittle = true;
else if( sBit == "reverse" ) m_bReverseScroll = true;
else if( sBit == "note" ) m_ColorType = COLOR_NOTE;
+6 -2
View File
@@ -10,6 +10,8 @@
-----------------------------------------------------------------------------
*/
const int NUM_EFFECT_TYPES = 9;
struct PlayerOptions
{
float m_fArrowScrollSpeed;
@@ -21,11 +23,13 @@ struct PlayerOptions
EFFECT_DIZZY =1<<3,
EFFECT_SPACE =1<<4,
EFFECT_MINI =1<<5,
NUM_EFFECT_TYPES };
EFFECT_FLIP =1<<6,
EFFECT_TORNADO =1<<7
};
int m_EffectType;
enum AppearanceType { APPEARANCE_VISIBLE=0, APPEARANCE_HIDDEN, APPEARANCE_SUDDEN, APPEARANCE_STEALTH, APPEARANCE_BLINK, NUM_APPEARANCE_TYPES };
AppearanceType m_AppearanceType;
enum TurnType { TURN_NONE=0, TURN_MIRROR, TURN_LEFT, TURN_RIGHT, TURN_SHUFFLE };
enum TurnType { TURN_NONE=0, TURN_MIRROR, TURN_LEFT, TURN_RIGHT, TURN_SHUFFLE, TURN_SUPER_SHUFFLE, NUM_TURN_TYPES };
TurnType m_TurnType;
bool m_bLittle;
bool m_bReverseScroll;
+9
View File
@@ -23,6 +23,15 @@ Screen::~Screen()
}
void Screen::AddChild( Actor* pActor )
{
// add only if the actor is on screen
float fX = pActor->GetX();
float fY = pActor->GetY();
// if( SCREEN_LEFT>=fX && fX<=SCREEN_RIGHT && SCREEN_TOP>=fY && fY<=SCREEN_BOTTOM )
ActorFrame::AddChild( pActor );
}
void Screen::Update( float fDeltaTime )
{
ActorFrame::Update( fDeltaTime );
+2
View File
@@ -27,6 +27,8 @@ public:
Screen();
virtual ~Screen();
virtual void AddChild( Actor* pActor );
// let subclass override if they want
virtual void Restore() {};
virtual void Invalidate() {};
+3 -3
View File
@@ -33,13 +33,13 @@ ScreenCaution::ScreenCaution()
m_sprCaution.Load( THEME->GetPathTo("Graphics","caution") );
m_sprCaution.StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
this->AddSubActor( &m_sprCaution );
this->AddChild( &m_sprCaution );
m_Wipe.OpenWipingRight( SM_DoneOpening );
this->AddSubActor( &m_Wipe );
this->AddChild( &m_Wipe );
m_FadeWipe.SetOpened();
this->AddSubActor( &m_FadeWipe );
this->AddChild( &m_FadeWipe );
this->SendScreenMessage( SM_StartClosing, 3 );
+10 -10
View File
@@ -223,7 +223,7 @@ ScreenEdit::ScreenEdit()
m_NoteFieldEdit.Load( &noteData, PLAYER_1, 200, 800 );
m_rectRecordBack.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
m_rectRecordBack.SetDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_rectRecordBack.SetDiffuse( D3DXCOLOR(0,0,0,0) );
m_GrayArrowRowRecord.SetXY( EDIT_X, EDIT_GRAY_Y );
m_GrayArrowRowRecord.Load( PLAYER_1 );
@@ -257,7 +257,7 @@ ScreenEdit::ScreenEdit()
m_textHelp.SetText( HELP_TEXT );
m_rectShortcutsBack.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
m_rectShortcutsBack.SetDiffuseColor( D3DXCOLOR(0,0,0,0.8f) );
m_rectShortcutsBack.SetDiffuse( D3DXCOLOR(0,0,0,0.8f) );
m_textShortcuts.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textShortcuts.SetXY( SHORTCUTS_X, SHORTCUTS_Y );
@@ -325,7 +325,7 @@ void ScreenEdit::Update( float fDeltaTime )
TransitionFromRecordToEdit();
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fEndMarker;
m_rectRecordBack.BeginTweening( 0.5f );
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
}
else if( m_EditMode == MODE_PLAYING )
{
@@ -333,7 +333,7 @@ void ScreenEdit::Update( float fDeltaTime )
m_EditMode = MODE_EDITING;
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fEndMarker;
m_rectRecordBack.BeginTweening( 0.5f );
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
}
}
}
@@ -839,7 +839,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
MenuItemGainFocus( m_iMenuSelection );
m_rectRecordBack.BeginTweening( 0.5f );
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.8f) );
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0.8f) );
}
break;
case DIK_P:
@@ -855,7 +855,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
m_Player.Load( PLAYER_1, (NoteData*)&m_NoteFieldEdit, NULL, NULL );
m_rectRecordBack.BeginTweening( 0.5f );
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.8f) );
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0.8f) );
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
float fElapsedSeconds = max( 0, m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) );
@@ -881,7 +881,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
m_EditMode = MODE_RECORDING;
m_rectRecordBack.BeginTweening( 0.5f );
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.8f) );
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0.8f) );
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
float fElapsedSeconds = max( 0, m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) );
@@ -1138,7 +1138,7 @@ void ScreenEdit::InputRecord( const DeviceInput& DeviceI, const InputEventType t
TransitionFromRecordToEdit();
m_rectRecordBack.BeginTweening( 0.5f );
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
break;
}
@@ -1205,7 +1205,7 @@ void ScreenEdit::InputMenu( const DeviceInput& DeviceI, const InputEventType typ
case DIK_ESCAPE:
m_EditMode = MODE_EDITING;
m_rectRecordBack.BeginTweening( 0.5f );
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
MenuItemLoseFocus( m_iMenuSelection );
if( DeviceI.button == DIK_RETURN )
{
@@ -1230,7 +1230,7 @@ void ScreenEdit::InputPlay( const DeviceInput& DeviceI, const InputEventType typ
m_EditMode = MODE_EDITING;
m_soundMusic.Stop();
m_rectRecordBack.BeginTweening( 0.5f );
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
GAMESTATE->m_fSongBeat = froundf( GAMESTATE->m_fSongBeat, NoteTypeToBeat(m_SnapDisplay.GetSnapMode()) );
break;
+4 -4
View File
@@ -43,7 +43,7 @@ ScreenEditMenu::ScreenEditMenu()
Selector.SetXY( 0, 0 );
// Selector.AllowNewNotes();
this->AddSubActor( &Selector );
this->AddChild( &Selector );
m_Menu.Load(
THEME->GetPathTo("Graphics","edit menu background"),
@@ -51,17 +51,17 @@ ScreenEditMenu::ScreenEditMenu()
ssprintf("%c %c change line %c %c change value START to continue", char(3), char(4), char(1), char(2) ),
false, 99
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
m_textExplanation.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y );
m_textExplanation.SetText( EXPLANATION_TEXT );
m_textExplanation.SetZoom( 0.7f );
this->AddSubActor( &m_textExplanation );
this->AddChild( &m_textExplanation );
m_Fade.SetOpened();
this->AddSubActor( &m_Fade);
this->AddChild( &m_Fade);
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","edit menu music") );
+47 -51
View File
@@ -188,14 +188,14 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
case RM_ARCADE_STAGE:
m_BannerWithFrame[0].LoadFromSongAndNotes( GAMESTATE->m_pCurSong, GAMESTATE->m_pCurNotes );
m_BannerWithFrame[0].SetXY( BANNER_X, BANNER_Y );
this->AddSubActor( &m_BannerWithFrame[0] );
this->AddChild( &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 );
this->AddChild( &m_textStage );
break;
case RM_ARCADE_SUMMARY:
@@ -216,14 +216,14 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
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] );
this->AddChild( &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] );
this->AddChild( &m_BannerWithFrame[0] );
break;
}
@@ -236,7 +236,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
THEME->GetPathTo("Graphics",m_ResultMode==RM_ARCADE_SUMMARY?"evaluation summary top edge":"evaluation top edge"),
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
for( p=0; p<NUM_PLAYERS; p++ )
@@ -246,8 +246,8 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_ScoreDisplay[p].SetXY( SCORE_NUMBERS_X(p), SCORE_Y );
m_ScoreDisplay[p].SetZoomY( 0.9f );
m_ScoreDisplay[p].SetDiffuseColor( PlayerToColor(p) );
this->AddSubActor( &m_ScoreDisplay[p] );
m_ScoreDisplay[p].SetDiffuse( PlayerToColor(p) );
this->AddChild( &m_ScoreDisplay[p] );
}
@@ -357,7 +357,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
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] );
this->AddChild( &m_sprJudgeLabels[l] );
}
m_sprScoreLabel.Load( THEME->GetPathTo("Graphics","evaluation score labels") );
@@ -365,7 +365,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_sprScoreLabel.StopAnimating();
m_sprScoreLabel.SetXY( SCORE_LABELS_X, SCORE_Y );
m_sprScoreLabel.SetZoom( 1.0f );
this->AddSubActor( &m_sprScoreLabel );
this->AddChild( &m_sprScoreLabel );
for( p=0; p<NUM_PLAYERS; p++ )
@@ -379,8 +379,8 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_textJudgeNumbers[l][p].TurnShadowOff();
m_textJudgeNumbers[l][p].SetXY( JUDGE_X(p,l), JUDGE_Y(l) );
m_textJudgeNumbers[l][p].SetZoom( 0.7f );
m_textJudgeNumbers[l][p].SetDiffuseColor( PlayerToColor(p) );
this->AddSubActor( &m_textJudgeNumbers[l][p] );
m_textJudgeNumbers[l][p].SetDiffuse( PlayerToColor(p) );
this->AddChild( &m_textJudgeNumbers[l][p] );
}
m_textJudgeNumbers[0][p].SetText( ssprintf("%4d", iTapNoteScores[p][TNS_PERFECT]) );
@@ -417,7 +417,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_sprPercentFrame[p].StopAnimating();
m_sprPercentFrame[p].SetState( p );
m_sprPercentFrame[p].SetXY( GRADE_X(p), GRADE_Y );
this->AddSubActor( &m_sprPercentFrame[p] );
this->AddChild( &m_sprPercentFrame[p] );
m_textOniPercentLarge[p].LoadFromFont( THEME->GetPathTo("Fonts","oni percent numbers") );
m_textOniPercentLarge[p].TurnShadowOff();
@@ -425,7 +425,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
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] );
this->AddChild( &m_textOniPercentLarge[p] );
m_textOniPercentSmall[p].LoadFromFont( THEME->GetPathTo("Fonts","oni percent numbers") );
m_textOniPercentSmall[p].TurnShadowOff();
@@ -434,7 +434,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
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] );
this->AddChild( &m_textOniPercentSmall[p] );
iPossibleDancePoints[p] = max( 1, iPossibleDancePoints[p] );
float fPercentDancePoints = iActualDancePoints[p] / (float)iPossibleDancePoints[p] + 0.0001f; // correct for rounding errors
@@ -448,13 +448,13 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_sprCourseFrame[p].StopAnimating();
m_sprCourseFrame[p].SetState( p );
m_sprCourseFrame[p].SetXY( BONUS_X(p), BONUS_Y );
this->AddSubActor( &m_sprCourseFrame[p] );
this->AddChild( &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] );
this->AddChild( &m_textSongsSurvived[p] );
}
break;
case RM_ARCADE_STAGE:
@@ -464,7 +464,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_sprGradeFrame[p].StopAnimating();
m_sprGradeFrame[p].SetState( p );
m_sprGradeFrame[p].SetXY( GRADE_X(p), GRADE_Y );
this->AddSubActor( &m_sprGradeFrame[p] );
this->AddChild( &m_sprGradeFrame[p] );
// Ez2dancer should control the grade tween using theme metrics
m_Grades[p].SetXY( GRADE_X(p), GRADE_Y );
@@ -475,47 +475,43 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_Grades[p].SpinAndSettleOn( grade[p] );
else
m_Grades[p].SetGrade( (PlayerNumber)p, grade[p] );
this->AddSubActor( &m_Grades[p] );
this->AddChild( &m_Grades[p] );
// Bonus info frame
m_sprBonusFrame[p].Load( THEME->GetPathTo("Graphics","evaluation bonus frame 2x1") );
m_sprBonusFrame[p].StopAnimating();
m_sprBonusFrame[p].SetState( p );
m_sprBonusFrame[p].SetXY( BONUS_X(p), BONUS_Y );
this->AddSubActor( &m_sprBonusFrame[p] );
this->AddChild( &m_sprBonusFrame[p] );
for( int l=0; l<NUM_RADAR_VALUES; l++ ) // foreach line
{
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].ZoomToHeight( 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_sprPossibleBar[p][l].SetTweenZoomToWidth( BAR_WIDTH*fPossibleRadarValues[p][l] );
this->AddChild( &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].ZoomToHeight( BAR_HEIGHT );
m_sprActualBar[p][l].BeginTweening( 0.5f );
m_sprActualBar[p][l].SetTweenZoomX( BAR_WIDTH*fActualRadarValues[p][l] );
m_sprActualBar[p][l].SetTweenZoomToWidth( BAR_WIDTH*fActualRadarValues[p][l] );
if( fActualRadarValues[p][l] == fPossibleRadarValues[p][l] )
m_sprActualBar[p][l].SetEffectGlowing();
this->AddSubActor( &m_sprActualBar[p][l] );
this->AddChild( &m_sprActualBar[p][l] );
}
break;
}
@@ -530,7 +526,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_textNewRecord[p].SetText( "IT'S A NEW RECORD!" );
m_textNewRecord[p].SetZoom( 0.5f );
m_textNewRecord[p].SetEffectGlowing( 1.0f );
this->AddSubActor( &m_textNewRecord[p] );
this->AddChild( &m_textNewRecord[p] );
}
}
@@ -545,7 +541,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_textTryExtraStage.SetText( "Try ExtraStage!!!" );
m_textTryExtraStage.SetZoom( 1 );
m_textTryExtraStage.SetEffectGlowing( 1.0f );
this->AddSubActor( &m_textTryExtraStage );
this->AddChild( &m_textTryExtraStage );
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","evaluation extra stage") );
}
@@ -608,29 +604,29 @@ void ScreenEvaluation::TweenOnScreen()
{
fOriginalY = m_BannerWithFrame[i].GetY();
m_BannerWithFrame[i].SetY( fOriginalY + SCREEN_HEIGHT );
m_BannerWithFrame[i].BeginTweeningQueued( 0.0f );
m_BannerWithFrame[i].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
m_BannerWithFrame[i].BeginTweening( 0.0f );
m_BannerWithFrame[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
m_BannerWithFrame[i].SetTweenY( fOriginalY );
}
fOriginalY = m_textStage.GetY();
m_textStage.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
m_textStage.BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
m_textStage.SetTweenY( fOriginalY );
for( i=0; i<NUM_JUDGE_LINES; i++ )
{
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].BeginTweening( 0.2f + 0.1f*i );
m_sprJudgeLabels[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
m_sprJudgeLabels[i].SetTweenY( fOriginalY );
for( int p=0; p<NUM_PLAYERS; p++ )
{
fOriginalX = m_textJudgeNumbers[i][p].GetX();
m_textJudgeNumbers[i][p].SetX( fOriginalX + SCREEN_WIDTH/2*(p==PLAYER_1 ? 1 : -1) );
m_textJudgeNumbers[i][p].BeginTweeningQueued( 0.2f + 0.1f*i );
m_textJudgeNumbers[i][p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
m_textJudgeNumbers[i][p].BeginTweening( 0.2f + 0.1f*i );
m_textJudgeNumbers[i][p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
m_textJudgeNumbers[i][p].SetTweenX( fOriginalX );
}
}
@@ -639,16 +635,16 @@ void ScreenEvaluation::TweenOnScreen()
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.BeginTweening( 0.8f + 0.1f*i );
m_sprScoreLabel.BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
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].BeginTweening( 0.8f + 0.1f*i );
m_ScoreDisplay[p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
m_ScoreDisplay[p].SetTweenX( fOriginalX );
}
@@ -670,8 +666,8 @@ void ScreenEvaluation::TweenOnScreen()
{
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]->BeginTweening( 0.2f );
apActorsInBonusOrStageInfo[i]->BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN );
apActorsInBonusOrStageInfo[i]->SetTweenX( fOriginalX );
}
@@ -704,32 +700,32 @@ void ScreenEvaluation::TweenOffScreen()
for( i=0; i<STAGES_TO_SHOW_IN_SUMMARY; i++ )
{
m_BannerWithFrame[i].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_BannerWithFrame[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_BannerWithFrame[i].SetTweenZoomY( 0 );
}
m_textStage.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_textStage.BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_textStage.SetTweenZoomY( 0 );
for( i=0; i<NUM_JUDGE_LINES; i++ )
{
m_sprJudgeLabels[i].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_sprJudgeLabels[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_sprJudgeLabels[i].SetTweenZoomY( 0 );
for( int p=0; p<NUM_PLAYERS; p++ )
{
m_textJudgeNumbers[i][p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_textJudgeNumbers[i][p].BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_textJudgeNumbers[i][p].SetTweenZoomY( 0 );
}
}
m_sprScoreLabel.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_sprScoreLabel.BeginTweening( 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].BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_ScoreDisplay[p].SetTweenZoomY( 0 );
}
@@ -751,7 +747,7 @@ void ScreenEvaluation::TweenOffScreen()
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]->BeginTweening( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END );
apActorsInBonusOrStageInfo[i]->SetTweenZoomY( 0 );
}
+3 -3
View File
@@ -58,12 +58,12 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()
{
m_sprControllers[p].Load( THEME->GetPathTo("Graphics","select player controller") );
m_sprControllers[p].SetXY( CONTROLLER_X(p), CONTROLLER_Y(p) );
this->AddSubActor( &m_sprControllers[p] );
this->AddChild( &m_sprControllers[p] );
m_sprCursors[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player cursor p%d",p+1)) );
m_sprCursors[p].SetXY( CURSOR_X(p), CURSOR_Y(p) );
m_sprCursors[p].SetEffectBouncing( D3DXVECTOR3(0,10,0), 0.5f );
this->AddSubActor( &m_sprCursors[p] );
this->AddChild( &m_sprCursors[p] );
}
m_Menu.Load(
@@ -71,7 +71,7 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()
THEME->GetPathTo("Graphics","select player top edge"),
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
+5 -5
View File
@@ -56,7 +56,7 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
m_ScrollingList.SetXY( CENTER_X, CENTER_Y );
m_ScrollingList.SetSpacing( 400 );
m_ScrollingList.SetNumberVisible( 5 );
this->AddSubActor( &m_ScrollingList );
this->AddChild( &m_ScrollingList );
for( int p=0; p<NUM_PLAYERS; p++ )
{
@@ -65,12 +65,12 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
m_sprControllers[p].Load( THEME->GetPathTo("Graphics","select player controller") );
m_sprControllers[p].SetXY( CONTROLLER_X(p), CONTROLLER_Y(p) );
this->AddSubActor( &m_sprControllers[p] );
this->AddChild( &m_sprControllers[p] );
m_sprCursors[p].Load( THEME->GetPathTo("Graphics",ssprintf("select player cursor p%d",p+1)) );
m_sprCursors[p].SetXY( CURSOR_X(p), CURSOR_Y(p) );
m_sprCursors[p].SetEffectBouncing( D3DXVECTOR3(0,10,0), 0.5f );
this->AddSubActor( &m_sprCursors[p] );
this->AddChild( &m_sprCursors[p] );
}
@@ -79,7 +79,7 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
THEME->GetPathTo("Graphics","select style top edge"),
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
m_soundChange.Load( THEME->GetPathTo("Sounds","select style change") );
@@ -208,7 +208,7 @@ void ScreenEz2SelectStyle::RefreshStylesAndList()
}
CStringArray asGraphicPaths;
for( int i=0; i<m_aPossibleStyles.GetSize(); i++ )
for( i=0; i<m_aPossibleStyles.GetSize(); i++ )
{
Style style = m_aPossibleStyles[i];
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
+10 -10
View File
@@ -33,20 +33,20 @@ ScreenGameOver::ScreenGameOver()
m_sprGameOver.Load( THEME->GetPathTo("Graphics","game over") );
m_sprGameOver.SetXY( CENTER_X, CENTER_Y );
this->AddSubActor( &m_sprGameOver );
this->AddChild( &m_sprGameOver );
// tween game over
m_sprGameOver.SetGlowColor( D3DXCOLOR(1,1,1,0) );
m_sprGameOver.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprGameOver.SetGlow( D3DXCOLOR(1,1,1,0) );
m_sprGameOver.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprGameOver.BeginTweeningQueued( 0.5f ); // fade to white
m_sprGameOver.SetTweenAddColor( D3DXCOLOR(1,1,1,1) );
m_sprGameOver.BeginTweening( 0.5f ); // fade to white
m_sprGameOver.SetTweenGlow( D3DXCOLOR(1,1,1,1) );
m_sprGameOver.BeginTweeningQueued( 0.01f ); // turn color on
m_sprGameOver.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprGameOver.BeginTweening( 0.01f ); // turn color on
m_sprGameOver.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprGameOver.BeginTweeningQueued( 0.5f ); // fade to color
m_sprGameOver.SetTweenAddColor( D3DXCOLOR(1,1,1,0) );
m_sprGameOver.BeginTweening( 0.5f ); // fade to color
m_sprGameOver.SetTweenGlow( D3DXCOLOR(1,1,1,0) );
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","game over music") );
@@ -65,7 +65,7 @@ void ScreenGameOver::HandleScreenMessage( const ScreenMessage SM )
case SM_StartFadingOut:
m_bClosing = true;
m_sprGameOver.BeginTweening( 0.8f );
m_sprGameOver.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprGameOver.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
this->SendScreenMessage( SM_GoToNextScreen, 0.8f );
break;
case SM_GoToNextScreen:
+94 -89
View File
@@ -59,6 +59,9 @@
#define SURVIVE_TIME_Y THEME->GetMetricF("ScreenGameplay","SurviveTimeY")
#define SECONDS_BETWEEN_COMMENTS THEME->GetMetricF("ScreenGameplay","SecondsBetweenComments")
#define DEMONSTRATION_SECONDS THEME->GetMetricF("ScreenGameplay","DemonstrationSeconds")
#define TICK_EARLY_SECONDS THEME->GetMetricF("ScreenGameplay","TickEarlySeconds")
float g_fTickEarlySecondsCache = 0; // reading directly out of theme metrics is slow
// received while STATE_DANCING
@@ -93,6 +96,8 @@ ScreenGameplay::ScreenGameplay()
m_pScoreDisplay[p] = NULL;
}
g_fTickEarlySecondsCache = TICK_EARLY_SECONDS;
MUSIC->Stop();
@@ -148,8 +153,8 @@ ScreenGameplay::ScreenGameplay()
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS;
m_Background.SetDiffuseColor( D3DXCOLOR(0.4f,0.4f,0.4f,1) );
this->AddSubActor( &m_Background );
m_Background.SetDiffuse( D3DXCOLOR(0.4f,0.4f,0.4f,1) );
this->AddChild( &m_Background );
for( p=0; p<NUM_PLAYERS; p++ )
@@ -159,18 +164,18 @@ ScreenGameplay::ScreenGameplay()
float fPlayerX = (float) GAMESTATE->GetCurrentStyleDef()->m_iCenterX[p];
m_Player[p].SetX( fPlayerX );
this->AddSubActor( &m_Player[p] );
this->AddChild( &m_Player[p] );
m_sprOniGameOver[p].Load( THEME->GetPathTo("Graphics","gameplay oni gameover") );
m_sprOniGameOver[p].SetX( fPlayerX );
m_sprOniGameOver[p].SetY( SCREEN_TOP - m_sprOniGameOver[p].GetZoomedHeight()/2 );
m_sprOniGameOver[p].SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // 0 alpha so we don't waste time drawing while not visible
this->AddSubActor( &m_sprOniGameOver[p] );
m_sprOniGameOver[p].SetDiffuse( D3DXCOLOR(1,1,1,0) ); // 0 alpha so we don't waste time drawing while not visible
this->AddChild( &m_sprOniGameOver[p] );
}
m_OniFade.SetOpened();
this->AddSubActor( &m_OniFade );
this->AddChild( &m_OniFade );
m_sprMiddleFrame.Load( THEME->GetPathTo("Graphics","Gameplay Middle Frame") );
@@ -193,20 +198,20 @@ ScreenGameplay::ScreenGameplay()
m_pLifeMeter[p]->Load( (PlayerNumber)p );
m_pLifeMeter[p]->SetXY( LIFE_X(p), LIFE_Y(p,bExtra) );
this->AddSubActor( m_pLifeMeter[p] );
this->AddChild( m_pLifeMeter[p] );
}
// TopFrame goes above LifeMeter
m_sprTopFrame.Load( THEME->GetPathTo("Graphics",bExtra?"gameplay extra top frame":"gameplay top frame") );
m_sprTopFrame.SetXY( TOP_FRAME_X, TOP_FRAME_Y(bExtra) );
this->AddSubActor( &m_sprTopFrame );
this->AddChild( &m_sprTopFrame );
m_textStageNumber.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
m_textStageNumber.TurnShadowOff();
m_textStageNumber.SetXY( STAGE_X, STAGE_Y(bExtra) );
m_textStageNumber.SetText( GAMESTATE->GetStageText() );
m_textStageNumber.SetDiffuseColor( GAMESTATE->GetStageColor() );
m_textStageNumber.SetDiffuse( GAMESTATE->GetStageColor() );
for( p=0; p<NUM_PLAYERS; p++ )
{
@@ -214,19 +219,19 @@ ScreenGameplay::ScreenGameplay()
m_textCourseSongNumber[p].TurnShadowOff();
m_textCourseSongNumber[p].SetXY( SONG_NUMBER_X(p), SONG_NUMBER_Y(p,bExtra) );
m_textCourseSongNumber[p].SetText( "" );
m_textCourseSongNumber[p].SetDiffuseColor( GAMESTATE->GetStageColor() ); // light blue
m_textCourseSongNumber[p].SetDiffuse( GAMESTATE->GetStageColor() ); // light blue
}
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
this->AddSubActor( &m_textStageNumber );
this->AddChild( &m_textStageNumber );
break;
case PLAY_MODE_ONI:
case PLAY_MODE_ENDLESS:
for( p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) )
this->AddSubActor( &m_textCourseSongNumber[p] );
this->AddChild( &m_textCourseSongNumber[p] );
break;
default:
ASSERT(0); // invalid GameMode
@@ -238,7 +243,7 @@ ScreenGameplay::ScreenGameplay()
//
m_sprBottomFrame.Load( THEME->GetPathTo("Graphics",bExtra?"gameplay extra bottom frame":"gameplay bottom frame") );
m_sprBottomFrame.SetXY( BOTTOM_FRAME_X, BOTTOM_FRAME_Y(bExtra) );
this->AddSubActor( &m_sprBottomFrame );
this->AddChild( &m_sprBottomFrame );
for( p=0; p<NUM_PLAYERS; p++ )
{
@@ -261,25 +266,25 @@ ScreenGameplay::ScreenGameplay()
m_pScoreDisplay[p]->Init( (PlayerNumber)p );
m_pScoreDisplay[p]->SetXY( SCORE_X(p), SCORE_Y(p,bExtra) );
m_pScoreDisplay[p]->SetZoom( 0.8f );
m_pScoreDisplay[p]->SetDiffuseColor( PlayerToColor(p) );
this->AddSubActor( m_pScoreDisplay[p] );
m_pScoreDisplay[p]->SetDiffuse( PlayerToColor(p) );
this->AddChild( m_pScoreDisplay[p] );
m_textPlayerOptions[p].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textPlayerOptions[p].TurnShadowOff();
m_textPlayerOptions[p].SetXY( PLAYER_OPTIONS_X(p), PLAYER_OPTIONS_Y(p,bExtra) );
m_textPlayerOptions[p].SetZoom( 0.5f );
m_textPlayerOptions[p].SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textPlayerOptions[p].SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_textPlayerOptions[p].SetText( GAMESTATE->m_PlayerOptions[p].GetString() );
this->AddSubActor( &m_textPlayerOptions[p] );
this->AddChild( &m_textPlayerOptions[p] );
}
m_textSongOptions.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textSongOptions.TurnShadowOff();
m_textSongOptions.SetXY( SONG_OPTIONS_X, SONG_OPTIONS_Y(bExtra) );
m_textSongOptions.SetZoom( 0.5f );
m_textSongOptions.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textSongOptions.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_textSongOptions.SetText( GAMESTATE->m_SongOptions.GetString() );
this->AddSubActor( &m_textSongOptions );
this->AddChild( &m_textSongOptions );
// Get the current StyleDef definition (used below)
@@ -291,74 +296,74 @@ ScreenGameplay::ScreenGameplay()
continue;
m_DifficultyBanner[p].SetXY( DIFFICULTY_X(p), DIFFICULTY_Y(p,bReverse[p],bExtra) );
this->AddSubActor( &m_DifficultyBanner[p] );
this->AddChild( &m_DifficultyBanner[p] );
}
m_textDebug.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textDebug.SetXY( DEBUG_X, DEBUG_Y );
m_textDebug.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
this->AddSubActor( &m_textDebug );
m_textDebug.SetDiffuse( D3DXCOLOR(1,1,1,1) );
this->AddChild( &m_textDebug );
m_textAutoPlay.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textAutoPlay.SetXY( AUTOPLAY_X, AUTOPLAY_Y );
m_textAutoPlay.SetText( "AutoPlay is ON" );
m_textAutoPlay.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
this->AddSubActor( &m_textAutoPlay );
m_textAutoPlay.SetDiffuse( D3DXCOLOR(1,1,1,1) );
this->AddChild( &m_textAutoPlay );
m_StarWipe.SetClosed();
this->AddSubActor( &m_StarWipe );
this->AddChild( &m_StarWipe );
m_sprReady.Load( THEME->GetPathTo("Graphics","gameplay ready") );
m_sprReady.SetXY( CENTER_X, CENTER_Y );
m_sprReady.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
this->AddSubActor( &m_sprReady );
m_sprReady.SetDiffuse( D3DXCOLOR(1,1,1,0) );
this->AddChild( &m_sprReady );
m_sprHereWeGo.Load( THEME->GetPathTo("Graphics","gameplay here we go") );
m_sprHereWeGo.SetXY( CENTER_X, CENTER_Y );
m_sprHereWeGo.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
this->AddSubActor( &m_sprHereWeGo );
m_sprHereWeGo.SetDiffuse( D3DXCOLOR(1,1,1,0) );
this->AddChild( &m_sprHereWeGo );
m_sprCleared.Load( THEME->GetPathTo("Graphics","gameplay cleared") );
m_sprCleared.SetXY( CENTER_X, CENTER_Y );
m_sprCleared.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
this->AddSubActor( &m_sprCleared );
m_sprCleared.SetDiffuse( D3DXCOLOR(1,1,1,0) );
this->AddChild( &m_sprCleared );
m_sprFailed.Load( THEME->GetPathTo("Graphics","gameplay failed") );
m_sprFailed.SetXY( CENTER_X, CENTER_Y );
m_sprFailed.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
this->AddSubActor( &m_sprFailed );
m_sprFailed.SetDiffuse( D3DXCOLOR(1,1,1,0) );
this->AddChild( &m_sprFailed );
if( GAMESTATE->m_bDemonstration )
{
m_quadDemonstrationBox.SetDiffuseColor( D3DXCOLOR(0,0,0,0.7f) );
m_quadDemonstrationBox.SetDiffuse( D3DXCOLOR(0,0,0,0.7f) );
m_quadDemonstrationBox.StretchTo( CRect(SCREEN_LEFT, int(CENTER_Y-60), SCREEN_RIGHT, int(CENTER_Y+60)) );
this->AddSubActor( &m_quadDemonstrationBox );
this->AddChild( &m_quadDemonstrationBox );
m_sprDemonstration.Load( THEME->GetPathTo("Graphics","gameplay demonstration") );
m_sprDemonstration.SetXY( CENTER_X, CENTER_Y );
m_sprDemonstration.SetEffectBlinking();
this->AddSubActor( &m_sprDemonstration );
this->AddChild( &m_sprDemonstration );
m_Fade.OpenWipingRight();
}
m_Fade.SetOpened();
this->AddSubActor( &m_Fade );
this->AddChild( &m_Fade );
m_textSurviveTime.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textSurviveTime.TurnShadowOff();
m_textSurviveTime.SetXY( SURVIVE_TIME_X, SURVIVE_TIME_Y );
m_textSurviveTime.SetText( "" );
m_textSurviveTime.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
this->AddSubActor( &m_textSurviveTime );
m_textSurviveTime.SetDiffuse( D3DXCOLOR(1,1,1,0) );
this->AddChild( &m_textSurviveTime );
m_sprToasty.Load( THEME->GetPathTo("Graphics","gameplay toasty") );
m_sprToasty.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
this->AddSubActor( &m_sprToasty );
m_sprToasty.SetDiffuse( D3DXCOLOR(1,1,1,0) );
this->AddChild( &m_sprToasty );
m_soundToasty.Load( THEME->GetPathTo("Sounds","gameplay toasty") );
@@ -508,7 +513,7 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad )
// reset oni game over graphic
m_sprOniGameOver[p].SetY( SCREEN_TOP - m_sprOniGameOver[p].GetZoomedHeight()/2 );
m_sprOniGameOver[p].SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // 0 alpha so we don't waste time drawing while not visible
m_sprOniGameOver[p].SetDiffuse( D3DXCOLOR(1,1,1,0) ); // 0 alpha so we don't waste time drawing while not visible
if( GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY && GAMESTATE->m_fSecondsBeforeFail[p] != -1 ) // already failed
ShowOniGameOver((PlayerNumber)p);
@@ -528,9 +533,9 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad )
}
m_Background.LoadFromSong( GAMESTATE->m_pCurSong );
m_Background.SetDiffuseColor( D3DXCOLOR(0.5f,0.5f,0.5f,1) );
m_Background.BeginTweeningQueued( 2 );
m_Background.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_Background.SetDiffuse( D3DXCOLOR(0.5f,0.5f,0.5f,1) );
m_Background.BeginTweening( 2 );
m_Background.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_soundMusic.Load( GAMESTATE->m_pCurSong->GetMusicPath(), true ); // enable accurate sync
float fStartSeconds = min( 0, -4+GAMESTATE->m_pCurSong->GetElapsedTimeFromBeat(GAMESTATE->m_pCurSong->m_fFirstBeat) );
@@ -710,7 +715,7 @@ void ScreenGameplay::Update( float fDeltaTime )
// fPositionSeconds ahead
if( GAMESTATE->m_SongOptions.m_AssistType == SongOptions::ASSIST_TICK )
{
fPositionSeconds += (SOUND->GetPlayLatency()+0.018f) * m_soundMusic.GetPlaybackRate(); // HACK: Add 0.015 seconds to account for the fact that the middle of the tick sounds occurs 0.015 seconds into playing.
fPositionSeconds += (SOUND->GetPlayLatency()+g_fTickEarlySecondsCache) * m_soundMusic.GetPlaybackRate(); // HACK: Play the sound a little bit early to account for the fact that the middle of the tick sounds occurs 0.015 seconds into playing.
GAMESTATE->m_pCurSong->GetBeatAndBPSFromElapsedTime( fPositionSeconds, fSongBeat, fBPS, bFreeze );
int iRowNow = BeatToNoteRowNotRounded( fSongBeat );
@@ -739,9 +744,9 @@ void ScreenGameplay::Update( float fDeltaTime )
}
if( PREFSMAN->m_bAutoPlay && !GAMESTATE->m_bDemonstration )
m_textAutoPlay.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textAutoPlay.SetDiffuse( D3DXCOLOR(1,1,1,1) );
else
m_textAutoPlay.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textAutoPlay.SetDiffuse( D3DXCOLOR(1,1,1,0) );
Screen::Update( fDeltaTime );
}
@@ -792,11 +797,11 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
else
GAMESTATE->m_SongOptions.m_AssistType = SongOptions::ASSIST_NONE;
m_textDebug.SetText( ssprintf( "Assist tick is %s.", (GAMESTATE->m_SongOptions.m_AssistType==SongOptions::ASSIST_NONE)?"OFF":"ON") );
m_textDebug.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textDebug.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_textDebug.StopTweening();
m_textDebug.BeginTweeningQueued( 3 ); // sleep
m_textDebug.BeginTweeningQueued( 0.5f ); // fade out
m_textDebug.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textDebug.BeginTweening( 3 ); // sleep
m_textDebug.BeginTweening( 0.5f ); // fade out
m_textDebug.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
break;
case DIK_F8:
PREFSMAN->m_bAutoPlay = !PREFSMAN->m_bAutoPlay;
@@ -820,11 +825,11 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
seg.m_fBPM += fOffsetDelta;
m_textDebug.SetText( ssprintf("Cur BPM = %f", seg.m_fBPM) );
m_textDebug.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textDebug.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_textDebug.StopTweening();
m_textDebug.BeginTweeningQueued( 3 ); // sleep
m_textDebug.BeginTweeningQueued( 0.5f ); // fade out
m_textDebug.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textDebug.BeginTweening( 3 ); // sleep
m_textDebug.BeginTweening( 0.5f ); // fade out
m_textDebug.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
}
break;
case DIK_F11:
@@ -845,11 +850,11 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds += fOffsetDelta;
m_textDebug.SetText( ssprintf("Offset = %f", GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds) );
m_textDebug.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textDebug.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_textDebug.StopTweening();
m_textDebug.BeginTweeningQueued( 3 ); // sleep
m_textDebug.BeginTweeningQueued( 0.5f ); // fade out
m_textDebug.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textDebug.BeginTweening( 3 ); // sleep
m_textDebug.BeginTweening( 0.5f ); // fade out
m_textDebug.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
}
break;
}
@@ -1079,16 +1084,16 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
// set off screen
m_sprToasty.StopTweening();
m_sprToasty.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprToasty.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprToasty.SetX( SCREEN_RIGHT+m_sprToasty.GetUnzoomedWidth()/2 );
m_sprToasty.SetY( SCREEN_BOTTOM-m_sprToasty.GetUnzoomedHeight()/2 );
m_sprToasty.BeginTweeningQueued( 0.2f, Actor::TWEEN_BIAS_BEGIN ); // slide on
m_sprToasty.BeginTweening( 0.2f, Actor::TWEEN_BIAS_BEGIN ); // slide on
m_sprToasty.SetTweenX( SCREEN_RIGHT-m_sprToasty.GetUnzoomedWidth()/2 );
m_sprToasty.BeginTweeningQueued( 0.6f ); // sleep
m_sprToasty.BeginTweeningQueued( 0.3f, Actor::TWEEN_BIAS_END ); // slide off
m_sprToasty.BeginTweening( 0.6f ); // sleep
m_sprToasty.BeginTweening( 0.3f, Actor::TWEEN_BIAS_END ); // slide off
m_sprToasty.SetTweenX( SCREEN_RIGHT+m_sprToasty.GetUnzoomedWidth()/2 );
m_sprToasty.BeginTweeningQueued( 0.001f ); // fade out
m_sprToasty.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprToasty.BeginTweening( 0.001f ); // fade out
m_sprToasty.SetDiffuse( D3DXCOLOR(1,1,1,0) );
break;
case SM_PlayToastySound:
@@ -1177,12 +1182,12 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
// received while STATE_OUTRO
case SM_ShowCleared:
m_sprCleared.BeginTweening(1.0f);
m_sprCleared.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
SCREENMAN->SendMessageToTopScreen( SM_HideCleared, 2.5 );
m_sprCleared.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
SCREENMAN->SendMessageToTopScreen( SM_HideCleared, 1.5 );
break;
case SM_HideCleared:
m_sprCleared.BeginTweening(0.7f);
m_sprCleared.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprCleared.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
SCREENMAN->SendMessageToTopScreen( SM_GoToStateAfterCleared, 1 );
break;
case SM_SaveChangedBeforeGoingBack:
@@ -1236,18 +1241,18 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
// make the background invisible so we don't waste mem bandwidth drawing it
m_Background.BeginTweening( 1 );
m_Background.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_Background.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprFailed.SetZoom( 4 );
m_sprFailed.BeginBlurredTweening( 0.8f, TWEEN_BIAS_END );
m_sprFailed.SetTweenZoom( 0.5f ); // zoom out
m_sprFailed.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0.7f) ); // and fade in
m_sprFailed.BeginTweeningQueued( 0.3f );
m_sprFailed.SetTweenDiffuse( D3DXCOLOR(1,1,1,0.7f) ); // and fade in
m_sprFailed.BeginTweening( 0.3f );
m_sprFailed.SetTweenZoom( 1.1f ); // bounce
m_sprFailed.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0.7f) ); // and fade in
m_sprFailed.BeginTweeningQueued( 0.2f );
m_sprFailed.SetTweenDiffuse( D3DXCOLOR(1,1,1,0.7f) ); // and fade in
m_sprFailed.BeginTweening( 0.2f );
m_sprFailed.SetTweenZoom( 1.0f ); // come to rest
m_sprFailed.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0.7f) ); // and fade in
m_sprFailed.SetTweenDiffuse( D3DXCOLOR(1,1,1,0.7f) ); // and fade in
// show the survive time if extra stage
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
@@ -1259,12 +1264,12 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
ASSERT( fMaxSurviveSeconds != -1 );
m_textSurviveTime.SetText( "TIME " + SecondsToTime(fMaxSurviveSeconds) );
m_textSurviveTime.BeginTweening( 0.3f ); // sleep
m_textSurviveTime.BeginTweeningQueued( 0.3f ); // fade in
m_textSurviveTime.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textSurviveTime.BeginTweening( 0.3f ); // fade in
m_textSurviveTime.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
}
SCREENMAN->SendMessageToTopScreen( SM_PlayFailComment, 1.5f );
SCREENMAN->SendMessageToTopScreen( SM_HideFailed, 3.0f );
SCREENMAN->SendMessageToTopScreen( SM_PlayFailComment, 1.0f );
SCREENMAN->SendMessageToTopScreen( SM_HideFailed, 2.0f );
break;
case SM_PlayFailComment:
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("gameplay failed") );
@@ -1272,11 +1277,11 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
case SM_HideFailed:
m_sprFailed.StopTweening();
m_sprFailed.BeginTweening(1.0f);
m_sprFailed.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprFailed.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_textSurviveTime.BeginTweening( 0.5f ); // sleep
m_textSurviveTime.BeginTweeningQueued( 0.5f ); // fade out
m_textSurviveTime.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textSurviveTime.BeginTweening( 0.5f ); // fade out
m_textSurviveTime.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
SCREENMAN->SendMessageToTopScreen( SM_GoToScreenAfterFail, 1.5f );
break;
@@ -1319,8 +1324,8 @@ void ScreenGameplay::TweenOnScreen()
float fOriginalY = apActorsInTopFrame[i]->GetY();
apActorsInTopFrame[i]->SetY( fOriginalY-100 );
if( !GAMESTATE->m_bDemonstration )
apActorsInTopFrame[i]->BeginTweeningQueued( 0.5f ); // sleep
apActorsInTopFrame[i]->BeginTweeningQueued( 1 );
apActorsInTopFrame[i]->BeginTweening( 0.5f ); // sleep
apActorsInTopFrame[i]->BeginTweening( 1 );
apActorsInTopFrame[i]->SetTweenY( fOriginalY );
}
@@ -1340,8 +1345,8 @@ void ScreenGameplay::TweenOnScreen()
float fOriginalY = apActorsInBottomFrame[i]->GetY();
apActorsInBottomFrame[i]->SetY( fOriginalY+100 );
if( !GAMESTATE->m_bDemonstration )
apActorsInBottomFrame[i]->BeginTweeningQueued( 0.5f ); // sleep
apActorsInBottomFrame[i]->BeginTweeningQueued( 1 );
apActorsInBottomFrame[i]->BeginTweening( 0.5f ); // sleep
apActorsInBottomFrame[i]->BeginTweening( 1 );
apActorsInBottomFrame[i]->SetTweenY( fOriginalY );
}
@@ -1350,8 +1355,8 @@ void ScreenGameplay::TweenOnScreen()
float fOriginalX = m_DifficultyBanner[p].GetX();
m_DifficultyBanner[p].SetX( (p==PLAYER_1) ? fOriginalX-200 : fOriginalX+200 );
if( !GAMESTATE->m_bDemonstration )
m_DifficultyBanner[p].BeginTweeningQueued( 0.5f ); // sleep
m_DifficultyBanner[p].BeginTweeningQueued( 1 );
m_DifficultyBanner[p].BeginTweening( 0.5f ); // sleep
m_DifficultyBanner[p].BeginTweening( 1 );
m_DifficultyBanner[p].SetTweenX( fOriginalX );
}
}
@@ -1363,7 +1368,7 @@ void ScreenGameplay::TweenOffScreen()
void ScreenGameplay::ShowOniGameOver( PlayerNumber p )
{
m_sprOniGameOver[p].SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprOniGameOver[p].SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprOniGameOver[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
m_sprOniGameOver[p].SetTweenY( CENTER_Y );
m_sprOniGameOver[p].SetEffectBobbing( D3DXVECTOR3(0,6,0), 4 );
+4 -4
View File
@@ -40,7 +40,7 @@ ScreenHowToPlay::ScreenHowToPlay()
HELP_TEXT, true, TIMER_SECONDS
);
m_Menu.TweenOnScreenFromMenu( SM_None );
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
CString sHowToPlayPath;
switch( GAMESTATE->m_PlayMode )
@@ -58,11 +58,11 @@ ScreenHowToPlay::ScreenHowToPlay()
m_sprHowToPlay.Load( sHowToPlayPath );
m_sprHowToPlay.SetXY( CENTER_X, CENTER_Y );
this->AddSubActor( &m_sprHowToPlay );
this->AddChild( &m_sprHowToPlay );
m_sprHowToPlay.SetX( SCREEN_LEFT-SCREEN_WIDTH );
m_sprHowToPlay.BeginTweeningQueued( 0.4f ); // sleep
m_sprHowToPlay.BeginTweeningQueued( 0.6f, Actor::TWEEN_BIAS_BEGIN );
m_sprHowToPlay.BeginTweening( 0.4f ); // sleep
m_sprHowToPlay.BeginTweening( 0.6f, Actor::TWEEN_BIAS_BEGIN );
m_sprHowToPlay.SetTweenX( CENTER_X );
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","how to play music") );
+7 -7
View File
@@ -60,7 +60,7 @@ ScreenManager::ScreenManager()
m_textCreditInfo[p].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textCreditInfo[p].SetXY( CREDITS_X(p), CREDITS_Y(p) );
m_textCreditInfo[p].SetZoom( 0.5f );
m_textCreditInfo[p].SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textCreditInfo[p].SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_textCreditInfo[p].SetShadowLength( 2 );
}
@@ -70,7 +70,7 @@ ScreenManager::ScreenManager()
m_textSystemMessage.SetXY( 4.0f, 4.0f );
m_textSystemMessage.SetZoom( 0.5f );
m_textSystemMessage.SetShadowLength( 2 );
m_textSystemMessage.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textSystemMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) );
}
@@ -129,7 +129,7 @@ void ScreenManager::Draw()
for( int i=0; i<m_ScreenStack.GetSize(); i++ )
m_ScreenStack[i]->Draw();
if( m_textSystemMessage.GetDiffuseColor().a != 0 )
if( m_textSystemMessage.GetDiffuse().a != 0 )
m_textSystemMessage.Draw();
if( PREFSMAN && PREFSMAN->m_bShowStats )
@@ -266,10 +266,10 @@ void ScreenManager::SystemMessage( CString sMessage )
// Look for an open spot
m_textSystemMessage.StopTweening();
m_textSystemMessage.SetText( sMessage );
m_textSystemMessage.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textSystemMessage.BeginTweeningQueued( 5 );
m_textSystemMessage.BeginTweeningQueued( 1 );
m_textSystemMessage.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textSystemMessage.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_textSystemMessage.BeginTweening( 5 );
m_textSystemMessage.BeginTweening( 1 );
m_textSystemMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
LOG->Trace( "WARNING: Didn't find an empty system messages slot." );
}
+6 -6
View File
@@ -130,7 +130,7 @@ ScreenMusicScroll::ScreenMusicScroll()
m_sprBackground.Load( THEME->GetPathTo("Graphics","music scroll background") );
m_sprBackground.StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
this->AddSubActor( &m_sprBackground );
this->AddChild( &m_sprBackground );
CArray<Song*, Song*> arraySongs;
@@ -144,7 +144,7 @@ ScreenMusicScroll::ScreenMusicScroll()
Song* pSong = arraySongs[i];
m_textLines[m_iNumLines].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textLines[m_iNumLines].SetText( pSong->GetFullTitle() );
m_textLines[m_iNumLines].SetDiffuseColor( SONGMAN->GetSongColor(pSong) );
m_textLines[m_iNumLines].SetDiffuse( SONGMAN->GetSongColor(pSong) );
m_iNumLines++;
}
@@ -153,7 +153,7 @@ ScreenMusicScroll::ScreenMusicScroll()
{
m_textLines[m_iNumLines].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textLines[m_iNumLines].SetText( CREDIT_LINES[i] );
// this->AddSubActor( &m_textLines[m_iNumLines] );
// this->AddChild( &m_textLines[m_iNumLines] );
m_iNumLines++;
}
@@ -162,14 +162,14 @@ ScreenMusicScroll::ScreenMusicScroll()
{
m_textLines[i].SetZoom( 0.7f );
m_textLines[i].SetXY( CENTER_X, SCREEN_BOTTOM + 40 );
m_textLines[i].BeginTweeningQueued( 0.20f * i );
m_textLines[i].BeginTweeningQueued( 2.0f );
m_textLines[i].BeginTweening( 0.20f * i );
m_textLines[i].BeginTweening( 2.0f );
m_textLines[i].SetTweenXY( CENTER_X, SCREEN_TOP - 40 );
}
this->SendScreenMessage( SM_StartFadingOut, 0.2f * i + 3.0f );
this->AddSubActor( &m_Fade );
this->AddChild( &m_Fade );
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("music scroll") );
+12 -11
View File
@@ -52,14 +52,14 @@ ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CStrin
sTopEdgePath,
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
// add everything to m_framePage so we can animate everything at once
this->AddSubActor( &m_framePage );
this->AddChild( &m_framePage );
m_sprPage.Load( sPagePath );
m_sprPage.SetXY( CENTER_X, CENTER_Y );
m_framePage.AddSubActor( &m_sprPage );
m_framePage.AddChild( &m_sprPage );
for( int p=0; p<NUM_PLAYERS; p++ )
@@ -72,7 +72,7 @@ ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CStrin
m_Menu.TweenOnScreenFromBlack( SM_None );
m_Wipe.OpenWipingRight(SM_None);
this->AddSubActor( &m_Wipe );
this->AddChild( &m_Wipe );
m_framePage.SetX( SCREEN_LEFT-SCREEN_WIDTH );
m_framePage.BeginTweening( 0.3f, Actor::TWEEN_BIAS_BEGIN );
@@ -106,23 +106,23 @@ void ScreenOptions::Init( InputMode im, OptionLineData optionLineData[], int iNu
for( int l=0; l<m_iNumOptionLines; l++ )
{
m_Underline[p][l].Load( (PlayerNumber)p, true );
m_framePage.AddSubActor( &m_Underline[p][l] );
m_framePage.AddChild( &m_Underline[p][l] );
}
m_Highlight[p].Load( (PlayerNumber)p, false );
m_framePage.AddSubActor( &m_Highlight[p] );
m_framePage.AddChild( &m_Highlight[p] );
}
// init text
for( int i=0; i<m_iNumOptionLines; i++ ) // foreach line
{
m_framePage.AddSubActor( &m_textOptionLineTitles[i] );
m_framePage.AddChild( &m_textOptionLineTitles[i] );
for( int j=0; j<m_OptionLineData[i].iNumOptions; j++ )
{
m_textOptions[i][j].SetZ( -1 );
m_framePage.AddSubActor( &m_textOptions[i][j] ); // this array has to be big enough to hold all of the options
m_framePage.AddChild( &m_textOptions[i][j] ); // this array has to be big enough to hold all of the options
}
}
@@ -177,7 +177,7 @@ void ScreenOptions::InitOptionsText()
BitmapText &option = m_textOptions[i][j];
option.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
option.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
option.SetDiffuse( D3DXCOLOR(1,1,1,1) );
option.SetText( optline.szOptionsText[j] );
option.SetZoom( 0.5f );
option.SetShadowLength( 2 );
@@ -196,9 +196,9 @@ void ScreenOptions::DimOption(int line, int option, bool dim)
m_OptionDim[line][option] = dim;
m_textOptions[line][option].BeginTweening(.250);
if(m_OptionDim[line][option])
m_textOptions[line][option].SetTweenDiffuseColor( D3DXCOLOR(.5,.5,.5,1) );
m_textOptions[line][option].SetTweenDiffuse( D3DXCOLOR(.5,.5,.5,1) );
else
m_textOptions[line][option].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textOptions[line][option].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
/* Don't know if I like this ...-glenn
m_textOptionLineTitles[line].BeginTweening(.250);
@@ -262,6 +262,7 @@ void ScreenOptions::TweenHighlight( PlayerNumber player_no )
int iWidth, iX, iY;
GetWidthXY( player_no, iCurRow, iWidth, iX, iY );
highlight.StopTweening();
highlight.BeginTweening( 0.2f );
highlight.TweenBarWidth( iWidth );
highlight.SetTweenXY( (float)iX, (float)iY );
+3 -1
View File
@@ -25,6 +25,7 @@
enum {
PO_SPEED = 0,
PO_BOOST,
PO_EFFECT,
PO_APPEAR,
PO_TURN,
@@ -37,7 +38,8 @@ enum {
};
OptionLineData g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = {
{ "Speed", 9, {"x0.5","x0.75","x1","x1.5","x2","x3","x4","x5","x8"} },
{ "Effect", 7, {"OFF","BOOST","WAVE", "DRUNK", "DIZZY","SPACE","MINI"} },
{ "Boost", 2, {"OFF","ON"} },
{ "Effect", 8, {"OFF","WAVE", "DRUNK", "DIZZY","SPACE","MINI","FLIP","TORNADO"} },
{ "Appear", 4, {"VISIBLE","HIDDEN","SUDDEN","STEALTH"} },
{ "Turn", 5, {"OFF","MIRROR","LEFT","RIGHT","SHUFFLE"} },
{ "Little", 2, {"OFF","ON"} },
+11 -11
View File
@@ -35,25 +35,25 @@ ScreenPrompt::ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, bool b
m_Fade.SetTransitionTime( 0.5f );
m_Fade.SetDiffuseColor( D3DXCOLOR(0,0,0,0.7f) );
m_Fade.SetDiffuse( D3DXCOLOR(0,0,0,0.7f) );
m_Fade.SetOpened();
m_Fade.CloseWipingRight();
this->AddSubActor( &m_Fade );
this->AddChild( &m_Fade );
m_textQuestion.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textQuestion.SetText( sText );
m_textQuestion.SetXY( QUESTION_X, QUESTION_Y );
this->AddSubActor( &m_textQuestion );
this->AddChild( &m_textQuestion );
m_rectAnswerBox.SetDiffuseColor( D3DXCOLOR(0.5f,0.5f,1.0f,0.7f) );
this->AddSubActor( &m_rectAnswerBox );
m_rectAnswerBox.SetDiffuse( D3DXCOLOR(0.5f,0.5f,1.0f,0.7f) );
this->AddChild( &m_rectAnswerBox );
m_textAnswer[0].LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textAnswer[1].LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textAnswer[0].SetY( PROMPT_Y );
m_textAnswer[1].SetY( PROMPT_Y );
this->AddSubActor( &m_textAnswer[0] );
this->AddSubActor( &m_textAnswer[1] );
this->AddChild( &m_textAnswer[0] );
this->AddChild( &m_textAnswer[1] );
@@ -142,17 +142,17 @@ void ScreenPrompt::MenuStart( PlayerNumber p )
m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight );
m_textQuestion.BeginTweening( 0.2f );
m_textQuestion.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textQuestion.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_rectAnswerBox.BeginTweening( 0.2f );
m_rectAnswerBox.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_rectAnswerBox.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_textAnswer[m_bAnswer].SetEffectNone();
m_textAnswer[0].BeginTweening( 0.2f );
m_textAnswer[0].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textAnswer[0].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_textAnswer[1].BeginTweening( 0.2f );
m_textAnswer[1].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textAnswer[1].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
+6 -3
View File
@@ -22,7 +22,10 @@ ScreenSandbox::ScreenSandbox()
{
m_spr.Load( THEME->GetPathTo("Graphics","title menu logo game 0") );
m_spr.SetXY( CENTER_X, CENTER_Y );
this->AddSubActor( &m_spr );
m_spr.SetZoomY( 0 );
m_spr.BeginTweening( 0.5f );
m_spr.SetTweenZoomY( 1 );
this->AddChild( &m_spr );
// m_Menu.Load(
// THEME->GetPathTo(GRAPHIC_SELECT_STYLE_BACKGROUND),
@@ -30,10 +33,10 @@ ScreenSandbox::ScreenSandbox()
// ssprintf("Use %c %c to select, then press START", char(1), char(2) ),
// false, true, 40
// );
// this->AddSubActor( &m_Menu );
// this->AddChild( &m_Menu );
// m_Menu.TweenOnScreenFromBlack( SM_None );
//this->AddSubActor( &m_spr );
//this->AddChild( &m_spr );
}
+58 -30
View File
@@ -25,6 +25,7 @@
#include "AnnouncerManager.h"
#include "GameState.h"
#include "RageMusic.h"
#include "CodeDetector.h"
#define BANNER_FRAME_X THEME->GetMetricF("ScreenSelectCourse","BannerFrameX")
@@ -68,31 +69,31 @@ ScreenSelectCourse::ScreenSelectCourse()
THEME->GetPathTo("Graphics","select course top edge"),
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
m_Banner.SetXY( BANNER_X, BANNER_Y );
m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
this->AddSubActor( &m_Banner );
this->AddChild( &m_Banner );
m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","select course info frame") );
m_sprBannerFrame.SetXY( BANNER_FRAME_X, BANNER_FRAME_Y );
this->AddSubActor( &m_sprBannerFrame );
this->AddChild( &m_sprBannerFrame );
m_textNumStages.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textNumStages.SetXY( STAGES_X, STAGES_Y );
m_textNumStages.TurnShadowOff();
this->AddSubActor( &m_textNumStages );
this->AddChild( &m_textNumStages );
m_textTime.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textTime.SetXY( TIME_X, TIME_Y );
m_textTime.TurnShadowOff();
this->AddSubActor( &m_textTime );
this->AddChild( &m_textTime );
m_CourseContentsFrame.SetXY( CONTENTS_X, CONTENTS_Y );
this->AddSubActor( &m_CourseContentsFrame );
this->AddChild( &m_CourseContentsFrame );
m_MusicWheel.SetXY( WHEEL_X, WHEEL_Y );
this->AddSubActor( &m_MusicWheel );
this->AddChild( &m_MusicWheel );
for( int p=0; p<NUM_PLAYERS; p++ )
{
@@ -103,12 +104,12 @@ ScreenSelectCourse::ScreenSelectCourse()
m_sprHighScoreFrame[p].StopAnimating();
m_sprHighScoreFrame[p].SetState( p );
m_sprHighScoreFrame[p].SetXY( SCORE_X(p), SCORE_Y(p) );
this->AddSubActor( &m_sprHighScoreFrame[p] );
this->AddChild( &m_sprHighScoreFrame[p] );
m_HighScore[p].SetXY( SCORE_X(p), SCORE_Y(p) );
m_HighScore[p].SetZoom( 0.6f );
m_HighScore[p].SetDiffuseColor( PlayerToColor(p) );
this->AddSubActor( &m_HighScore[p] );
m_HighScore[p].SetDiffuse( PlayerToColor(p) );
this->AddChild( &m_HighScore[p] );
}
m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","Stage") );
@@ -116,17 +117,19 @@ ScreenSelectCourse::ScreenSelectCourse()
m_textHoldForOptions.SetText( "press START again for options" );
m_textHoldForOptions.SetZoom( 1 );
m_textHoldForOptions.SetZoomY( 0 );
m_textHoldForOptions.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
this->AddSubActor( &m_textHoldForOptions );
m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) );
this->AddChild( &m_textHoldForOptions );
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","select music change notes") );
m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music change options") );
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("select course intro") );
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","select course music") );
UpdateOptionsDisplays();
AfterCourseChange();
TweenOnScreen();
m_Menu.TweenOnScreenFromMenu( SM_None );
@@ -160,7 +163,7 @@ void ScreenSelectCourse::TweenOnScreen()
}
m_CourseContentsFrame.SetXY( CONTENTS_X - 400, CONTENTS_Y );
m_CourseContentsFrame.BeginTweeningQueued( TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_CourseContentsFrame.BeginTweening( TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_CourseContentsFrame.SetTweenXY( CONTENTS_X, CONTENTS_Y );
Actor* pActorsInScore[] = { &m_sprHighScoreFrame[0], &m_sprHighScoreFrame[1], &m_HighScore[0], &m_HighScore[1] };
@@ -183,11 +186,11 @@ void ScreenSelectCourse::TweenOffScreen()
int i;
for( i=0; i<iNumActorsInGroupInfoFrame; i++ )
{
pActorsInCourseInfoFrame[i]->BeginTweeningQueued( TWEEN_TIME, TWEEN_BOUNCE_BEGIN );
pActorsInCourseInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_BEGIN );
pActorsInCourseInfoFrame[i]->SetTweenX( pActorsInCourseInfoFrame[i]->GetX()-400 );
}
m_CourseContentsFrame.BeginTweeningQueued( TWEEN_TIME, Actor::TWEEN_BOUNCE_BEGIN );
m_CourseContentsFrame.BeginTweening( TWEEN_TIME, Actor::TWEEN_BOUNCE_BEGIN );
m_CourseContentsFrame.SetTweenXY( CONTENTS_X - 400, CONTENTS_Y );
Actor* pActorsInScore[] = { &m_sprHighScoreFrame[0], &m_sprHighScoreFrame[1], &m_HighScore[0], &m_HighScore[1] };
@@ -205,25 +208,34 @@ void ScreenSelectCourse::TweenOffScreen()
void ScreenSelectCourse::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
LOG->Trace( "ScreenSelectCourse::Input()" );
if(type == IET_RELEASE) return; // don't care
if( type == IET_RELEASE ) return; // don't care
if( m_Menu.IsClosing() )
return; // ignore
if( m_Menu.IsClosing() ) return; // ignore
if( MenuI.player == PLAYER_INVALID )
return;
if( !GameI.IsValid() ) return; // don't care
if( m_bMadeChoice && !m_bGoToOptions && MenuI.button == MENU_BUTTON_START )
if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
{
m_bGoToOptions = true;
m_textHoldForOptions.SetText( "Entering Options..." );
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
return;
}
if( m_bMadeChoice )
return;
PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller );
if( CodeDetector::DetectAndAdjustOptions(GameI.controller) )
{
m_soundOptionsChange.Play();
UpdateOptionsDisplays();
return;
}
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
}
@@ -289,18 +301,18 @@ void ScreenSelectCourse::MenuStart( PlayerNumber p )
TweenOffScreen();
m_soundSelect.PlayRandom();
m_soundSelect.Play();
m_bMadeChoice = true;
// show "hold START for options"
m_textHoldForOptions.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.BeginTweeningQueued( 0.25f ); // fade in
m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.BeginTweening( 0.25f ); // fade in
m_textHoldForOptions.SetTweenZoomY( 1 );
m_textHoldForOptions.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textHoldForOptions.BeginTweeningQueued( 2.0f ); // sleep
m_textHoldForOptions.BeginTweeningQueued( 0.25f ); // fade out
m_textHoldForOptions.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_textHoldForOptions.BeginTweening( 2.0f ); // sleep
m_textHoldForOptions.BeginTweening( 0.25f ); // fade out
m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.SetTweenZoomY( 0 );
m_Menu.TweenOffScreenToBlack( SM_None, false );
@@ -354,3 +366,19 @@ void ScreenSelectCourse::AfterCourseChange()
}
}
void ScreenSelectCourse::UpdateOptionsDisplays()
{
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( GAMESTATE->IsPlayerEnabled(p) )
{
CString s = GAMESTATE->m_PlayerOptions[p].GetString();
s.Replace( ", ", "\n" );
// m_textPlayerOptions[p].SetText( s );
}
}
CString s = GAMESTATE->m_SongOptions.GetString();
s.Replace( ", ", "\n" );
// m_textSongOptions.SetText( s );
}
+7 -3
View File
@@ -12,7 +12,7 @@
#include "Screen.h"
#include "Sprite.h"
#include "BitmapText.h"
#include "RandomStream.h"
#include "RageSoundSample.h"
#include "GameConstantsAndTypes.h"
#include "MusicWheel.h"
#include "CourseContentsFrame.h"
@@ -42,6 +42,8 @@ public:
protected:
void AfterCourseChange();
void UpdateOptionsDisplays();
MenuElements m_Menu;
Sprite m_sprBannerFrame;
@@ -51,14 +53,16 @@ protected:
CourseContentsFrame m_CourseContentsFrame;
Sprite m_sprHighScoreFrame[NUM_PLAYERS];
ScoreDisplayNormal m_HighScore[NUM_PLAYERS];
BitmapText m_textPlayerOptions[NUM_PLAYERS];
BitmapText m_textSongOptions;
MusicWheel m_MusicWheel;
bool m_bMadeChoice;
bool m_bGoToOptions;
BitmapText m_textHoldForOptions;
RandomSample m_soundSelect;
RandomSample m_soundChangeNotes;
RageSoundSample m_soundSelect;
RageSoundSample m_soundOptionsChange;
};
+45 -39
View File
@@ -93,7 +93,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
THEME->GetPathTo("Graphics","select difficulty top edge"),
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
for( int d=0; d<NUM_DIFFICULTY_ITEMS; d++ )
@@ -112,26 +112,26 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
m_sprPicture[d].SetXY( ITEM_X(d), ITEM_Y(d) );
m_sprPicture[d].SetVertAlign( align_bottom );
m_sprPicture[d].TurnShadowOff();
m_framePages.AddSubActor( &m_sprPicture[d] );
m_framePages.AddChild( &m_sprPicture[d] );
m_sprHeader[d].Load( THEME->GetPathTo("Graphics",sHeaderFile) );
m_sprHeader[d].SetXY( ITEM_X(d), ITEM_Y(d) );
m_sprHeader[d].SetVertAlign( align_top );
m_sprHeader[d].TurnShadowOff();
m_framePages.AddSubActor( &m_sprHeader[d] );
m_framePages.AddChild( &m_sprHeader[d] );
}
for( p=0; p<NUM_PAGES; p++ )
{
m_sprMoreArrows[p].Load( THEME->GetPathTo("Graphics", p==0 ? "select difficulty more page1" : "select difficulty more page2" ) );
m_sprMoreArrows[p].SetXY( MORE_X(p), MORE_Y(p) );
m_framePages.AddSubActor( &m_sprMoreArrows[p] );
m_framePages.AddChild( &m_sprMoreArrows[p] );
m_sprExplanation[p].Load( THEME->GetPathTo("Graphics", "select difficulty explanation") );
m_sprExplanation[p].SetXY( EXPLANATION_X(p), EXPLANATION_Y(p) );
m_sprExplanation[p].StopAnimating();
m_sprExplanation[p].SetState( p );
m_framePages.AddSubActor( &m_sprExplanation[p] );
m_framePages.AddChild( &m_sprExplanation[p] );
}
@@ -147,21 +147,21 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
m_sprCursorShadow[p].StopAnimating();
m_sprCursorShadow[p].SetState( p );
m_sprCursorShadow[p].TurnShadowOff();
m_sprCursorShadow[p].SetDiffuseColor( D3DXCOLOR(0,0,0,0.6f) );
m_framePages.AddSubActor( &m_sprCursorShadow[p] );
m_sprCursorShadow[p].SetDiffuse( D3DXCOLOR(0,0,0,0.6f) );
m_framePages.AddChild( &m_sprCursorShadow[p] );
m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "select difficulty cursor 2x1") );
m_sprCursor[p].StopAnimating();
m_sprCursor[p].SetState( p );
m_sprCursor[p].TurnShadowOff();
m_sprCursor[p].SetEffectGlowing();
m_framePages.AddSubActor( &m_sprCursor[p] );
m_framePages.AddChild( &m_sprCursor[p] );
m_sprOK[p].Load( THEME->GetPathTo("Graphics", "select difficulty ok 2x1") );
m_framePages.AddSubActor( &m_sprOK[p] );
m_framePages.AddChild( &m_sprOK[p] );
}
this->AddSubActor( &m_framePages );
this->AddChild( &m_framePages );
m_soundChange.Load( THEME->GetPathTo("Sounds", "select difficulty change") );
m_soundSelect.Load( THEME->GetPathTo("Sounds", "menu start") );
@@ -351,6 +351,7 @@ void ScreenSelectDifficulty::ChangeTo( PlayerNumber pn, int iSelectionWas, int i
if( bChangedPagesFrom1To2 || bChangedPagesFrom2To1 )
{
m_framePages.StopTweening();
m_framePages.BeginTweening( 0.2f );
m_framePages.SetTweenX( bSelectedSomethingOnPage1 ? 0.0f : -SCREEN_WIDTH );
}
@@ -359,10 +360,12 @@ void ScreenSelectDifficulty::ChangeTo( PlayerNumber pn, int iSelectionWas, int i
{
if( bSelectedSomethingOnPage2 || bChangedPagesFrom2To1 || p==pn )
{
m_sprCursor[p].StopTweening();
m_sprCursor[p].BeginTweening( 0.2f, bChangedPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN );
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_sprCursorShadow[p].StopTweening();
m_sprCursorShadow[p].BeginTweening( 0.2f, bChangedPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN );
m_sprCursorShadow[p].SetTweenX( CURSOR_X(m_iSelection[p],(PlayerNumber)p) );
m_sprCursorShadow[p].SetTweenY( CURSOR_Y(m_iSelection[p],(PlayerNumber)p) );
@@ -402,23 +405,23 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
}
}
m_sprCursor[pn].BeginTweeningQueued( 0.2f );
m_sprCursor[pn].BeginTweeningQueued( 0.2f );
m_sprCursor[pn].BeginTweening( 0.2f );
m_sprCursor[pn].BeginTweening( 0.2f );
m_sprCursor[pn].SetTweenX( CURSOR_X(iSelection, pn) );
m_sprCursor[pn].SetTweenY( CURSOR_Y(iSelection, pn) );
m_sprOK[pn].SetX( CURSOR_X(iSelection, pn) );
m_sprOK[pn].SetY( CURSOR_Y(iSelection, pn) );
m_sprOK[pn].SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprOK[pn].SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprOK[pn].SetZoom( 2 );
m_sprOK[pn].BeginTweening( 0.2f );
m_sprOK[pn].SetTweenZoom( 1 );
m_sprOK[pn].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprOK[pn].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprCursorShadow[pn].BeginTweeningQueued( 0.2f );
m_sprCursorShadow[pn].BeginTweeningQueued( 0.2f );
m_sprCursorShadow[pn].SetDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_sprCursorShadow[pn].BeginTweening( 0.2f );
m_sprCursorShadow[pn].BeginTweening( 0.2f );
m_sprCursorShadow[pn].SetDiffuse( D3DXCOLOR(0,0,0,0) );
// check to see if everyone has chosen
@@ -450,7 +453,7 @@ void ScreenSelectDifficulty::TweenOffScreen()
m_sprExplanation[p].SetTweenXY( EXPLANATION_X(p)+700, EXPLANATION_Y(p) );
m_sprMoreArrows[p].BeginTweening( 0.5 );
m_sprMoreArrows[p].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprMoreArrows[p].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
}
for( p=0; p<NUM_PLAYERS; p++ )
@@ -464,8 +467,8 @@ void ScreenSelectDifficulty::TweenOffScreen()
m_sprOK[p].BeginTweening( 0.3f );
m_sprOK[p].SetTweenZoom( 0 );
m_sprCursorShadow[p].BeginTweeningQueued( 0.3f );
m_sprCursorShadow[p].SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_sprCursorShadow[p].BeginTweening( 0.3f );
m_sprCursorShadow[p].SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
}
for( int d=0; d<NUM_DIFFICULTY_ITEMS; d++ )
@@ -476,21 +479,21 @@ void ScreenSelectDifficulty::TweenOffScreen()
const float fPauseTime = d*0.2f;
// pause
m_sprHeader[d].BeginTweeningQueued( fPauseTime );
m_sprHeader[d].BeginTweening( fPauseTime );
m_sprPicture[d].BeginTweeningQueued( fPauseTime );
m_sprPicture[d].BeginTweening( fPauseTime );
// roll up
m_sprHeader[d].BeginTweeningQueued( 0.3f, TWEEN_BOUNCE_BEGIN );
m_sprHeader[d].BeginTweening( 0.3f, TWEEN_BOUNCE_BEGIN );
m_sprPicture[d].BeginTweeningQueued( 0.3f, TWEEN_BOUNCE_BEGIN );
m_sprPicture[d].BeginTweening( 0.3f, TWEEN_BOUNCE_BEGIN );
m_sprPicture[d].SetTweenZoomY( 0 );
// fly off
m_sprHeader[d].BeginTweeningQueued( 0.4f, TWEEN_BIAS_END );
m_sprHeader[d].BeginTweening( 0.4f, TWEEN_BIAS_END );
m_sprHeader[d].SetTweenXY( ITEM_X(d)-700, ITEM_Y(d) );
m_sprPicture[d].BeginTweeningQueued( 0.4f, TWEEN_BIAS_END );
m_sprPicture[d].BeginTweening( 0.4f, TWEEN_BIAS_END );
m_sprPicture[d].SetTweenXY( ITEM_X(d)-700, ITEM_Y(d) );
}
}
@@ -505,9 +508,9 @@ void ScreenSelectDifficulty::TweenOnScreen()
m_sprExplanation[p].BeginTweening( 0.3f, Actor::TWEEN_BOUNCE_END );
m_sprExplanation[p].SetTweenXY( EXPLANATION_X(p), EXPLANATION_Y(p) );
m_sprMoreArrows[p].SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprMoreArrows[p].SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprMoreArrows[p].BeginTweening( 0.5 );
m_sprMoreArrows[p].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprMoreArrows[p].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
}
for( p=0; p<NUM_PLAYERS; p++ )
@@ -518,19 +521,22 @@ void ScreenSelectDifficulty::TweenOnScreen()
int iSelection = m_iSelection[p];
m_sprCursor[p].SetXY( CURSOR_X(iSelection,(PlayerNumber)p), CURSOR_Y(iSelection,(PlayerNumber)p) );
m_sprCursor[p].SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
/*
m_sprCursor[p].SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprCursor[p].SetRotation( D3DX_PI );
m_sprCursor[p].SetZoom( 2 );
m_sprCursor[p].BeginTweening( 0.3f );
m_sprCursor[p].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprCursor[p].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprCursor[p].SetTweenRotationZ( 0 );
m_sprCursor[p].SetTweenZoom( 1 );
*/
m_sprCursor[p].FadeOntoScreen( 0, "SpinZ ZoomX ZoomY Fade", 0.3f );
m_sprCursorShadow[p].SetXY( CURSOR_X(iSelection,(PlayerNumber)p), CURSOR_Y(iSelection,(PlayerNumber)p) );
D3DXCOLOR colorOriginal = m_sprCursorShadow[p].GetDiffuseColor();
m_sprCursorShadow[p].SetDiffuseColor( D3DXCOLOR(0,0,0,0) );
D3DXCOLOR colorOriginal = m_sprCursorShadow[p].GetDiffuse();
m_sprCursorShadow[p].SetDiffuse( D3DXCOLOR(0,0,0,0) );
m_sprCursorShadow[p].BeginTweening( 0.3f );
m_sprCursorShadow[p].SetTweenDiffuseColor( colorOriginal );
m_sprCursorShadow[p].SetTweenDiffuse( colorOriginal );
}
for( int d=0; d<NUM_DIFFICULTY_ITEMS; d++ )
@@ -547,21 +553,21 @@ void ScreenSelectDifficulty::TweenOnScreen()
m_sprPicture[d].SetZoomY( 0 );
// pause
m_sprHeader[d].BeginTweeningQueued( fPauseTime );
m_sprHeader[d].BeginTweening( fPauseTime );
m_sprPicture[d].BeginTweeningQueued( fPauseTime );
m_sprPicture[d].BeginTweening( fPauseTime );
// fly on
m_sprHeader[d].BeginTweeningQueued( 0.5f, TWEEN_BIAS_BEGIN );
m_sprHeader[d].BeginTweening( 0.5f, TWEEN_BIAS_BEGIN );
m_sprHeader[d].SetTweenXY( ITEM_X(d), ITEM_Y(d) );
m_sprPicture[d].BeginTweeningQueued( 0.5f, TWEEN_BIAS_BEGIN );
m_sprPicture[d].BeginTweening( 0.5f, TWEEN_BIAS_BEGIN );
m_sprPicture[d].SetTweenXY( ITEM_X(d), ITEM_Y(d) );
// roll down
m_sprHeader[d].BeginTweeningQueued( 0.3f, TWEEN_BOUNCE_END );
m_sprHeader[d].BeginTweening( 0.3f, TWEEN_BOUNCE_END );
m_sprPicture[d].BeginTweeningQueued( 0.3f, TWEEN_BOUNCE_END );
m_sprPicture[d].BeginTweening( 0.3f, TWEEN_BOUNCE_END );
m_sprPicture[d].SetTweenZoomY( 1 );
}
+16 -16
View File
@@ -126,37 +126,37 @@ ScreenSelectGroup::ScreenSelectGroup()
THEME->GetPathTo("Graphics","select group top edge"),
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
m_sprExplanation.Load( THEME->GetPathTo("Graphics","select group explanation") );
m_sprExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y );
this->AddSubActor( &m_sprExplanation );
this->AddChild( &m_sprExplanation );
// these guys get loaded SetSong and TweenToSong
m_Banner.SetXY( BANNER_X, BANNER_Y );
m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
this->AddSubActor( &m_Banner );
this->AddChild( &m_Banner );
m_sprFrame.Load( THEME->GetPathTo("Graphics","select group info frame") );
m_sprFrame.SetXY( FRAME_X, FRAME_Y );
this->AddSubActor( &m_sprFrame );
this->AddChild( &m_sprFrame );
m_textNumber.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textNumber.SetXY( NUMBER_X, NUMBER_Y );
m_textNumber.SetHorizAlign( Actor::align_right );
m_textNumber.TurnShadowOff();
this->AddSubActor( &m_textNumber );
this->AddChild( &m_textNumber );
m_sprContents.Load( THEME->GetPathTo("Graphics","select group contents header") );
m_sprContents.SetXY( CONTENTS_X, CONTENTS_Y );
this->AddSubActor( &m_sprContents );
this->AddChild( &m_sprContents );
this->AddSubActor( &m_MusicList );
this->AddChild( &m_MusicList );
for( i=0; i < asGroupNames.GetSize(); ++i )
m_GroupList.AddGroup( asGroupNames[i] );
m_GroupList.DoneAddingGroups();
this->AddSubActor( &m_GroupList );
this->AddChild( &m_GroupList );
m_soundChange.Load( THEME->GetPathTo("Sounds","select group change") );
@@ -300,21 +300,21 @@ void ScreenSelectGroup::MenuBack( PlayerNumber p )
void ScreenSelectGroup::TweenOffScreen()
{
m_sprExplanation.BeginTweeningQueued( 0.8f );
m_sprExplanation.BeginTweeningQueued( 0.5f, TWEEN_BOUNCE_BEGIN );
m_sprExplanation.BeginTweening( 0.8f );
m_sprExplanation.BeginTweening( 0.5f, TWEEN_BOUNCE_BEGIN );
m_sprExplanation.SetTweenX( EXPLANATION_X-400 );
Actor* pActorsInGroupInfoFrame[] = { &m_sprFrame, &m_Banner, &m_textNumber };
const int iNumActorsInGroupInfoFrame = sizeof(pActorsInGroupInfoFrame) / sizeof(Actor*);
for( int i=0; i<iNumActorsInGroupInfoFrame; i++ )
{
pActorsInGroupInfoFrame[i]->BeginTweeningQueued( 0.9f );
pActorsInGroupInfoFrame[i]->BeginTweeningQueued( 0.5f, TWEEN_BOUNCE_BEGIN );
pActorsInGroupInfoFrame[i]->BeginTweening( 0.9f );
pActorsInGroupInfoFrame[i]->BeginTweening( 0.5f, TWEEN_BOUNCE_BEGIN );
pActorsInGroupInfoFrame[i]->SetTweenX( pActorsInGroupInfoFrame[i]->GetX()-400 );
}
m_sprContents.BeginTweeningQueued( 0.7f );
m_sprContents.BeginTweeningQueued( 0.5f, TWEEN_BIAS_END );
m_sprContents.BeginTweening( 0.7f );
m_sprContents.BeginTweening( 0.5f, TWEEN_BIAS_END );
m_sprContents.SetTweenY( CONTENTS_Y+400 );
m_MusicList.TweenOffScreen();
@@ -338,8 +338,8 @@ void ScreenSelectGroup::TweenOnScreen()
}
m_sprContents.SetY( CONTENTS_Y+400 );
m_sprContents.BeginTweeningQueued( 0.5f, TWEEN_BIAS_END ); // sleep
m_sprContents.BeginTweeningQueued( 0.5f, TWEEN_BIAS_END );
m_sprContents.BeginTweening( 0.5f, TWEEN_BIAS_END ); // sleep
m_sprContents.BeginTweening( 0.5f, TWEEN_BIAS_END );
m_sprContents.SetTweenY( CONTENTS_Y );
m_MusicList.TweenOnScreen();
+82 -92
View File
@@ -25,6 +25,7 @@
#include "AnnouncerManager.h"
#include "InputMapper.h"
#include "GameState.h"
#include "CodeDetector.h"
#define BANNER_FRAME_X THEME->GetMetricF("ScreenSelectMusic","BannerFrameX")
@@ -59,6 +60,8 @@
#define PLAYER_OPTIONS_Y( i )THEME->GetMetricF("ScreenSelectMusic",ssprintf("PlayerOptionsP%dY",i+1))
#define SONG_OPTIONS_X THEME->GetMetricF("ScreenSelectMusic","SongOptionsX")
#define SONG_OPTIONS_Y THEME->GetMetricF("ScreenSelectMusic","SongOptionsY")
#define OPTION_ICONS_X THEME->GetMetricF("ScreenSelectMusic","OptionIconsX")
#define OPTION_ICONS_Y THEME->GetMetricF("ScreenSelectMusic","OptionIconsY")
#define HELP_TEXT THEME->GetMetric("ScreenSelectMusic","HelpText")
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectMusic","TimerSeconds")
#define SCORE_CONNECTED_TO_MUSIC_WHEEL THEME->GetMetricB("ScreenSelectMusic","ScoreConnectedToMusicWheel")
@@ -75,9 +78,9 @@ ScreenSelectMusic::ScreenSelectMusic()
{
LOG->Trace( "ScreenSelectMusic::ScreenSelectMusic()" );
// for debugging
if( GAMESTATE->m_CurStyle == STYLE_NONE )
GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE;
CodeDetector::RefreshCacheItems();
int p;
@@ -86,55 +89,60 @@ ScreenSelectMusic::ScreenSelectMusic()
THEME->GetPathTo("Graphics","select music top edge"),
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
// these guys get loaded SetSong and TweenToSong
m_Banner.SetXY( BANNER_X, BANNER_Y );
m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
this->AddSubActor( &m_Banner );
this->AddChild( &m_Banner );
m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","select music info frame") );
m_sprBannerFrame.SetXY( BANNER_FRAME_X, BANNER_FRAME_Y );
this->AddSubActor( &m_sprBannerFrame );
this->AddChild( &m_sprBannerFrame );
m_BPMDisplay.SetXY( BPM_X, BPM_Y );
m_BPMDisplay.SetZoomX( 1.0f );
this->AddSubActor( &m_BPMDisplay );
this->AddChild( &m_BPMDisplay );
m_textStage.LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
m_textStage.TurnShadowOff();
m_textStage.SetZoomX( 1.0f );
m_textStage.SetXY( STAGE_X, STAGE_Y );
m_textStage.SetText( GAMESTATE->GetStageText() );
m_textStage.SetDiffuseColor( GAMESTATE->GetStageColor() );
this->AddSubActor( &m_textStage );
m_textStage.SetDiffuse( GAMESTATE->GetStageColor() );
this->AddChild( &m_textStage );
m_sprCDTitle.Load( THEME->GetPathTo("Graphics","fallback cd title") );
m_sprCDTitle.TurnShadowOff();
m_sprCDTitle.SetXY( CD_TITLE_X, CD_TITLE_Y );
this->AddSubActor( &m_sprCDTitle );
this->AddChild( &m_sprCDTitle );
m_sprDifficultyFrame.Load( THEME->GetPathTo("Graphics","select music difficulty frame") );
m_sprDifficultyFrame.SetXY( DIFFICULTY_X, DIFFICULTY_Y );
this->AddSubActor( &m_sprDifficultyFrame );
this->AddChild( &m_sprDifficultyFrame );
for( p=0; p<NUM_PLAYERS; p++ )
{
m_DifficultyIcon[p].SetXY( ICON_X(p), ICON_Y(p) );
this->AddSubActor( &m_DifficultyIcon[p] );
this->AddChild( &m_DifficultyIcon[p] );
}
m_GrooveRadar.SetXY( RADAR_X, RADAR_Y );
this->AddSubActor( &m_GrooveRadar );
this->AddChild( &m_GrooveRadar );
// m_OptionIcons.SetXY( OPTION_ICONS_X, OPTION_ICONS_Y );
// this->AddChild( &m_OptionIcons );
m_textSongOptions.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textSongOptions.SetXY( SONG_OPTIONS_X, SONG_OPTIONS_Y );
m_textSongOptions.SetZoom( 0.5f );
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_textSongOptions.SetEffectCamelion( 2.5f, D3DXCOLOR(1,0,0,1), D3DXCOLOR(1,1,1,1) ); // blink red
m_textSongOptions.SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // white
this->AddSubActor( &m_textSongOptions );
m_textSongOptions.SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
this->AddChild( &m_textSongOptions );
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
@@ -147,24 +155,25 @@ ScreenSelectMusic::ScreenSelectMusic()
m_textPlayerOptions[p].SetVertAlign( Actor::align_middle );
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_textPlayerOptions[p].SetEffectCamelion( 2.5f, D3DXCOLOR(1,0,0,1), D3DXCOLOR(1,1,1,1) ); // blink red
m_textPlayerOptions[p].SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // white
this->AddSubActor( &m_textPlayerOptions[p] );
m_textPlayerOptions[p].SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
this->AddChild( &m_textPlayerOptions[p] );
}
m_sprMeterFrame.Load( THEME->GetPathTo("Graphics","select music meter frame") );
m_sprMeterFrame.SetXY( METER_FRAME_X, METER_FRAME_Y );
this->AddSubActor( &m_sprMeterFrame );
this->AddChild( &m_sprMeterFrame );
for( p=0; p<NUM_PLAYERS; p++ )
{
m_FootMeter[p].LoadFromFont( THEME->GetPathTo("Fonts","meter") );
m_FootMeter[p].SetXY( METER_X(p), METER_Y(p) );
m_FootMeter[p].SetShadowLength( 2 );
this->AddSubActor( &m_FootMeter[p] );
this->AddChild( &m_FootMeter[p] );
}
m_MusicWheel.SetXY( WHEEL_X, WHEEL_Y );
this->AddSubActor( &m_MusicWheel );
this->AddChild( &m_MusicWheel );
for( p=0; p<NUM_PLAYERS; p++ )
{
@@ -175,18 +184,18 @@ ScreenSelectMusic::ScreenSelectMusic()
m_sprHighScoreFrame[p].StopAnimating();
m_sprHighScoreFrame[p].SetState( p );
m_sprHighScoreFrame[p].SetXY( SCORE_X(p), SCORE_Y(p) );
this->AddSubActor( &m_sprHighScoreFrame[p] );
this->AddChild( &m_sprHighScoreFrame[p] );
m_HighScore[p].SetXY( SCORE_X(p), SCORE_Y(p) );
m_HighScore[p].SetZoom( 0.6f );
m_HighScore[p].SetDiffuseColor( PlayerToColor(p) );
this->AddSubActor( &m_HighScore[p] );
m_HighScore[p].SetDiffuse( PlayerToColor(p) );
this->AddChild( &m_HighScore[p] );
}
m_MusicSortDisplay.SetXY( SORT_ICON_X, SORT_ICON_Y );
//m_MusicSortDisplay.SetEffectGlowing( 1.0f );
m_MusicSortDisplay.Set( GAMESTATE->m_SongSortOrder );
this->AddSubActor( &m_MusicSortDisplay );
this->AddChild( &m_MusicSortDisplay );
m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","stage") );
@@ -194,13 +203,14 @@ ScreenSelectMusic::ScreenSelectMusic()
m_textHoldForOptions.SetText( "press START again for options" );
m_textHoldForOptions.SetZoom( 1 );
m_textHoldForOptions.SetZoomY( 0 );
m_textHoldForOptions.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.SetZ( -2 );
this->AddSubActor( &m_textHoldForOptions );
this->AddChild( &m_textHoldForOptions );
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","select music change notes") );
m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music change options") );
m_soundLocked.Load( THEME->GetPathTo("Sounds","select music wheel locked") );
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("select music intro") );
@@ -258,12 +268,16 @@ void ScreenSelectMusic::TweenOnScreen()
m_GrooveRadar.TweenOnScreen();
// fOriginalZoomY = m_OptionIcons.GetZoomY();
// m_OptionIcons.BeginTweening( TWEEN_TIME );
// m_OptionIcons.SetTweenZoomY( fOriginalZoomY );
fOriginalZoomY = m_textSongOptions.GetZoomY();
m_textSongOptions.BeginTweening( TWEEN_TIME );
m_textSongOptions.SetTweenZoomY( fOriginalZoomY );
for( int p=0; p<NUM_PLAYERS; p++ )
{
{
fOriginalZoomY = m_textPlayerOptions[p].GetZoomY();
m_textPlayerOptions[p].BeginTweening( TWEEN_TIME );
m_textPlayerOptions[p].SetTweenZoomY( fOriginalZoomY );
@@ -277,9 +291,9 @@ void ScreenSelectMusic::TweenOnScreen()
m_FootMeter[p].SetTweenZoomY( fOriginalZoomY );
}
m_MusicSortDisplay.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_MusicSortDisplay.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_MusicSortDisplay.BeginTweening( TWEEN_TIME );
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
CArray<Actor*,Actor*> apActorsInScore;
for( p=0; p<NUM_PLAYERS; p++ )
@@ -310,7 +324,7 @@ void ScreenSelectMusic::TweenOffScreen()
apActorsInGroupInfoFrame.Add( &m_sprCDTitle );
for( i=0; i<apActorsInGroupInfoFrame.GetSize(); i++ )
{
apActorsInGroupInfoFrame[i]->BeginTweeningQueued( TWEEN_TIME, TWEEN_BOUNCE_BEGIN );
apActorsInGroupInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_BEGIN );
apActorsInGroupInfoFrame[i]->SetTweenX( apActorsInGroupInfoFrame[i]->GetX()-400 );
}
@@ -322,6 +336,9 @@ void ScreenSelectMusic::TweenOffScreen()
m_GrooveRadar.TweenOffScreen();
// m_OptionIcons.BeginTweening( TWEEN_TIME );
// m_OptionIcons.SetTweenZoomY( 0 );
m_textSongOptions.BeginTweening( TWEEN_TIME );
m_textSongOptions.SetTweenZoomY( 0 );
@@ -339,7 +356,7 @@ void ScreenSelectMusic::TweenOffScreen()
m_MusicSortDisplay.SetEffectNone();
m_MusicSortDisplay.BeginTweening( TWEEN_TIME );
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
CArray<Actor*,Actor*> apActorsInScore;
for( p=0; p<NUM_PLAYERS; p++ )
@@ -373,9 +390,10 @@ void ScreenSelectMusic::TweenScoreOnAndOffAfterChangeSort()
apActorsInScore[i]->BeginTweening( TWEEN_TIME, TWEEN_BIAS_END ); // tween off screen
apActorsInScore[i]->SetTweenX( fOriginalX+400 );
apActorsInScore[i]->BeginTweeningQueued( 0.5f ); // sleep
apActorsInScore[i]->StopTweening();
apActorsInScore[i]->BeginTweening( 0.5f ); // sleep
apActorsInScore[i]->BeginTweeningQueued( 1, TWEEN_BIAS_BEGIN ); // tween back on screen
apActorsInScore[i]->BeginTweening( 1, TWEEN_BIAS_BEGIN ); // tween back on screen
apActorsInScore[i]->SetTweenX( fOriginalX );
}
}
@@ -388,38 +406,22 @@ void ScreenSelectMusic::Update( float fDeltaTime )
fNewRotation = fmodf( fNewRotation, D3DX_PI*2 );
m_sprCDTitle.SetRotationY( fNewRotation );
if( fNewRotation > D3DX_PI/2 && fNewRotation <= D3DX_PI*3.0f/2 )
m_sprCDTitle.SetDiffuseColor( D3DXCOLOR(0.2f,0.2f,0.2f,1) );
m_sprCDTitle.SetDiffuse( D3DXCOLOR(0.2f,0.2f,0.2f,1) );
else
m_sprCDTitle.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprCDTitle.SetDiffuse( D3DXCOLOR(1,1,1,1) );
}
const GameButton DANCE_EASIER_DIFFICULTY_PATTERN[] = { DANCE_BUTTON_UP, DANCE_BUTTON_UP };
const int DANCE_EASIER_DIFFICULTY_PATTERN_SIZE = sizeof(DANCE_EASIER_DIFFICULTY_PATTERN) / sizeof(GameButton);
const GameButton DANCE_HARDER_DIFFICULTY_PATTERN[] = { DANCE_BUTTON_DOWN, DANCE_BUTTON_DOWN };
const int DANCE_HARDER_DIFFICULTY_PATTERN_SIZE = sizeof(DANCE_HARDER_DIFFICULTY_PATTERN) / sizeof(GameButton);
const MenuButton MENU_EASIER_DIFFICULTY_PATTERN[] = { MENU_BUTTON_UP, MENU_BUTTON_UP };
const int MENU_EASIER_DIFFICULTY_PATTERN_SIZE = sizeof(MENU_EASIER_DIFFICULTY_PATTERN) / sizeof(MenuButton);
const MenuButton MENU_HARDER_DIFFICULTY_PATTERN[] = { MENU_BUTTON_DOWN, MENU_BUTTON_DOWN };
const int MENU_HARDER_DIFFICULTY_PATTERN_SIZE = sizeof(MENU_HARDER_DIFFICULTY_PATTERN) / sizeof(MenuButton);
const MenuButton MENU_NEXT_SORT_PATTERN[] = { MENU_BUTTON_UP, MENU_BUTTON_DOWN, MENU_BUTTON_UP, MENU_BUTTON_DOWN };
const int MENU_NEXT_SORT_PATTERN_SIZE = sizeof(MENU_NEXT_SORT_PATTERN) / sizeof(MenuButton);
void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
LOG->Trace( "ScreenSelectMusic::Input()" );
if(type == IET_RELEASE) return; // don't care
if( type == IET_RELEASE ) return; // don't care
if( MenuI.player == PLAYER_INVALID )
return;
if( m_Menu.IsClosing() ) return; // ignore
if( m_Menu.IsClosing() )
return; // ignore
if( !GameI.IsValid() ) return; // don't care
if( m_bMadeChoice && !m_bGoToOptions && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
{
m_bGoToOptions = true;
m_textHoldForOptions.SetText( "Entering Options..." );
@@ -430,45 +432,25 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType
if( m_bMadeChoice )
return;
switch( GAMESTATE->m_CurGame )
{
case GAME_DANCE:
if( INPUTQUEUE->MatchesPattern(GameI.controller, DANCE_EASIER_DIFFICULTY_PATTERN, DANCE_EASIER_DIFFICULTY_PATTERN_SIZE) )
{
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_soundLocked.Play();
else
EasierDifficulty( MenuI.player );
return;
}
if( INPUTQUEUE->MatchesPattern(GameI.controller, DANCE_HARDER_DIFFICULTY_PATTERN, DANCE_HARDER_DIFFICULTY_PATTERN_SIZE) )
{
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_soundLocked.Play();
else
HarderDifficulty( MenuI.player );
return;
}
break;
}
PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller );
if( INPUTQUEUE->MatchesPattern(GameI.controller, MENU_EASIER_DIFFICULTY_PATTERN, MENU_EASIER_DIFFICULTY_PATTERN_SIZE) )
if( CodeDetector::EnteredEasierDifficulty(GameI.controller) )
{
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_soundLocked.Play();
else
EasierDifficulty( MenuI.player );
EasierDifficulty( pn );
return;
}
if( INPUTQUEUE->MatchesPattern(GameI.controller, MENU_HARDER_DIFFICULTY_PATTERN, MENU_HARDER_DIFFICULTY_PATTERN_SIZE) )
if( CodeDetector::EnteredHarderDifficulty(GameI.controller) )
{
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_soundLocked.Play();
else
HarderDifficulty( MenuI.player );
HarderDifficulty( pn );
return;
}
if( INPUTQUEUE->MatchesPattern(GameI.controller, MENU_NEXT_SORT_PATTERN, MENU_NEXT_SORT_PATTERN_SIZE) )
if( CodeDetector::EnteredNextSort(GameI.controller) )
{
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
m_soundLocked.Play();
@@ -478,12 +460,18 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType
MUSIC->Stop();
m_MusicSortDisplay.BeginTweening( 0.3f );
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
TweenScoreOnAndOffAfterChangeSort();
}
return;
}
if( CodeDetector::DetectAndAdjustOptions(GameI.controller) )
{
m_soundOptionsChange.Play();
UpdateOptionsDisplays();
return;
}
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
}
@@ -616,7 +604,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber p )
MUSIC->Stop();
m_MusicSortDisplay.BeginTweening( 0.3f );
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
TweenScoreOnAndOffAfterChangeSort();
}
@@ -677,13 +665,13 @@ void ScreenSelectMusic::MenuStart( PlayerNumber p )
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
{
// show "hold START for options"
m_textHoldForOptions.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.BeginTweeningQueued( 0.25f ); // fade in
m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.BeginTweening( 0.25f ); // fade in
m_textHoldForOptions.SetTweenZoomY( 1 );
m_textHoldForOptions.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_textHoldForOptions.BeginTweeningQueued( 2.0f ); // sleep
m_textHoldForOptions.BeginTweeningQueued( 0.25f ); // fade out
m_textHoldForOptions.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_textHoldForOptions.BeginTweening( 2.0f ); // sleep
m_textHoldForOptions.BeginTweening( 0.25f ); // fade out
m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_textHoldForOptions.SetTweenZoomY( 0 );
}
@@ -823,6 +811,8 @@ void ScreenSelectMusic::PlayMusicSample()
void ScreenSelectMusic::UpdateOptionsDisplays()
{
// m_OptionIcons.Load( GAMESTATE->m_PlayerOptions, &GAMESTATE->m_SongOptions );
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( GAMESTATE->IsPlayerEnabled(p) )
@@ -845,6 +835,6 @@ void ScreenSelectMusic::SortOrderChanged()
// tween music sort on screen
// m_MusicSortDisplay.SetEffectGlowing();
m_MusicSortDisplay.BeginTweening( 0.3f );
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
}
+1
View File
@@ -84,6 +84,7 @@ protected:
RageSoundSample m_soundSelect;
RageSoundSample m_soundChangeNotes;
RageSoundSample m_soundOptionsChange;
RageSoundSample m_soundLocked;
};
+35 -63
View File
@@ -61,20 +61,20 @@ ScreenSelectStyle::ScreenSelectStyle()
m_sprIcon[i].StopAnimating();
m_sprIcon[i].SetState( i );
m_sprIcon[i].SetXY( ICONS_START_X + i*ICONS_SPACING_X, ICONS_START_Y + i*ICONS_SPACING_Y );
this->AddSubActor( &m_sprIcon[i] );
this->AddChild( &m_sprIcon[i] );
}
UpdateEnabledDisabled();
m_sprExplanation.Load( THEME->GetPathTo("Graphics","select style explanation") );
m_sprExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y );
this->AddSubActor( &m_sprExplanation );
this->AddChild( &m_sprExplanation );
m_sprPreview.SetXY( PREVIEW_X, PREVIEW_Y );
this->AddSubActor( &m_sprPreview );
this->AddChild( &m_sprPreview );
m_sprInfo.SetXY( INFO_X, INFO_Y );
this->AddSubActor( &m_sprInfo );
this->AddChild( &m_sprInfo );
// Load dummy Sprites
@@ -90,7 +90,7 @@ ScreenSelectStyle::ScreenSelectStyle()
THEME->GetPathTo("Graphics","select style top edge"),
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
m_soundChange.Load( THEME->GetPathTo("Sounds","select style change") );
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
@@ -160,28 +160,28 @@ void ScreenSelectStyle::AfterChange()
m_sprPreview.Load( THEME->GetPathTo("Graphics",ssprintf("select style preview game %d style %d",GAMESTATE->m_CurGame,m_iSelection)) );
m_sprPreview.StopTweening();
m_sprPreview.SetGlowColor( D3DXCOLOR(1,1,1,0) );
m_sprPreview.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprPreview.SetGlow( D3DXCOLOR(1,1,1,0) );
m_sprPreview.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprPreview.BeginTweeningQueued( 0.25f ); // sleep
m_sprPreview.BeginTweening( 0.25f ); // sleep
m_sprPreview.BeginTweeningQueued( 0.2f ); // fade to white
m_sprPreview.SetTweenAddColor( D3DXCOLOR(1,1,1,1) );
m_sprPreview.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprPreview.BeginTweening( 0.2f ); // fade to white
m_sprPreview.SetTweenGlow( D3DXCOLOR(1,1,1,1) );
m_sprPreview.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprPreview.BeginTweeningQueued( 0.01f ); // turn color on
m_sprPreview.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprPreview.BeginTweening( 0.01f ); // turn color on
m_sprPreview.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprPreview.BeginTweeningQueued( 0.2f ); // fade to color
m_sprPreview.SetTweenAddColor( D3DXCOLOR(1,1,1,0) );
m_sprPreview.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprPreview.BeginTweening( 0.2f ); // fade to color
m_sprPreview.SetTweenGlow( D3DXCOLOR(1,1,1,0) );
m_sprPreview.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
// Tween Info
m_sprInfo.Load( THEME->GetPathTo("Graphics",ssprintf("select style info game %d style %d",GAMESTATE->m_CurGame,m_iSelection)) );
m_sprInfo.StopTweening();
m_sprInfo.SetZoomY( 0 );
m_sprInfo.BeginTweeningQueued( 0.5f, Actor::TWEEN_BOUNCE_END );
m_sprInfo.BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
m_sprInfo.SetTweenZoomY( 1 );
}
@@ -272,57 +272,29 @@ void ScreenSelectStyle::MenuBack( PlayerNumber p )
}
void ScreenSelectStyle::TweenOffScreen()
{
for( int i=0; i<NUM_STYLES; i++ )
{
m_sprIcon[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
m_sprIcon[i].SetTweenZoomY( 0 );
}
m_sprExplanation.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
m_sprExplanation.SetTweenZoomY( 0 );
m_sprPreview.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
m_sprPreview.SetTweenZoomY( 0 );
m_sprInfo.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
m_sprInfo.SetTweenZoomX( 0 );
}
void ScreenSelectStyle::TweenOnScreen()
{
float fOriginalZoom;
for( int i=0; i<NUM_STYLES; i++ )
{
fOriginalZoom = m_sprIcon[i].GetZoomY();
m_sprIcon[i].SetZoomY( 0 );
m_sprIcon[i].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
m_sprIcon[i].SetTweenZoomY( fOriginalZoom );
}
fOriginalZoom = m_sprExplanation.GetZoomY();
m_sprExplanation.SetZoomY( 0 );
m_sprExplanation.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
m_sprExplanation.SetTweenZoomY( fOriginalZoom );
for( int i=0; i<m_aPossibleStyles.GetSize(); i++ )
m_sprIcon[i].FadeOntoScreen( (m_aPossibleStyles.GetSize()-i)*0.1f, "Left Accelerate", MENU_ELEMENTS_TWEEN_TIME );
m_sprExplanation.FadeOntoScreen( 0, "Right Accelerate", MENU_ELEMENTS_TWEEN_TIME );
// let AfterChange tween Preview and Info
/*
fOriginalZoom = m_sprPreview.GetZoomY();
m_sprPreview.SetZoomY( 0 );
m_sprPreview.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
m_sprPreview.SetTweenZoomY( fOriginalZoom );
fOriginalZoom = m_sprInfo.GetZoomY();
m_sprInfo.SetZoomY( 0 );
m_sprInfo.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
m_sprInfo.SetTweenZoomY( fOriginalZoom );
*/
}
void ScreenSelectStyle::TweenOffScreen()
{
for( int i=0; i<m_aPossibleStyles.GetSize(); i++ )
m_sprIcon[i].FadeOffScreen( (m_aPossibleStyles.GetSize()-i)*0.1f, "Left Accelerate", MENU_ELEMENTS_TWEEN_TIME );
m_sprExplanation.FadeOffScreen( 0, "Right Accelerate", MENU_ELEMENTS_TWEEN_TIME );
m_sprPreview.FadeOffScreen( 0, "Fade", MENU_ELEMENTS_TWEEN_TIME );
m_sprInfo.FadeOffScreen( 0, "FoldY", MENU_ELEMENTS_TWEEN_TIME );
}
bool ScreenSelectStyle::IsEnabled( int iStyleIndex )
{
Style style = m_aPossibleStyles[iStyleIndex];
@@ -347,9 +319,9 @@ void ScreenSelectStyle::UpdateEnabledDisabled()
for( i=0; i<m_aPossibleStyles.GetSize(); i++ )
{
if( IsEnabled(i) )
m_sprIcon[i].SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprIcon[i].SetDiffuse( D3DXCOLOR(1,1,1,1) );
else
m_sprIcon[i].SetDiffuseColor( D3DXCOLOR(0.5f,0.5f,0.5f,1) );
m_sprIcon[i].SetDiffuse( D3DXCOLOR(0.5f,0.5f,0.5f,1) );
}
// Select first enabled style
+27 -27
View File
@@ -124,7 +124,7 @@ ScreenSelectStyle5th::ScreenSelectStyle5th()
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] );
this->AddChild( &m_sprPad[i] );
}
@@ -135,7 +135,7 @@ ScreenSelectStyle5th::ScreenSelectStyle5th()
// m_sprDancer[i].SetXY( DANCER_X[i], DANCER_Y[i] );
// m_sprDancer[i].SetZoom( 2 );
m_sprDancer[i].StopAnimating();
this->AddSubActor( &m_sprDancer[i] );
this->AddChild( &m_sprDancer[i] );
}
@@ -143,33 +143,33 @@ ScreenSelectStyle5th::ScreenSelectStyle5th()
m_sprStyleIcon.TurnShadowOff();
m_sprStyleIcon.StopAnimating();
m_sprStyleIcon.SetXY( ICON_X, ICON_Y );
this->AddSubActor( &m_sprStyleIcon );
this->AddChild( &m_sprStyleIcon );
m_textExplanation1.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textExplanation1.SetDiffuseColor( D3DXCOLOR(0,0.7f,0,1) );
m_textExplanation1.SetDiffuse( 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 );
this->AddChild( &m_textExplanation1 );
m_textExplanation2.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textExplanation2.SetDiffuseColor( D3DXCOLOR(0,0.7f,0,1) );
m_textExplanation2.SetDiffuse( 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 );
this->AddChild( &m_textExplanation2 );
m_Menu.Load(
THEME->GetPathTo("Graphics","select style background"),
THEME->GetPathTo("Graphics","select style top edge"),
HELP_TEXT, true, TIMER_SECONDS
);
this->AddSubActor( &m_Menu );
this->AddChild( &m_Menu );
m_soundChange.Load( THEME->GetPathTo("Graphics","select style change") );
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
@@ -300,27 +300,27 @@ void ScreenSelectStyle5th::BeforeChange()
{
case 0:
m_sprDancer[0].BeginTweening( TWEEN_TIME );
m_sprDancer[0].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
m_sprDancer[0].SetTweenDiffuse( COLOR_P1_NOT_SELECTED );
break;
case 1:
m_sprDancer[1].BeginTweening( TWEEN_TIME );
m_sprDancer[1].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
m_sprDancer[1].SetTweenDiffuse( COLOR_P1_NOT_SELECTED );
m_sprDancer[2].BeginTweening( TWEEN_TIME );
m_sprDancer[2].SetTweenDiffuseColor( COLOR_P2_NOT_SELECTED );
m_sprDancer[2].SetTweenDiffuse( COLOR_P2_NOT_SELECTED );
break;
case 2:
m_sprDancer[3].BeginTweening( TWEEN_TIME );
m_sprDancer[3].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
m_sprDancer[3].SetTweenDiffuse( COLOR_P1_NOT_SELECTED );
break;
case 3:
m_sprDancer[4].BeginTweening( TWEEN_TIME );
m_sprDancer[4].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
m_sprDancer[4].SetTweenDiffuse( COLOR_P1_NOT_SELECTED );
m_sprDancer[5].BeginTweening( TWEEN_TIME );
m_sprDancer[5].SetTweenDiffuseColor( COLOR_P2_NOT_SELECTED );
m_sprDancer[5].SetTweenDiffuse( COLOR_P2_NOT_SELECTED );
break;
case 4:
m_sprDancer[6].BeginTweening( TWEEN_TIME );
m_sprDancer[6].SetTweenDiffuseColor( COLOR_P1_NOT_SELECTED );
m_sprDancer[6].SetTweenDiffuse( COLOR_P1_NOT_SELECTED );
break;
}
@@ -344,47 +344,47 @@ void ScreenSelectStyle5th::AfterChange()
{
case 0:
m_sprPad[0].BeginTweening( TWEEN_TIME );
m_sprPad[0].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprPad[0].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprDancer[0].BeginTweening( TWEEN_TIME );
m_sprDancer[0].SetTweenDiffuseColor( COLOR_P1_SELECTED );
m_sprDancer[0].SetTweenDiffuse( 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_sprPad[1].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprDancer[1].BeginTweening( TWEEN_TIME );
m_sprDancer[1].SetTweenDiffuseColor( COLOR_P1_SELECTED );
m_sprDancer[1].SetTweenDiffuse( COLOR_P1_SELECTED );
m_sprDancer[1].StartAnimating();
m_sprDancer[2].BeginTweening( TWEEN_TIME );
m_sprDancer[2].SetTweenDiffuseColor( COLOR_P2_SELECTED );
m_sprDancer[2].SetTweenDiffuse( 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_sprPad[2].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprDancer[3].BeginTweening( TWEEN_TIME );
m_sprDancer[3].SetTweenDiffuseColor( COLOR_P1_SELECTED );
m_sprDancer[3].SetTweenDiffuse( 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_sprPad[3].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprDancer[4].BeginTweening( TWEEN_TIME );
m_sprDancer[4].SetTweenDiffuseColor( COLOR_P1_SELECTED );
m_sprDancer[4].SetTweenDiffuse( COLOR_P1_SELECTED );
m_sprDancer[4].StartAnimating();
m_sprDancer[5].BeginTweening( TWEEN_TIME );
m_sprDancer[5].SetTweenDiffuseColor( COLOR_P2_SELECTED );
m_sprDancer[5].SetTweenDiffuse( 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_sprPad[4].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprDancer[6].BeginTweening( TWEEN_TIME );
m_sprDancer[6].SetTweenDiffuseColor( COLOR_P1_SELECTED );
m_sprDancer[6].SetTweenDiffuse( COLOR_P1_SELECTED );
m_sprDancer[6].StartAnimating();
m_sprStyleIcon.SetState( 4 );
break;
+36 -36
View File
@@ -100,9 +100,9 @@ ScreenStage::ScreenStage()
//
// Init common graphics
//
this->AddSubActor( &m_sprSongBackground ); // add background first so it draws bottom-most
this->AddSubActor( &m_quadMask ); // add quad mask before stage so that it will block out the stage sprites
this->AddSubActor( &m_frameStage );
this->AddChild( &m_sprSongBackground ); // add background first so it draws bottom-most
this->AddChild( &m_quadMask ); // add quad mask before stage so that it will block out the stage sprites
this->AddChild( &m_frameStage );
for( int i=0; i<4; i++ )
{
@@ -162,36 +162,36 @@ ScreenStage::ScreenStage()
if ( g_StageType != STAGE_TYPE_EZ2 ) // Ez2dancer MUST have this graphic on-top
{
for( i=0; i<iNumChars; i++ )
m_frameStage.AddSubActor( &m_sprNumbers[i] );
m_frameStage.AddSubActor( &m_sprStage );
m_frameStage.AddChild( &m_sprNumbers[i] );
m_frameStage.AddChild( &m_sprStage );
}
}
break;
case MODE_FINAL:
m_sprStage.Load( THEME->GetPathTo("Graphics","stage final") );
m_frameStage.AddSubActor( &m_sprStage );
m_frameStage.AddChild( &m_sprStage );
break;
case MODE_EXTRA1:
m_sprStage.Load( THEME->GetPathTo("Graphics","stage extra1") );
m_frameStage.AddSubActor( &m_sprStage );
m_frameStage.AddChild( &m_sprStage );
break;
case MODE_EXTRA2:
m_sprStage.Load( THEME->GetPathTo("Graphics","stage extra2") );
m_frameStage.AddSubActor( &m_sprStage );
m_frameStage.AddChild( &m_sprStage );
break;
case MODE_ONI:
m_sprStage.Load( THEME->GetPathTo("Graphics","stage oni") );
m_frameStage.AddSubActor( &m_sprStage );
m_frameStage.AddChild( &m_sprStage );
break;
case MODE_ENDLESS:
m_sprStage.Load( THEME->GetPathTo("Graphics","stage endless") );
m_frameStage.AddSubActor( &m_sprStage );
m_frameStage.AddChild( &m_sprStage );
break;
default:
ASSERT(0);
}
this->AddSubActor( &m_Fade ); // fade should draw last, on top of everything else
this->AddChild( &m_Fade ); // fade should draw last, on top of everything else
m_Fade.SetOpened();
@@ -204,7 +204,7 @@ ScreenStage::ScreenStage()
const float fStageOffScreenY = CENTER_Y+fStageHeight;
m_quadMask.SetDiffuseColor( D3DXCOLOR(0,0,0,0) );
m_quadMask.SetDiffuse( D3DXCOLOR(0,0,0,0) );
m_quadMask.StretchTo( CRect(SCREEN_LEFT, roundf(fStageOffScreenY-fStageHeight/2), SCREEN_RIGHT, roundf(fStageOffScreenY+fStageHeight/2)) );
m_quadMask.SetZ( -1 ); // important: fill Z buffer with values that will cause subsequent draws to fail the Z test
@@ -267,8 +267,8 @@ ScreenStage::ScreenStage()
for( i=0; i<4; i++ ) // redefine the size of the numbers
{
m_sprNumbers[i].SetWidth( 200.0f ); // make the numbers that appear really big
m_sprNumbers[i].SetHeight( 200.0f); // so they can 'shrink' onto the screen
m_sprNumbers[i].ZoomToWidth( 200.0f ); // make the numbers that appear really big
m_sprNumbers[i].ZoomToHeight( 200.0f); // so they can 'shrink' onto the screen
}
// m_frameStage.SetXY( CENTER_X, CENTER_Y );
@@ -316,8 +316,8 @@ ScreenStage::ScreenStage()
m_sprbgxtra.StopAnimating();
m_sprbgxtra.SetState( bg_modeoffset ); // use the first element of the offset for this graphic
m_sprbgxtra.SetXY( CENTER_X-30, CENTER_Y+180); // set it's initial XY coordinates
m_sprbgxtra.SetHeight( 30 ); // set it's height and width. As we're only dealing with solid color
m_sprbgxtra.SetWidth( SCREEN_WIDTH + 50 ); // stretching shouldn't be a concern.
m_sprbgxtra.ZoomToHeight( 30 ); // set it's height and width. As we're only dealing with solid color
m_sprbgxtra.ZoomToWidth( SCREEN_WIDTH + 50 ); // stretching shouldn't be a concern.
m_sprbgxtra.SetRotation( -20 ); // rotate this graphic
m_sprbgxtra.BeginTweening(0.3f); // start tweening
m_sprbgxtra.SetTweenRotationZ( 0 ); // set the rotation we want it to finally appear as
@@ -327,24 +327,24 @@ ScreenStage::ScreenStage()
m_sprbg[0].SetXY( CENTER_X, CENTER_Y+150); // this is where we want the red bar graphic....
if (ez2Final == 1) // however in final...
m_sprbg[0].SetXY( CENTER_X-30, CENTER_Y-160); // we want it somewhere else
m_sprbg[0].SetHeight( 100 ); // it's fairly high in normal
m_sprbg[0].ZoomToHeight( 100 ); // it's fairly high in normal
if (ez2Final == 1) // but in final...
m_sprbg[0].SetHeight( 30 ); // it needs to be a bit more squashed
m_sprbg[0].SetWidth( SCREEN_WIDTH + 50 ); // no matter what... it's this wide
m_sprbg[0].ZoomToHeight( 30 ); // it needs to be a bit more squashed
m_sprbg[0].ZoomToWidth( SCREEN_WIDTH + 50 ); // no matter what... it's this wide
m_sprbg[0].SetRotation( -20 ); // and is initially this rotation
m_sprbg[0].BeginTweening(0.3f); // start tweening
m_sprbg[0].SetTweenRotationZ( 0 ); // and set the rotation to where we want it to end up
m_sprbg[1].SetXY( CENTER_X-(SCREEN_WIDTH/2)-20, CENTER_Y+element_y_offsets);
m_sprbg[1].SetHeight( SCREEN_HEIGHT - 140 );
m_sprbg[1].SetWidth( 130 );
m_sprbg[1].ZoomToHeight( SCREEN_HEIGHT - 140 );
m_sprbg[1].ZoomToWidth( 130 );
m_sprbg[1].SetRotation( -20 );
m_sprbg[1].BeginTweening(0.3f);
m_sprbg[1].SetTweenRotationZ( 0 );
m_sprbg[2].SetXY( CENTER_X+430, CENTER_Y+element_y_offsets);
m_sprbg[2].SetHeight( SCREEN_HEIGHT - 140 );
m_sprbg[2].SetWidth( SCREEN_WIDTH + 50 );
m_sprbg[2].ZoomToHeight( SCREEN_HEIGHT - 140 );
m_sprbg[2].ZoomToWidth( SCREEN_WIDTH + 50 );
m_sprbg[2].SetRotation( -20 );
m_sprbg[2].BeginTweening(0.3f);
m_sprbg[2].SetTweenX( CENTER_X );
@@ -352,12 +352,12 @@ ScreenStage::ScreenStage()
for (i=3; i>=0; i--) // work backwards as we wanna add em in reverse
{
m_frameStage.AddSubActor( &m_sprbg[i] );
m_frameStage.AddChild( &m_sprbg[i] );
}
if (ez2Final == 1) // if we're in FINAL add that extra background element mentioned earlier.
{
m_frameStage.AddSubActor( &m_sprbgxtra );
m_frameStage.AddChild( &m_sprbgxtra );
}
@@ -396,17 +396,17 @@ ScreenStage::ScreenStage()
for (i=0; i<2; i++) // initialize the UK MOVE text and positions
{
m_ez2ukm[i].SetText( "STEPMANIA EZ2 MOVE" ); // choose something better if you like ;)
m_ez2ukm[i].SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // it's white
m_ez2ukm[i].SetDiffuse( D3DXCOLOR(1,1,1,1) ); // it's white
m_ez2ukm[i].BeginTweening(0.5f); // start it tweening
if (ez2Final == 1)
{
m_stagedesc[i].SetText( "FINAL FINAL FINAL FINAL FINAL FINAL FINAL FINAL FINAL FINAL" ); // this is the desc text for final stage
m_stagedesc[i].SetDiffuseColor( D3DXCOLOR(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) ); // it's blueish
m_stagedesc[i].SetDiffuse( D3DXCOLOR(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) ); // it's blueish
}
else
{
m_stagedesc[i].SetText( "NEXT NEXT NEXT NEXT NEXT NEXT NEXT NEXT NEXT NEXT NEXT" ); // normal stages use this text
m_stagedesc[i].SetDiffuseColor( D3DXCOLOR(1.0f/225.0f*166.0f,1.0f/225.0f*83.0f,1/225.0f*16.0f,1) ); // it's orangey
m_stagedesc[i].SetDiffuse( D3DXCOLOR(1.0f/225.0f*166.0f,1.0f/225.0f*83.0f,1/225.0f*16.0f,1) ); // it's orangey
}
m_stagedesc[i].BeginTweening(0.5f); // start tweening the descriptions
@@ -419,8 +419,8 @@ ScreenStage::ScreenStage()
for (i=0; i<2; i++) // add the actors
{
m_frameStage.AddSubActor( &m_ez2ukm[i] );
m_frameStage.AddSubActor( &m_stagedesc[i] );
m_frameStage.AddChild( &m_ez2ukm[i] );
m_frameStage.AddChild( &m_stagedesc[i] );
}
//////////////////////////////
@@ -484,7 +484,7 @@ ScreenStage::ScreenStage()
else // set 2
m_sprScrollingBlobs[j][i].SetTweenX(CENTER_X+(SCREEN_WIDTH/2)+30-70-(i*30.0f));
m_frameStage.AddSubActor( &m_sprScrollingBlobs[j][i] ); // add the actor
m_frameStage.AddChild( &m_sprScrollingBlobs[j][i] ); // add the actor
}
}
@@ -527,11 +527,11 @@ ScreenStage::ScreenStage()
m_stagename.SetText( "" ); // make this text disappear.
}
m_stagename.SetDiffuseColor( D3DXCOLOR(1.0f/225.0f*166.0f,1.0f/225.0f*83.0f,1/225.0f*16.0f,1) ); // orangey colour
m_stagename.SetDiffuse( D3DXCOLOR(1.0f/225.0f*166.0f,1.0f/225.0f*83.0f,1/225.0f*16.0f,1) ); // orangey colour
if (ez2Final == 1) // if we're final stage
{
m_stagename.SetDiffuseColor( D3DXCOLOR(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) ); // blueish colour
m_stagename.SetDiffuse( D3DXCOLOR(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) ); // blueish colour
m_stagename.SetText( "THE FINAL STAGE" );
stage_mode = MODE_FINAL; // set back to final again.
ez2Final = 0;
@@ -540,7 +540,7 @@ ScreenStage::ScreenStage()
m_stagename.BeginTweening(0.5f); // start tweening them to their new home
m_stagename.SetTweenX(CENTER_X+70); // set their new locations
m_frameStage.AddSubActor( &m_stagename ); //add the actor
m_frameStage.AddChild( &m_stagename ); //add the actor
//////////////////////////////
// END stage name //
//////////////////////////////
@@ -549,8 +549,8 @@ ScreenStage::ScreenStage()
CString sStageNo = ssprintf("%d", iStageNo);
const int iNumChars = sStageNo.GetLength()+1;
for( i=0; i<iNumChars; i++ )
m_frameStage.AddSubActor( &m_sprNumbers[i] );
m_frameStage.AddSubActor( &m_sprStage );
m_frameStage.AddChild( &m_sprNumbers[i] );
m_frameStage.AddChild( &m_sprStage );
m_sprStage.SetZoom( 0 ); // hide this element for Ez2 :)
}
+10 -10
View File
@@ -34,29 +34,29 @@ ScreenTextEntry::ScreenTextEntry( ScreenMessage SM_SendWhenDone, CString sQuesti
m_sAnswer = sInitialAnswer;
m_Fade.SetTransitionTime( 0.5f );
m_Fade.SetDiffuseColor( D3DXCOLOR(0,0,0,0.7f) );
m_Fade.SetDiffuse( D3DXCOLOR(0,0,0,0.7f) );
m_Fade.SetOpened();
m_Fade.CloseWipingRight();
this->AddSubActor( &m_Fade );
this->AddChild( &m_Fade );
m_textQuestion.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textQuestion.SetText( sQuestion );
m_textQuestion.SetXY( QUESTION_X, QUESTION_Y );
this->AddSubActor( &m_textQuestion );
this->AddChild( &m_textQuestion );
m_rectAnswerBox.SetDiffuseColor( D3DXCOLOR(0.5f,0.5f,1.0f,0.7f) );
this->AddSubActor( &m_rectAnswerBox );
m_rectAnswerBox.SetDiffuse( D3DXCOLOR(0.5f,0.5f,1.0f,0.7f) );
this->AddChild( &m_rectAnswerBox );
m_rectAnswerBox.SetXY( ANSWER_X, ANSWER_Y );
m_rectAnswerBox.SetZoomX( ANSWER_WIDTH );
m_rectAnswerBox.SetZoomY( ANSWER_HEIGHT );
this->AddSubActor( &m_rectAnswerBox );
this->AddChild( &m_rectAnswerBox );
m_textAnswer.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textAnswer.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textAnswer.SetXY( ANSWER_X, ANSWER_Y );
m_textAnswer.SetText( m_sAnswer );
this->AddSubActor( &m_textAnswer );
this->AddChild( &m_textAnswer );
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu prompt") );
}
@@ -131,15 +131,15 @@ void ScreenTextEntry::MenuStart( PlayerNumber p )
m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight );
m_textQuestion.BeginTweening( 0.2f );
m_textQuestion.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textQuestion.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_rectAnswerBox.BeginTweening( 0.2f );
m_rectAnswerBox.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_rectAnswerBox.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
m_textAnswer.SetEffectNone();
m_textAnswer.BeginTweening( 0.2f );
m_textAnswer.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_textAnswer.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
+19 -14
View File
@@ -95,17 +95,18 @@ ScreenTitleMenu::ScreenTitleMenu()
m_sprBG.Load( THEME->GetPathTo("Graphics","title menu background") );
m_sprBG.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
this->AddSubActor( &m_sprBG );
this->AddChild( &m_sprBG );
m_sprLogo.Load( THEME->GetPathTo("Graphics",ssprintf("title menu logo game %d",GAMESTATE->m_CurGame)) );
m_sprLogo.SetXY( LOGO_X, LOGO_Y );
m_sprLogo.SetGlowColor( D3DXCOLOR(1,1,1,1) );
m_sprLogo.SetGlow( D3DXCOLOR(1,1,1,1) );
m_sprLogo.SetZoomY( 0 );
m_sprLogo.BeginTweeningQueued( 0.5f ); // sleep
m_sprLogo.BeginTweeningQueued( 0.5f, Actor::TWEEN_BOUNCE_END );
m_sprLogo.StopTweening();
m_sprLogo.BeginTweening( 0.5f ); // sleep
m_sprLogo.BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
m_sprLogo.SetEffectGlowing(1, D3DXCOLOR(1,1,1,0.1f), D3DXCOLOR(1,1,1,0.3f) );
m_sprLogo.SetTweenZoom( 1 );
this->AddSubActor( &m_sprLogo );
this->AddChild( &m_sprLogo );
m_textHelp.LoadFromFont( THEME->GetPathTo("Fonts","help") );
m_textHelp.SetText( HELP_TEXT );
@@ -113,26 +114,26 @@ ScreenTitleMenu::ScreenTitleMenu()
m_textHelp.SetZoom( 0.5f );
m_textHelp.SetEffectBlinking();
m_textHelp.SetShadowLength( 2 );
this->AddSubActor( &m_textHelp );
this->AddChild( &m_textHelp );
m_textVersion.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textVersion.SetText( "v3.0 beta 6" );
m_textVersion.SetDiffuseColor( D3DXCOLOR(0.6f,0.6f,0.6f,1) ); // light gray
m_textVersion.SetDiffuse( D3DXCOLOR(0.6f,0.6f,0.6f,1) ); // light gray
m_textVersion.SetXY( VERSION_X, VERSION_Y );
m_textVersion.SetZoom( 0.5f );
m_textVersion.SetShadowLength( 2 );
this->AddSubActor( &m_textVersion );
this->AddChild( &m_textVersion );
m_textSongs.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textSongs.SetHorizAlign( Actor::align_left );
m_textSongs.SetText( ssprintf("Found %d Songs", SONGMAN->m_pSongs.GetSize()) );
m_textSongs.SetDiffuseColor( D3DXCOLOR(0.6f,0.6f,0.6f,1) ); // light gray
m_textSongs.SetDiffuse( D3DXCOLOR(0.6f,0.6f,0.6f,1) ); // light gray
m_textSongs.SetXY( SONGS_X, SONGS_Y );
m_textSongs.SetZoom( 0.5f );
m_textSongs.SetShadowLength( 2 );
this->AddSubActor( &m_textSongs );
this->AddChild( &m_textSongs );
for( int i=0; i< NUM_TITLE_MENU_CHOICES; i++ )
@@ -141,13 +142,13 @@ ScreenTitleMenu::ScreenTitleMenu()
m_textChoice[i].SetText( CHOICE_TEXT[i] );
m_textChoice[i].SetXY( CHOICES_X, CHOICES_START_Y + i*CHOICES_SPACING_Y );
m_textChoice[i].SetShadowLength( 5 );
this->AddSubActor( &m_textChoice[i] );
this->AddChild( &m_textChoice[i] );
}
m_Fade.SetClosed();
m_Fade.OpenWipingRight( SM_None );
this->AddSubActor( &m_Fade );
this->AddChild( &m_Fade );
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("title menu game name") );
@@ -253,6 +254,7 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
if( RandomFloat(0,1)>0.8f )
GAMESTATE->m_PlayerOptions[p].m_fArrowScrollSpeed = 1.5f;
/* This is a bitfield; choose a bit. 1<<0 chooses the first
* option, 1<<1 the second, and so on. NUM_EFFECT_TYPES is one
* greater than the number of options (since it includes NONE);
@@ -261,15 +263,16 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
* do anything.
*
* It's simple, but it's a hack. FIXME -glenn */
GAMESTATE->m_PlayerOptions[p].m_EffectType =
1 << (rand()%PlayerOptions::NUM_EFFECT_TYPES) ;
1 << (rand()%NUM_EFFECT_TYPES) ;
if( RandomFloat(0,1)>0.9f )
GAMESTATE->m_PlayerOptions[p].m_AppearanceType = PlayerOptions::APPEARANCE_HIDDEN;
if( RandomFloat(0,1)>0.9f )
GAMESTATE->m_PlayerOptions[p].m_AppearanceType = PlayerOptions::APPEARANCE_SUDDEN;
if( RandomFloat(0,1)>0.7f )
GAMESTATE->m_PlayerOptions[p].m_bReverseScroll = true;
if( RandomFloat(0,1)>0.9f )
if( RandomFloat(0,1)>0.8f )
GAMESTATE->m_PlayerOptions[p].m_bDark = true;
}
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LifeType(rand()%SongOptions::NUM_LIFE_TYPES);
@@ -294,6 +297,7 @@ void ScreenTitleMenu::LoseFocus( int iChoiceIndex )
m_soundChange.PlayRandom();
m_textChoice[iChoiceIndex].SetEffectNone();
m_textChoice[iChoiceIndex].StopTweening();
m_textChoice[iChoiceIndex].BeginTweening( 0.3f );
m_textChoice[iChoiceIndex].SetTweenZoom( 0.9f );
@@ -301,6 +305,7 @@ void ScreenTitleMenu::LoseFocus( int iChoiceIndex )
void ScreenTitleMenu::GainFocus( int iChoiceIndex )
{
m_textChoice[iChoiceIndex].StopTweening();
m_textChoice[iChoiceIndex].BeginTweening( 0.3f );
m_textChoice[iChoiceIndex].SetTweenZoom( 1.2f );
D3DXCOLOR color1, color2;
+5 -5
View File
@@ -20,25 +20,25 @@ ScrollBar::ScrollBar()
m_sprBackground.Load( THEME->GetPathTo("Graphics","select music scrollbar parts 1x3") );
m_sprBackground.StopAnimating();
m_sprBackground.SetState( 1 );
this->AddSubActor( &m_sprBackground );
this->AddChild( &m_sprBackground );
m_sprScrollThumbPart1.Load( THEME->GetPathTo("Graphics","select music scrollbar thumb") );
m_sprScrollThumbPart1.StopAnimating();
this->AddSubActor( &m_sprScrollThumbPart1 );
this->AddChild( &m_sprScrollThumbPart1 );
m_sprScrollThumbPart2.Load( THEME->GetPathTo("Graphics","select music scrollbar thumb") );
m_sprScrollThumbPart2.StopAnimating();
this->AddSubActor( &m_sprScrollThumbPart2 );
this->AddChild( &m_sprScrollThumbPart2 );
m_sprTopButton.Load( THEME->GetPathTo("Graphics","select music scrollbar parts 1x3") );
m_sprTopButton.StopAnimating();
m_sprTopButton.SetState( 0 );
this->AddSubActor( &m_sprTopButton );
this->AddChild( &m_sprTopButton );
m_sprBottomButton.Load( THEME->GetPathTo("Graphics","select music scrollbar parts 1x3") );
m_sprBottomButton.StopAnimating();
m_sprBottomButton.SetState( 2 );
this->AddSubActor( &m_sprBottomButton );
this->AddChild( &m_sprBottomButton );
SetBarHeight( 100 );
}
+3 -3
View File
@@ -178,13 +178,13 @@ void ScrollingList::DrawPrimitives()
if( i==0 ) // so we don't draw 0 twice
{
m_apSprites[iIndexToDraw1]->SetDiffuseColor( COLOR_SELECTED );
m_apSprites[iIndexToDraw1]->SetDiffuse( COLOR_SELECTED );
m_apSprites[iIndexToDraw1]->Draw();
}
else
{
m_apSprites[iIndexToDraw1]->SetDiffuseColor( COLOR_NOT_SELECTED );
m_apSprites[iIndexToDraw2]->SetDiffuseColor( COLOR_NOT_SELECTED );
m_apSprites[iIndexToDraw1]->SetDiffuse( COLOR_NOT_SELECTED );
m_apSprites[iIndexToDraw2]->SetDiffuse( COLOR_NOT_SELECTED );
m_apSprites[iIndexToDraw1]->Draw();
m_apSprites[iIndexToDraw2]->Draw();
}
+1 -1
View File
@@ -44,7 +44,7 @@ void SmallGradeDisplay::SetGrade( PlayerNumber p, Grade g )
{
m_Grade = g;
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
SetDiffuse( D3DXCOLOR(1,1,1,1) );
int iNumCols = 2;
switch( g )
+3 -3
View File
@@ -24,14 +24,14 @@ SnapDisplay::SnapDisplay()
for( int i=0; i<2; i++ )
{
m_sprIndicators[i].Load( THEME->GetPathTo("Graphics","edit snap indicator") );
this->AddSubActor( &m_sprIndicators[i] );
this->AddChild( &m_sprIndicators[i] );
}
m_NoteType = NOTE_TYPE_4TH;
D3DXCOLOR color = NoteTypeToColor( m_NoteType );
for( i=0; i<2; i++ )
m_sprIndicators[i].SetDiffuseColor( color );
m_sprIndicators[i].SetDiffuse( color );
m_iNumCols = 0;
}
@@ -74,6 +74,6 @@ void SnapDisplay::SnapModeChanged()
for( int i=0; i<2; i++ )
{
m_sprIndicators[i].BeginTweening( 0.3f );
m_sprIndicators[i].SetTweenDiffuseColor( color );
m_sprIndicators[i].SetTweenDiffuse( color );
}
}
+16 -16
View File
@@ -47,38 +47,38 @@ SongSelector::SongSelector()
m_textGroup.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textGroup.SetXY( GROUP_X, GROUP_Y );
m_textGroup.SetDiffuseColor( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
m_textGroup.SetDiffuse( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
m_textGroup.SetText( "blah" );
this->AddSubActor( &m_textGroup );
this->AddChild( &m_textGroup );
m_Banner.SetXY( SONG_BANNER_X, SONG_BANNER_Y );
m_Banner.SetCroppedSize( SONG_BANNER_WIDTH, SONG_BANNER_HEIGHT );
this->AddSubActor( &m_Banner );
this->AddChild( &m_Banner );
m_TextBanner.SetXY( SONG_TEXT_BANNER_X, SONG_TEXT_BANNER_Y );
this->AddSubActor( &m_TextBanner );
this->AddChild( &m_TextBanner );
m_sprArrowLeft.Load( THEME->GetPathTo("Graphics","edit menu left") );
m_sprArrowLeft.SetXY( ARROWS_X[0], ARROWS_Y[0] );
m_sprArrowLeft.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
this->AddSubActor( &m_sprArrowLeft );
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,0) );
this->AddChild( &m_sprArrowLeft );
m_sprArrowRight.Load( THEME->GetPathTo("Graphics","edit menu right") );
m_sprArrowRight.SetXY( ARROWS_X[1], ARROWS_Y[1] );
m_sprArrowRight.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
this->AddSubActor( &m_sprArrowRight );
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,0) );
this->AddChild( &m_sprArrowRight );
m_textNotesType.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textNotesType.SetXY( GAME_STYLE_X, GAME_STYLE_Y );
m_textNotesType.SetDiffuseColor( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
m_textNotesType.SetDiffuse( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
m_textNotesType.SetText( "blah" );
this->AddSubActor( &m_textNotesType );
this->AddChild( &m_textNotesType );
m_textNotes.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
m_textNotes.SetXY( STEPS_X, STEPS_Y );
m_textNotes.SetDiffuseColor( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
m_textNotes.SetDiffuse( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
m_textNotes.SetText( "blah" );
this->AddSubActor( &m_textNotes );
this->AddChild( &m_textNotes );
// data structures
ChangeSelectedRow(ROW_GROUP);
@@ -214,8 +214,8 @@ void SongSelector::Right()
void SongSelector::ChangeSelectedRow( SelectedRow row )
{
m_textGroup.SetEffectNone();
m_sprArrowLeft.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprArrowRight.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,0) );
m_textNotesType.SetEffectNone();
m_textNotes.SetEffectNone();
@@ -225,8 +225,8 @@ void SongSelector::ChangeSelectedRow( SelectedRow row )
{
case ROW_GROUP: m_textGroup.SetEffectGlowing(); break;
case ROW_SONG:
m_sprArrowLeft.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprArrowRight.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,1) );
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,1) );
break;
case ROW_NOTES_TYPE: m_textNotesType.SetEffectGlowing(); break;
case ROW_STEPS: m_textNotes.SetEffectGlowing(); break;
+10 -10
View File
@@ -143,8 +143,8 @@ bool Sprite::LoadTexture( CString sTexturePath, bool bForceReload, int iMipMaps,
assert( m_pTexture != NULL );
// the size of the sprite is the size of the image before it was scaled
SetWidth( (float)m_pTexture->GetSourceFrameWidth() );
SetHeight( (float)m_pTexture->GetSourceFrameHeight() );
Sprite::m_size.x = (float)m_pTexture->GetSourceFrameWidth();
Sprite::m_size.y = (float)m_pTexture->GetSourceFrameHeight();
// Assume the frames of this animation play in sequential order with 0.2 second delay.
for( int i=0; i<m_pTexture->GetNumFrames(); i++ )
@@ -263,7 +263,7 @@ void Sprite::DrawPrimitives()
if( m_temp_colorDiffuse[0].a != 0 )
if( m_temp.diffuse[0].a != 0 )
{
//////////////////////
// render the shadow
@@ -272,7 +272,7 @@ void Sprite::DrawPrimitives()
{
DISPLAY->PushMatrix();
DISPLAY->TranslateLocal( m_fShadowLength, m_fShadowLength, 0 ); // shift by 5 units
v[0].color = v[1].color = v[2].color = v[3].color = D3DXCOLOR(0,0,0,0.5f*m_temp_colorDiffuse[0].a); // semi-transparent black
v[0].color = v[1].color = v[2].color = v[3].color = D3DXCOLOR(0,0,0,0.5f*m_temp.diffuse[0].a); // semi-transparent black
DISPLAY->AddQuad( v );
DISPLAY->PopMatrix();
}
@@ -280,20 +280,20 @@ void Sprite::DrawPrimitives()
//////////////////////
// render the diffuse pass
//////////////////////
v[0].color = m_temp_colorDiffuse[2]; // bottom left
v[1].color = m_temp_colorDiffuse[0]; // top left
v[2].color = m_temp_colorDiffuse[3]; // bottom right
v[3].color = m_temp_colorDiffuse[1]; // top right
v[0].color = m_temp.diffuse[2]; // bottom left
v[1].color = m_temp.diffuse[0]; // top left
v[2].color = m_temp.diffuse[3]; // bottom right
v[3].color = m_temp.diffuse[1]; // top right
DISPLAY->AddQuad( v );
}
//////////////////////
// render the glow pass
//////////////////////
if( m_temp_colorGlow.a != 0 )
if( m_temp.glow.a != 0 )
{
DISPLAY->SetColorDiffuse();
v[0].color = v[1].color = v[2].color = v[3].color = m_temp_colorGlow;
v[0].color = v[1].color = v[2].color = v[3].color = m_temp.glow;
DISPLAY->AddQuad( v );
}
}
+26 -2
View File
@@ -59,7 +59,7 @@ IntDir=.\../Release
TargetDir=\stepmania\stepmania
TargetName=StepMania
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -95,7 +95,7 @@ IntDir=.\../Debug
TargetDir=\stepmania\stepmania
TargetName=StepMania-debug
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -235,6 +235,14 @@ SOURCE=.\RageUtil.h
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\CodeDetector.cpp
# End Source File
# Begin Source File
SOURCE=.\CodeDetector.h
# End Source File
# Begin Source File
SOURCE=.\Course.cpp
# End Source File
# Begin Source File
@@ -716,6 +724,14 @@ SOURCE=.\MusicWheel.h
# End Source File
# Begin Source File
SOURCE=.\OptionIcon.cpp
# End Source File
# Begin Source File
SOURCE=.\OptionIcon.h
# End Source File
# Begin Source File
SOURCE=.\OptionsCursor.cpp
# End Source File
# Begin Source File
@@ -724,6 +740,14 @@ SOURCE=.\OptionsCursor.h
# End Source File
# Begin Source File
SOURCE=.\PlayerOptionIcons.cpp
# End Source File
# Begin Source File
SOURCE=.\PlayerOptionIcons.h
# End Source File
# Begin Source File
SOURCE=.\ScrollBar.cpp
# End Source File
# Begin Source File
+18
View File
@@ -352,6 +352,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<Filter
Name="Data Structures"
Filter="">
<File
RelativePath="CodeDetector.cpp">
</File>
<File
RelativePath="CodeDetector.h">
</File>
<File
RelativePath="Course.cpp">
</File>
@@ -686,12 +692,24 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<File
RelativePath=".\MusicWheel.h">
</File>
<File
RelativePath="OptionIcon.cpp">
</File>
<File
RelativePath="OptionIcon.h">
</File>
<File
RelativePath="OptionsCursor.cpp">
</File>
<File
RelativePath="OptionsCursor.h">
</File>
<File
RelativePath="PlayerOptionIcons.cpp">
</File>
<File
RelativePath="PlayerOptionIcons.h">
</File>
<File
RelativePath="ScrollBar.cpp">
</File>
+14
View File
@@ -66,3 +66,17 @@ StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI ) const
}
PlayerNumber StyleDef::ControllerToPlayerNumber( GameController controller ) const
{
switch( m_StyleType )
{
case ONE_PLAYER_ONE_CREDIT:
case TWO_PLAYERS_TWO_CREDITS:
return (PlayerNumber)controller;
case ONE_PLAYER_TWO_CREDITS:
return GAMESTATE->m_MasterPlayerNumber;
default:
ASSERT(0);
return PLAYER_INVALID;
}
}
+2
View File
@@ -65,6 +65,8 @@ public:
GameInput StyleInputToGameInput( const StyleInput StyleI ) const;
StyleInput GameInputToStyleInput( const GameInput &GameI ) const;
PlayerNumber ControllerToPlayerNumber( GameController controller ) const;
void GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData* pNoteDataOut ) const;
};
+3 -3
View File
@@ -38,9 +38,9 @@ TextBanner::TextBanner()
m_textSubTitle.TurnShadowOff();
m_textArtist.TurnShadowOff();
this->AddSubActor( &m_textTitle );
this->AddSubActor( &m_textSubTitle );
this->AddSubActor( &m_textArtist );
this->AddChild( &m_textTitle );
this->AddChild( &m_textSubTitle );
this->AddChild( &m_textArtist );
}
+1 -1
View File
@@ -26,7 +26,7 @@ TipDisplay::TipDisplay()
m_textTip.LoadFromFont( THEME->GetPathTo("Fonts","help") );
m_textTip.SetEffectBlinking();
m_textTip.TurnShadowOff();
this->AddSubActor( &m_textTip );
this->AddChild( &m_textTip );
m_iCurTipIndex = 0;
m_fSecsUntilSwitch = TIP_SHOW_TIME;
+1 -1
View File
@@ -72,7 +72,7 @@ void TransitionBackWipe::DrawPrimitives()
m_quad.SetXY( (float)iRectX, CENTER_Y );
m_quad.SetZoomX( (float)iRectWidth );
m_quad.SetZoomY( SCREEN_HEIGHT );
m_quad.SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_quad.SetDiffuse( D3DXCOLOR(0,0,0,1) );
m_quad.Draw();
}
} // end foreach rect
+3 -3
View File
@@ -21,7 +21,7 @@
TransitionFade::TransitionFade()
{
m_rect.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
SetDiffuseColor( D3DXCOLOR(0,0,0,1) ); // black
SetDiffuse( D3DXCOLOR(0,0,0,1) ); // black
}
TransitionFade::~TransitionFade()
@@ -35,8 +35,8 @@ void TransitionFade::DrawPrimitives()
if( fPercentageOpaque == 0 )
return; // draw nothing
D3DXCOLOR colorTemp = m_colorDiffuse[0] * fPercentageOpaque;
m_rect.SetDiffuseColor( colorTemp );
D3DXCOLOR colorTemp = GetDiffuse() * fPercentageOpaque;
m_rect.SetDiffuse( colorTemp );
m_rect.Draw();
}
+3 -3
View File
@@ -50,12 +50,12 @@ void TransitionFadeWipe::DrawPrimitives()
float fDarkOutsideX = bLeftEdgeIsDarker ? fDarkEdgeX - SCREEN_WIDTH*2 : fDarkEdgeX + SCREEN_WIDTH*2;
m_rectBlack.SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
m_rectBlack.SetDiffuse( D3DXCOLOR(0,0,0,1) );
m_rectBlack.StretchTo( CRect((int)fDarkOutsideX, 0, (int)fDarkEdgeX, (int)SCREEN_HEIGHT) );
m_rectBlack.Draw();
m_rectGradient.SetDiffuseColorLeftEdge( D3DXCOLOR(0,0,0,1) );
m_rectGradient.SetDiffuseColorRightEdge( D3DXCOLOR(0,0,0,0) );
m_rectGradient.SetDiffuseLeftEdge( D3DXCOLOR(0,0,0,1) );
m_rectGradient.SetDiffuseRightEdge( D3DXCOLOR(0,0,0,0) );
m_rectGradient.StretchTo( CRect((int)fDarkEdgeX, 0, (int)fLightEdgeX, (int)SCREEN_HEIGHT) );
m_rectGradient.Draw();
+2 -2
View File
@@ -63,7 +63,7 @@ void TransitionKeepAlive::DrawPrimitives()
const float fPercentColor = fPercentClosed;
const float fPercentAlpha = min( fPercentClosed * 2, 1 );
m_sprLogo.SetDiffuseColor( D3DXCOLOR(fPercentColor,fPercentColor,fPercentColor,fPercentAlpha) );
m_sprLogo.SetDiffuse( D3DXCOLOR(fPercentColor,fPercentColor,fPercentColor,fPercentAlpha) );
m_sprLogo.SetZoomY( fPercentClosed );
if( fPercentClosed > 0 )
m_sprLogo.Draw();
@@ -72,7 +72,7 @@ void TransitionKeepAlive::DrawPrimitives()
case KEEP_ALIVE_TYPE_5TH:
{
float fPercentClosed = 1 - this->GetPercentageOpen();
m_sprLogo.SetDiffuseColor( D3DXCOLOR(1,1,1,fPercentClosed) );
m_sprLogo.SetDiffuse( D3DXCOLOR(1,1,1,fPercentClosed) );
m_sprLogo.Draw();
}
break;
+4 -4
View File
@@ -20,7 +20,7 @@
TransitionOniFade::TransitionOniFade()
{
SetDiffuseColor( D3DXCOLOR(1,1,1,1) ); // white
SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
m_quadBackground.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
@@ -47,15 +47,15 @@ void TransitionOniFade::DrawPrimitives()
UpdateSongText();
}
m_quadBackground.SetDiffuseColor( D3DXCOLOR(1,1,1,SCALE(GetPercentageClosed(),0,1,-1,1)) );
m_quadBackground.SetDiffuse( D3DXCOLOR(1,1,1,SCALE(GetPercentageClosed(),0,1,-1,1)) );
m_quadBackground.Draw();
if( m_TransitionState == closed || m_TransitionState == opening_right )
{
m_quadStrip.SetDiffuseColor( D3DXCOLOR(0,0,0,SCALE(GetPercentageClosed(),0,1,0,2)) );
m_quadStrip.SetDiffuse( D3DXCOLOR(0,0,0,SCALE(GetPercentageClosed(),0,1,0,2)) );
m_quadStrip.Draw();
m_textSongInfo.SetDiffuseColor( D3DXCOLOR(1,1,1,SCALE(GetPercentageClosed(),0,1,0,2)) );
m_textSongInfo.SetDiffuse( D3DXCOLOR(1,1,1,SCALE(GetPercentageClosed(),0,1,0,2)) );
m_textSongInfo.Draw();
}
}
+2 -2
View File
@@ -32,7 +32,7 @@ void TransitionStarWipe::DrawPrimitives()
return;
else if( m_TransitionState == closed ) {
m_rect.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
m_rect.SetDiffuseColor( D3DCOLOR_RGBA(0,0,0,255) );
m_rect.SetDiffuse( D3DCOLOR_RGBA(0,0,0,255) );
m_rect.Draw();
return;
}
@@ -79,7 +79,7 @@ void TransitionStarWipe::DrawPrimitives()
int y_top = y - m_iStarHeight/2;
int y_bot = y + m_iStarHeight/2+1;
m_rect.StretchTo( CRect(x_rect_leading_edge, y_top, x_rect_trailing_edge, y_bot) );
m_rect.SetDiffuseColor( D3DCOLOR_ARGB(255,0,0,0) );
m_rect.SetDiffuse( D3DCOLOR_ARGB(255,0,0,0) );
m_rect.Draw();
}