Files
itgmania212121/stepmania/src/ScoreKeeperMAX2.h
T

78 lines
3.0 KiB
C++
Raw Normal View History

2004-05-31 21:35:31 +00:00
/* ScoreKeeperMAX2 - MAX2-style scorekeeping. */
2002-11-03 07:17:03 +00:00
#ifndef SCOREKEEPER_MAX2_H
2004-05-31 21:35:31 +00:00
#define SCOREKEEPER_MAX2_H
2002-11-03 07:17:03 +00:00
#include "ScoreKeeper.h"
#include "NoteDataWithScoring.h"
2003-08-03 00:13:55 +00:00
class Steps;
2002-11-03 07:17:03 +00:00
class ScoreKeeperMAX2: public ScoreKeeper
{
int m_iScoreRemainder;
2003-06-23 22:05:24 +00:00
int m_iMaxPossiblePoints;
2004-05-24 04:26:54 +00:00
int m_iTapNotesHit; // number of notes judged so far, needed by scoring
2002-11-03 07:17:03 +00:00
2003-06-18 04:24:12 +00:00
int m_iNumTapsAndHolds;
int m_iMaxScoreSoFar; // for nonstop scoring
int m_iPointBonus; // the difference to award at the end
int m_iCurToastyCombo;
bool m_bIsLastSongInCourse;
2003-03-16 20:55:45 +00:00
2004-05-24 03:41:39 +00:00
const vector<Steps*>& apSteps;
2003-07-08 20:56:25 +00:00
void AddScore( TapNoteScore score );
2002-11-07 03:53:54 +00:00
/* Configuration: */
/* Score after each tap will be rounded to the nearest m_iRoundTo; 1 to do nothing. */
int m_iRoundTo;
int m_ComboBonusFactor[NUM_TAP_NOTE_SCORES];
2002-11-03 07:17:03 +00:00
public:
2004-05-24 03:41:39 +00:00
ScoreKeeperMAX2( const vector<Song*>& apSongs, const vector<Steps*>& apSteps, const vector<AttackArray> &asModifiers, PlayerNumber pn);
2003-03-26 23:08:05 +00:00
2003-07-21 19:07:10 +00:00
// before a song plays (called multiple times if course)
2004-05-24 03:41:39 +00:00
void OnNextSong( int iSongInCourseIndex, const Steps* pSteps, const NoteData* pNoteData );
2002-11-03 07:17:03 +00:00
2004-01-02 08:43:14 +00:00
void HandleTapScore( TapNoteScore score );
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow );
2003-07-08 20:56:25 +00:00
void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
2004-03-11 06:31:30 +00:00
// This must be calculated using only cached radar values so that we can
// do it quickly.
static int GetPossibleDancePoints( const RadarValues& fRadars );
static int GetPossibleDancePoints( const RadarValues& fOriginalRadars, const RadarValues& fPostRadars );
2004-03-11 06:31:30 +00:00
2003-08-13 19:51:53 +00:00
private:
2004-03-11 06:31:30 +00:00
static int TapNoteScoreToDancePoints( TapNoteScore tns );
static int HoldNoteScoreToDancePoints( HoldNoteScore hns );
2002-11-03 07:17:03 +00:00
};
#endif
2004-05-31 21:35:31 +00:00
/*
* (c) 2001-2004 Chris Danford, Glenn Maynard
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons to
* whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/