2002-11-03 07:17:03 +00:00
|
|
|
#ifndef SCOREKEEPER_MAX2_H
|
|
|
|
|
#define SCOREKEEPER_MAX2_H 1
|
|
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: ScoreKeeperMAX2
|
|
|
|
|
|
|
|
|
|
Class to handle scorekeeping, MAX2-style.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
Chris Danford
|
|
|
|
|
Glenn Maynard
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
{
|
2003-09-08 21:32:23 +00:00
|
|
|
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-06-11 19:11:24 +00:00
|
|
|
|
2003-07-08 20:56:25 +00:00
|
|
|
void AddScore( TapNoteScore score );
|
2002-11-07 03:53:54 +00:00
|
|
|
|
2003-09-08 21:32:23 +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 );
|
2003-03-16 18:57:34 +00:00
|
|
|
|
2004-03-11 06:31:30 +00:00
|
|
|
// This must be calculated using only cached radar values so that we can
|
|
|
|
|
// do it quickly.
|
2004-03-21 08:47:21 +00:00
|
|
|
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
|
|
|
|
|
|