#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 ----------------------------------------------------------------------------- */ #include "GhostArrow.h" #include "PrefsManager.h" #define SHOW_SECONDS THEME->GetMetricF("GhostArrow","ShowSeconds") #define ZOOM_START THEME->GetMetricF("GhostArrow","ZoomStart") #define ZOOM_END THEME->GetMetricF("GhostArrow","ZoomEnd") #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") float g_fShowSeconds; float g_fZoomStart, g_fZoomEnd; D3DXCOLOR 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_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; SetDiffuse( D3DXCOLOR(1,1,1,0) ); } void GhostArrow::Update( float fDeltaTime ) { Sprite::Update( fDeltaTime ); } 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