Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ScreenEvaluation.h

Go to the documentation of this file.
00001 /* ScreenEvaluation - Shows the user their score after gameplay has ended. */ 00002 00003 #ifndef SCREEN_EVALUATION_H 00004 #define SCREEN_EVALUATION_H 00005 00006 #include "ScreenWithMenuElements.h" 00007 #include "Sprite.h" 00008 #include "BitmapText.h" 00009 #include "GradeDisplay.h" 00010 #include "Banner.h" 00011 #include "ScoreDisplayNormal.h" 00012 #include "Banner.h" 00013 #include "DifficultyIcon.h" 00014 #include "DifficultyMeter.h" 00015 #include "PercentageDisplay.h" 00016 #include "GraphDisplay.h" 00017 #include "ComboGraph.h" 00018 #include "ActorUtil.h" 00019 #include "ConditionalBGA.h" 00020 #include "HighScore.h" 00021 #include "RageSound.h" 00022 00023 const int MAX_SONGS_TO_SHOW = 5; // In summary, we show last 3 stages, plus extra stages if passed 00024 enum JudgeLine { marvelous, perfect, great, good, boo, miss, ok, max_combo, error, NUM_JUDGE_LINES }; 00025 enum StatsLine { jumps, holds, mines, hands, NUM_STATS_LINES }; 00026 00027 // sound sequences for the evaluation screen 00028 struct EvalSoundSequence 00029 { 00030 float fTime; 00031 RageSound sSound; 00032 }; 00033 00034 class ScreenEvaluation : public ScreenWithMenuElements 00035 { 00036 public: 00037 enum Type { stage, summary, course }; 00038 ScreenEvaluation( CString sClassName ); 00039 virtual void Update( float fDeltaTime ); 00040 virtual void DrawPrimitives(); 00041 virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); 00042 virtual void HandleScreenMessage( const ScreenMessage SM ); 00043 00044 // virtual void TweenOnScreen(); 00045 virtual void TweenOffScreen(); 00046 virtual void MenuLeft( PlayerNumber pn ); 00047 virtual void MenuRight( PlayerNumber pn ); 00048 virtual void MenuBack( PlayerNumber pn ); 00049 virtual void MenuStart( PlayerNumber pn ); 00050 00051 protected: 00052 virtual void Init(); 00053 void CommitScores( 00054 const StageStats &stageStats, 00055 int iPersonalHighScoreIndexOut[NUM_PLAYERS], 00056 int iMachineHighScoreIndexOut[NUM_PLAYERS], 00057 RankingCategory rcOut[NUM_PLAYERS], 00058 PerDifficultyAward pdaToShowOut[NUM_PLAYERS], 00059 PeakComboAward pcaToShowOut[NUM_PLAYERS] ); 00060 void EndScreen(); 00061 00062 Type m_Type; 00063 00064 float m_fScreenCreateTime; 00065 00066 ConditionalBGA m_bgCondBga; 00067 00068 // player name area 00069 BitmapText m_textPlayerName[NUM_PLAYERS]; 00070 00071 // banner area 00072 Banner m_LargeBanner; 00073 AutoActor m_sprLargeBannerFrame; 00074 AutoActor m_sprStage; 00075 DifficultyIcon m_DifficultyIcon[NUM_PLAYERS]; 00076 DifficultyMeter m_DifficultyMeter[NUM_PLAYERS]; 00077 BitmapText m_textPlayerOptions[NUM_PLAYERS]; 00078 AutoActor m_sprDisqualified[NUM_PLAYERS]; 00079 Banner m_SmallBanner[MAX_SONGS_TO_SHOW]; 00080 AutoActor m_sprSmallBannerFrame[MAX_SONGS_TO_SHOW]; 00081 00082 // grade area 00083 AutoActor m_sprGradeFrame[NUM_PLAYERS]; 00084 GradeDisplay m_Grades[NUM_PLAYERS]; 00085 AutoActor m_sprGrade[NUM_PLAYERS]; 00086 00087 // graph area 00088 AutoActor m_sprGraphFrame[NUM_PLAYERS]; 00089 GraphDisplay m_Graph[NUM_PLAYERS]; 00090 00091 // combo area 00092 ComboGraph m_Combo[NUM_PLAYERS]; 00093 00094 // points area 00095 bool m_bNewSongsUnlocked; 00096 PercentageDisplay m_Percent[NUM_PLAYERS]; 00097 AutoActor m_sprPercentFrame[NUM_PLAYERS]; 00098 00099 // bonus area 00100 AutoActor m_sprBonusFrame[NUM_PLAYERS]; 00101 Sprite m_sprPossibleBar[NUM_PLAYERS][NUM_RADAR_CATEGORIES]; 00102 Sprite m_sprActualBar[NUM_PLAYERS][NUM_RADAR_CATEGORIES]; 00103 00104 // survived area 00105 AutoActor m_sprSurvivedFrame[NUM_PLAYERS]; 00106 BitmapText m_textSurvivedNumber[NUM_PLAYERS]; 00107 00108 // win area 00109 AutoActor m_sprWinFrame[NUM_PLAYERS]; 00110 Sprite m_sprWin[NUM_PLAYERS]; 00111 00112 // judgment area 00113 Sprite m_sprJudgeLabels[NUM_JUDGE_LINES]; 00114 BitmapText m_textJudgeNumbers[NUM_JUDGE_LINES][NUM_PLAYERS]; 00115 00116 // stats area 00117 AutoActor m_sprStatsLabel[NUM_STATS_LINES]; 00118 BitmapText m_textStatsText[NUM_STATS_LINES][NUM_PLAYERS]; 00119 00120 // score area 00121 AutoActor m_sprScoreLabel; 00122 BitmapText m_textScore[NUM_PLAYERS]; 00123 00124 // total score area 00125 AutoActor m_sprTotalScoreLabel; 00126 BitmapText m_textTotalScore[NUM_PLAYERS]; 00127 00128 // time area 00129 AutoActor m_sprTimeLabel; 00130 BitmapText m_textTime[NUM_PLAYERS]; 00131 00132 // extra area 00133 AutoActor m_sprMachineRecord[NUM_PLAYERS]; 00134 AutoActor m_sprPersonalRecord[NUM_PLAYERS]; 00135 bool m_bTryExtraStage; 00136 AutoActor m_sprTryExtraStage; 00137 AutoActor m_PerDifficultyAward[NUM_PLAYERS]; 00138 AutoActor m_PeakComboAward[NUM_PLAYERS]; 00139 bool m_bFailed; 00140 00141 RageSound m_soundStart; // sound played if the player passes or fails 00142 00143 // sound effects for other gametypes 00144 RageSound m_sndPassFail; // sound played if the player passes or fails 00145 bool m_bPassFailTriggered; // has the pass / fail sound been played yet? 00146 RageTimer m_timerSoundSequences; // timer used for triggering sounds. 00147 vector<EvalSoundSequence> m_SoundSequences; // a sequence of sounds to be played (although they're stored in no particular order!) 00148 00149 HighScore m_HighScore[NUM_PLAYERS]; 00150 bool m_bSavedScreenshot[NUM_PLAYERS]; 00151 }; 00152 00153 #endif 00154 00155 /* 00156 * (c) 2001-2004 Chris Danford 00157 * All rights reserved. 00158 * 00159 * Permission is hereby granted, free of charge, to any person obtaining a 00160 * copy of this software and associated documentation files (the 00161 * "Software"), to deal in the Software without restriction, including 00162 * without limitation the rights to use, copy, modify, merge, publish, 00163 * distribute, and/or sell copies of the Software, and to permit persons to 00164 * whom the Software is furnished to do so, provided that the above 00165 * copyright notice(s) and this permission notice appear in all copies of 00166 * the Software and that both the above copyright notice(s) and this 00167 * permission notice appear in supporting documentation. 00168 * 00169 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00170 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00171 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00172 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00173 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00174 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00175 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00176 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00177 * PERFORMANCE OF THIS SOFTWARE. 00178 */

Generated on Thu Jan 27 20:57:31 2005 for StepMania by doxygen 1.3.7