per-player NoteSkin
NoteSkin selected on PlayerOptions screen tweaked judgement appearance marvelous judgement glow ActorEffect cleanup
This commit is contained in:
@@ -575,8 +575,8 @@ HelpText=Use arrow keys to navigate, ENTER to assign, SPACE to clear, ESCAPE whe
|
||||
ShowSeconds=0.25
|
||||
ZoomStart=1.0
|
||||
ZoomEnd=1.5
|
||||
ColorMarvelousStart=1.0,1.0,0.3,1 // yellow
|
||||
ColorMarvelousEnd=1.0,1.0,0.3,0 // yellow no alpha
|
||||
ColorMarvelousStart=1.0,1.0,1.0,1 // white
|
||||
ColorMarvelousEnd=1.0,1.0,1.0,0 // white no alpha
|
||||
ColorPerfectStart=1.0,1.0,0.3,1 // yellow
|
||||
ColorPerfectEnd=1.0,1.0,0.3,0 // yellow no alpha
|
||||
ColorGreatStart=0.0,1.0,0.4,1 // green
|
||||
@@ -590,8 +590,8 @@ ColorBooEnd=0.8,0.0,0.6,0 // purple no alpha
|
||||
ShowSeconds=0.25
|
||||
ZoomStart=1.0
|
||||
ZoomEnd=1.5
|
||||
ColorMarvelousStart=1.0,1.0,0.3,1 // yellow
|
||||
ColorMarvelousEnd=1.0,1.0,0.3,0 // yellow no alpha
|
||||
ColorMarvelousStart=1.0,1.0,1.0,1 // white
|
||||
ColorMarvelousEnd=1.0,1.0,1.0,0 // white no alpha
|
||||
ColorPerfectStart=1.0,1.0,0.3,1 // yellow
|
||||
ColorPerfectEnd=1.0,1.0,0.3,0 // yellow no alpha
|
||||
ColorGreatStart=0.0,1.0,0.4,1 // green
|
||||
@@ -601,6 +601,9 @@ ColorGoodEnd=0.3,0.8,1.0,0 // blue no alpha
|
||||
ColorBooStart=0.8,0.0,0.6,1 // purple
|
||||
ColorBooEnd=0.8,0.0,0.6,0 // purple no alpha
|
||||
|
||||
[HoldGhostArrow]
|
||||
WarmUpSeconds=0.25
|
||||
|
||||
[BitmapText]
|
||||
RainbowColor1=1.0,0.0,0.4,1 // red
|
||||
RainbowColor2=0.8,0.2,0.6,1 // pink
|
||||
@@ -632,19 +635,45 @@ TopEdge=20
|
||||
RightEdge=620
|
||||
BottomEdge=460
|
||||
|
||||
[Judgment]
|
||||
WordX=0
|
||||
WordY=0
|
||||
MarvelousZoom=1.3
|
||||
PerfectZoom=1.2
|
||||
GreatZoom=1.1
|
||||
GoodZoom=1.05
|
||||
BooZoom=1.0
|
||||
TweenSeconds=0.05
|
||||
ShowSeconds=0.8
|
||||
|
||||
[Combo]
|
||||
LabelX=6
|
||||
LabelY=16
|
||||
LabelHorizAlign=0
|
||||
LabelVertAlign=2
|
||||
NumberX=0
|
||||
NumberY=16
|
||||
NumberHorizAlign=2
|
||||
NumberVertAlign=2
|
||||
ShowComboAt=4
|
||||
NumberMinZoom=0.5
|
||||
NumberMaxZoom=0.9
|
||||
NumberMaxZoomAt=300
|
||||
PulseZoom=1.2
|
||||
TweenSeconds=0.05
|
||||
|
||||
[HoldJudgment]
|
||||
OKZoomX=1.25
|
||||
OKZoomY=1.25
|
||||
TweenSeconds=0.3
|
||||
ShowSeconds=0.8
|
||||
|
||||
[Player]
|
||||
JudgeMarvelousZoomX=1.3
|
||||
JudgeMarvelousZoomY=1.3
|
||||
JudgePerfectZoomX=1.3
|
||||
JudgePerfectZoomY=1.3
|
||||
JudgeGreatZoomX=1.2
|
||||
JudgeGreatZoomY=1.2
|
||||
JudgeGoodZoomX=1.1
|
||||
JudgeGoodZoomY=1.1
|
||||
JudgeBooZoomX=1.0
|
||||
JudgeBooZoomY=1.0
|
||||
ComboJudgeTweenSeconds=0.1
|
||||
BrightGhostThreshold=100
|
||||
GrayArrowsY=96
|
||||
JudgmentY=210
|
||||
ComboY=270
|
||||
HoldJudgmentY=150
|
||||
BrightGhostComboThreshold=100
|
||||
|
||||
[GameState]
|
||||
StageColorDemo=0.3,1.0,0.3,1 // green
|
||||
|
||||
+65
-79
@@ -34,13 +34,10 @@ Actor::Actor()
|
||||
m_HorizAlign = align_center;
|
||||
m_VertAlign = align_middle;
|
||||
|
||||
m_Effect = no_effect ;
|
||||
m_fPercentBetweenColors = 0.0f;
|
||||
m_bTweeningTowardEndColor = true;
|
||||
m_fDeltaPercentPerSecond = 1.0f;
|
||||
m_Effect = no_effect;
|
||||
m_fSecsIntoEffect = 0;
|
||||
m_fEffectPeriodSeconds = 1;
|
||||
m_fWagRadians = 0.2f;
|
||||
m_fWagPeriod = 2.0f;
|
||||
m_fWagTimer = 0.0f;
|
||||
m_vSpinVelocity = RageVector3(0,0,0);
|
||||
m_fVibrationDistance = 5.0f;
|
||||
m_bVisibleThisFrame = false;
|
||||
@@ -72,35 +69,35 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
||||
//
|
||||
// set temporary drawing properties based on Effects
|
||||
//
|
||||
|
||||
bool bBlinkOn = m_fSecsIntoEffect/m_fEffectPeriodSeconds > 0.5f;
|
||||
float fPercentBetweenColors = sinf( m_fSecsIntoEffect/m_fEffectPeriodSeconds * 2 * PI ) / 2 + 0.5f;
|
||||
ASSERT( fPercentBetweenColors >= 0 && fPercentBetweenColors <= 1 );
|
||||
float fOriginalAlpha = m_temp.diffuse[0].a;
|
||||
|
||||
switch( m_Effect )
|
||||
{
|
||||
case no_effect:
|
||||
break;
|
||||
case blinking:
|
||||
case diffuse_blinking:
|
||||
for(i=0; i<4; i++)
|
||||
{
|
||||
float fOriginalAlpha = m_temp.diffuse[i].a;
|
||||
m_temp.diffuse[i] = m_bTweeningTowardEndColor ? m_effect_colorDiffuse1 : m_effect_colorDiffuse2;
|
||||
m_temp.diffuse[i].a *= fOriginalAlpha;
|
||||
}
|
||||
m_temp.diffuse[i] = bBlinkOn ? m_effectColor1 : m_effectColor2;
|
||||
break;
|
||||
case camelion:
|
||||
case diffuse_camelion:
|
||||
for(i=0; i<4; i++)
|
||||
{
|
||||
float fOriginalAlpha = m_temp.diffuse[i].a;
|
||||
m_temp.diffuse[i] = m_effect_colorDiffuse1*m_fPercentBetweenColors + m_effect_colorDiffuse2*(1.0f-m_fPercentBetweenColors);
|
||||
m_temp.diffuse[i].a *= fOriginalAlpha;
|
||||
}
|
||||
m_temp.diffuse[i] = m_effectColor1*fPercentBetweenColors + m_effectColor2*(1.0f-fPercentBetweenColors);
|
||||
break;
|
||||
case glowing:
|
||||
float fCurvedPercent;
|
||||
fCurvedPercent = sinf( m_fPercentBetweenColors * PI );
|
||||
m_temp.glow = m_effect_colorGlow1*fCurvedPercent + m_effect_colorGlow2*(1.0f-fCurvedPercent);
|
||||
m_temp.glow.a *= m_temp.diffuse[0].a; // don't glow if the Actor is transparent!
|
||||
case glow_blinking:
|
||||
m_temp.glow = bBlinkOn ? m_effectColor1 : m_effectColor2;
|
||||
m_temp.glow.a *= fOriginalAlpha; // don't glow if the Actor is transparent!
|
||||
break;
|
||||
case glow_camelion:
|
||||
m_temp.glow = m_effectColor1*fPercentBetweenColors + m_effectColor2*(1.0f-fPercentBetweenColors);
|
||||
m_temp.glow.a *= fOriginalAlpha; // don't glow if the Actor is transparent!
|
||||
break;
|
||||
case wagging:
|
||||
m_temp.rotation.z = m_fWagRadians * sinf(
|
||||
(m_fWagTimer / m_fWagPeriod) // percent through wag
|
||||
(m_fSecsIntoEffect / m_fEffectPeriodSeconds) // percent through wag
|
||||
* 2.0f * PI );
|
||||
break;
|
||||
case spinning:
|
||||
@@ -118,14 +115,14 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
||||
break;
|
||||
case bouncing:
|
||||
{
|
||||
float fPercentThroughBounce = m_fTimeIntoBounce / m_fBouncePeriod;
|
||||
float fPercentOffset = sinf( fPercentThroughBounce*PI );
|
||||
m_temp.pos += m_vectBounce * fPercentOffset;
|
||||
float fPercentThroughBounce = m_fSecsIntoEffect / m_fEffectPeriodSeconds;
|
||||
float fPercentOffset = sinf( fPercentThroughBounce*PI );
|
||||
m_temp.pos += m_vectBounce * fPercentOffset;
|
||||
}
|
||||
break;
|
||||
case bobbing:
|
||||
{
|
||||
float fPercentThroughBounce = m_fTimeIntoBounce / m_fBouncePeriod;
|
||||
float fPercentThroughBounce = m_fSecsIntoEffect / m_fEffectPeriodSeconds;
|
||||
float fPercentOffset = sinf( fPercentThroughBounce*PI*2 );
|
||||
m_temp.pos += m_vectBounce * fPercentOffset;
|
||||
}
|
||||
@@ -226,30 +223,16 @@ void Actor::Update( float fDeltaTime )
|
||||
{
|
||||
case no_effect:
|
||||
break;
|
||||
case blinking:
|
||||
case camelion:
|
||||
case glowing:
|
||||
if( m_bTweeningTowardEndColor ) {
|
||||
m_fPercentBetweenColors += m_fDeltaPercentPerSecond * fDeltaTime;
|
||||
if( m_fPercentBetweenColors > 1.0f ) {
|
||||
m_fPercentBetweenColors = 1.0f;
|
||||
|
||||
m_bTweeningTowardEndColor = false;
|
||||
}
|
||||
}
|
||||
else { // !m_bTweeningTowardEndColor
|
||||
m_fPercentBetweenColors -= m_fDeltaPercentPerSecond * fDeltaTime;
|
||||
if( m_fPercentBetweenColors < 0.0f ) {
|
||||
m_fPercentBetweenColors = 0.0f;
|
||||
m_bTweeningTowardEndColor = true;
|
||||
}
|
||||
}
|
||||
//LOG->Trace( "Actor::m_fPercentBetweenColors %f", m_fPercentBetweenColors );
|
||||
break;
|
||||
case diffuse_blinking:
|
||||
case diffuse_camelion:
|
||||
case glow_blinking:
|
||||
case glow_camelion:
|
||||
case wagging:
|
||||
m_fWagTimer += fDeltaTime;
|
||||
if( m_fWagTimer > m_fWagPeriod )
|
||||
m_fWagTimer -= m_fWagPeriod;
|
||||
case bouncing:
|
||||
case bobbing:
|
||||
m_fSecsIntoEffect += fDeltaTime;
|
||||
while( m_fSecsIntoEffect >= m_fEffectPeriodSeconds )
|
||||
m_fSecsIntoEffect -= m_fEffectPeriodSeconds;
|
||||
break;
|
||||
case spinning:
|
||||
m_current.rotation += m_vSpinVelocity;
|
||||
@@ -261,12 +244,6 @@ void Actor::Update( float fDeltaTime )
|
||||
break;
|
||||
case flickering:
|
||||
break;
|
||||
case bouncing:
|
||||
case bobbing:
|
||||
m_fTimeIntoBounce += fDeltaTime;
|
||||
if( m_fTimeIntoBounce >= m_fBouncePeriod )
|
||||
m_fTimeIntoBounce -= m_fBouncePeriod;
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateTweening( fDeltaTime );
|
||||
@@ -414,38 +391,47 @@ void Actor::SetEffectNone()
|
||||
//m_color = RageColor( 1.0,1.0,1.0,1.0 );
|
||||
}
|
||||
|
||||
void Actor::SetEffectBlinking( float fDeltaPercentPerSecond, RageColor Color, RageColor Color2 )
|
||||
void Actor::SetEffectDiffuseBlinking( float fEffectPeriodSeconds, RageColor c1, RageColor c2 )
|
||||
{
|
||||
m_Effect = blinking;
|
||||
m_effect_colorDiffuse1 = Color;
|
||||
m_effect_colorDiffuse2 = Color2;
|
||||
|
||||
m_fDeltaPercentPerSecond = fDeltaPercentPerSecond;
|
||||
m_Effect = diffuse_blinking;
|
||||
m_effectColor1 = c1;
|
||||
m_effectColor2 = c2;
|
||||
m_fEffectPeriodSeconds = fEffectPeriodSeconds;
|
||||
m_fSecsIntoEffect = 0;
|
||||
}
|
||||
|
||||
void Actor::SetEffectCamelion( float fDeltaPercentPerSecond, RageColor Color, RageColor Color2 )
|
||||
void Actor::SetEffectDiffuseCamelion( float fEffectPeriodSeconds, RageColor c1, RageColor c2 )
|
||||
{
|
||||
m_Effect = camelion;
|
||||
m_effect_colorDiffuse1 = Color;
|
||||
m_effect_colorDiffuse2 = Color2;
|
||||
|
||||
m_fDeltaPercentPerSecond = fDeltaPercentPerSecond;
|
||||
m_Effect = diffuse_camelion;
|
||||
m_effectColor1 = c1;
|
||||
m_effectColor2 = c2;
|
||||
m_fEffectPeriodSeconds = fEffectPeriodSeconds;
|
||||
m_fSecsIntoEffect = 0;
|
||||
}
|
||||
|
||||
void Actor::SetEffectGlowing( float fDeltaPercentPerSecond, RageColor Color, RageColor Color2 )
|
||||
void Actor::SetEffectGlowBlinking( float fEffectPeriodSeconds, RageColor c1, RageColor c2 )
|
||||
{
|
||||
m_Effect = glowing;
|
||||
m_effect_colorGlow1 = Color;
|
||||
m_effect_colorGlow2 = Color2;
|
||||
m_Effect = glow_blinking;
|
||||
m_effectColor1 = c1;
|
||||
m_effectColor2 = c2;
|
||||
m_fEffectPeriodSeconds = fEffectPeriodSeconds;
|
||||
m_fSecsIntoEffect = 0;
|
||||
}
|
||||
|
||||
m_fDeltaPercentPerSecond = fDeltaPercentPerSecond;
|
||||
void Actor::SetEffectGlowCamelion( float fEffectPeriodSeconds, RageColor c1, RageColor c2 )
|
||||
{
|
||||
m_Effect = glow_camelion;
|
||||
m_effectColor1 = c1;
|
||||
m_effectColor2 = c2;
|
||||
m_fEffectPeriodSeconds = fEffectPeriodSeconds;
|
||||
m_fSecsIntoEffect = 0;
|
||||
}
|
||||
|
||||
void Actor::SetEffectWagging( float fWagRadians, float fWagPeriod )
|
||||
{
|
||||
m_Effect = wagging;
|
||||
m_fWagRadians = fWagRadians;
|
||||
m_fWagPeriod = fWagPeriod;
|
||||
m_fEffectPeriodSeconds = fWagPeriod;
|
||||
}
|
||||
|
||||
void Actor::SetEffectSpinning( RageVector3 vectRotationVelocity )
|
||||
@@ -470,8 +456,8 @@ void Actor::SetEffectBouncing( RageVector3 vectBounce, float fPeriod )
|
||||
m_Effect = bouncing;
|
||||
|
||||
m_vectBounce = vectBounce;
|
||||
m_fBouncePeriod = fPeriod;
|
||||
m_fTimeIntoBounce = 0;
|
||||
m_fEffectPeriodSeconds = fPeriod;
|
||||
m_fSecsIntoEffect = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -480,8 +466,8 @@ void Actor::SetEffectBobbing( RageVector3 vectBob, float fPeriod )
|
||||
m_Effect = bobbing;
|
||||
|
||||
m_vectBounce = vectBob;
|
||||
m_fBouncePeriod = fPeriod;
|
||||
m_fTimeIntoBounce = 0;
|
||||
m_fEffectPeriodSeconds = fPeriod;
|
||||
m_fSecsIntoEffect = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+18
-22
@@ -31,7 +31,8 @@ public:
|
||||
TWEEN_SPRING,
|
||||
};
|
||||
enum Effect { no_effect,
|
||||
blinking, camelion, glowing,
|
||||
diffuse_blinking, diffuse_camelion,
|
||||
glow_blinking, glow_camelion,
|
||||
wagging, spinning,
|
||||
vibrating, flickering,
|
||||
bouncing, bobbing
|
||||
@@ -152,15 +153,18 @@ public:
|
||||
|
||||
// effects
|
||||
void SetEffectNone();
|
||||
void SetEffectBlinking( float fDeltaPercentPerSecond = 2.5,
|
||||
RageColor Color = RageColor(0.5f,0.5f,0.5f,1),
|
||||
RageColor Color2 = RageColor(1,1,1,1) );
|
||||
void SetEffectCamelion( float fDeltaPercentPerSecond = 2.5,
|
||||
RageColor Color = RageColor(0,0,0,1),
|
||||
RageColor Color2 = RageColor(1,1,1,1) );
|
||||
void SetEffectGlowing( float fDeltaPercentPerSecond = 2.5,
|
||||
RageColor Color = RageColor(1,1,1,0.2f),
|
||||
RageColor Color2 = RageColor(1,1,1,0.8f) );
|
||||
void SetEffectDiffuseBlinking( float fEffectPeriodSeconds = 1.0f,
|
||||
RageColor c1 = RageColor(0.5f,0.5f,0.5f,1),
|
||||
RageColor c2 = RageColor(1,1,1,1) );
|
||||
void SetEffectDiffuseCamelion( float fEffectPeriodSeconds = 1.0f,
|
||||
RageColor c1 = RageColor(0,0,0,1),
|
||||
RageColor c2 = RageColor(1,1,1,1) );
|
||||
void SetEffectGlowBlinking( float fEffectPeriodSeconds = 1.0f,
|
||||
RageColor c1 = RageColor(1,1,1,0.2f),
|
||||
RageColor c2 = RageColor(1,1,1,0.8f) );
|
||||
void SetEffectGlowCamelion( float fEffectPeriodSeconds = 1.0f,
|
||||
RageColor c1 = RageColor(1,1,1,0.2f),
|
||||
RageColor c2 = RageColor(1,1,1,0.8f) );
|
||||
void SetEffectWagging( float fWagRadians = 0.2,
|
||||
float fWagPeriod = 2.0 );
|
||||
void SetEffectSpinning( RageVector3 vectRotationVelocity );
|
||||
@@ -271,21 +275,15 @@ protected:
|
||||
// Stuff for effects
|
||||
//
|
||||
Effect m_Effect;
|
||||
|
||||
float m_fSecsIntoEffect;
|
||||
float m_fEffectPeriodSeconds;
|
||||
|
||||
// Counting variables for camelion and glowing:
|
||||
RageColor m_effect_colorDiffuse1;
|
||||
RageColor m_effect_colorDiffuse2;
|
||||
RageColor m_effect_colorGlow1;
|
||||
RageColor m_effect_colorGlow2;
|
||||
float m_fPercentBetweenColors;
|
||||
bool m_bTweeningTowardEndColor; // TRUE is fading toward end_color, FALSE if fading toward start_color
|
||||
float m_fDeltaPercentPerSecond; // percentage change in tweening per second
|
||||
RageColor m_effectColor1;
|
||||
RageColor m_effectColor2;
|
||||
|
||||
// wagging:
|
||||
float m_fWagRadians;
|
||||
float m_fWagPeriod; // seconds to complete a wag (back and forth)
|
||||
float m_fWagTimer; // num of seconds into this wag
|
||||
|
||||
// spinning:
|
||||
RageVector3 m_vSpinVelocity; // delta per second
|
||||
@@ -298,8 +296,6 @@ protected:
|
||||
|
||||
// bouncing:
|
||||
RageVector3 m_vectBounce;
|
||||
float m_fBouncePeriod;
|
||||
float m_fTimeIntoBounce;
|
||||
|
||||
|
||||
//
|
||||
|
||||
+68
-33
@@ -18,6 +18,57 @@
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
CachedThemeMetric LABEL_X ("Combo","LabelX");
|
||||
CachedThemeMetric LABEL_Y ("Combo","LabelY");
|
||||
CachedThemeMetric LABEL_HORIZ_ALIGN ("Combo","LabelHorizAlign");
|
||||
CachedThemeMetric LABEL_VERT_ALIGN ("Combo","LabelVertAlign");
|
||||
CachedThemeMetric NUMBER_X ("Combo","NumberX");
|
||||
CachedThemeMetric NUMBER_Y ("Combo","NumberY");
|
||||
CachedThemeMetric NUMBER_HORIZ_ALIGN ("Combo","NumberHorizAlign");
|
||||
CachedThemeMetric NUMBER_VERT_ALIGN ("Combo","NumberVertAlign");
|
||||
CachedThemeMetric SHOW_COMBO_AT ("Combo","ShowComboAt");
|
||||
CachedThemeMetric NUMBER_MIN_ZOOM ("Combo","NumberMinZoom");
|
||||
CachedThemeMetric NUMBER_MAX_ZOOM ("Combo","NumberMaxZoom");
|
||||
CachedThemeMetric NUMBER_MAX_ZOOM_AT ("Combo","NumberMaxZoomAt");
|
||||
CachedThemeMetric PULSE_ZOOM ("Combo","PulseZoom");
|
||||
CachedThemeMetric C_TWEEN_SECONDS ("Combo","TweenSeconds");
|
||||
|
||||
|
||||
Combo::Combo()
|
||||
{
|
||||
LABEL_X.Refresh();
|
||||
LABEL_Y.Refresh();
|
||||
LABEL_HORIZ_ALIGN.Refresh();
|
||||
LABEL_VERT_ALIGN.Refresh();
|
||||
NUMBER_X.Refresh();
|
||||
NUMBER_Y.Refresh();
|
||||
NUMBER_HORIZ_ALIGN.Refresh();
|
||||
NUMBER_VERT_ALIGN.Refresh();
|
||||
SHOW_COMBO_AT.Refresh();
|
||||
NUMBER_MIN_ZOOM.Refresh();
|
||||
NUMBER_MAX_ZOOM.Refresh();
|
||||
NUMBER_MAX_ZOOM_AT.Refresh();
|
||||
PULSE_ZOOM.Refresh();
|
||||
C_TWEEN_SECONDS.Refresh();
|
||||
|
||||
Reset();
|
||||
|
||||
m_sprCombo.Load( THEME->GetPathTo("Graphics", "gameplay combo label") );
|
||||
m_sprCombo.TurnShadowOn();
|
||||
m_sprCombo.StopAnimating();
|
||||
m_sprCombo.SetXY( LABEL_X, LABEL_Y );
|
||||
m_sprCombo.SetHorizAlign( (Actor::HorizAlign)(int)LABEL_HORIZ_ALIGN );
|
||||
m_sprCombo.SetVertAlign( (Actor::VertAlign)(int)LABEL_VERT_ALIGN );
|
||||
this->AddChild( &m_sprCombo );
|
||||
|
||||
m_textComboNumber.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay combo numbers") );
|
||||
m_textComboNumber.TurnShadowOn();
|
||||
m_textComboNumber.SetXY( NUMBER_X, NUMBER_Y );
|
||||
m_textComboNumber.SetHorizAlign( (Actor::HorizAlign)(int)NUMBER_HORIZ_ALIGN );
|
||||
m_textComboNumber.SetVertAlign( (Actor::VertAlign)(int)NUMBER_VERT_ALIGN );
|
||||
this->AddChild( &m_textComboNumber );
|
||||
}
|
||||
|
||||
void Combo::Reset()
|
||||
{
|
||||
m_iCurCombo = m_iMaxCombo = m_iCurComboOfPerfects = 0;
|
||||
@@ -26,27 +77,7 @@ void Combo::Reset()
|
||||
m_sprCombo.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
}
|
||||
|
||||
Combo::Combo()
|
||||
{
|
||||
Reset();
|
||||
|
||||
m_sprCombo.Load( THEME->GetPathTo("Graphics", "gameplay combo label") );
|
||||
m_sprCombo.TurnShadowOn();
|
||||
m_sprCombo.StopAnimating();
|
||||
m_sprCombo.SetX( 40 );
|
||||
m_sprCombo.SetZoom( 1.0f );
|
||||
|
||||
m_textComboNumber.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay combo numbers") );
|
||||
m_textComboNumber.TurnShadowOn();
|
||||
m_textComboNumber.SetHorizAlign( Actor::align_right );
|
||||
m_textComboNumber.SetX( 0 );
|
||||
|
||||
this->AddChild( &m_textComboNumber );
|
||||
this->AddChild( &m_sprCombo );
|
||||
}
|
||||
|
||||
|
||||
void Combo::UpdateScore( TapNoteScore score, int iNumNotesInThisRow )
|
||||
void Combo::SetScore( TapNoteScore score, int iNumNotesInThisRow )
|
||||
{
|
||||
#ifndef DEBUG
|
||||
if( PREFSMAN->m_bAutoPlay && !GAMESTATE->m_bDemonstration ) // cheaters never prosper
|
||||
@@ -100,24 +131,28 @@ void Combo::UpdateScore( TapNoteScore score, int iNumNotesInThisRow )
|
||||
m_iMaxCombo = max(m_iMaxCombo, m_iCurCombo);
|
||||
|
||||
|
||||
if( m_iCurCombo <= 4 )
|
||||
{
|
||||
m_textComboNumber.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
m_sprCombo.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
}
|
||||
else
|
||||
if( m_iCurCombo >= (int)SHOW_COMBO_AT )
|
||||
{
|
||||
m_textComboNumber.SetDiffuse( RageColor(1,1,1,1) ); // visible
|
||||
m_sprCombo.SetDiffuse( RageColor(1,1,1,1) ); // visible
|
||||
|
||||
m_textComboNumber.SetText( ssprintf("%d", m_iCurCombo) );
|
||||
float fNewZoom = min( 0.5f + m_iCurCombo/800.0f, 1.0f );
|
||||
m_textComboNumber.SetZoom( fNewZoom );
|
||||
|
||||
//this->SetZoom( 1.2f );
|
||||
//this->BeginTweening( 0.3f );
|
||||
//this->SetTweenZoom( 1 );
|
||||
float fNumberZoom = SCALE(m_iCurCombo,0.f,(float)NUMBER_MAX_ZOOM_AT,(float)NUMBER_MIN_ZOOM,(float)NUMBER_MAX_ZOOM);
|
||||
CLAMP( fNumberZoom, (float)NUMBER_MIN_ZOOM, (float)NUMBER_MAX_ZOOM );
|
||||
m_textComboNumber.SetZoom( fNumberZoom * (float)PULSE_ZOOM );
|
||||
m_textComboNumber.BeginTweening( C_TWEEN_SECONDS );
|
||||
m_textComboNumber.SetTweenZoom( fNumberZoom );
|
||||
|
||||
m_sprCombo.SetZoom( PULSE_ZOOM );
|
||||
m_sprCombo.BeginTweening( C_TWEEN_SECONDS );
|
||||
m_sprCombo.SetTweenZoom( 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_textComboNumber.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
m_sprCombo.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case TNS_GOOD:
|
||||
|
||||
@@ -23,7 +23,7 @@ class Combo : public ActorFrame
|
||||
public:
|
||||
Combo();
|
||||
|
||||
void UpdateScore( TapNoteScore score, int iNumNotesInThisRow );
|
||||
void SetScore( TapNoteScore score, int iNumNotesInThisRow );
|
||||
|
||||
int GetCurrentCombo() const { return m_iCurCombo; }
|
||||
int GetMaxCombo() const { return m_iMaxCombo; }
|
||||
@@ -34,7 +34,6 @@ protected:
|
||||
int m_iMaxCombo;
|
||||
int m_iCurComboOfPerfects;
|
||||
|
||||
bool m_bComboVisible;
|
||||
Sprite m_sprCombo;
|
||||
BitmapText m_textComboNumber;
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ void FootMeter::SetFromNotes( Notes* pNotes )
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
SetNumFeet( pNotes->GetMeter() );
|
||||
if( pNotes->GetMeter() > GLOW_IF_METER_GREATER_THAN )
|
||||
this->SetEffectGlowing();
|
||||
this->SetEffectGlowCamelion();
|
||||
else
|
||||
this->SetEffectNone();
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@ void GhostArrowRow::Load( PlayerNumber pn )
|
||||
// init arrows
|
||||
for( int c=0; c<m_iNumCols; c++ )
|
||||
{
|
||||
m_GhostArrowRow[c].Load( NOTESKIN->GetPathTo(c, "tap explosion dim") );
|
||||
m_GhostArrowRowBright[c].Load( NOTESKIN->GetPathTo(c, "tap explosion bright") );
|
||||
m_HoldGhostArrowRow[c].Load( NOTESKIN->GetPathTo(c, "hold explosion") );
|
||||
m_GhostArrowRow[c].Load( NOTESKIN->GetPathTo(pn, c, "tap explosion dim") );
|
||||
m_GhostArrowRowBright[c].Load( NOTESKIN->GetPathTo(pn, c, "tap explosion bright") );
|
||||
m_HoldGhostArrowRow[c].Load( NOTESKIN->GetPathTo(pn, c, "hold explosion") );
|
||||
|
||||
m_GhostArrowRow[c].SetX( pStyleDef->m_ColumnInfo[pn][c].fXOffset );
|
||||
m_GhostArrowRowBright[c].SetX( pStyleDef->m_ColumnInfo[pn][c].fXOffset );
|
||||
|
||||
@@ -35,7 +35,7 @@ void GrayArrowRow::Load( PlayerNumber pn )
|
||||
|
||||
for( int c=0; c<m_iNumCols; c++ )
|
||||
{
|
||||
CString sPath = NOTESKIN->GetPathTo(c, "receptor");
|
||||
CString sPath = NOTESKIN->GetPathTo(pn, c, "receptor");
|
||||
m_GrayArrow[c].Load( sPath );
|
||||
// XXX
|
||||
if( m_GrayArrow[c].GetNumStates() != 2 &&
|
||||
|
||||
@@ -84,12 +84,12 @@ void GroupList::AfterChange()
|
||||
m_sprButton[iSel].StopTweening();
|
||||
m_sprButton[iSel].BeginTweening( 0.2f );
|
||||
m_sprButton[iSel].SetTweenX( BUTTON_SELECTED_X );
|
||||
m_sprButton[iSel].SetEffectGlowing();
|
||||
m_sprButton[iSel].SetEffectGlowCamelion();
|
||||
|
||||
m_screenLabels[iSel].StopTweening();
|
||||
m_screenLabels[iSel].BeginTweening( 0.2f );
|
||||
m_screenLabels[iSel].SetTweenX( BUTTON_SELECTED_X );
|
||||
m_screenLabels[iSel].SetEffectGlowing();
|
||||
m_screenLabels[iSel].SetEffectGlowCamelion();
|
||||
}
|
||||
|
||||
void GroupList::Up()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
-----------------------------------------------------------------------------
|
||||
Class: HoldGhostArrow
|
||||
|
||||
Desc: A graphic displayed in the HoldJudgement during Dancing.
|
||||
Desc: A graphic displayed in the HoldJudgment during Dancing.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Ben Nordstrom
|
||||
@@ -16,18 +16,21 @@
|
||||
#include "RageException.h"
|
||||
#include "RageTimer.h"
|
||||
#include <math.h>
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
const float HOLD_GHOST_ARROW_TWEEN_TIME = 0.5f;
|
||||
CachedThemeMetric WARM_UP_SECONDS ("HoldGhostArrow","WarmUpSeconds");
|
||||
|
||||
|
||||
HoldGhostArrow::HoldGhostArrow()
|
||||
{
|
||||
WARM_UP_SECONDS.Refresh();
|
||||
|
||||
m_bWasSteppedOnLastFrame = false;
|
||||
m_fHeatLevel = 0;
|
||||
|
||||
// LoadFromSpriteFile( THEME->GetPathTo(GRAPHIC_HOLD_GHOST_ARROW) );
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
// SetZoom( 1.1f );
|
||||
}
|
||||
|
||||
void HoldGhostArrow::Update( float fDeltaTime )
|
||||
@@ -35,13 +38,11 @@ void HoldGhostArrow::Update( float fDeltaTime )
|
||||
Sprite::Update( fDeltaTime );
|
||||
|
||||
if( m_bWasSteppedOnLastFrame )
|
||||
m_fHeatLevel += fDeltaTime * 4;
|
||||
m_fHeatLevel += fDeltaTime/(float)WARM_UP_SECONDS;
|
||||
else
|
||||
m_fHeatLevel -= fDeltaTime * 4;
|
||||
m_fHeatLevel -= fDeltaTime/(float)WARM_UP_SECONDS;
|
||||
|
||||
CLAMP( m_fHeatLevel, 0, 1 );
|
||||
// if( m_fHeatLevel > 0 )
|
||||
// LOG->Trace( "m_fHeatLevel = %f\n", m_fHeatLevel );
|
||||
|
||||
int iStateNum = (int)min( m_fHeatLevel * GetNumStates(), GetNumStates()-1 );
|
||||
SetState( iStateNum );
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
#include "global.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: HoldJudgement
|
||||
|
||||
Desc: A graphic displayed in the HoldJudgement during Dancing.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "HoldJudgement.h"
|
||||
#include "RageUtil.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
//
|
||||
// Important!!!! Do not use these macros during gameplay. They return very slowly. Cache them in a member.
|
||||
//
|
||||
#define JUDGEMENT_DISPLAY_TIME THEME->GetMetricF("HoldJudgement","DisplayTime")
|
||||
|
||||
|
||||
HoldJudgement::HoldJudgement()
|
||||
{
|
||||
m_fDisplayTime = JUDGEMENT_DISPLAY_TIME;
|
||||
m_fDisplayCountdown = 0;
|
||||
m_sprJudgement.Load( THEME->GetPathTo("Graphics","gameplay hold judgement") );
|
||||
m_sprJudgement.StopAnimating();
|
||||
m_sprJudgement.TurnShadowOn();
|
||||
this->AddChild( &m_sprJudgement );
|
||||
}
|
||||
|
||||
void HoldJudgement::Update( float fDeltaTime )
|
||||
{
|
||||
ActorFrame::Update( fDeltaTime );
|
||||
|
||||
m_fDisplayCountdown -= fDeltaTime;
|
||||
if( m_fDisplayCountdown < 0 )
|
||||
m_fDisplayCountdown = 0;
|
||||
}
|
||||
|
||||
void HoldJudgement::DrawPrimitives()
|
||||
{
|
||||
if( m_fDisplayCountdown > 0 )
|
||||
{
|
||||
ActorFrame::DrawPrimitives();
|
||||
}
|
||||
}
|
||||
|
||||
void HoldJudgement::SetHoldJudgement( HoldNoteScore hns )
|
||||
{
|
||||
//LOG->Trace( "Judgement::SetJudgement()" );
|
||||
|
||||
switch( hns )
|
||||
{
|
||||
case HNS_NONE: m_sprJudgement.SetState( 0 ); break;
|
||||
case HNS_OK: m_sprJudgement.SetState( 0 ); break;
|
||||
case HNS_NG: m_sprJudgement.SetState( 1 ); break;
|
||||
default: ASSERT( false );
|
||||
}
|
||||
|
||||
m_fDisplayCountdown = m_fDisplayTime;
|
||||
|
||||
if( hns == HNS_NG )
|
||||
{
|
||||
// falling down
|
||||
m_sprJudgement.StopTweening();
|
||||
m_sprJudgement.SetY( -10 );
|
||||
m_sprJudgement.SetZoom( 1.0f );
|
||||
m_sprJudgement.BeginTweening( m_fDisplayTime );
|
||||
m_sprJudgement.SetTweenY( 10 );
|
||||
}
|
||||
else // hns == HNS_OK
|
||||
{
|
||||
// zooming out
|
||||
m_sprJudgement.StopTweening();
|
||||
m_sprJudgement.SetZoom( 1.5f );
|
||||
m_sprJudgement.BeginTweening( m_fDisplayTime/3.0f );
|
||||
m_sprJudgement.SetTweenZoom( 1.0f );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
#include "global.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: HoldJudgment
|
||||
|
||||
Desc: A graphic displayed in the HoldJudgment during Dancing.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "HoldJudgment.h"
|
||||
#include "RageUtil.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
CachedThemeMetric OK_ZOOM_X ("HoldJudgment","OKZoomX");
|
||||
CachedThemeMetric OK_ZOOM_Y ("HoldJudgment","OKZoomY");
|
||||
CachedThemeMetric TWEEN_SECONDS ("HoldJudgment","TweenSeconds");
|
||||
CachedThemeMetric SHOW_SECONDS ("HoldJudgment","ShowSeconds");
|
||||
|
||||
|
||||
HoldJudgment::HoldJudgment()
|
||||
{
|
||||
OK_ZOOM_X.Refresh();
|
||||
OK_ZOOM_Y.Refresh();
|
||||
TWEEN_SECONDS.Refresh();
|
||||
SHOW_SECONDS.Refresh();
|
||||
|
||||
m_fShowCountdown = 0;
|
||||
m_sprJudgment.Load( THEME->GetPathTo("Graphics","gameplay hold Judgment 1x2") );
|
||||
m_sprJudgment.StopAnimating();
|
||||
m_sprJudgment.TurnShadowOn();
|
||||
this->AddChild( &m_sprJudgment );
|
||||
}
|
||||
|
||||
void HoldJudgment::Update( float fDeltaTime )
|
||||
{
|
||||
ActorFrame::Update( fDeltaTime );
|
||||
|
||||
m_fShowCountdown -= fDeltaTime;
|
||||
if( m_fShowCountdown < 0 )
|
||||
m_fShowCountdown = 0;
|
||||
}
|
||||
|
||||
void HoldJudgment::DrawPrimitives()
|
||||
{
|
||||
if( m_fShowCountdown > 0 )
|
||||
{
|
||||
ActorFrame::DrawPrimitives();
|
||||
}
|
||||
}
|
||||
|
||||
void HoldJudgment::SetHoldJudgment( HoldNoteScore hns )
|
||||
{
|
||||
//LOG->Trace( "Judgment::SetJudgment()" );
|
||||
|
||||
switch( hns )
|
||||
{
|
||||
case HNS_NONE: m_sprJudgment.SetState( 0 ); break;
|
||||
case HNS_OK: m_sprJudgment.SetState( 0 ); break;
|
||||
case HNS_NG: m_sprJudgment.SetState( 1 ); break;
|
||||
default: ASSERT( false );
|
||||
}
|
||||
|
||||
m_fShowCountdown = SHOW_SECONDS;
|
||||
|
||||
if( hns == HNS_NG )
|
||||
{
|
||||
// falling down
|
||||
m_sprJudgment.StopTweening();
|
||||
m_sprJudgment.SetY( -10 );
|
||||
m_sprJudgment.SetZoom( 1.0f );
|
||||
m_sprJudgment.BeginTweening( SHOW_SECONDS );
|
||||
m_sprJudgment.SetTweenY( 10 );
|
||||
}
|
||||
else // hns == HNS_OK
|
||||
{
|
||||
// zooming out
|
||||
m_sprJudgment.StopTweening();
|
||||
m_sprJudgment.SetZoomX( OK_ZOOM_X );
|
||||
m_sprJudgment.SetZoomY( OK_ZOOM_Y );
|
||||
m_sprJudgment.BeginTweening( TWEEN_SECONDS );
|
||||
m_sprJudgment.SetTweenZoom( 1.0f );
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
#ifndef HOLDJUDGEMENT_H
|
||||
#define HOLDJUDGEMENT_H
|
||||
#ifndef HOLDJudgment_H
|
||||
#define HOLDJudgment_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: HoldJudgement
|
||||
Class: HoldJudgment
|
||||
|
||||
Desc: A graphic displayed in the HoldJudgement during Dancing.
|
||||
Desc: A graphic displayed in the HoldJudgment during Dancing.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
@@ -18,18 +18,17 @@
|
||||
#include "PrefsManager.h"
|
||||
|
||||
|
||||
class HoldJudgement : public ActorFrame
|
||||
class HoldJudgment : public ActorFrame
|
||||
{
|
||||
public:
|
||||
HoldJudgement();
|
||||
void SetHoldJudgement( HoldNoteScore hns );
|
||||
HoldJudgment();
|
||||
void SetHoldJudgment( HoldNoteScore hns );
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void DrawPrimitives();
|
||||
|
||||
protected:
|
||||
Sprite m_sprJudgement;
|
||||
float m_fDisplayTime;
|
||||
float m_fDisplayCountdown;
|
||||
Sprite m_sprJudgment;
|
||||
float m_fShowCountdown;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,102 +0,0 @@
|
||||
#include "global.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: Judgement
|
||||
|
||||
Desc: See header
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "Judgement.h"
|
||||
#include "RageUtil.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GameState.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
const float JUDGEMENT_DISPLAY_TIME = 0.8f;
|
||||
|
||||
|
||||
Judgement::Judgement()
|
||||
{
|
||||
m_fDisplayCountdown = 0;
|
||||
m_sprJudgement.Load( THEME->GetPathTo("Graphics","gameplay judgement 1x6") );
|
||||
m_sprJudgement.StopAnimating();
|
||||
m_sprJudgement.TurnShadowOn();
|
||||
this->AddChild( &m_sprJudgement );
|
||||
}
|
||||
|
||||
void Judgement::Update( float fDeltaTime )
|
||||
{
|
||||
ActorFrame::Update( fDeltaTime );
|
||||
|
||||
m_fDisplayCountdown -= fDeltaTime;
|
||||
if( m_fDisplayCountdown < 0 )
|
||||
m_fDisplayCountdown = 0;
|
||||
}
|
||||
|
||||
void Judgement::DrawPrimitives()
|
||||
{
|
||||
if( m_fDisplayCountdown > 0 )
|
||||
{
|
||||
ActorFrame::DrawPrimitives();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Judgement::SetJudgement( TapNoteScore score )
|
||||
{
|
||||
//LOG->Trace( "Judgement::SetJudgement()" );
|
||||
|
||||
switch( score )
|
||||
{
|
||||
case TNS_MARVELOUS: m_sprJudgement.SetState( 0 ); break;
|
||||
case TNS_PERFECT: m_sprJudgement.SetState( 1 ); break;
|
||||
case TNS_GREAT: m_sprJudgement.SetState( 2 ); break;
|
||||
case TNS_GOOD: m_sprJudgement.SetState( 3 ); break;
|
||||
case TNS_BOO: m_sprJudgement.SetState( 4 ); break;
|
||||
case TNS_MISS: m_sprJudgement.SetState( 5 ); break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
m_fDisplayCountdown = JUDGEMENT_DISPLAY_TIME;
|
||||
|
||||
m_sprJudgement.SetEffectNone();
|
||||
m_sprJudgement.StopTweening();
|
||||
|
||||
if( score == TNS_MISS )
|
||||
{
|
||||
// falling down
|
||||
m_sprJudgement.SetY( -20 );
|
||||
m_sprJudgement.BeginTweening( JUDGEMENT_DISPLAY_TIME );
|
||||
m_sprJudgement.SetTweenY( 20 );
|
||||
}
|
||||
else if( score == TNS_BOO )
|
||||
{
|
||||
// vibrate
|
||||
m_sprJudgement.SetY( 0 );
|
||||
m_sprJudgement.SetZoom( 1.0f );
|
||||
m_sprJudgement.SetEffectVibrating();
|
||||
}
|
||||
else
|
||||
{
|
||||
// zooming out
|
||||
float fMagnitudeX, fMagnitudeY;
|
||||
switch( score )
|
||||
{
|
||||
case TNS_MARVELOUS: fMagnitudeX = 1.50f; fMagnitudeY = 2.00f; break;
|
||||
case TNS_PERFECT: fMagnitudeX = 1.50f; fMagnitudeY = 2.00f; break;
|
||||
case TNS_GREAT: fMagnitudeX = 1.30f; fMagnitudeY = 1.50f; break;
|
||||
case TNS_GOOD: fMagnitudeX = 1.10f; fMagnitudeY = 1.25f; break;
|
||||
default: ASSERT(false); // invalid score value
|
||||
}
|
||||
m_sprJudgement.SetY( 0 );
|
||||
// m_sprJudgement.SetZoomY( fMagnitudeY );
|
||||
// m_sprJudgement.SetZoomX( fMagnitudeX );
|
||||
// m_sprJudgement.BeginTweening( JUDGEMENT_DISPLAY_TIME/5.0f );
|
||||
// m_sprJudgement.SetTweenZoom( 1 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
#include "global.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: Judgment
|
||||
|
||||
Desc: See header
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "Judgment.h"
|
||||
#include "RageUtil.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GameState.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
CachedThemeMetric WORD_X ("Judgment","WordX");
|
||||
CachedThemeMetric WORD_Y ("Judgment","WordY");
|
||||
CachedThemeMetric MARVELOUS_ZOOM ("Judgment","MarvelousZoom");
|
||||
CachedThemeMetric PERFECT_ZOOM ("Judgment","PerfectZoom");
|
||||
CachedThemeMetric GREAT_ZOOM ("Judgment","GreatZoom");
|
||||
CachedThemeMetric GOOD_ZOOM ("Judgment","GoodZoom");
|
||||
CachedThemeMetric BOO_ZOOM ("Judgment","BooZoom");
|
||||
CachedThemeMetric J_TWEEN_SECONDS ("Judgment","TweenSeconds");
|
||||
CachedThemeMetric J_SHOW_SECONDS ("Judgment","ShowSeconds");
|
||||
|
||||
|
||||
Judgment::Judgment()
|
||||
{
|
||||
WORD_X.Refresh();
|
||||
WORD_Y.Refresh();
|
||||
MARVELOUS_ZOOM.Refresh();
|
||||
PERFECT_ZOOM.Refresh();
|
||||
GREAT_ZOOM.Refresh();
|
||||
GOOD_ZOOM.Refresh();
|
||||
BOO_ZOOM.Refresh();
|
||||
J_TWEEN_SECONDS.Refresh();
|
||||
J_SHOW_SECONDS.Refresh();
|
||||
|
||||
m_fShowCountdown = 0;
|
||||
m_sprJudgment.Load( THEME->GetPathTo("Graphics","gameplay Judgment 1x6") );
|
||||
m_sprJudgment.SetXY( WORD_X, WORD_Y );
|
||||
m_sprJudgment.StopAnimating();
|
||||
m_sprJudgment.TurnShadowOn();
|
||||
this->AddChild( &m_sprJudgment );
|
||||
}
|
||||
|
||||
void Judgment::Update( float fDeltaTime )
|
||||
{
|
||||
ActorFrame::Update( fDeltaTime );
|
||||
|
||||
m_fShowCountdown -= fDeltaTime;
|
||||
if( m_fShowCountdown < 0 )
|
||||
m_fShowCountdown = 0;
|
||||
}
|
||||
|
||||
void Judgment::DrawPrimitives()
|
||||
{
|
||||
if( m_fShowCountdown > 0 )
|
||||
{
|
||||
ActorFrame::DrawPrimitives();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Judgment::SetJudgment( TapNoteScore score )
|
||||
{
|
||||
//LOG->Trace( "Judgment::SetJudgment()" );
|
||||
|
||||
switch( score )
|
||||
{
|
||||
case TNS_MARVELOUS: m_sprJudgment.SetState( 0 ); break;
|
||||
case TNS_PERFECT: m_sprJudgment.SetState( 1 ); break;
|
||||
case TNS_GREAT: m_sprJudgment.SetState( 2 ); break;
|
||||
case TNS_GOOD: m_sprJudgment.SetState( 3 ); break;
|
||||
case TNS_BOO: m_sprJudgment.SetState( 4 ); break;
|
||||
case TNS_MISS: m_sprJudgment.SetState( 5 ); break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
m_fShowCountdown = J_SHOW_SECONDS;
|
||||
|
||||
m_sprJudgment.SetEffectNone();
|
||||
m_sprJudgment.StopTweening();
|
||||
|
||||
if( score == TNS_MISS )
|
||||
{
|
||||
// falling down
|
||||
m_sprJudgment.SetY( -20 );
|
||||
m_sprJudgment.BeginTweening( J_SHOW_SECONDS );
|
||||
m_sprJudgment.SetTweenY( 20 );
|
||||
}
|
||||
else if( score == TNS_BOO )
|
||||
{
|
||||
// vibrate
|
||||
m_sprJudgment.SetY( 0 );
|
||||
m_sprJudgment.SetZoom( 1.0f );
|
||||
m_sprJudgment.SetEffectVibrating();
|
||||
}
|
||||
else
|
||||
{
|
||||
// zooming out
|
||||
float fZoom;
|
||||
switch( score )
|
||||
{
|
||||
case TNS_MARVELOUS: fZoom = MARVELOUS_ZOOM; break;
|
||||
case TNS_PERFECT: fZoom = PERFECT_ZOOM; break;
|
||||
case TNS_GREAT: fZoom = GREAT_ZOOM; break;
|
||||
case TNS_GOOD: fZoom = GOOD_ZOOM; break;
|
||||
default: ASSERT(0); fZoom = 1; break;
|
||||
}
|
||||
m_sprJudgment.SetY( 0 );
|
||||
m_sprJudgment.SetZoom( fZoom );
|
||||
m_sprJudgment.BeginTweening( J_TWEEN_SECONDS );
|
||||
m_sprJudgment.SetTweenZoom( 1 );
|
||||
}
|
||||
|
||||
if( score == TNS_MARVELOUS )
|
||||
m_sprJudgment.SetEffectGlowBlinking(0.05f, RageColor(1,1,1,0), RageColor(1,1,1,0.5f));
|
||||
else
|
||||
m_sprJudgment.SetEffectNone();
|
||||
}
|
||||
@@ -1,18 +1,16 @@
|
||||
#ifndef Judgment_H
|
||||
#define Judgment_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: Judgement.h
|
||||
File: Judgment.h
|
||||
|
||||
Desc: A graphic displayed in the Judgement during Dancing.
|
||||
Desc: A graphic displayed in the Judgment during Dancing.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef JUDGEMENT_H
|
||||
#define JUDGEMENT_H
|
||||
|
||||
|
||||
#include "Sprite.h"
|
||||
#include "ActorFrame.h"
|
||||
#include "song.h"
|
||||
@@ -20,19 +18,19 @@
|
||||
#include "PrefsManager.h"
|
||||
|
||||
|
||||
class Judgement : public ActorFrame
|
||||
class Judgment : public ActorFrame
|
||||
{
|
||||
public:
|
||||
Judgement();
|
||||
virtual ~Judgement() { }
|
||||
void SetJudgement( TapNoteScore score );
|
||||
Judgment();
|
||||
virtual ~Judgment() { }
|
||||
void SetJudgment( TapNoteScore score );
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void DrawPrimitives();
|
||||
virtual void Reset() { m_fDisplayCountdown = .0f; }
|
||||
virtual void Reset() { m_fShowCountdown = .0f; }
|
||||
|
||||
protected:
|
||||
Sprite m_sprJudgement;
|
||||
float m_fDisplayCountdown;
|
||||
Sprite m_sprJudgment;
|
||||
float m_fShowCountdown;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -87,8 +87,8 @@ void MenuTimer::Update( float fDeltaTime )
|
||||
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("hurry up") );
|
||||
else if( fOldSecondsLeft > 5 && fNewSecondsLeft < 5 ) // transition to below 5
|
||||
{
|
||||
m_textDigit1.SetEffectGlowing( 10, RageColor(1,0,0,0), RageColor(1,0,0,1) );
|
||||
m_textDigit2.SetEffectGlowing( 10, RageColor(1,0,0,0), RageColor(1,0,0,1) );
|
||||
m_textDigit1.SetEffectGlowCamelion( 0.15f, RageColor(1,0,0,0), RageColor(1,0,0,1) );
|
||||
m_textDigit2.SetEffectGlowCamelion( 0.15f, RageColor(1,0,0,0), RageColor(1,0,0,1) );
|
||||
m_soundBeep.Play();
|
||||
}
|
||||
else if( fOldSecondsLeft > 4 && fNewSecondsLeft < 4 ) // transition to below 4
|
||||
|
||||
@@ -78,7 +78,7 @@ MusicWheel::MusicWheel()
|
||||
m_sprSelectionOverlay.Load( THEME->GetPathTo("Graphics","select music song highlight") );
|
||||
m_sprSelectionOverlay.SetXY( 0, 0 );
|
||||
m_sprSelectionOverlay.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprSelectionOverlay.SetEffectGlowing( 1.0f, RageColor(1,1,1,0.4f), RageColor(1,1,1,1) );
|
||||
m_sprSelectionOverlay.SetEffectGlowCamelion( 1.0f, RageColor(1,1,1,0.4f), RageColor(1,1,1,1) );
|
||||
AddChild( &m_sprSelectionOverlay );
|
||||
|
||||
m_ScrollBar.SetX( SCROLL_BAR_X );
|
||||
|
||||
@@ -26,28 +26,28 @@
|
||||
#include "NoteTypes.h"
|
||||
|
||||
|
||||
#define DRAW_HOLD_HEAD_FOR_TAPS_ON_SAME_ROW NOTESKIN->GetMetricB(name,"DrawHoldHeadForTapsOnSameRow")
|
||||
#define TAP_NOTE_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(name,"TapNoteAnimationLengthInBeats")
|
||||
#define HOLD_HEAD_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(name,"HoldHeadAnimationLengthInBeats")
|
||||
#define HOLD_TOPCAP_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(name,"HoldTopCapAnimationLengthInBeats")
|
||||
#define HOLD_BODY_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(name,"HoldBodyAnimationLengthInBeats")
|
||||
#define HOLD_BOTTOMCAP_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(name,"HoldBottomCapAnimationLengthInBeats")
|
||||
#define HOLD_TAIL_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(name,"HoldTailAnimationLengthInBeats")
|
||||
#define TAP_NOTE_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(name,"TapNoteAnimationIsVivid")
|
||||
#define HOLD_HEAD_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(name,"HoldHeadAnimationIsVivid")
|
||||
#define HOLD_TOPCAP_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(name,"HoldTopCapAnimationIsVivid")
|
||||
#define HOLD_BODY_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(name,"HoldBodyAnimationIsVivid")
|
||||
#define HOLD_BOTTOMCAP_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(name,"HoldBottomCapAnimationIsVivid")
|
||||
#define HOLD_TAIL_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(name,"HoldTailAnimationIsVivid")
|
||||
#define TAP_NOTE_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(name,"TapNoteAnimationIsNoteColor")
|
||||
#define HOLD_HEAD_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(name,"HoldHeadAnimationIsNoteColor")
|
||||
#define HOLD_TOPCAP_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(name,"HoldTopCapAnimationIsNoteColor")
|
||||
#define HOLD_BODY_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(name,"HoldBodyAnimationIsNoteColor")
|
||||
#define HOLD_BOTTOMCAP_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(name,"HoldBottomCapAnimationIsNoteColor")
|
||||
#define HOLD_TAIL_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(name,"HoldTailAnimationIsNoteColor")
|
||||
#define START_DRAWING_HOLD_BODY_OFFSET_FROM_HEAD NOTESKIN->GetMetricI(name,"StartDrawingHoldBodyOffsetFromHead")
|
||||
#define STOP_DRAWING_HOLD_BODY_OFFSET_FROM_TAIL NOTESKIN->GetMetricI(name,"StopDrawingHoldBodyOffsetFromTail")
|
||||
#define HOLD_NG_GRAY_PERCENT NOTESKIN->GetMetricF(name,"HoldNGGrayPercent")
|
||||
#define DRAW_HOLD_HEAD_FOR_TAPS_ON_SAME_ROW NOTESKIN->GetMetricB(pn,name,"DrawHoldHeadForTapsOnSameRow")
|
||||
#define TAP_NOTE_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(pn,name,"TapNoteAnimationLengthInBeats")
|
||||
#define HOLD_HEAD_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(pn,name,"HoldHeadAnimationLengthInBeats")
|
||||
#define HOLD_TOPCAP_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(pn,name,"HoldTopCapAnimationLengthInBeats")
|
||||
#define HOLD_BODY_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(pn,name,"HoldBodyAnimationLengthInBeats")
|
||||
#define HOLD_BOTTOMCAP_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(pn,name,"HoldBottomCapAnimationLengthInBeats")
|
||||
#define HOLD_TAIL_ANIMATION_LENGTH_IN_BEATS NOTESKIN->GetMetricF(pn,name,"HoldTailAnimationLengthInBeats")
|
||||
#define TAP_NOTE_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(pn,name,"TapNoteAnimationIsVivid")
|
||||
#define HOLD_HEAD_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(pn,name,"HoldHeadAnimationIsVivid")
|
||||
#define HOLD_TOPCAP_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(pn,name,"HoldTopCapAnimationIsVivid")
|
||||
#define HOLD_BODY_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(pn,name,"HoldBodyAnimationIsVivid")
|
||||
#define HOLD_BOTTOMCAP_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(pn,name,"HoldBottomCapAnimationIsVivid")
|
||||
#define HOLD_TAIL_ANIMATION_IS_VIVID NOTESKIN->GetMetricB(pn,name,"HoldTailAnimationIsVivid")
|
||||
#define TAP_NOTE_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(pn,name,"TapNoteAnimationIsNoteColor")
|
||||
#define HOLD_HEAD_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(pn,name,"HoldHeadAnimationIsNoteColor")
|
||||
#define HOLD_TOPCAP_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(pn,name,"HoldTopCapAnimationIsNoteColor")
|
||||
#define HOLD_BODY_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(pn,name,"HoldBodyAnimationIsNoteColor")
|
||||
#define HOLD_BOTTOMCAP_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(pn,name,"HoldBottomCapAnimationIsNoteColor")
|
||||
#define HOLD_TAIL_ANIMATION_IS_NOTE_COLOR NOTESKIN->GetMetricB(pn,name,"HoldTailAnimationIsNoteColor")
|
||||
#define START_DRAWING_HOLD_BODY_OFFSET_FROM_HEAD NOTESKIN->GetMetricI(pn,name,"StartDrawingHoldBodyOffsetFromHead")
|
||||
#define STOP_DRAWING_HOLD_BODY_OFFSET_FROM_TAIL NOTESKIN->GetMetricI(pn,name,"StopDrawingHoldBodyOffsetFromTail")
|
||||
#define HOLD_NG_GRAY_PERCENT NOTESKIN->GetMetricF(pn,name,"HoldNGGrayPercent")
|
||||
|
||||
// cache
|
||||
struct NoteMetricCache_t {
|
||||
@@ -74,10 +74,10 @@ struct NoteMetricCache_t {
|
||||
int m_iStopDrawingHoldBodyOffsetFromTail;
|
||||
float m_fHoldNGGrayPercent;
|
||||
|
||||
void Load(const CString &name);
|
||||
void Load(PlayerNumber pn, const CString &name);
|
||||
} *NoteMetricCache;
|
||||
|
||||
void NoteMetricCache_t::Load(const CString &name)
|
||||
void NoteMetricCache_t::Load(PlayerNumber pn, const CString &name)
|
||||
{
|
||||
m_bDrawHoldHeadForTapsOnSameRow = DRAW_HOLD_HEAD_FOR_TAPS_ON_SAME_ROW;
|
||||
m_fTapNoteAnimationLengthInBeats = TAP_NOTE_ANIMATION_LENGTH_IN_BEATS;
|
||||
@@ -117,7 +117,7 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn )
|
||||
{
|
||||
m_PlayerNumber = pn;
|
||||
|
||||
cache->Load(NoteSkinManager::ColToButtonName(iColNum));
|
||||
cache->Load( pn, NoteSkinManager::ColToButtonName(iColNum) );
|
||||
|
||||
// Look up note names once and store them here.
|
||||
CString sNoteType[ NOTE_COLOR_IMAGES ];
|
||||
@@ -128,81 +128,81 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn )
|
||||
if( cache->m_bTapNoteAnimationIsNoteColor )
|
||||
{
|
||||
for( int i=0; i<NOTE_COLOR_IMAGES; i++ )
|
||||
m_sprTapNote[i].Load( NOTESKIN->GetPathTo(iColNum, "tap note "+sNoteType[i]) );
|
||||
m_sprTapNote[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "tap note "+sNoteType[i]) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sprTapNote[0].Load( NOTESKIN->GetPathTo(iColNum, "tap note") );
|
||||
m_sprTapNote[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "tap note") );
|
||||
}
|
||||
|
||||
if( cache->m_bHoldHeadAnimationIsNoteColor )
|
||||
{
|
||||
for( int i=0; i<NOTE_COLOR_IMAGES; i++ )
|
||||
{
|
||||
m_sprHoldHeadActive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold head active "+sNoteType[i]) );
|
||||
m_sprHoldHeadInactive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold head inactive "+sNoteType[i]) );
|
||||
m_sprHoldHeadActive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold head active "+sNoteType[i]) );
|
||||
m_sprHoldHeadInactive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold head inactive "+sNoteType[i]) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sprHoldHeadActive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold head active") );
|
||||
m_sprHoldHeadInactive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold head inactive") );
|
||||
m_sprHoldHeadActive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold head active") );
|
||||
m_sprHoldHeadInactive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold head inactive") );
|
||||
}
|
||||
|
||||
if( cache->m_bHoldTopCapAnimationIsNoteColor )
|
||||
{
|
||||
for( int i=0; i<NOTE_COLOR_IMAGES; i++ )
|
||||
{
|
||||
m_sprHoldTopCapActive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold topcap active "+sNoteType[i]) );
|
||||
m_sprHoldTopCapInactive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold topcap inactive "+sNoteType[i]) );
|
||||
m_sprHoldTopCapActive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold topcap active "+sNoteType[i]) );
|
||||
m_sprHoldTopCapInactive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold topcap inactive "+sNoteType[i]) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sprHoldTopCapActive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold topcap active") );
|
||||
m_sprHoldTopCapInactive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold topcap inactive") );
|
||||
m_sprHoldTopCapActive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold topcap active") );
|
||||
m_sprHoldTopCapInactive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold topcap inactive") );
|
||||
}
|
||||
|
||||
if( cache->m_bHoldBodyAnimationIsNoteColor )
|
||||
{
|
||||
for( int i=0; i<NOTE_COLOR_IMAGES; i++ )
|
||||
{
|
||||
m_sprHoldBodyActive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold body active "+sNoteType[i]) );
|
||||
m_sprHoldBodyInactive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold body inactive "+sNoteType[i]) );
|
||||
m_sprHoldBodyActive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold body active "+sNoteType[i]) );
|
||||
m_sprHoldBodyInactive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold body inactive "+sNoteType[i]) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sprHoldBodyActive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold body active") );
|
||||
m_sprHoldBodyInactive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold body inactive") );
|
||||
m_sprHoldBodyActive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold body active") );
|
||||
m_sprHoldBodyInactive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold body inactive") );
|
||||
}
|
||||
|
||||
if( cache->m_bHoldBottomCapAnimationIsNoteColor )
|
||||
{
|
||||
for( int i=0; i<NOTE_COLOR_IMAGES; i++ )
|
||||
{
|
||||
m_sprHoldBottomCapActive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold bottomcap active "+sNoteType[i]) );
|
||||
m_sprHoldBottomCapInactive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold bottomcap inactive "+sNoteType[i]) );
|
||||
m_sprHoldBottomCapActive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold bottomcap active "+sNoteType[i]) );
|
||||
m_sprHoldBottomCapInactive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold bottomcap inactive "+sNoteType[i]) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sprHoldBottomCapActive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold bottomcap active") );
|
||||
m_sprHoldBottomCapInactive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold bottomcap inactive") );
|
||||
m_sprHoldBottomCapActive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold bottomcap active") );
|
||||
m_sprHoldBottomCapInactive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold bottomcap inactive") );
|
||||
}
|
||||
|
||||
if( cache->m_bHoldTailAnimationIsNoteColor )
|
||||
{
|
||||
for( int i=0; i<NOTE_COLOR_IMAGES; i++ )
|
||||
{
|
||||
m_sprHoldTailActive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold tail active "+sNoteType[i]) );
|
||||
m_sprHoldTailInactive[i].Load( NOTESKIN->GetPathTo(iColNum, "hold tail inactive "+sNoteType[i]) );
|
||||
m_sprHoldTailActive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold tail active "+sNoteType[i]) );
|
||||
m_sprHoldTailInactive[i].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold tail inactive "+sNoteType[i]) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sprHoldTailActive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold tail active") );
|
||||
m_sprHoldTailInactive[0].Load( NOTESKIN->GetPathTo(iColNum, "hold tail inactive") );
|
||||
m_sprHoldTailActive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold tail active") );
|
||||
m_sprHoldTailInactive[0].Load( NOTESKIN->GetPathTo(pn, iColNum, "hold tail inactive") );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ NoteField::NoteField()
|
||||
m_textMeasureNumber.SetZoom( 1.0f );
|
||||
|
||||
m_rectMarkerBar.TurnShadowOff();
|
||||
m_rectMarkerBar.SetEffectGlowing();
|
||||
m_rectMarkerBar.SetEffectGlowCamelion();
|
||||
|
||||
m_fBeginMarker = m_fEndMarker = -1;
|
||||
|
||||
|
||||
@@ -30,14 +30,17 @@ const CString NOTESKINS_DIR = "NoteSkins/";
|
||||
|
||||
NoteSkinManager::NoteSkinManager()
|
||||
{
|
||||
m_pIniMetrics = new IniFile;
|
||||
|
||||
m_sCurNoteSkinName = BASE_NOTESKIN_NAME; // Use the base theme for now. It's up to PrefsManager to change this.
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_pIniMetrics[p] = new IniFile;
|
||||
SwitchNoteSkin( (PlayerNumber)p, BASE_NOTESKIN_NAME );
|
||||
}
|
||||
}
|
||||
|
||||
NoteSkinManager::~NoteSkinManager()
|
||||
{
|
||||
delete m_pIniMetrics;
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
delete m_pIniMetrics[p];
|
||||
}
|
||||
|
||||
void NoteSkinManager::GetNoteSkinNames( Game game, CStringArray &AddTo ) const
|
||||
@@ -68,7 +71,7 @@ bool NoteSkinManager::DoesNoteSkinExist( CString sSkinName ) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void NoteSkinManager::SwitchNoteSkin( CString sNewNoteSkin )
|
||||
void NoteSkinManager::SwitchNoteSkin( PlayerNumber pn, CString sNewNoteSkin )
|
||||
{
|
||||
if( sNewNoteSkin == "" || !DoesNoteSkinExist(sNewNoteSkin) )
|
||||
{
|
||||
@@ -82,9 +85,9 @@ void NoteSkinManager::SwitchNoteSkin( CString sNewNoteSkin )
|
||||
if(!as[i].CompareNoCase("default")) sNewNoteSkin = "default";
|
||||
}
|
||||
|
||||
m_sCurNoteSkinName = sNewNoteSkin;
|
||||
m_sCurNoteSkinName[pn] = sNewNoteSkin;
|
||||
|
||||
m_pIniMetrics->Reset();
|
||||
m_pIniMetrics[pn]->Reset();
|
||||
|
||||
/* Read only the default keys from the default noteskin. */
|
||||
IniFile defaults;
|
||||
@@ -92,11 +95,11 @@ void NoteSkinManager::SwitchNoteSkin( CString sNewNoteSkin )
|
||||
defaults.ReadFile();
|
||||
const IniFile::key *def = defaults.GetKey("NoteDisplay");
|
||||
if(def)
|
||||
m_pIniMetrics->SetValue("NoteDisplay", *def);
|
||||
m_pIniMetrics[pn]->SetValue("NoteDisplay", *def);
|
||||
|
||||
/* Read the active theme. */
|
||||
m_pIniMetrics->SetPath( GetNoteSkinDir(m_sCurNoteSkinName)+"metrics.ini" );
|
||||
m_pIniMetrics->ReadFile();
|
||||
m_pIniMetrics[pn]->SetPath( GetNoteSkinDir(sNewNoteSkin)+"metrics.ini" );
|
||||
m_pIniMetrics[pn]->ReadFile();
|
||||
}
|
||||
|
||||
CString NoteSkinManager::GetNoteSkinDir( CString sSkinName )
|
||||
@@ -106,36 +109,36 @@ CString NoteSkinManager::GetNoteSkinDir( CString sSkinName )
|
||||
return NOTESKINS_DIR + ssprintf("%s/%s/", pGameDef->m_szName, sSkinName.GetString());
|
||||
}
|
||||
|
||||
CString NoteSkinManager::GetMetric( CString sButtonName, CString sValue ) // looks in GAMESTATE for the current Style
|
||||
CString NoteSkinManager::GetMetric( PlayerNumber pn, CString sButtonName, CString sValue ) // looks in GAMESTATE for the current Style
|
||||
{
|
||||
CString sReturn;
|
||||
if( m_pIniMetrics->GetValue( sButtonName, sValue, sReturn ) )
|
||||
if( m_pIniMetrics[pn]->GetValue( sButtonName, sValue, sReturn ) )
|
||||
return sReturn;
|
||||
if( !m_pIniMetrics->GetValue( "NoteDisplay", sValue, sReturn ) )
|
||||
if( !m_pIniMetrics[pn]->GetValue( "NoteDisplay", sValue, sReturn ) )
|
||||
RageException::Throw( "Could not read metric '%s - %s' or 'NoteDisplay - %s'",
|
||||
sButtonName.GetString(), sValue.GetString(), sValue.GetString() );
|
||||
return sReturn;
|
||||
}
|
||||
|
||||
int NoteSkinManager::GetMetricI( CString sButtonName, CString sValueName )
|
||||
int NoteSkinManager::GetMetricI( PlayerNumber pn, CString sButtonName, CString sValueName )
|
||||
{
|
||||
return atoi( GetMetric(sButtonName,sValueName) );
|
||||
return atoi( GetMetric(pn,sButtonName,sValueName) );
|
||||
}
|
||||
|
||||
float NoteSkinManager::GetMetricF( CString sButtonName, CString sValueName )
|
||||
float NoteSkinManager::GetMetricF( PlayerNumber pn, CString sButtonName, CString sValueName )
|
||||
{
|
||||
return (float)atof( GetMetric(sButtonName,sValueName) );
|
||||
return (float)atof( GetMetric(pn,sButtonName,sValueName) );
|
||||
}
|
||||
|
||||
bool NoteSkinManager::GetMetricB( CString sButtonName, CString sValueName )
|
||||
bool NoteSkinManager::GetMetricB( PlayerNumber pn, CString sButtonName, CString sValueName )
|
||||
{
|
||||
return atoi( GetMetric(sButtonName,sValueName) ) != 0;
|
||||
return atoi( GetMetric(pn,sButtonName,sValueName) ) != 0;
|
||||
}
|
||||
|
||||
RageColor NoteSkinManager::GetMetricC( CString sButtonName, CString sValueName )
|
||||
RageColor NoteSkinManager::GetMetricC( PlayerNumber pn, CString sButtonName, CString sValueName )
|
||||
{
|
||||
float r=1,b=1,g=1,a=1; // initialize in case sscanf fails
|
||||
CString sValue = GetMetric(sButtonName,sValueName);
|
||||
CString sValue = GetMetric(pn,sButtonName,sValueName);
|
||||
char szValue[40];
|
||||
strncpy( szValue, sValue, 39 );
|
||||
int result = sscanf( szValue, "%f,%f,%f,%f", &r, &g, &b, &a );
|
||||
@@ -158,15 +161,15 @@ CString NoteSkinManager::ColToButtonName(int col)
|
||||
return pGameDef->m_szButtonNames[GI.button];
|
||||
}
|
||||
|
||||
CString NoteSkinManager::GetPathTo( int col, CString sFileName ) // looks in GAMESTATE for the current Style
|
||||
CString NoteSkinManager::GetPathTo( PlayerNumber pn, int col, CString sFileName ) // looks in GAMESTATE for the current Style
|
||||
{
|
||||
CString sButtonName = ColToButtonName(col);
|
||||
|
||||
CString sCurNoteSkinName = m_sCurNoteSkinName;
|
||||
CString sCurNoteSkinName = m_sCurNoteSkinName[pn];
|
||||
if( GAMESTATE->m_bEditing )
|
||||
sCurNoteSkinName = "note";
|
||||
|
||||
CString ret = GetPathTo( m_sCurNoteSkinName, sButtonName, sFileName );
|
||||
CString ret = GetPathTo( sCurNoteSkinName, sButtonName, sFileName );
|
||||
if( !ret.empty() ) // we found something
|
||||
return ret;
|
||||
ret = GetPathTo( BASE_NOTESKIN_NAME, sButtonName, sFileName);
|
||||
@@ -174,7 +177,7 @@ CString NoteSkinManager::GetPathTo( int col, CString sFileName ) // looks in GAM
|
||||
if( ret.empty() )
|
||||
RageException::Throw( "The NoteSkin element '%s %s' could not be found in '%s' or '%s'.",
|
||||
sButtonName.GetString(), sFileName.GetString(),
|
||||
GetNoteSkinDir(m_sCurNoteSkinName).GetString(),
|
||||
GetNoteSkinDir(sCurNoteSkinName).GetString(),
|
||||
GetNoteSkinDir(BASE_NOTESKIN_NAME).GetString() );
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "RageTypes.h"
|
||||
#include "Game.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
class IniFile;
|
||||
|
||||
@@ -26,16 +27,16 @@ public:
|
||||
void GetNoteSkinNames( Game game, CStringArray &AddTo ) const;
|
||||
void GetNoteSkinNames( CStringArray &AddTo ) const; // looks up current Game in GAMESTATE
|
||||
bool DoesNoteSkinExist( CString sSkinName ) const; // looks up current Game in GAMESTATE
|
||||
void SwitchNoteSkin( CString sNewNoteSkin ); // looks up current Game in GAMESTATE
|
||||
CString GetCurNoteSkinName() const { return m_sCurNoteSkinName; };
|
||||
void SwitchNoteSkin( PlayerNumber pn, CString sNewNoteSkin ); // looks up current Game in GAMESTATE
|
||||
CString GetCurNoteSkinName( PlayerNumber pn ) const { return m_sCurNoteSkinName[pn]; };
|
||||
|
||||
CString GetPathTo( int col, CString sFileName );
|
||||
CString GetPathTo( PlayerNumber pn, int col, CString sFileName );
|
||||
|
||||
CString GetMetric( CString sButtonName, CString sValueName );
|
||||
int GetMetricI( CString sButtonName, CString sValueName );
|
||||
float GetMetricF( CString sButtonName, CString sValueName );
|
||||
bool GetMetricB( CString sButtonName, CString sValueName );
|
||||
RageColor GetMetricC( CString sButtonName, CString sValueName );
|
||||
CString GetMetric( PlayerNumber pn, CString sButtonName, CString sValueName );
|
||||
int GetMetricI( PlayerNumber pn, CString sButtonName, CString sValueName );
|
||||
float GetMetricF( PlayerNumber pn, CString sButtonName, CString sValueName );
|
||||
bool GetMetricB( PlayerNumber pn, CString sButtonName, CString sValueName );
|
||||
RageColor GetMetricC( PlayerNumber pn, CString sButtonName, CString sValueName );
|
||||
|
||||
static CString NoteSkinManager::ColToButtonName(int col);
|
||||
|
||||
@@ -43,10 +44,10 @@ protected:
|
||||
CString GetPathTo( CString sSkinName, CString sButtonName, CString sFileName );
|
||||
CString GetNoteSkinDir( CString sSkinName );
|
||||
|
||||
CString m_sCurNoteSkinName;
|
||||
IniFile* m_pIniMetrics;
|
||||
unsigned m_uHashForCurThemeMetrics;
|
||||
unsigned m_uHashForBaseThemeMetrics;
|
||||
CString m_sCurNoteSkinName[NUM_PLAYERS];
|
||||
IniFile* m_pIniMetrics[NUM_PLAYERS];
|
||||
unsigned m_uHashForCurThemeMetrics[NUM_PLAYERS];
|
||||
unsigned m_uHashForBaseThemeMetrics[NUM_PLAYERS];
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ OptionIcon::OptionIcon()
|
||||
|
||||
void OptionIcon::Load( PlayerNumber pn, CString sText, bool bHeader )
|
||||
{
|
||||
static CString sStopWords[] = { "OFF", "VISIBLE", "VIVID", "STANDARD", "X1", "HOLDS" };
|
||||
static CString sStopWords[] = { "OFF", "VISIBLE", "VIVID", "STANDARD", "X1", "HOLDS", "DEFAULT" };
|
||||
const int iNumStopWords = sizeof(sStopWords)/sizeof(sStopWords[0]);
|
||||
|
||||
for( int i=0; i<iNumStopWords; i++ )
|
||||
|
||||
+30
-109
@@ -28,61 +28,16 @@
|
||||
#include "ThemeManager.h"
|
||||
#include "Combo.h"
|
||||
|
||||
#define JUDGE_MARVELOUS_ZOOM_X THEME->GetMetricF("Player","JudgeMarvelousZoomX")
|
||||
#define JUDGE_MARVELOUS_ZOOM_Y THEME->GetMetricF("Player","JudgeMarvelousZoomY")
|
||||
#define JUDGE_PERFECT_ZOOM_X THEME->GetMetricF("Player","JudgePerfectZoomX")
|
||||
#define JUDGE_PERFECT_ZOOM_Y THEME->GetMetricF("Player","JudgePerfectZoomY")
|
||||
#define JUDGE_GREAT_ZOOM_X THEME->GetMetricF("Player","JudgeGreatZoomX")
|
||||
#define JUDGE_GREAT_ZOOM_Y THEME->GetMetricF("Player","JudgeGreatZoomY")
|
||||
#define JUDGE_GOOD_ZOOM_X THEME->GetMetricF("Player","JudgeGoodZoomX")
|
||||
#define JUDGE_GOOD_ZOOM_Y THEME->GetMetricF("Player","JudgeGoodZoomY")
|
||||
#define JUDGE_BOO_ZOOM_X THEME->GetMetricF("Player","JudgeBooZoomX")
|
||||
#define JUDGE_BOO_ZOOM_Y THEME->GetMetricF("Player","JudgeBooZoomY")
|
||||
#define COMBO_JUDGE_TWEEN_SECONDS THEME->GetMetricF("Player","ComboJudgeTweenSeconds")
|
||||
#define BRIGHT_GHOST_THRESHOLD THEME->GetMetricI("Player","BrightGhostThreshold")
|
||||
|
||||
|
||||
// cache because reading from theme metrics is slow
|
||||
float
|
||||
g_fJudgeMarvelousZoomX,
|
||||
g_fJudgeMarvelousZoomY,
|
||||
g_fJudgePerfectZoomX,
|
||||
g_fJudgePerfectZoomY,
|
||||
g_fJudgeGreatZoomX,
|
||||
g_fJudgeGreatZoomY,
|
||||
g_fJudgeGoodZoomX,
|
||||
g_fJudgeGoodZoomY,
|
||||
g_fJudgeBooZoomX,
|
||||
g_fJudgeBooZoomY,
|
||||
g_fComboJudgeTweenSeconds;
|
||||
int g_iBrightGhostThreshold;
|
||||
|
||||
// these two items are in the
|
||||
const float FRAME_JUDGE_AND_COMBO_Y = CENTER_Y;
|
||||
const float JUDGEMENT_Y_OFFSET = -26;
|
||||
const float COMBO_Y_OFFSET = +26;
|
||||
|
||||
const float FRAME_JUDGE_AND_COMBO_BEAT_TIME = 0.2f;
|
||||
|
||||
const float ARROWS_Y = SCREEN_TOP + ARROW_SIZE * 1.5f;
|
||||
const float HOLD_JUDGEMENT_Y = ARROWS_Y + 80;
|
||||
#define GRAY_ARROWS_Y THEME->GetMetricF("Player","GrayArrowsY")
|
||||
#define JUDGMENT_Y THEME->GetMetricF("Player","JudgmentY")
|
||||
#define COMBO_Y THEME->GetMetricF("Player","ComboY")
|
||||
#define HOLD_JUDGMENT_Y THEME->GetMetricF("Player","HoldJudgmentY")
|
||||
CachedThemeMetric BRIGHT_GHOST_COMBO_THRESHOLD("Player","BrightGhostComboThreshold");
|
||||
|
||||
|
||||
Player::Player()
|
||||
{
|
||||
// Update theme metrics cache
|
||||
g_fJudgeMarvelousZoomX = JUDGE_MARVELOUS_ZOOM_X;
|
||||
g_fJudgeMarvelousZoomY = JUDGE_MARVELOUS_ZOOM_Y;
|
||||
g_fJudgePerfectZoomX = JUDGE_PERFECT_ZOOM_X;
|
||||
g_fJudgePerfectZoomY = JUDGE_PERFECT_ZOOM_Y;
|
||||
g_fJudgeGreatZoomX = JUDGE_GREAT_ZOOM_X;
|
||||
g_fJudgeGreatZoomY = JUDGE_GREAT_ZOOM_Y;
|
||||
g_fJudgeGoodZoomX = JUDGE_GOOD_ZOOM_X;
|
||||
g_fJudgeGoodZoomY = JUDGE_GOOD_ZOOM_Y;
|
||||
g_fJudgeBooZoomX = JUDGE_BOO_ZOOM_X;
|
||||
g_fJudgeBooZoomY = JUDGE_BOO_ZOOM_Y;
|
||||
g_fComboJudgeTweenSeconds = COMBO_JUDGE_TWEEN_SECONDS;
|
||||
g_iBrightGhostThreshold = BRIGHT_GHOST_THRESHOLD;
|
||||
BRIGHT_GHOST_COMBO_THRESHOLD.Refresh();
|
||||
|
||||
m_PlayerNumber = PLAYER_INVALID;
|
||||
|
||||
@@ -95,30 +50,22 @@ Player::Player()
|
||||
this->AddChild( &m_GrayArrowRow );
|
||||
this->AddChild( &m_NoteField );
|
||||
this->AddChild( &m_GhostArrowRow );
|
||||
|
||||
m_frameJudgement.AddChild( &m_Judgement );
|
||||
this->AddChild( &m_frameJudgement );
|
||||
|
||||
m_frameCombo.AddChild( &m_Combo );
|
||||
this->AddChild( &m_frameCombo );
|
||||
|
||||
this->AddChild( &m_Judgment );
|
||||
this->AddChild( &m_Combo );
|
||||
for( int c=0; c<MAX_NOTE_TRACKS; c++ )
|
||||
this->AddChild( &m_HoldJudgement[c] );
|
||||
this->AddChild( &m_HoldJudgment[c] );
|
||||
}
|
||||
|
||||
|
||||
int Player::GetPlayersMaxCombo()
|
||||
{
|
||||
return( m_Combo.GetMaxCombo() );
|
||||
}
|
||||
|
||||
|
||||
Player::~Player()
|
||||
{
|
||||
delete m_ScoreKeeper;
|
||||
}
|
||||
|
||||
|
||||
void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDisplay* pScore )
|
||||
{
|
||||
//LOG->Trace( "Player::Load()", );
|
||||
@@ -140,9 +87,9 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
|
||||
/* The editor reuses Players ... so we really need to make sure everything
|
||||
* is reset and not tweening. Perhaps ActorFrame should recurse to subactors;
|
||||
* then we could just this->StopTweening()? -glenn */
|
||||
m_frameJudgement.StopTweening();
|
||||
m_Judgment.StopTweening();
|
||||
// m_Combo.Reset(); // don't reset combos between songs in a course!
|
||||
m_Judgement.Reset();
|
||||
m_Judgment.Reset();
|
||||
|
||||
if(m_ScoreKeeper) delete m_ScoreKeeper;
|
||||
m_ScoreKeeper = new ScoreKeeperMAX2(GAMESTATE->m_pCurNotes[m_PlayerNumber], *this, pn);
|
||||
@@ -190,20 +137,20 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
|
||||
m_GrayArrowRow.Load( pn );
|
||||
m_GhostArrowRow.Load( pn );
|
||||
|
||||
m_frameJudgement.SetY( FRAME_JUDGE_AND_COMBO_Y );
|
||||
m_frameCombo.SetY( FRAME_JUDGE_AND_COMBO_Y );
|
||||
m_Combo.SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? -COMBO_Y_OFFSET : COMBO_Y_OFFSET );
|
||||
m_Judgement.SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? -JUDGEMENT_Y_OFFSET : JUDGEMENT_Y_OFFSET );
|
||||
bool bReverse = GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll;
|
||||
m_Combo.SetY( bReverse ? SCREEN_BOTTOM-COMBO_Y : SCREEN_TOP+COMBO_Y );
|
||||
m_Judgment.SetY( bReverse ? SCREEN_BOTTOM-JUDGMENT_Y : SCREEN_TOP+JUDGMENT_Y );
|
||||
|
||||
int c;
|
||||
for( c=0; c<pStyleDef->m_iColsPerPlayer; c++ )
|
||||
m_HoldJudgement[c].SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? SCREEN_HEIGHT - HOLD_JUDGEMENT_Y : HOLD_JUDGEMENT_Y );
|
||||
for( c=0; c<pStyleDef->m_iColsPerPlayer; c++ )
|
||||
m_HoldJudgement[c].SetX( (float)pStyleDef->m_ColumnInfo[pn][c].fXOffset );
|
||||
{
|
||||
m_HoldJudgment[c].SetY( bReverse ? SCREEN_BOTTOM-HOLD_JUDGMENT_Y : SCREEN_TOP+HOLD_JUDGMENT_Y );
|
||||
m_HoldJudgment[c].SetX( (float)pStyleDef->m_ColumnInfo[pn][c].fXOffset );
|
||||
}
|
||||
|
||||
m_NoteField.SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? SCREEN_HEIGHT - ARROWS_Y : ARROWS_Y );
|
||||
m_GrayArrowRow.SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? SCREEN_HEIGHT - ARROWS_Y : ARROWS_Y );
|
||||
m_GhostArrowRow.SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? SCREEN_HEIGHT - ARROWS_Y : ARROWS_Y );
|
||||
m_NoteField.SetY( bReverse ? SCREEN_BOTTOM-GRAY_ARROWS_Y : SCREEN_TOP+GRAY_ARROWS_Y );
|
||||
m_GrayArrowRow.SetY( bReverse ? SCREEN_BOTTOM-GRAY_ARROWS_Y : SCREEN_TOP+GRAY_ARROWS_Y );
|
||||
m_GhostArrowRow.SetY( bReverse ? SCREEN_BOTTOM-GRAY_ARROWS_Y : SCREEN_TOP+GRAY_ARROWS_Y );
|
||||
|
||||
if( GAMESTATE->m_PlayerOptions[pn].m_bEffects[PlayerOptions::EFFECT_MINI] )
|
||||
{
|
||||
@@ -217,7 +164,6 @@ void Player::Update( float fDeltaTime )
|
||||
{
|
||||
//LOG->Trace( "Player::Update(%f)", fDeltaTime );
|
||||
|
||||
|
||||
const float fSongBeat = GAMESTATE->m_fSongBeat;
|
||||
|
||||
//
|
||||
@@ -296,7 +242,7 @@ void Player::Update( float fDeltaTime )
|
||||
{
|
||||
/* this note's been judged */
|
||||
HandleHoldNoteScore( hns, tns );
|
||||
m_HoldJudgement[hn.iTrack].SetHoldJudgement( hns );
|
||||
m_HoldJudgment[hn.iTrack].SetHoldJudgment( hns );
|
||||
}
|
||||
|
||||
m_NoteField.SetHoldNoteLife(i, fLife); // update the NoteField display
|
||||
@@ -313,7 +259,7 @@ void Player::Update( float fDeltaTime )
|
||||
|
||||
void Player::DrawPrimitives()
|
||||
{
|
||||
m_frameCombo.Draw(); // draw this below everything else
|
||||
m_Combo.Draw(); // draw this below everything else
|
||||
|
||||
if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_bEffects[PlayerOptions::EFFECT_SPACE] )
|
||||
{
|
||||
@@ -343,10 +289,10 @@ void Player::DrawPrimitives()
|
||||
DISPLAY->PopMatrix();
|
||||
}
|
||||
|
||||
m_frameJudgement.Draw();
|
||||
m_Judgment.Draw();
|
||||
|
||||
for( int c=0; c<GetNumTracks(); c++ )
|
||||
m_HoldJudgement[c].Draw();
|
||||
m_HoldJudgment[c].Draw();
|
||||
}
|
||||
|
||||
int Player::GetClosestNoteDirectional( int col, float fBeat, float fMaxSecondsDistance, int iDirection )
|
||||
@@ -525,43 +471,18 @@ void Player::OnRowDestroyed( int iIndexThatWasSteppedOn )
|
||||
|
||||
// show the ghost arrow for this column
|
||||
if(score == TNS_GREAT || score == TNS_PERFECT || score == TNS_MARVELOUS)
|
||||
m_GhostArrowRow.TapNote( c, score, m_Combo.GetCurrentCombo()>g_iBrightGhostThreshold );
|
||||
m_GhostArrowRow.TapNote( c, score, m_Combo.GetCurrentCombo()>(int)BRIGHT_GHOST_COMBO_THRESHOLD);
|
||||
}
|
||||
}
|
||||
|
||||
if( iNumNotesInThisRow > 0 )
|
||||
{
|
||||
HandleNoteScore( score, iNumNotesInThisRow ); // update score
|
||||
m_Combo.UpdateScore( score, iNumNotesInThisRow );
|
||||
m_Combo.SetScore( score, iNumNotesInThisRow );
|
||||
GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber] = max( GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber], m_Combo.GetCurrentCombo() );
|
||||
}
|
||||
|
||||
// update the judgement, score, and life
|
||||
m_Judgement.SetJudgement( score );
|
||||
|
||||
// zoom the judgement and combo like a heart beat
|
||||
float fStartZoomX=0.f, fStartZoomY=0.f;
|
||||
switch( score )
|
||||
{
|
||||
case TNS_MARVELOUS: fStartZoomX = g_fJudgeMarvelousZoomX; fStartZoomY = g_fJudgeMarvelousZoomY; break;
|
||||
case TNS_PERFECT: fStartZoomX = g_fJudgePerfectZoomX; fStartZoomY = g_fJudgePerfectZoomY; break;
|
||||
case TNS_GREAT: fStartZoomX = g_fJudgeGreatZoomX; fStartZoomY = g_fJudgeGreatZoomY; break;
|
||||
case TNS_GOOD: fStartZoomX = g_fJudgeGoodZoomX; fStartZoomY = g_fJudgeGoodZoomY; break;
|
||||
case TNS_BOO: fStartZoomX = g_fJudgeBooZoomX; fStartZoomY = g_fJudgeBooZoomY; break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
m_frameJudgement.StopTweening();
|
||||
m_frameJudgement.SetZoomX( fStartZoomX );
|
||||
m_frameJudgement.SetZoomY( fStartZoomY );
|
||||
m_frameJudgement.BeginTweening( g_fComboJudgeTweenSeconds );
|
||||
m_frameJudgement.SetTweenZoom( 1 );
|
||||
|
||||
m_frameCombo.StopTweening();
|
||||
m_frameCombo.SetZoomX( fStartZoomX );
|
||||
m_frameCombo.SetZoomY( fStartZoomY );
|
||||
m_frameCombo.BeginTweening( g_fComboJudgeTweenSeconds );
|
||||
m_frameCombo.SetTweenZoom( 1 );
|
||||
m_Judgment.SetJudgment( score );
|
||||
}
|
||||
|
||||
|
||||
@@ -599,13 +520,13 @@ int Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds )
|
||||
if( iNumMissesThisRow > 0 )
|
||||
{
|
||||
HandleNoteScore( TNS_MISS, iNumMissesThisRow );
|
||||
m_Combo.UpdateScore( TNS_MISS, iNumMissesThisRow );
|
||||
m_Combo.SetScore( TNS_MISS, iNumMissesThisRow );
|
||||
}
|
||||
}
|
||||
|
||||
if( iNumMissesFound > 0 )
|
||||
{
|
||||
m_Judgement.SetJudgement( TNS_MISS );
|
||||
m_Judgment.SetJudgment( TNS_MISS );
|
||||
}
|
||||
|
||||
return iNumMissesFound;
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include "RandomSample.h"
|
||||
#include "ScoreDisplay.h"
|
||||
#include "LifeMeterBar.h"
|
||||
#include "Judgement.h"
|
||||
#include "HoldJudgement.h"
|
||||
#include "Judgment.h"
|
||||
#include "HoldJudgment.h"
|
||||
#include "Combo.h"
|
||||
#include "NoteField.h"
|
||||
#include "GrayArrowRow.h"
|
||||
@@ -72,12 +72,10 @@ protected:
|
||||
NoteField m_NoteField;
|
||||
GhostArrowRow m_GhostArrowRow;
|
||||
|
||||
HoldJudgement m_HoldJudgement[MAX_NOTE_TRACKS];
|
||||
HoldJudgment m_HoldJudgment[MAX_NOTE_TRACKS];
|
||||
|
||||
ActorFrame m_frameJudgement;
|
||||
Judgement m_Judgement;
|
||||
Judgment m_Judgment;
|
||||
|
||||
ActorFrame m_frameCombo;
|
||||
Combo m_Combo;
|
||||
|
||||
LifeMeter* m_pLifeMeter;
|
||||
|
||||
@@ -271,17 +271,17 @@ void PrefsManager::ReadGamePrefsFromDisk()
|
||||
ini.SetPath( "GamePrefs.ini" );
|
||||
ini.ReadFile(); // it's OK if this fails
|
||||
|
||||
CString sAnnouncer = sGameName, sTheme = sGameName, sNoteSkin = sGameName;
|
||||
CString sAnnouncer = sGameName, sTheme = sGameName;//, sNoteSkin = sGameName;
|
||||
|
||||
// if these calls fail, the three strings will keep the initial values set above.
|
||||
ini.GetValue( sGameName, "Announcer", sAnnouncer );
|
||||
ini.GetValue( sGameName, "Theme", sTheme );
|
||||
ini.GetValue( sGameName, "NoteSkin", sNoteSkin );
|
||||
// ini.GetValue( sGameName, "NoteSkin", sNoteSkin );
|
||||
|
||||
// it's OK to call these functions with names that don't exist.
|
||||
ANNOUNCER->SwitchAnnouncer( sAnnouncer );
|
||||
THEME->SwitchTheme( sTheme );
|
||||
NOTESKIN->SwitchNoteSkin( sNoteSkin );
|
||||
// NOTESKIN->SwitchNoteSkin( sNoteSkin );
|
||||
}
|
||||
|
||||
void PrefsManager::SaveGamePrefsToDisk()
|
||||
@@ -296,7 +296,7 @@ void PrefsManager::SaveGamePrefsToDisk()
|
||||
|
||||
ini.SetValue( sGameName, "Announcer", ANNOUNCER->GetCurAnnouncerName() );
|
||||
ini.SetValue( sGameName, "Theme", THEME->GetCurThemeName() );
|
||||
ini.SetValue( sGameName, "NoteSkin", NOTESKIN->GetCurNoteSkinName() );
|
||||
// ini.SetValue( sGameName, "NoteSkin", NOTESKIN->GetCurNoteSkinName() );
|
||||
|
||||
ini.WriteFile();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
enum {
|
||||
AO_ANNOUNCER = 0,
|
||||
AO_THEME,
|
||||
AO_SKIN,
|
||||
// AO_SKIN,
|
||||
AO_INSTRUCTIONS,
|
||||
AO_CAUTION,
|
||||
AO_SELECT_GROUP,
|
||||
@@ -41,7 +41,7 @@ enum {
|
||||
OptionRowData g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = {
|
||||
{ "Announcer", 1, {"OFF"} }, // fill this in on ImportOptions()
|
||||
{ "Theme", 0, {""} }, // fill this in on ImportOptions()
|
||||
{ "Note\nSkin", 0, {""} }, // fill this in on ImportOptions()
|
||||
// { "Note\nSkin", 0, {""} }, // fill this in on ImportOptions()
|
||||
{ "How To\nPlay", 2, {"SKIP","SHOW"} },
|
||||
{ "Caution", 2, {"SKIP","SHOW"} },
|
||||
{ "Song\nGroup", 2, {"ALL MUSIC","CHOOSE"} },
|
||||
@@ -131,31 +131,6 @@ void ScreenAppearanceOptions::ImportOptions()
|
||||
if( m_iSelectedOption[0][AO_THEME] == -1 )
|
||||
m_iSelectedOption[0][AO_THEME] = 0;
|
||||
|
||||
|
||||
//
|
||||
// fill in skin names
|
||||
//
|
||||
CStringArray arraySkinNames;
|
||||
NOTESKIN->GetNoteSkinNames( arraySkinNames );
|
||||
|
||||
m_OptionRowData[AO_SKIN].iNumOptions = arraySkinNames.size();
|
||||
|
||||
for( i=0; i<arraySkinNames.size(); i++ )
|
||||
strcpy( m_OptionRowData[AO_SKIN].szOptionsText[i], arraySkinNames[i] );
|
||||
|
||||
// highlight currently selected skin
|
||||
m_iSelectedOption[0][AO_SKIN] = -1;
|
||||
for( i=0; i<m_OptionRowData[AO_SKIN].iNumOptions; i++ )
|
||||
{
|
||||
if( 0==stricmp(m_OptionRowData[AO_SKIN].szOptionsText[i], NOTESKIN->GetCurNoteSkinName()) )
|
||||
{
|
||||
m_iSelectedOption[0][AO_SKIN] = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( m_iSelectedOption[0][AO_SKIN] == -1 )
|
||||
m_iSelectedOption[0][AO_SKIN] = 0;
|
||||
|
||||
m_iSelectedOption[0][AO_INSTRUCTIONS] = PREFSMAN->m_bInstructions? 1:0;
|
||||
m_iSelectedOption[0][AO_CAUTION] = PREFSMAN->m_bShowDontDie? 1:0;
|
||||
m_iSelectedOption[0][AO_SELECT_GROUP] = PREFSMAN->m_bShowSelectGroup? 1:0;
|
||||
@@ -178,10 +153,6 @@ void ScreenAppearanceOptions::ExportOptions()
|
||||
CString sNewTheme = m_OptionRowData[AO_THEME].szOptionsText[iSelectedTheme];
|
||||
THEME->SwitchTheme( sNewTheme );
|
||||
|
||||
int iSelectedSkin = m_iSelectedOption[0][AO_SKIN];
|
||||
CString sNewSkin = m_OptionRowData[AO_SKIN].szOptionsText[iSelectedSkin];
|
||||
NOTESKIN->SwitchNoteSkin( sNewSkin );
|
||||
|
||||
PREFSMAN->m_bInstructions = !!m_iSelectedOption[0][AO_INSTRUCTIONS];
|
||||
PREFSMAN->m_bShowDontDie = !!m_iSelectedOption[0][AO_CAUTION];
|
||||
PREFSMAN->m_bShowSelectGroup = !!m_iSelectedOption[0][AO_SELECT_GROUP];
|
||||
|
||||
@@ -140,7 +140,7 @@ ScreenDemonstration::ScreenDemonstration() : ScreenGameplay(SetUpSongOptions())
|
||||
|
||||
m_sprDemonstrationBlink.Load( THEME->GetPathTo("Graphics","demonstration blink") );
|
||||
m_sprDemonstrationBlink.SetXY( CENTER_X, CENTER_Y );
|
||||
m_sprDemonstrationBlink.SetEffectBlinking();
|
||||
m_sprDemonstrationBlink.SetEffectDiffuseBlinking();
|
||||
this->AddChild( &m_sprDemonstrationBlink );
|
||||
|
||||
this->MoveToTail( &m_Fade );
|
||||
|
||||
@@ -1444,7 +1444,7 @@ void ScreenEdit::OnSnapModeChange()
|
||||
|
||||
void ScreenEdit::MenuItemGainFocus( BitmapText* menuitem )
|
||||
{
|
||||
menuitem->SetEffectCamelion( 2.5, RageColor(1,1,1,1), RageColor(0,1,0,1) );
|
||||
menuitem->SetEffectDiffuseCamelion( 1.0f, RageColor(1,1,1,1), RageColor(0,1,0,1) );
|
||||
menuitem->SetZoom( 0.7f );
|
||||
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","edit menu row") );
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
m_textOniPercentLarge[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y );
|
||||
m_textOniPercentLarge[p].SetHorizAlign( Actor::align_right );
|
||||
m_textOniPercentLarge[p].SetVertAlign( Actor::align_bottom );
|
||||
m_textOniPercentLarge[p].SetEffectGlowing( 1.0f );
|
||||
m_textOniPercentLarge[p].SetEffectGlowCamelion( 2.5f );
|
||||
this->AddChild( &m_textOniPercentLarge[p] );
|
||||
|
||||
m_textOniPercentSmall[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation percent numbers") );
|
||||
@@ -339,7 +339,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
m_textOniPercentSmall[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y );
|
||||
m_textOniPercentSmall[p].SetHorizAlign( Actor::align_left );
|
||||
m_textOniPercentSmall[p].SetVertAlign( Actor::align_bottom );
|
||||
m_textOniPercentSmall[p].SetEffectGlowing( 1.0f );
|
||||
m_textOniPercentSmall[p].SetEffectGlowCamelion( 2.5f );
|
||||
this->AddChild( &m_textOniPercentSmall[p] );
|
||||
|
||||
stageStats.iPossibleDancePoints[p] = max( 1, stageStats.iPossibleDancePoints[p] );
|
||||
@@ -381,7 +381,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
m_Grades[p].SetXY( GRADE_X(p), GRADE_Y );
|
||||
m_Grades[p].SetZ( 2 );
|
||||
m_Grades[p].SetZoom( 1.0f );
|
||||
m_Grades[p].SetEffectGlowing( 5.0f, GRADES_GLOW_COLOR_1, GRADES_GLOW_COLOR_2 );
|
||||
m_Grades[p].SetEffectGlowCamelion( 1.0f, GRADES_GLOW_COLOR_1, GRADES_GLOW_COLOR_2 );
|
||||
if( SPIN_GRADES )
|
||||
m_Grades[p].SpinAndSettleOn( grade[p] );
|
||||
else
|
||||
@@ -424,7 +424,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
m_sprActualBar[p][r].BeginTweening( 1.0f ); // tween
|
||||
m_sprActualBar[p][r].SetTweenZoomToWidth( BAR_WIDTH*stageStats.fRadarActual[p][r] );
|
||||
if( stageStats.fRadarActual[p][r] == stageStats.fRadarPossible[p][r] )
|
||||
m_sprActualBar[p][r].SetEffectGlowing();
|
||||
m_sprActualBar[p][r].SetEffectGlowCamelion();
|
||||
this->AddChild( &m_sprActualBar[p][r] );
|
||||
}
|
||||
break;
|
||||
@@ -435,7 +435,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
{
|
||||
m_sprNewRecord[p].Load( THEME->GetPathTo("Graphics","evaluation new record") );
|
||||
m_sprNewRecord[p].SetXY( NEW_RECORD_X(p), NEW_RECORD_Y );
|
||||
m_sprNewRecord[p].SetEffectGlowing( 1.0f );
|
||||
m_sprNewRecord[p].SetEffectGlowCamelion( 2.5f );
|
||||
this->AddChild( &m_sprNewRecord[p] );
|
||||
}
|
||||
}
|
||||
@@ -507,7 +507,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
{
|
||||
m_sprTryExtraStage.Load( THEME->GetPathTo("Graphics",GAMESTATE->IsExtraStage()?"evaluation try extra stage2":"evaluation try extra stage1") );
|
||||
m_sprTryExtraStage.SetXY( TRY_EXTRA_STAGE_X, TRY_EXTRA_STAGE_Y );
|
||||
m_sprTryExtraStage.SetEffectGlowing( 1.0f );
|
||||
m_sprTryExtraStage.SetEffectGlowCamelion( 2.5f );
|
||||
this->AddChild( &m_sprTryExtraStage );
|
||||
|
||||
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","evaluation extra stage") );
|
||||
|
||||
@@ -34,7 +34,7 @@ ScreenLogo::ScreenLogo() : ScreenAttract("ScreenLogo","logo")
|
||||
m_sprLogo.StopTweening();
|
||||
m_sprLogo.BeginTweening( 0.5f ); // sleep
|
||||
m_sprLogo.BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
||||
m_sprLogo.SetEffectGlowing(1, RageColor(1,1,1,0.1f), RageColor(1,1,1,0.3f) );
|
||||
m_sprLogo.SetEffectGlowCamelion(2.5f, RageColor(1,1,1,0.1f), RageColor(1,1,1,0.3f) );
|
||||
m_sprLogo.SetTweenZoom( 1 );
|
||||
this->AddChild( &m_sprLogo );
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ void ScreenOptions::UpdateEnabledDisabled()
|
||||
bThisRowIsSelectedByBoth = false;
|
||||
m_textOptions[i][0].SetDiffuse( bThisRowIsSelectedByBoth ? colorNotSelected : colorSelected );
|
||||
if( bThisRowIsSelectedByBoth )
|
||||
m_textOptions[i][0].SetEffectCamelion( 2.5, colorSelected, colorNotSelected );
|
||||
m_textOptions[i][0].SetEffectDiffuseCamelion( 1.0f, colorSelected, colorNotSelected );
|
||||
else
|
||||
m_textOptions[i][0].SetEffectNone();
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ const unsigned MAX_OPTIONS_PER_LINE = 20;
|
||||
|
||||
// used to pass menu info into this class
|
||||
struct OptionRowData {
|
||||
char szTitle[30];
|
||||
char szTitle[40];
|
||||
unsigned iNumOptions;
|
||||
char szOptionsText[MAX_OPTIONS_PER_LINE][60];
|
||||
char szOptionsText[MAX_OPTIONS_PER_LINE][80];
|
||||
char szExplanation[2048];
|
||||
};
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "GameState.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "AnnouncerManager.h"
|
||||
#include "NoteSkinManager.h"
|
||||
|
||||
#define SONGSEL_SCREEN THEME->GetMetric("ScreenGameplay","SongSelectScreen")
|
||||
|
||||
@@ -28,7 +29,7 @@ enum {
|
||||
PO_TURN,
|
||||
PO_TRANSFORM,
|
||||
PO_SCROLL,
|
||||
PO_COLOR,
|
||||
PO_NOTE_SKIN,
|
||||
PO_HOLD_NOTES,
|
||||
PO_DARK,
|
||||
NUM_PLAYER_OPTIONS_LINES
|
||||
@@ -41,7 +42,7 @@ OptionRowData g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = {
|
||||
{ "Turn", 6, {"OFF","MIRROR","LEFT","RIGHT","SHUFFLE","SUPER SHUFFLE"} },
|
||||
{ "Trans\n-form", 3, {"OFF","LITTLE","BIG"} },
|
||||
{ "Scroll", 2, {"STANDARD","REVERSE"} },
|
||||
{ "Color", 3, {"VIVID","NOTE","FLAT"} },
|
||||
{ "Note\nSkin", 0, {""} },
|
||||
{ "Holds", 2, {"OFF","ON"} },
|
||||
{ "Dark", 2, {"OFF","ON"} },
|
||||
};
|
||||
@@ -68,6 +69,21 @@ ScreenPlayerOptions::ScreenPlayerOptions() :
|
||||
|
||||
void ScreenPlayerOptions::ImportOptions()
|
||||
{
|
||||
//
|
||||
// fill in skin names
|
||||
//
|
||||
CStringArray arraySkinNames;
|
||||
NOTESKIN->GetNoteSkinNames( arraySkinNames );
|
||||
|
||||
m_OptionRowData[PO_NOTE_SKIN].iNumOptions = arraySkinNames.size();
|
||||
|
||||
for( unsigned i=0; i<arraySkinNames.size(); i++ )
|
||||
{
|
||||
arraySkinNames[i].MakeUpper();
|
||||
strcpy( m_OptionRowData[PO_NOTE_SKIN].szOptionsText[i], arraySkinNames[i] );
|
||||
}
|
||||
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
PlayerOptions &po = GAMESTATE->m_PlayerOptions[p];
|
||||
@@ -97,7 +113,22 @@ void ScreenPlayerOptions::ImportOptions()
|
||||
m_iSelectedOption[p][PO_TURN] = po.m_TurnType;
|
||||
m_iSelectedOption[p][PO_TRANSFORM] = po.m_Transform;
|
||||
m_iSelectedOption[p][PO_SCROLL] = po.m_bReverseScroll ? 1 : 0 ;
|
||||
m_iSelectedOption[p][PO_COLOR] = po.m_ColorType;
|
||||
|
||||
|
||||
// highlight currently selected skin
|
||||
m_iSelectedOption[p][PO_NOTE_SKIN] = -1;
|
||||
for( unsigned i=0; i<m_OptionRowData[PO_NOTE_SKIN].iNumOptions; i++ )
|
||||
{
|
||||
if( 0==stricmp(m_OptionRowData[PO_NOTE_SKIN].szOptionsText[i], NOTESKIN->GetCurNoteSkinName((PlayerNumber)p)) )
|
||||
{
|
||||
m_iSelectedOption[p][PO_NOTE_SKIN] = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( m_iSelectedOption[p][PO_NOTE_SKIN] == -1 )
|
||||
m_iSelectedOption[p][PO_NOTE_SKIN] = 0;
|
||||
|
||||
|
||||
m_iSelectedOption[p][PO_HOLD_NOTES] = po.m_bHoldNotes ? 1 : 0;
|
||||
m_iSelectedOption[p][PO_DARK] = po.m_bDark ? 1 : 0;
|
||||
}
|
||||
@@ -134,7 +165,13 @@ void ScreenPlayerOptions::ExportOptions()
|
||||
po.m_TurnType = (PlayerOptions::TurnType)m_iSelectedOption[p][PO_TURN];
|
||||
po.m_Transform = (PlayerOptions::Transform)m_iSelectedOption[p][PO_TRANSFORM];
|
||||
po.m_bReverseScroll = (m_iSelectedOption[p][PO_SCROLL] == 1);
|
||||
po.m_ColorType = (PlayerOptions::ColorType)m_iSelectedOption[p][PO_COLOR];
|
||||
|
||||
|
||||
int iSelectedSkin = m_iSelectedOption[p][PO_NOTE_SKIN];
|
||||
CString sNewSkin = m_OptionRowData[PO_NOTE_SKIN].szOptionsText[iSelectedSkin];
|
||||
NOTESKIN->SwitchNoteSkin( (PlayerNumber)p, sNewSkin );
|
||||
|
||||
|
||||
po.m_bHoldNotes = (m_iSelectedOption[p][PO_HOLD_NOTES] == 1);
|
||||
po.m_bDark = (m_iSelectedOption[p][PO_DARK] == 1);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ ScreenPrompt::ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, bool b
|
||||
m_rectAnswerBox.SetZoomX( m_textAnswer[m_bAnswer].GetWidestLineWidthInSourcePixels()+10.0f );
|
||||
m_rectAnswerBox.SetZoomY( 30 );
|
||||
|
||||
m_textAnswer[m_bAnswer].SetEffectGlowing();
|
||||
m_textAnswer[m_bAnswer].SetEffectGlowCamelion();
|
||||
|
||||
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu prompt") );
|
||||
}
|
||||
@@ -142,7 +142,7 @@ void ScreenPrompt::MenuRight( PlayerNumber pn )
|
||||
|
||||
m_textAnswer[m_bAnswer].SetEffectNone();
|
||||
m_bAnswer = !m_bAnswer;
|
||||
m_textAnswer[m_bAnswer].SetEffectGlowing();
|
||||
m_textAnswer[m_bAnswer].SetEffectGlowCamelion();
|
||||
|
||||
m_rectAnswerBox.StopTweening();
|
||||
m_rectAnswerBox.BeginTweening( 0.2f );
|
||||
|
||||
@@ -218,8 +218,8 @@ void ScreenRanking::SetPage( PageToShow pts )
|
||||
|
||||
if( bRecentHighScore )
|
||||
{
|
||||
m_textNames[l].SetEffectBlinking( 10, TEXT_COLOR, RageColor(1,1,1,1) );
|
||||
m_textScores[l].SetEffectBlinking( 10, TEXT_COLOR, RageColor(1,1,1,1) );
|
||||
m_textNames[l].SetEffectDiffuseBlinking( 10, TEXT_COLOR, RageColor(1,1,1,1) );
|
||||
m_textScores[l].SetEffectDiffuseBlinking( 10, TEXT_COLOR, RageColor(1,1,1,1) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -252,8 +252,8 @@ void ScreenRanking::SetPage( PageToShow pts )
|
||||
pts.nt == GAMESTATE->m_RankingNotesType &&
|
||||
GAMESTATE->m_iRankingIndex[p] == l )
|
||||
{
|
||||
m_textNames[l].SetEffectBlinking();
|
||||
m_textScores[l].SetEffectBlinking();
|
||||
m_textNames[l].SetEffectDiffuseBlinking();
|
||||
m_textScores[l].SetEffectDiffuseBlinking();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -127,12 +127,12 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
|
||||
|
||||
m_sprPicture[c].Load( THEME->GetPathTo("Graphics",sPictureFile) );
|
||||
m_sprPicture[c].SetXY( CHOICE_X(c), CHOICE_Y(c) );
|
||||
m_sprPicture[c].SetVertAlign( align_bottom );
|
||||
m_sprPicture[c].SetVertAlign( align_top );
|
||||
m_framePages.AddChild( &m_sprPicture[c] );
|
||||
|
||||
m_sprHeader[c].Load( THEME->GetPathTo("Graphics",sHeaderFile) );
|
||||
m_sprHeader[c].SetXY( CHOICE_X(c), CHOICE_Y(c) );
|
||||
m_sprHeader[c].SetVertAlign( align_top );
|
||||
m_sprHeader[c].SetVertAlign( align_bottom );
|
||||
m_framePages.AddChild( &m_sprHeader[c] );
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
|
||||
m_sprCursor[p].StopAnimating();
|
||||
m_sprCursor[p].SetState( p );
|
||||
m_sprCursor[p].TurnShadowOff();
|
||||
m_sprCursor[p].SetEffectGlowing();
|
||||
m_sprCursor[p].SetEffectGlowCamelion();
|
||||
m_framePages.AddChild( &m_sprCursor[p] );
|
||||
|
||||
m_sprOK[p].Load( THEME->GetPathTo("Graphics", "select difficulty ok 2x1") );
|
||||
|
||||
@@ -150,27 +150,10 @@ ScreenSelectMusic::ScreenSelectMusic()
|
||||
m_textSongOptions.SetXY( SONG_OPTIONS_X, SONG_OPTIONS_Y );
|
||||
m_textSongOptions.SetZoom( 0.5f );
|
||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||
m_textSongOptions.SetEffectCamelion( 2.5f, RageColor(1,0,0,1), RageColor(1,1,1,1) ); // blink red
|
||||
m_textSongOptions.SetEffectDiffuseCamelion( 2.5f, RageColor(1,0,0,1), RageColor(1,1,1,1) ); // blink red
|
||||
m_textSongOptions.SetDiffuse( RageColor(1,1,1,1) ); // white
|
||||
this->AddChild( &m_textSongOptions );
|
||||
|
||||
/*
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
if( !GAMESTATE->IsPlayerEnabled(p) )
|
||||
continue;
|
||||
|
||||
m_textPlayerOptions[p].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_textPlayerOptions[p].SetXY( PLAYER_OPTIONS_X(p), PLAYER_OPTIONS_Y(p) );
|
||||
m_textPlayerOptions[p].SetZoom( 0.5f );
|
||||
m_textPlayerOptions[p].SetHorizAlign( p==PLAYER_1 ? Actor::align_left : Actor::align_right );
|
||||
m_textPlayerOptions[p].SetVertAlign( Actor::align_middle );
|
||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||
m_textPlayerOptions[p].SetEffectCamelion( 2.5f, RageColor(1,0,0,1), RageColor(1,1,1,1) ); // blink red
|
||||
m_textPlayerOptions[p].SetDiffuse( RageColor(1,1,1,1) ); // white
|
||||
this->AddChild( &m_textPlayerOptions[p] );
|
||||
}
|
||||
*/
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
if( !GAMESTATE->IsPlayerEnabled(p) )
|
||||
@@ -790,7 +773,7 @@ void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn )
|
||||
m_DifficultyIcon[pn].SetFromNotes( pn, pNotes );
|
||||
if( pNotes && pNotes->IsAutogen() )
|
||||
{
|
||||
m_AutoGenIcon[pn].SetEffectCamelion();
|
||||
m_AutoGenIcon[pn].SetEffectDiffuseCamelion();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -184,7 +184,7 @@ void ScreenSelectStyle::BeforeChange()
|
||||
|
||||
void ScreenSelectStyle::AfterChange()
|
||||
{
|
||||
m_sprIcon[m_iSelection]->SetEffectGlowing();
|
||||
m_sprIcon[m_iSelection]->SetEffectGlowCamelion();
|
||||
|
||||
const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef();
|
||||
const StyleDef* pStyleDef = GAMEMAN->GetStyleDefForStyle( m_aPossibleStyles[m_iSelection] );
|
||||
|
||||
@@ -73,7 +73,7 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
m_textHelp.SetText( sHelpText );
|
||||
m_textHelp.SetXY( HELP_X, HELP_Y );
|
||||
m_textHelp.SetZoom( 0.5f );
|
||||
m_textHelp.SetEffectBlinking();
|
||||
m_textHelp.SetEffectDiffuseBlinking();
|
||||
m_textHelp.TurnShadowOn();
|
||||
m_textHelp.SetShadowLength( 2 );
|
||||
this->AddChild( &m_textHelp );
|
||||
@@ -357,6 +357,6 @@ void ScreenTitleMenu::GainFocus( int iChoiceIndex )
|
||||
color1 = COLOR_SELECTED;
|
||||
color2 = color1 * 0.5f;
|
||||
color2.a = 1;
|
||||
m_textChoice[iChoiceIndex].SetEffectCamelion( 2.5f, color1, color2 );
|
||||
m_textChoice[iChoiceIndex].SetEffectDiffuseCamelion( 0.5f, color1, color2 );
|
||||
}
|
||||
|
||||
|
||||
@@ -198,17 +198,17 @@ void Sprite::DrawPrimitives()
|
||||
|
||||
switch( m_HorizAlign )
|
||||
{
|
||||
case align_top: quadVerticies.left = 0; quadVerticies.right = m_size.x; break;
|
||||
case align_middle: quadVerticies.left = -m_size.x/2; quadVerticies.right = m_size.x/2; break;
|
||||
case align_bottom: quadVerticies.left = -m_size.x; quadVerticies.right = 0; break;
|
||||
case align_left: quadVerticies.left = 0; quadVerticies.right = m_size.x; break;
|
||||
case align_center: quadVerticies.left = -m_size.x/2; quadVerticies.right = m_size.x/2; break;
|
||||
case align_right: quadVerticies.left = -m_size.x; quadVerticies.right = 0; break;
|
||||
default: ASSERT( false );
|
||||
}
|
||||
|
||||
switch( m_VertAlign )
|
||||
{
|
||||
case align_bottom: quadVerticies.top = 0; quadVerticies.bottom = m_size.y; break;
|
||||
case align_top: quadVerticies.top = 0; quadVerticies.bottom = m_size.y; break;
|
||||
case align_middle: quadVerticies.top = -m_size.y/2; quadVerticies.bottom = m_size.y/2; break;
|
||||
case align_top: quadVerticies.top = -m_size.y; quadVerticies.bottom = 0; break;
|
||||
case align_bottom: quadVerticies.top = -m_size.y; quadVerticies.bottom = 0; break;
|
||||
default: ASSERT( false );
|
||||
}
|
||||
|
||||
|
||||
@@ -121,11 +121,15 @@ void ResetGame()
|
||||
INPUTMAPPER->ReadMappingsFromDisk();
|
||||
GAMESTATE->m_bPlayersCanJoin = true;
|
||||
|
||||
if( !NOTESKIN->DoesNoteSkinExist( NOTESKIN->GetCurNoteSkinName() ) )
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
CStringArray asNoteSkinNames;
|
||||
NOTESKIN->GetNoteSkinNames( asNoteSkinNames );
|
||||
NOTESKIN->SwitchNoteSkin( asNoteSkinNames[0] );
|
||||
PlayerNumber pn = (PlayerNumber)p;
|
||||
if( !NOTESKIN->DoesNoteSkinExist( NOTESKIN->GetCurNoteSkinName(pn) ) )
|
||||
{
|
||||
CStringArray asNoteSkinNames;
|
||||
NOTESKIN->GetNoteSkinNames( asNoteSkinNames );
|
||||
NOTESKIN->SwitchNoteSkin( pn, asNoteSkinNames[0] );
|
||||
}
|
||||
}
|
||||
if( !THEME->DoesThemeExist( THEME->GetCurThemeName() ) )
|
||||
{
|
||||
|
||||
@@ -1224,16 +1224,16 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
RelativePath=".\HoldGhostArrow.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\HoldJudgement.cpp">
|
||||
RelativePath="HoldJudgment.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\HoldJudgement.h">
|
||||
RelativePath="HoldJudgment.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Judgement.cpp">
|
||||
RelativePath="Judgment.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Judgement.h">
|
||||
RelativePath="Judgment.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="LifeMeter.cpp">
|
||||
|
||||
@@ -324,12 +324,10 @@ RageColor ThemeManager::GetMetricC( CString sClassName, CString sValueName )
|
||||
{
|
||||
float r=1,b=1,g=1,a=1; // initialize in case sscanf fails
|
||||
CString sValue = GetMetric(sClassName,sValueName);
|
||||
char szValue[40];
|
||||
strncpy( szValue, sValue, 39 );
|
||||
int result = sscanf( szValue, "%f,%f,%f,%f", &r, &g, &b, &a );
|
||||
int result = sscanf( GetMetric(sClassName,sValueName), "%f,%f,%f,%f", &r, &g, &b, &a );
|
||||
if( result != 4 )
|
||||
{
|
||||
LOG->Warn( "The color value '%s' for NoteSkin metric '%s : %s' is invalid.", szValue, sClassName.GetString(), sValueName.GetString() );
|
||||
LOG->Warn( "The color value '%s' for NoteSkin metric '%s : %s' is invalid.", GetMetric(sClassName,sValueName), sClassName.GetString(), sValueName.GetString() );
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,8 +51,44 @@ protected:
|
||||
unsigned m_uHashForBaseThemeMetrics;
|
||||
};
|
||||
|
||||
|
||||
|
||||
extern ThemeManager* THEME; // global and accessable from anywhere in our program
|
||||
|
||||
class CachedThemeMetric
|
||||
{
|
||||
CString m_sClassName;
|
||||
CString m_sValueName;
|
||||
bool m_bInited;
|
||||
|
||||
CString m_sValue;
|
||||
int m_iValue;
|
||||
float m_fValue;
|
||||
bool m_bValue;
|
||||
RageColor m_cValue;
|
||||
|
||||
public:
|
||||
CachedThemeMetric( CString sClassName, CString sValueName )
|
||||
{
|
||||
m_sClassName = sClassName;
|
||||
m_sValueName = sValueName;
|
||||
m_bInited = false;
|
||||
}
|
||||
|
||||
void Refresh()
|
||||
{
|
||||
m_sValue = THEME->GetMetric(m_sClassName,m_sValueName);
|
||||
m_iValue = atoi( m_sValue );
|
||||
m_fValue = (float)atof( m_sValue );
|
||||
m_bValue = atoi( m_sValue ) != 0;
|
||||
m_cValue = RageColor(1,1,1,1);
|
||||
sscanf( m_sValue, "%f,%f,%f,%f", &m_cValue.r, &m_cValue.g, &m_cValue.b, &m_cValue.a );
|
||||
m_bInited = true;
|
||||
}
|
||||
|
||||
operator const CString () const { ASSERT(m_bInited); return m_sValue; };
|
||||
operator const int () const { ASSERT(m_bInited); return m_iValue; };
|
||||
operator const float () const { ASSERT(m_bInited); return m_fValue; };
|
||||
operator const bool () const { ASSERT(m_bInited); return m_bValue; };
|
||||
operator const RageColor () const { ASSERT(m_bInited); return m_cValue; };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@ TipDisplay::TipDisplay()
|
||||
LOG->Trace( "TipDisplay::TipDisplay()" );
|
||||
|
||||
m_textTip.LoadFromFont( THEME->GetPathTo("Fonts","help") );
|
||||
m_textTip.SetEffectBlinking();
|
||||
m_textTip.SetEffectDiffuseBlinking();
|
||||
m_textTip.TurnShadowOff();
|
||||
this->AddChild( &m_textTip );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user