00001 /* DifficultyMeter - A meter represention of how hard a Steps is. */ 00002 00003 #ifndef DIFFICULTY_METER_H 00004 #define DIFFICULTY_METER_H 00005 00006 #include "BitmapText.h" 00007 #include "PlayerNumber.h" 00008 #include "ActorFrame.h" 00009 #include "GameConstantsAndTypes.h" 00010 #include "ActorUtil.h" 00011 #include "Difficulty.h" 00012 00013 class Steps; 00014 class Trail; 00015 00016 00017 class DifficultyMeter: public ActorFrame 00018 { 00019 public: 00020 DifficultyMeter(); 00021 00022 void Load(); 00023 void SetFromGameState( PlayerNumber pn ); 00024 void SetFromMeterAndDifficulty( int iMeter, Difficulty dc ); 00025 void SetFromSteps( const Steps* pSteps ); 00026 void SetFromTrail( const Trail* pTrail ); 00027 void Unset(); 00028 00029 private: 00030 void SetFromDifficulty( Difficulty dc ); 00031 void SetFromCourseDifficulty( CourseDifficulty cd ); 00032 00033 void SetDifficulty( CString diff ); 00034 BitmapText m_textFeet; 00035 00036 CString m_CurDifficulty; 00037 AutoActor m_Difficulty; 00038 00039 BitmapText m_textMeter; 00040 00041 int m_iNumFeetInMeter, m_iMaxFeetInMeter, m_iGlowIfMeterGreaterThan; 00042 bool m_bShowFeet, m_bShowDifficulty, m_bShowMeter, m_bFeetIsDifficultyColor, m_bFeetPerDifficulty; 00043 }; 00044 00045 #endif 00046 00047 /* 00048 * (c) 2001-2004 Chris Danford, Glenn Maynard 00049 * All rights reserved. 00050 * 00051 * Permission is hereby granted, free of charge, to any person obtaining a 00052 * copy of this software and associated documentation files (the 00053 * "Software"), to deal in the Software without restriction, including 00054 * without limitation the rights to use, copy, modify, merge, publish, 00055 * distribute, and/or sell copies of the Software, and to permit persons to 00056 * whom the Software is furnished to do so, provided that the above 00057 * copyright notice(s) and this permission notice appear in all copies of 00058 * the Software and that both the above copyright notice(s) and this 00059 * permission notice appear in supporting documentation. 00060 * 00061 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00062 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00063 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00064 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00065 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00066 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00067 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00068 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00069 * PERFORMANCE OF THIS SOFTWARE. 00070 */