00001 #ifndef SCREEN_RANKING_H 00002 #define SCREEN_RANKING_H 00003 00004 #include "ScreenAttract.h" 00005 #include "GameConstantsAndTypes.h" // for NUM_RANKING_LINES 00006 #include "Sprite.h" 00007 #include "BitmapText.h" 00008 #include "Banner.h" 00009 #include "ListDisplay.h" 00010 #include "ActorUtil.h" 00011 #include "Difficulty.h" 00012 00013 class Course; 00014 class Song; 00015 class Trail; 00016 00017 enum PageType 00018 { 00019 PAGE_TYPE_CATEGORY, 00020 PAGE_TYPE_TRAIL, 00021 PAGE_TYPE_ALL_STEPS, 00022 PAGE_TYPE_ALL_COURSES, 00023 NUM_PAGE_TYPES 00024 }; 00025 #define FOREACH_PageType( pt ) FOREACH_ENUM( PageType, NUM_PAGE_TYPES, pt ) 00026 const CString& PageTypeToString( PageType pt ); 00027 00028 00029 class ScreenRanking : public ScreenAttract 00030 { 00031 public: 00032 ScreenRanking( CString sName ); 00033 ~ScreenRanking(); 00034 00035 void HandleScreenMessage( const ScreenMessage SM ); 00036 00037 protected: 00038 virtual bool AutoBeginFadingOut() const { return false; } 00039 00040 struct PageToShow 00041 { 00042 PageToShow() 00043 { 00044 pCourse = NULL; 00045 pTrail = NULL; 00046 } 00047 00048 PageType type; 00049 int colorIndex; 00050 StepsType nt; 00051 RankingCategory category; 00052 Course* pCourse; 00053 Trail* pTrail; 00054 }; 00055 00056 float SetPage( PageToShow pts ); 00057 void TweenPageOnScreen(); 00058 void TweenPageOffScreen(); 00059 00060 00061 Banner m_Banner; // for course 00062 Sprite m_sprBannerFrame; // for course 00063 BitmapText m_textCourseTitle; // for course 00064 BitmapText m_textCategory; // for category 00065 BitmapText m_textStepsType; // for category, course, all_steps 00066 AutoActor m_sprPageType; 00067 00068 Sprite m_sprBullets[NUM_RANKING_LINES]; // for category and course 00069 BitmapText m_textNames[NUM_RANKING_LINES]; // for category and course 00070 BitmapText m_textScores[NUM_RANKING_LINES]; // for category and course 00071 BitmapText m_textPoints[NUM_RANKING_LINES]; // for course 00072 BitmapText m_textTime[NUM_RANKING_LINES]; // for course 00073 AutoActor m_sprDifficulty[NUM_DIFFICULTIES]; // for all_steps 00074 struct StepsScoreRowItem : public ActorFrame // for all_steps 00075 { 00076 Song *m_pSong; 00077 Sprite m_sprSongFrame; 00078 BitmapText m_textSongTitle; 00079 BitmapText m_textStepsScore[NUM_DIFFICULTIES]; 00080 }; 00081 vector<StepsScoreRowItem*> m_vpStepsScoreRowItem; // for all_steps 00082 ListDisplay m_ListScoreRowItems; 00083 AutoActor m_sprCourseDifficulty[NUM_DIFFICULTIES]; // for all_courses 00084 struct CourseScoreRowItem : public ActorFrame // for all_steps 00085 { 00086 Course *m_pCourse; 00087 Sprite m_sprSongFrame; 00088 BitmapText m_textSongTitle; 00089 BitmapText m_textStepsScore[NUM_DIFFICULTIES]; 00090 }; 00091 vector<CourseScoreRowItem*> m_vpCourseScoreRowItem; // for all_courses 00092 ListDisplay m_ListCourseRowItems; 00093 00094 vector<PageToShow> m_vPagesToShow; 00095 vector<Difficulty> m_vDiffsToShow; 00096 }; 00097 00098 #endif 00099 00100 /* 00101 * (c) 2001-2004 Chris Danford, Ben Nordstrom 00102 * All rights reserved. 00103 * 00104 * Permission is hereby granted, free of charge, to any person obtaining a 00105 * copy of this software and associated documentation files (the 00106 * "Software"), to deal in the Software without restriction, including 00107 * without limitation the rights to use, copy, modify, merge, publish, 00108 * distribute, and/or sell copies of the Software, and to permit persons to 00109 * whom the Software is furnished to do so, provided that the above 00110 * copyright notice(s) and this permission notice appear in all copies of 00111 * the Software and that both the above copyright notice(s) and this 00112 * permission notice appear in supporting documentation. 00113 * 00114 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00115 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00116 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00117 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00118 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00119 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00120 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00121 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00122 * PERFORMANCE OF THIS SOFTWARE. 00123 */