Files
itgmania212121/stepmania/src/GhostArrow.cpp
T

68 lines
1.7 KiB
C++
Raw Normal View History

2001-12-01 23:46:09 +00:00
#include "stdafx.h"
/*
-----------------------------------------------------------------------------
Class: GhostArrow
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Ben Nordstrom
Chris Danford
-----------------------------------------------------------------------------
*/
2001-12-01 23:46:09 +00:00
#include "GhostArrow.h"
2002-07-23 01:41:40 +00:00
#include "PrefsManager.h"
2001-12-01 23:46:09 +00:00
#define POP_UP_SECONDS THEME->GetMetricF("GhostArrow","PopUpSeconds")
#define ZOOM_START THEME->GetMetricF("GhostArrow","ZoomStart")
#define ZOOM_END THEME->GetMetricF("GhostArrow","ZoomEnd")
#define COLOR_PERFECT THEME->GetMetricC("GhostArrow","ColorPerfect")
#define COLOR_GREAT THEME->GetMetricC("GhostArrow","ColorGreat")
#define COLOR_GOOD THEME->GetMetricC("GhostArrow","ColorGood")
#define COLOR_BOO THEME->GetMetricC("GhostArrow","ColorBoo")
2001-12-01 23:46:09 +00:00
GhostArrow::GhostArrow()
{
m_fPopUpSeconds = POP_UP_SECONDS;
m_fZoomStart = ZOOM_START;
m_fZoomEnd = ZOOM_END;
m_colorPerfect = COLOR_PERFECT;
m_colorGreat = COLOR_GREAT;
m_colorGood = COLOR_GOOD;
m_colorBoo = COLOR_BOO;
2001-12-01 23:46:09 +00:00
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
2001-12-28 10:15:59 +00:00
TurnShadowOff();
2001-12-01 23:46:09 +00:00
}
2002-02-24 01:43:11 +00:00
void GhostArrow::Update( float fDeltaTime )
{
Sprite::Update( fDeltaTime );
}
void GhostArrow::Step( TapNoteScore score )
2001-12-01 23:46:09 +00:00
{
D3DXCOLOR color;
2001-12-01 23:46:09 +00:00
switch( score )
{
case TNS_PERFECT: color = m_colorPerfect; break;
case TNS_GREAT: color = m_colorGreat; break;
case TNS_GOOD: color = m_colorGood; break;
case TNS_BOO: color = m_colorBoo; break;
case TNS_MISS: // miss should never be passed in here
default:
ASSERT(0);
2001-12-01 23:46:09 +00:00
}
StopTweening();
SetDiffuseColor( color );
SetState( 0 );
SetZoom( m_fZoomStart );
BeginTweening( m_fPopUpSeconds );
SetTweenZoom( m_fZoomEnd );
color.a = 0;
SetTweenDiffuseColor( color );
2001-12-01 23:46:09 +00:00
}