more course fixes, tweaked ghost arrow flashes

This commit is contained in:
Chris Danford
2003-02-17 19:52:16 +00:00
parent 5a179983d1
commit 7cd57efce7
9 changed files with 107 additions and 140 deletions
+30 -48
View File
@@ -16,45 +16,26 @@
#include "ThemeManager.h"
#define SHOW_SECONDS THEME->GetMetricF("GhostArrow","ShowSeconds")
#define ZOOM_START THEME->GetMetricF("GhostArrow","ZoomStart")
#define ZOOM_END THEME->GetMetricF("GhostArrow","ZoomEnd")
#define COLOR_MARVELOUS_START THEME->GetMetricC("GhostArrow","ColorMarvelousStart")
#define COLOR_MARVELOUS_END THEME->GetMetricC("GhostArrow","ColorMarvelousEnd")
#define COLOR_PERFECT_START THEME->GetMetricC("GhostArrow","ColorPerfectStart")
#define COLOR_PERFECT_END THEME->GetMetricC("GhostArrow","ColorPerfectEnd")
#define COLOR_GREAT_START THEME->GetMetricC("GhostArrow","ColorGreatStart")
#define COLOR_GREAT_END THEME->GetMetricC("GhostArrow","ColorGreatEnd")
#define COLOR_GOOD_START THEME->GetMetricC("GhostArrow","ColorGoodStart")
#define COLOR_GOOD_END THEME->GetMetricC("GhostArrow","ColorGoodEnd")
#define COLOR_BOO_START THEME->GetMetricC("GhostArrow","ColorBooStart")
#define COLOR_BOO_END THEME->GetMetricC("GhostArrow","ColorBooEnd")
CachedThemeMetric GA_SHOW_SECONDS ("GhostArrow","ShowSeconds");
CachedThemeMetric GA_ZOOM_START ("GhostArrow","ZoomStart");
CachedThemeMetric GA_ZOOM_END ("GhostArrow","ZoomEnd");
CachedThemeMetric GA_COLOR_MARVELOUS ("GhostArrow","ColorMarvelous");
CachedThemeMetric GA_COLOR_PERFECT ("GhostArrow","ColorPerfect");
CachedThemeMetric GA_COLOR_GREAT ("GhostArrow","ColorGreat");
CachedThemeMetric GA_COLOR_GOOD ("GhostArrow","ColorGood");
CachedThemeMetric GA_COLOR_BOO ("GhostArrow","ColorBoo");
float g_fShowSeconds;
float g_fZoomStart, g_fZoomEnd;
RageColor
g_colorMarvelousStart, g_colorMarvelousEnd,
g_colorPerfectStart, g_colorPerfectEnd,
g_colorGreatStart, g_colorGreatEnd,
g_colorGoodStart, g_colorGoodEnd,
g_colorBooStart, g_colorBooEnd;
GhostArrow::GhostArrow()
{
g_fShowSeconds = SHOW_SECONDS;
g_fZoomStart = ZOOM_START;
g_fZoomEnd = ZOOM_END;
g_colorMarvelousStart = COLOR_MARVELOUS_START;
g_colorMarvelousEnd = COLOR_MARVELOUS_END;
g_colorPerfectStart = COLOR_PERFECT_START;
g_colorPerfectEnd = COLOR_PERFECT_END;
g_colorGreatStart = COLOR_GREAT_START;
g_colorGreatEnd = COLOR_GREAT_END;
g_colorGoodStart = COLOR_GOOD_START;
g_colorGoodEnd = COLOR_GOOD_END;
g_colorBooStart = COLOR_BOO_START;
g_colorBooEnd = COLOR_BOO_END;
GA_SHOW_SECONDS.Refresh();
GA_ZOOM_START.Refresh();
GA_ZOOM_END.Refresh();
GA_COLOR_MARVELOUS.Refresh();
GA_COLOR_PERFECT.Refresh();
GA_COLOR_GREAT.Refresh();
GA_COLOR_GOOD.Refresh();
GA_COLOR_BOO.Refresh();
SetDiffuse( RageColor(1,1,1,0) );
}
@@ -69,30 +50,31 @@ void GhostArrow::Step( TapNoteScore score )
// HACK: set the length of each frame so the animation plays in exactly 1 pop up time.
// We can't do this in the constructor because the image hasn't been loaded yet
for( int i=0; i<Sprite::GetNumStates(); i++ )
Sprite::m_fDelay[i] = g_fShowSeconds / (float)Sprite::GetNumStates();
Sprite::m_fDelay[i] = (float)GA_SHOW_SECONDS / (float)Sprite::GetNumStates();
RageColor colorStart, colorEnd;
RageColor colorStart;
switch( score )
{
case TNS_MARVELOUS: colorStart = g_colorMarvelousStart; colorEnd = g_colorMarvelousEnd; break;
case TNS_PERFECT: colorStart = g_colorPerfectStart; colorEnd = g_colorPerfectEnd; break;
case TNS_GREAT: colorStart = g_colorGreatStart; colorEnd = g_colorGreatEnd; break;
case TNS_GOOD: colorStart = g_colorGoodStart; colorEnd = g_colorGoodEnd; break;
case TNS_BOO: colorStart = g_colorBooStart; colorEnd = g_colorBooEnd; break;
case TNS_MARVELOUS: colorStart = GA_COLOR_MARVELOUS; break;
case TNS_PERFECT: colorStart = GA_COLOR_PERFECT; break;
case TNS_GREAT: colorStart = GA_COLOR_GREAT; break;
case TNS_GOOD: colorStart = GA_COLOR_GOOD; break;
case TNS_BOO: colorStart = GA_COLOR_BOO; break;
case TNS_MISS: // miss should never be passed in here
default:
ASSERT(0);
}
RageColor colorEnd = colorStart;
colorEnd.a = 0;
StopTweening();
SetDiffuse( colorStart );
SetState( 0 );
SetZoom( g_fZoomStart );
SetZoom( GA_ZOOM_START );
BeginTweening( g_fShowSeconds );
SetTweenZoom( g_fZoomEnd );
BeginTweening( (float)GA_SHOW_SECONDS/2.0f );
SetTweenZoom( ((float)GA_ZOOM_START+(float)GA_ZOOM_END)/2.0f );
BeginTweening( (float)GA_SHOW_SECONDS/2.0f );
SetTweenZoom( GA_ZOOM_END );
SetTweenDiffuse( colorEnd );
BeginTweening( 0.0001f ); // snap to invisible
SetTweenDiffuse( RageColor(1,1,1,0) );
}