2002-04-28 20:42:32 +00:00
|
|
|
#pragma once
|
2002-04-16 17:31:00 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: NoteField
|
|
|
|
|
|
2002-04-28 20:42:32 +00:00
|
|
|
Desc: A stream of ColorNotes that scrolls past Y==0.
|
2002-04-16 17:31:00 +00:00
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
2002-04-16 17:31:00 +00:00
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "Sprite.h"
|
|
|
|
|
#include "ActorFrame.h"
|
|
|
|
|
#include "Song.h"
|
|
|
|
|
#include "BitmapText.h"
|
|
|
|
|
#include "ThemeManager.h"
|
|
|
|
|
#include "StyleDef.h"
|
2002-04-28 20:42:32 +00:00
|
|
|
#include "ColorNote.h"
|
2002-04-16 17:31:00 +00:00
|
|
|
#include "BitmapText.h"
|
2002-05-19 01:59:48 +00:00
|
|
|
#include "Quad.h"
|
2002-04-16 17:31:00 +00:00
|
|
|
#include "ArrowEffects.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class NoteField : public NoteData, public ActorFrame
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
NoteField();
|
|
|
|
|
virtual void Update( float fDeltaTime, float fSongBeat );
|
2002-05-19 01:59:48 +00:00
|
|
|
virtual void DrawPrimitives();
|
2002-04-16 17:31:00 +00:00
|
|
|
|
|
|
|
|
enum NoteFieldMode {
|
|
|
|
|
MODE_DANCING,
|
|
|
|
|
MODE_EDITING,
|
|
|
|
|
};
|
|
|
|
|
|
2002-05-27 08:23:27 +00:00
|
|
|
void Load( NoteData* pNoteData, PlayerNumber p, StyleDef* pStyleDef, PlayerOptions po, float fNumArrowsToDrawBehind, float fNumArrowsToDrawAhead, NoteFieldMode mode );
|
2002-04-16 17:31:00 +00:00
|
|
|
void RemoveTapNoteRow( int iIndex );
|
|
|
|
|
void SetHoldNoteLife( int iIndex, float fLife );
|
|
|
|
|
|
|
|
|
|
float m_HoldNoteLife[MAX_HOLD_NOTE_ELEMENTS]; // 1.0 = full life, 0 = dead
|
|
|
|
|
|
|
|
|
|
float m_fBeginMarker, m_fEndMarker; // only used with MODE_EDIT
|
|
|
|
|
|
2002-06-27 17:49:10 +00:00
|
|
|
float m_fOverrideAlpha; // -1 of not overriding
|
|
|
|
|
|
2002-04-16 17:31:00 +00:00
|
|
|
protected:
|
2002-04-28 20:42:32 +00:00
|
|
|
inline void CreateTapNoteInstance( ColorNoteInstance &cni, const int iCol, const float fIndex, const D3DXCOLOR color = D3DXCOLOR(-1,-1,-1,-1) );
|
|
|
|
|
inline void CreateHoldNoteInstance( ColorNoteInstance &cni, const bool bActive, const float fIndex, const HoldNote &hn, const float fHoldNoteLife );
|
2002-04-16 17:31:00 +00:00
|
|
|
inline void DrawMeasureBar( const int iIndex, const int iMeasureNo );
|
|
|
|
|
inline void DrawMarkerBar( const int iIndex );
|
2002-06-29 11:59:09 +00:00
|
|
|
inline void DrawBPMText( const int iIndex, const float fBPM );
|
|
|
|
|
inline void DrawFreezeText( const int iIndex, const float fBPM );
|
2002-04-16 17:31:00 +00:00
|
|
|
|
|
|
|
|
PlayerOptions m_PlayerOptions;
|
|
|
|
|
|
|
|
|
|
float m_fNumBeatsToDrawBehind;
|
|
|
|
|
float m_fNumBeatsToDrawAhead;
|
|
|
|
|
|
|
|
|
|
float m_fSongBeat;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NoteFieldMode m_Mode;
|
|
|
|
|
|
|
|
|
|
// color arrows
|
2002-04-28 20:42:32 +00:00
|
|
|
ColorNote m_ColorNote[MAX_NOTE_TRACKS];
|
2002-04-16 17:31:00 +00:00
|
|
|
|
|
|
|
|
// used in MODE_EDIT
|
2002-06-14 22:25:22 +00:00
|
|
|
Quad m_rectMeasureBar;
|
2002-04-16 17:31:00 +00:00
|
|
|
BitmapText m_textMeasureNumber;
|
2002-06-14 22:25:22 +00:00
|
|
|
Quad m_rectMarkerBar;
|
2002-04-16 17:31:00 +00:00
|
|
|
};
|