00001 /* BPMDisplay - displays a BPM or a range of BPMs. */ 00002 00003 #ifndef BPM_DISPLAY_H 00004 #define BPM_DISPLAY_H 00005 00006 #include "Sprite.h" 00007 #include "song.h" 00008 #include "ActorFrame.h" 00009 #include "BitmapText.h" 00010 #include "Quad.h" 00011 #include "ActorUtil.h" 00012 class Song; 00013 class Course; 00014 00015 class BPMDisplay : public ActorFrame 00016 { 00017 public: 00018 BPMDisplay(); 00019 void Load(); 00020 virtual void Update( float fDeltaTime ); 00021 virtual void DrawPrimitives(); 00022 void SetBPM( const Song* pSong ); 00023 void SetBPM( const Course* pCourse ); 00024 void SetBPM( float fBPM ); 00025 void CycleRandomly(); 00026 void NoBPM(); 00027 00028 protected: 00029 float GetActiveBPM() const; 00030 void SetBPMRange( const DisplayBpms &bpms ); 00031 00032 BitmapText m_textBPM; 00033 AutoActor m_sprLabel; 00034 00035 float m_fBPMFrom, m_fBPMTo; 00036 int m_iCurrentBPM; 00037 vector<float> m_BPMS; 00038 float m_fPercentInState; 00039 float m_fCycleTime; 00040 }; 00041 00042 #endif 00043 00044 /* 00045 * (c) 2001-2002 Chris Danford 00046 * All rights reserved. 00047 * 00048 * Permission is hereby granted, free of charge, to any person obtaining a 00049 * copy of this software and associated documentation files (the 00050 * "Software"), to deal in the Software without restriction, including 00051 * without limitation the rights to use, copy, modify, merge, publish, 00052 * distribute, and/or sell copies of the Software, and to permit persons to 00053 * whom the Software is furnished to do so, provided that the above 00054 * copyright notice(s) and this permission notice appear in all copies of 00055 * the Software and that both the above copyright notice(s) and this 00056 * permission notice appear in supporting documentation. 00057 * 00058 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00059 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00060 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00061 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00062 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00063 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00064 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00065 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00066 * PERFORMANCE OF THIS SOFTWARE. 00067 */