Files
itgmania212121/stepmania/src/Player.h
T

85 lines
2.2 KiB
C++
Raw Normal View History

2002-04-28 20:42:32 +00:00
#pragma once
/*
-----------------------------------------------------------------------------
2002-07-23 01:41:40 +00:00
Class: Player
2002-04-28 20:42:32 +00:00
Desc: Object that accepts pad input, knocks down ColorNotes that were stepped on,
and keeps score for the player.
2002-05-19 01:59:48 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-04-28 20:42:32 +00:00
Chris Danford
-----------------------------------------------------------------------------
*/
2001-11-03 10:52:42 +00:00
2002-06-14 22:25:22 +00:00
#include "PrefsManager.h" // for GameplayStatistics
2002-05-19 01:59:48 +00:00
#include "Notes.h"
#include "Sprite.h"
2002-01-16 10:01:32 +00:00
#include "BitmapText.h"
2001-11-03 10:52:42 +00:00
2001-11-29 11:05:04 +00:00
#include "GrayArrow.h"
#include "GhostArrow.h"
2001-12-28 10:15:59 +00:00
#include "GhostArrowBright.h"
2001-12-19 01:50:57 +00:00
#include "HoldGhostArrow.h"
2001-12-20 12:37:38 +00:00
#include "ActorFrame.h"
2002-03-10 10:30:45 +00:00
#include "RandomSample.h"
2002-07-23 01:41:40 +00:00
#include "ScoreDisplay.h"
2002-04-28 20:42:32 +00:00
#include "LifeMeterBar.h"
2002-02-24 01:43:11 +00:00
#include "Judgement.h"
#include "HoldJudgement.h"
#include "Combo.h"
2002-04-16 17:31:00 +00:00
#include "NoteField.h"
#include "GrayArrowRow.h"
#include "GhostArrowRow.h"
2002-06-24 22:04:31 +00:00
#include "NoteDataWithScoring.h"
2001-11-29 11:05:04 +00:00
2002-10-01 01:53:56 +00:00
#define SAMPLE_COUNT 16
2001-11-29 11:05:04 +00:00
2002-06-24 22:04:31 +00:00
class Player : public NoteDataWithScoring, public ActorFrame
2001-11-03 10:52:42 +00:00
{
public:
2002-02-02 05:11:12 +00:00
Player();
2001-11-03 10:52:42 +00:00
2002-07-28 20:28:37 +00:00
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();
2002-01-16 10:01:32 +00:00
2002-07-28 20:28:37 +00:00
void Load( PlayerNumber player_no, NoteData* pNoteData, LifeMeter* pLM, ScoreDisplay* pScore );
void CrossedRow( int iNoteRow );
void Step( int col );
2001-11-03 10:52:42 +00:00
2002-02-24 01:43:11 +00:00
2002-09-05 03:45:07 +00:00
void FadeToFail();
2002-08-01 21:55:40 +00:00
protected:
2002-07-28 20:28:37 +00:00
int UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat );
void OnRowDestroyed( int col, int iStepIndex );
void HandleNoteScore( TapNoteScore score, int iNumTapsInRow );
void HandleNoteScore( HoldNoteScore score, TapNoteScore TapNoteScore );
2002-07-28 20:28:37 +00:00
static float GetMaxBeatDifference();
2001-12-20 12:37:38 +00:00
PlayerNumber m_PlayerNumber;
2001-12-19 01:50:57 +00:00
2002-07-28 20:28:37 +00:00
int m_iNumTapNotes; // num of TapNotes for the current notes needed by scoring
int m_iTapNotesHit; // number of notes judged so far, needed by scoring
int m_iMeter; // meter of current steps, needed by scoring
2001-11-20 11:49:10 +00:00
2002-10-01 01:53:56 +00:00
float m_fOffset[SAMPLE_COUNT];//for AutoAdjust
int m_iOffsetSample; //
2002-10-01 01:53:56 +00:00
GrayArrowRow m_GrayArrowRow;
NoteField m_NoteField;
GhostArrowRow m_GhostArrowRow;
2002-07-23 01:41:40 +00:00
2002-10-01 01:53:56 +00:00
HoldJudgement m_HoldJudgement[MAX_NOTE_TRACKS];
ActorFrame m_frameJudgement;
Judgement m_Judgement;
2002-07-23 01:41:40 +00:00
2002-10-01 01:53:56 +00:00
ActorFrame m_frameCombo;
Combo m_Combo;
2002-07-23 01:41:40 +00:00
2002-10-01 01:53:56 +00:00
LifeMeter* m_pLifeMeter;
ScoreDisplay* m_pScore;
2002-02-24 01:43:11 +00:00
2001-11-03 10:52:42 +00:00
};