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

ScoreKeeperMAX2.h

Go to the documentation of this file.
00001 /* ScoreKeeperMAX2 - MAX2-style scorekeeping. */ 00002 00003 #ifndef SCORE_KEEPER_MAX2_H 00004 #define SCORE_KEEPER_MAX2_H 00005 00006 #include "ScoreKeeper.h" 00007 #include "Attack.h" 00008 #include "song.h" 00009 #include "Steps.h" 00010 class Steps; 00011 00012 class ScoreKeeperMAX2: public ScoreKeeper 00013 { 00014 int m_iScoreRemainder; 00015 int m_iMaxPossiblePoints; 00016 int m_iTapNotesHit; // number of notes judged so far, needed by scoring 00017 00018 int m_iNumTapsAndHolds; 00019 int m_iMaxScoreSoFar; // for nonstop scoring 00020 int m_iPointBonus; // the difference to award at the end 00021 int m_iCurToastyCombo; 00022 bool m_bIsLastSongInCourse; 00023 00024 const vector<Steps*>& apSteps; 00025 00026 void AddScore( TapNoteScore score ); 00027 00028 /* Configuration: */ 00029 /* Score after each tap will be rounded to the nearest m_iRoundTo; 1 to do nothing. */ 00030 int m_iRoundTo; 00031 int m_ComboBonusFactor[NUM_TAP_NOTE_SCORES]; 00032 00033 public: 00034 ScoreKeeperMAX2( 00035 const vector<Song*>& apSongs, 00036 const vector<Steps*>& apSteps, 00037 const vector<AttackArray> &asModifiers, 00038 PlayerState* pPlayerState, 00039 PlayerStageStats* pPlayerStageStats ); 00040 00041 // before a song plays (called multiple times if course) 00042 void OnNextSong( int iSongInCourseIndex, const Steps* pSteps, const NoteData* pNoteData ); 00043 00044 void HandleTapScore( TapNoteScore score ); 00045 void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow ); 00046 void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ); 00047 00048 // This must be calculated using only cached radar values so that we can 00049 // do it quickly. 00050 static int GetPossibleDancePoints( const RadarValues& fRadars ); 00051 static int GetPossibleDancePoints( const RadarValues& fOriginalRadars, const RadarValues& fPostRadars ); 00052 00053 private: 00054 static int TapNoteScoreToDancePoints( TapNoteScore tns ); 00055 static int HoldNoteScoreToDancePoints( HoldNoteScore hns ); 00056 00057 }; 00058 00059 #endif 00060 00061 /* 00062 * (c) 2001-2004 Chris Danford, Glenn Maynard 00063 * All rights reserved. 00064 * 00065 * Permission is hereby granted, free of charge, to any person obtaining a 00066 * copy of this software and associated documentation files (the 00067 * "Software"), to deal in the Software without restriction, including 00068 * without limitation the rights to use, copy, modify, merge, publish, 00069 * distribute, and/or sell copies of the Software, and to permit persons to 00070 * whom the Software is furnished to do so, provided that the above 00071 * copyright notice(s) and this permission notice appear in all copies of 00072 * the Software and that both the above copyright notice(s) and this 00073 * permission notice appear in supporting documentation. 00074 * 00075 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00076 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00077 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00078 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00079 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00080 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00081 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00082 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00083 * PERFORMANCE OF THIS SOFTWARE. 00084 */

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